home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
74.208.221.89
/
74.208.221.89.zip
/
74.208.221.89
/
manage
/
addflipkart.aspx
next >
Wrap
Text File
|
2015-03-28
|
3KB
|
105 lines
<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDB" %>
<%@ Import namespace="System.IO" %>
<script runat="server">
Dim mycon As New conValue()
Dim permissions As String
Dim K As Integer
Dim swidth,sheight As Integer
Dim sqlstr,stype,sheader,sheadertype,sfields,scolratio,scaption,tablehead,dropdownstring As String
Dim sheader1(),sfields1(),scolratio1(),sheadertype1() As String
Dim str1,str2,str3 As String
Dim i,z As Integer
Dim loc As String
Dim loc1 As String
Dim qr As String
Dim language As String
Dim exclfile As String
Dim exltype As String
Dim fileloc As String
Dim filename As String
Sub page_load()
If (Request.Cookies("gen") Is Nothing) Then
'Response.Redirect("logout.aspx")
End If
Response.Cookies("cart").Value = Request.QueryString("store")
'Checking user action. If no user action provide upload option
qr = trim(Request.Querystring("qr"))
language = trim(Request.Querystring("language"))
filename = trim(Request.Querystring("filename"))
' Storing folder path
loc = Server.MapPath(".")
loc1 = loc & "\language.xls"
End Sub
Sub SubmitButton_Click(Source As Object, e As EventArgs)
Dim uploadedFiles As HttpFileCollection = Request.Files
Dim i As Integer = 0
Do Until i = uploadedFiles.Count
Dim userPostedFile As HttpPostedFile = uploadedFiles(i)
Try
If (userPostedFile.ContentLength > 0) Then
filename = Path.GetFileName(userPostedFile.FileName)
userPostedFile.SaveAs(loc & "\" & Path.GetFileName(userPostedFile.FileName))
End If
Catch ex As Exception
End Try
i += 1
Loop
Response.Redirect("importExcelRead.aspx?qr=1&language=" & Trim(Request.QueryString("language")) & "&filename=" & filename)
End Sub
</Script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
<link href="ncss.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form runat="server">
<table width="100%" border="0" cellspacing="10" cellpadding="0">
<tr>
<td height="40" align="left" class="text1">Add Offers From Flip Kart. The excel file needs to be downloaded from Flip Kart Offers.</td>
</tr>
<tr>
<td align="left">
<input name="File" Type="File" class="btn btn-default" id="file1" runat="Server">
</td>
</tr>
<tr>
<td align="left"><asp:Button CssClass="button1" ID="Button1" runat="server" Text="Add Products" onClick="SubmitButton_Click" qvalue="button1"/></td>
</tr>
<tr>
<td align="left"></td>
</tr>
<tr>
<td align="left">
<a href="importf.aspx">ADD PRODUCTS THROUGH FTP</a></td>
</tr>
<tr>
<td align="left"></td>
</tr>
</table>
</form>
</body>
</html>