|
hotel_add_imgs.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include virtual="/dwzUpload/DefineVariable.asp" --> <% '********************************* '* * '* ONLY UPLOAD * '* http://www.DwZone.it * '* * '********************************* server.ScriptTimeout = 5400
Dim RG_Connection, RG_editColumn, RG_recordId, Form, editAction, editRedirectUrl, RG_Files, RG_formName, UploadType, ParamVal, ParamList, MaxFieldNumber, TmpVal, x, y, Key, ProgressBar, UploadStatus, NumFile Dim RG_altVal, RG_columns, RG_Cong, RG_dbValues, RG_dbValuesTmp, RG_delim, RG_editCmd, RG_editQuery, RG_editQueryTmp, RG_emptyVal, RG_Ext, RG_Extensions, RG_fields, RG_FieldValueTmp, RG_FileDel, RG_FileExt, RG_formVal, RG_FS, RG_i, RG_L, RG_Len, RG_Max, RG_Name, RG_New, RG_newName, RG_Num, RG_Path, RG_Rec, RG_ret, RG_Save, RG_tableValues, RG_tableValuesTmp, RG_tst, RG_typeArray, RG_z, newFileName, newThumbName Dim tmpField_Name(), tmpValue_Name(), tmpField_Size(), tmpValue_Size(), QtyRecord, TotalFileSize, valueToRedirectSend
Set Form = New ASPForm UploadID = Form.NewUploadID ProgressBar = "" TotalFileSize = "" editRedirectUrl = "hotel_add_imgs1.asp" RG_Files = "/public/;1;;;;1;;1;;;;0;;;;;1;;1;thumbnail|/public/;1;;;;1;;1;;;;0;;;;;1;;1;thumbnail1|/public/;1;;;;1;;1;;;;0;;;;;1;;1;thumbnail2@_@_@0@_@_@0@_@_@0;;;80;0;;;80;0;_small;0;0;0;;;80;0;_small;0|0;;;80;0;;;80;0;_small;0;0;0;;;80;0;_small;0|0;;;80;0;;;80;0;_small;0;0;0;;;80;0;_small;0@_@_@../" RG_formName = "form1" UploadType="Upload" UploadStatus = "" valueToRedirectSend = "" NumFile = 0
if len(Request.QueryString("UploadID"))>0 then Form.UploadID = Request.QueryString("UploadID") end if if (Request.QueryString <> "") Then editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) & "?" & Request.QueryString & "&UploadID=" & UploadID else editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) & "?UploadID=" & UploadID End If Const fsCompletted = 0
If Form.State = fsCompletted Then if Form.State = 0 then Set ParamVal = CreateObject("Scripting.Dictionary") tmp = split(RG_Files,"@_@_@") ParamList = split(tmp(0),"|") MaxFieldNumber = ubound(ParamList) for x=0 to Ubound(ParamList) TmpVal = Split(ParamList(x),";") for y=0 to ubound(TmpVal) Key = right("00" & cstr(x),3) & cstr(y) ParamVal.add Key, TmpVal(y) next next Form.Files.Save response.write(getRedirect()) response.end End If ElseIf Form.State > 10 then response.write "<br><Font Color=red>Some form error.<br>Error code: " & Form.State & "<br>Error List:<br>0 Form was successfully processed. <br>1 Request method is NOT post <br>2 Zero length request (there are no data in a source form) <br>3 Form is in a middle of process. <br>5 Initial form state <br>11 Boundary of multipart/form-data is not specified. <br>12 Unknown source form (Content-type must be multipart/form-data) <br>15 Client was disconnected before upload was completted.<br>16 Unexpected error from Request.BinaryRead method (ASP error).<br></Font><br>" End If
function GetFolderName(str): GetFolderName = Ris : end function
function myGetFileName(str): myGetFileName = Ris : end function %> <!--#include virtual="/Connections/my_conn.asp" --> <!--#include virtual="/includes/tNG/tNG.inc.asp" --> <!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>Pompei Tour Organizer - Sezione di amministrazione</title> <link href="css/master.css" rel="stylesheet" type="text/css" media="all" /> </head>
<body> <div id="container"> <!--#include virtual="/admin/header.inc"--> <div id="main"> <form onSubmit="return ProgressBar()" ACTION="<%=editAction%>" id="form1" name="form1" enctype="multipart/form-data" method="post" > <input name="thumbnail" type="file" id="thumbnail" onChange="dwz_setEvent(this,'change')" onClick="dwz_setEvent(this,'click')" /> <input name="thumbnail1" type="file" id="thumbnail1" onChange="dwz_setEvent(this,'change')" onClick="dwz_setEvent(this,'click')" /> <input name="thumbnail2" type="file" id="thumbnail2" onChange="dwz_setEvent(this,'change')" onClick="dwz_setEvent(this,'click')" /> <input type="submit" value="submit" name="dwzSubmit" /> </form> </div> </div> <div id="footer"> <div id="footer-content"> Pompei tour organizer </div> </div> </body> </html> <!--#include virtual="dwzUpload/Upload.asp" --> <!--#include virtual="dwzUpload/UploadAdvanced.asp" --> <!--#include virtual="dwzUpload/Resize.asp" -->
hotel_add_imgs1.asp <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% response.write request.form response.end %> <table border="1" cellspacing="0" cellpadding="3"> <tr> <td>File Name</td> <td>File Size (byte)</td> <td align="center">Upload Status</td> <td align="center">Renamed</td> </tr> <% for J=1 to request("NumFile") %> <tr> <td><%=request("FileName_" & J)%></td> <td><%=request("FileSize_" & J)%></td> <td align="center"><%=getFileStatus(request("FileStatus_" & J))%></td> <td align="center"><%=getNewFileName(request("NewFileName_" & J))%></td> </tr> <% next %> </table>
<% function getFileStatus(status) select case status case "0" getFileStatus = "File saved" case "1" getFileStatus = "File size exceed" case "2" getFileStatus = "File extension not allowed" case "3" getFileStatus = "File size exceed and<br>File extension not allowed" case "4" getFileStatus = "File exist" end select end function function getNewFileName(opt) if opt = "0" then getNewFileName = "No" elseif opt = "-1" then getNewFileName = "Yes" end if end function
%>
|
|
|
|
|