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 >
Text File  |  2014-12-10  |  3KB  |  97 lines

  1. <%@ Page Language="VB" Debug="true" %>
  2. <%@ Import Namespace="System.Data" %>
  3. <%@ Import Namespace="System.Data.OleDB" %>
  4. <%@ Import namespace="System.IO" %>
  5. <script runat="server">
  6. Dim mycon As New conValue()
  7. Dim permissions As String
  8. Dim K As Integer
  9. Dim swidth,sheight As Integer
  10. Dim sqlstr,stype,sheader,sheadertype,sfields,scolratio,scaption,tablehead,dropdownstring As String
  11. Dim sheader1(),sfields1(),scolratio1(),sheadertype1() As String
  12. Dim str1,str2,str3 As String
  13. Dim i,z As Integer
  14. Dim loc As String
  15. Dim loc1 As String
  16. Dim qr As String
  17. Dim language As String
  18. Dim exclfile As String
  19. Dim exltype As String
  20. Dim fileloc As String
  21. Dim filename As String
  22. Sub page_load()
  23. If (Request.Cookies("gen") Is Nothing) Then
  24. 'Response.Redirect("logout.aspx")
  25. End If
  26. swidth = Request.Cookies("screen")("width")
  27. sheight = Request.Cookies("screen")("height")
  28. swidth= ((swidth / 100) * 85) - 25
  29. sheight= (sheight - 220)
  30. 'Response.Write(swidth)
  31. permissions = Request.Cookies("gen")("permissions")
  32. 'Response.Write(sqlstr)
  33.  
  34.  
  35. 'Checking user action. If no user action provide upload option
  36. qr = trim(Request.Querystring("qr")) 
  37. language = trim(Request.Querystring("language"))
  38. filename = trim(Request.Querystring("filename"))
  39. ' Storing folder path
  40. loc = Server.MapPath(".")
  41. loc1 = loc & "\language.xls"
  42.  
  43.  
  44.  
  45.  
  46. End Sub
  47. Sub SubmitButton_Click(Source As Object, e As EventArgs)
  48.     Dim uploadedFiles As HttpFileCollection = Request.Files    
  49.  
  50.        Dim i As Integer = 0
  51.         Do Until i = uploadedFiles.Count
  52.           Dim userPostedFile As HttpPostedFile = uploadedFiles(i)
  53.           
  54.           Try
  55.              If (userPostedFile.ContentLength > 0) Then
  56.                    filename = Path.GetFileName(userPostedFile.FileName)
  57.                 userPostedFile.SaveAs(loc & "\" & Path.GetFileName(userPostedFile.FileName))
  58.               End If
  59.           Catch ex As Exception
  60.           End Try
  61.           i += 1
  62.        Loop       
  63.     Response.Redirect ("importExcelRead.aspx?qr=1&language=" & trim(Request.Querystring("language")) & "&filename=" & filename)
  64.     End Sub
  65. </Script>
  66. <!DOCTYPE html>
  67. <html lang="en-us">
  68.       <head>
  69.                <!--#include file="header.ascx" -->
  70.     </head>
  71.     <body class="fixed-header fixed-navigation fixed-footer fixed-ribbon smart-style-4">
  72.         <!-- possible classes: minified, fixed-ribbon, fixed-header, fixed-width-->
  73.  
  74.         <!--#include file="topmenu.ascx" -->
  75.  
  76.         <!--#include file="leftnavigation.ascx" -->
  77.  
  78.         <!-- MAIN PANEL -->
  79.         <div id="main" role="main">
  80.  
  81.            <!--#include file="ribbon.ascx" -->
  82.  
  83.            <!--#include file="importexcel1.ascx" -->
  84.  
  85.         </div>
  86.         <!-- END MAIN PANEL -->
  87.  
  88.         <!--#include file="pagefooter.ascx" -->
  89.  
  90.        <!--#include file="shortcutarea.ascx" -->
  91.         <!--#include file="formfooter.ascx" -->
  92.  
  93.  
  94.  
  95.     </body>
  96.  
  97. </html>