home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
74.208.221.89
/
74.208.221.89.zip
/
74.208.221.89
/
manage
/
importExcel.aspx
< prev
next >
Wrap
Text File
|
2014-12-10
|
3KB
|
97 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
swidth = Request.Cookies("screen")("width")
sheight = Request.Cookies("screen")("height")
swidth= ((swidth / 100) * 85) - 25
sheight= (sheight - 220)
'Response.Write(swidth)
permissions = Request.Cookies("gen")("permissions")
'Response.Write(sqlstr)
'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>
<html lang="en-us">
<head>
<!--#include file="header.ascx" -->
</head>
<body class="fixed-header fixed-navigation fixed-footer fixed-ribbon smart-style-4">
<!-- possible classes: minified, fixed-ribbon, fixed-header, fixed-width-->
<!--#include file="topmenu.ascx" -->
<!--#include file="leftnavigation.ascx" -->
<!-- MAIN PANEL -->
<div id="main" role="main">
<!--#include file="ribbon.ascx" -->
<!--#include file="importexcel1.ascx" -->
</div>
<!-- END MAIN PANEL -->
<!--#include file="pagefooter.ascx" -->
<!--#include file="shortcutarea.ascx" -->
<!--#include file="formfooter.ascx" -->
</body>
</html>