Modificare il file:
\iwgallery\admin\inc_pictures_edit.asp
<% If LCase(Request.Cookies("IWGalleryAccess")) <> "amministratore" Then Response.Redirect("logout.asp?reason=Accesso negato") %> <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT> function Thumbnail(tmb_suff,tmb_filename) Dim tmb_NewFilename, tmb_Path, tmb_PosPath, tmb_PosExt if not isnull(tmb_filename) then tmb_PosPath = InStrRev(tmb_filename,"/") tmb_Path = "" if tmb_PosPath > 0 then tmb_Path = mid(tmb_filename,1,tmb_PosPath) end if tmb_PosExt = InStrRev(tmb_filename,".") if tmb_PosExt > 0 then tmb_NewFilename = tmb_Path & mid(tmb_filename,tmb_PosPath+1,tmb_PosExt-(tmb_PosPath+1)) & tmb_suff & ".jpg" else tmb_NewFilename = tmb_Path & mid(tmb_filename,tmb_PosPath+1,len(tmb_filename)-tmb_PosPath) & tmb_suff & ".jpg" end if end if Thumbnail = tmb_NewFilename end function </SCRIPT> <!--#include virtual="/iwgallery/Connections/connIWGallery.asp" --> <!--#include virtual="/iwgallery/ScriptLibrary/incResizeAddOn.asp" --> <!--#include virtual="/iwgallery/ScriptLibrary/incPUAddOn.asp" --> <!--#include virtual="/iwgallery/ScriptLibrary/incPureUpload.asp" --> <% '*** Pure ASP File Upload 2.2.1 Dim GP_uploadAction,UploadQueryString PureUploadSetup If (CStr(Request.QueryString("GP_upload")) <> "") Then Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,pau_progressHeight pau_thePath = """" & strPublicPath & """" pau_Extensions = "GIF,JPG,JPEG,BMP,PNG" pau_Form = "form1" pau_Redirect = "" pau_storeType = "file" pau_sizeLimit = "" pau_nameConflict = "uniq" pau_requireUpload = "false" pau_minWidth = "" pau_minHeight = "" pau_maxWidth = "" pau_maxHeight = "" pau_saveWidth = "PIC_WIDTH" pau_saveHeight = "PIC_HEIGHT" pau_timeout = "600" pau_progressBar = "default.htm" pau_progressWidth = "300" pau_progressHeight = "100" Dim RequestBin, UploadRequest CheckPureUploadVersion 2.21 ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout end if %> <% ' *** Smart Image Processor 1.1.3 If (CStr(Request.QueryString("GP_upload")) <> "") Then Dim RUF_Component, RUF_DotNetResize, RUF_ResizeImages, RUF_AspectImages, RUF_maxWidth, RUF_maxHeight, RUF_Quality, RUF_MakeThumb, RUF_AspectThumb, RUF_Suffix, RUF_maxWidthThumb, RUF_maxHeightThumb, RUF_QualityThumb, RUF_RedirectURL RUF_Component = "AUTO" RUF_DotNetResize = "../ScriptLibrary/ResizeImage.aspx" RUF_ResizeImages = true RUF_AspectImages = true RUF_maxWidth = UploadFormRequest("MAX_WIDTH") RUF_maxHeight = UploadFormRequest("MAX_HEIGHT") RUF_Quality = UploadFormRequest("MAX_QUALITY") RUF_MakeThumb = true RUF_AspectThumb = true RUF_Suffix = "_small" RUF_maxWidthThumb = UploadFormRequest("MAX_THUMB") RUF_maxHeightThumb = UploadFormRequest("MAX_THUMB") RUF_QualityThumb = UploadFormRequest("MAX_QUALITY") RUF_RedirectURL = "" if RUF_ResizeImages then ResizeUploadedFiles RUF_Component, RUF_DotNetResize, pau_thePath, "", RUF_maxWidth, RUF_maxHeight, RUF_Quality, true, pau_saveWidth, pau_saveHeight, RUF_AspectImages, pau_nameConflict, "" end if if RUF_MakeThumb then ResizeUploadedFiles RUF_Component, RUF_DotNetResize, pau_thePath, RUF_Suffix, RUF_maxWidthThumb, RUF_maxHeightThumb, RUF_QualityThumb, false, pau_saveWidth, pau_saveHeight, RUF_AspectThumb, pau_nameConflict, "" end if if RUF_RedirectURL <> "" then Response.Redirect RUF_RedirectURL end if end if %> <% ' *** Edit Operations: (Modified for File Upload) declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (UploadQueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(UploadQueryString) End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Update Record: (Modified for File Upload) set variables If (CStr(UploadFormRequest("MM_update")) = "form1" And CStr(UploadFormRequest("MM_recordId")) <> "") Then MM_editConnection = MM_connIWGallery_STRING MM_editTable = "PICTURES" MM_editColumn = "PIC_ID" MM_recordId = "" + UploadFormRequest("MM_recordId") + "" MM_editRedirectUrl = "pictures_listing.asp" If UploadFormRequest("PIC_APPROVED") = "" Then MM_editRedirectUrl = "pictures_listing.asp" MM_fieldsStr = "PIC_FILE|value|PIC_TITLE|value|PIC_DESCRIPTION|value|PIC_URL|value|PIC_APPROVED|value|PIC_ACTIVE|value|PIC_WIDTH|value|PIC_HEIGHT|value|PIC_CATEGORY|value|PIC_LISTING|value" MM_columnsStr = "PIC_FILE|',none,''|PIC_TITLE|',none,''|PIC_DESCRIPTION|',none,''|PIC_URL|',none,''|PIC_APPROVED|none,1,0|PIC_ACTIVE|none,1,0|PIC_WIDTH|none,none,NULL|PIC_HEIGHT|none,none,NULL|PIC_CATEGORY|none,none,NULL|PIC_LISTING|',none,''" ' create the MM_fields and MM_columns arrays MM_columnsStr = FixColumnsForUpload(MM_fieldsStr,MM_columnsStr) MM_fieldsStr = FixFieldsForUpload(MM_fieldsStr,MM_columnsStr) MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) = CStr(UploadFormRequest(MM_fields(MM_i))) Next ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And UploadQueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And UploadQueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString End If End If End If %> <% ' *** Delete Old Files Before Update Record 1.6.0 If (CStr(UploadFormRequest("MM_update")) <> "" And CStr(UploadFormRequest("MM_recordId")) <> "") Then Dim DOF_path, DOF_suffix DOF_path = strPublicPath DOF_suffix = "_small" DeleteFileBeforeUpdate DOF_path,MM_fieldsStr,MM_columnsStr,MM_editConnection,MM_editTable,MM_editColumn,MM_recordId,DOF_suffix end if %> <% ' *** Update Record: (Modified for File Upload) construct a sql update statement and execute it If (CStr(UploadFormRequest("MM_update")) <> "" And CStr(UploadFormRequest("MM_recordId")) <> "") Then ' create the sql update statement MM_editQuery = "update " & MM_editTable & " set " For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray = Split(MM_columns(MM_i+1),",") MM_delim = MM_typeArray(0) If (MM_delim = "none") Then MM_delim = "" MM_altVal = MM_typeArray(1) If (MM_altVal = "none") Then MM_altVal = "" MM_emptyVal = MM_typeArray(2) If (MM_emptyVal = "none") Then MM_emptyVal = "" If (MM_formVal = "") Then MM_formVal = MM_emptyVal Else If (MM_altVal <> "") Then MM_formVal = MM_altVal ElseIf (MM_delim = "'") Then ' escape quotes MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'" Else MM_formVal = MM_delim + MM_formVal + MM_delim End If End If If (MM_i <> LBound(MM_fields)) Then MM_editQuery = MM_editQuery & "," End If MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal Next MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId If (Not MM_abortEdit) Then ' notify user If CStr(UploadFormRequest("PIC_APPROVED")) = "1" AND CStr(UploadFormRequest("PIC_NOTIFY")) = "1" Then MailPictured UploadFormRequest("USE_EMAIL"), UploadFormRequest("USE_NAME"), UploadFormRequest("PIC_NAME"), UploadFormRequest("CAT_FULL") End If ' execute the update Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim rsEdit__varData rsEdit__varData = "0" If (Request.QueryString("iData") <> "") Then rsEdit__varData = Request.QueryString("iData") End If %> <% Dim rsEdit Dim rsEdit_numRows Set rsEdit = Server.CreateObject("ADODB.Recordset") rsEdit.ActiveConnection = MM_connIWGallery_STRING rsEdit.Source = "SELECT * FROM PICTURES, USERS WHERE PIC_USER = USE_NAME AND PIC_ID = " + Replace(rsEdit__varData, "'", "''") + "" rsEdit.CursorType = 0 rsEdit.CursorLocation = 2 rsEdit.LockType = 1 rsEdit.Open() rsEdit_numRows = 0 %> <% Dim rsChannelCats__varCat rsChannelCats__varCat = "0" If (Request.QueryString("iCat") <> "") Then rsChannelCats__varCat = Request.QueryString("iCat") End If %> <% set rsChannelCats = Server.CreateObject("ADODB.Recordset") rsChannelCats.ActiveConnection = MM_connIWGallery_STRING rsChannelCats.Source = "SELECT * FROM CATEGORIES WHERE CAT_PARENT = " + Replace(rsChannelCats__varCat, "'", "''") + " ORDER BY CAT_NAME ASC" rsChannelCats.CursorType = 0 rsChannelCats.CursorLocation = 2 rsChannelCats.LockType = 3 rsChannelCats.Open() rsChannelCats_numRows = 0 %> <% set rsChannelSubs = Server.CreateObject("ADODB.Recordset") rsChannelSubs.ActiveConnection = MM_connIWGallery_STRING rsChannelSubs.Source = "SELECT * FROM CATEGORIES ORDER BY CAT_NAME ASC" rsChannelSubs.CursorType = 0 rsChannelSubs.CursorLocation = 2 rsChannelSubs.LockType = 3 rsChannelSubs.Open() rsChannelSubs_numRows = 0 %> <% Dim HLooper1__numRows HLooper1__numRows = -2 Dim HLooper1__index HLooper1__index = 0 rsChannelCats_numRows = rsChannelCats_numRows + HLooper1__numRows %> <script language="javascript" src="../ScriptLibrary/OpenImage.js"></script> <script language="javascript" src="../ScriptLibrary/incPureUpload.js"></script> <script language="JavaScript" type="text/JavaScript"> <!-- function WAAddError(formElement,errorMsg,focusIt,stopIt) { if (document.WAFV_Error) { document.WAFV_Error += "\n" + errorMsg; } else { document.WAFV_Error = errorMsg; } if (!document.WAFV_InvalidArray) { document.WAFV_InvalidArray = new Array(); } document.WAFV_InvalidArray[document.WAFV_InvalidArray.length] = formElement; if (focusIt && !document.WAFV_Focus) { document.WAFV_Focus = focusIt; } if (stopIt == 1) { document.WAFV_Stop = true; } else if (stopIt == 2) { formElement.WAFV_Continue = true; } else if (stopIt == 3) { formElement.WAFV_Stop = true; formElement.WAFV_Continue = false; } } function WAValidateFE(formElement,value,errorMsg,extensions,focusIt,stopIt,required) { var isValid = true; extensions = extensions.replace(/\s*,\s*/g,","); var ExtensionArr = extensions.split(","); if ((!document.WAFV_Stop && !formElement.WAFV_Stop) && !(!required && value=="")) { isValid = false; if (value.lastIndexOf(".") > 0) { value = value.substring(value.lastIndexOf(".")); for (var n=0; n<ExtensionArr.length; n++) { ExtensionArr[n] = ExtensionArr[n].replace(/ /g,""); if (value.toLowerCase() == ExtensionArr[n].toLowerCase()) { isValid = true; } } } } if (!isValid) { WAAddError(formElement,errorMsg,focusIt,stopIt); } } function WAValidateNM(formElement,errorMsg,minLength,maxLength,allowDecimals,roundDecimals,reformatDecimals,punctuationMarks,focusIt,stopIt,required) { var isValid = true; var theThousand = punctuationMarks.charAt(0); var theDecimal = punctuationMarks.charAt(1); var theCheck = 11/10; var trueDecimal = (String(theCheck).charAt(1)); var value = formElement.value; var decimalIndex = value.length; if (punctuationMarks.indexOf(trueDecimal)<0 && value.indexOf(trueDecimal)>=0) { isValid = false; } if (value.lastIndexOf(theDecimal)>=0) { decimalIndex = value.lastIndexOf(theDecimal); } while (value.indexOf(theThousand)>=0) { decimalIndex = value.length; if (value.lastIndexOf(theDecimal)>=0) { decimalIndex = value.lastIndexOf(theDecimal); } if ((decimalIndex-(value.lastIndexOf(theThousand)+1))%3 != 0) isValid = false; value = value.substring(0,value.lastIndexOf(theThousand)) + value.substring(value.lastIndexOf(theThousand)+1); } if (trueDecimal != theDecimal) { while (value.indexOf(theDecimal)>=0) { value = value.substring(0,value.indexOf(theDecimal)) + trueDecimal + value.substring(value.indexOf(theDecimal)+1); } } if ((!document.WAFV_Stop && !formElement.WAFV_Stop) && !(!required && value=="")) { for (var x=0; x<value.length; x++) { if ((value.charAt(x)<0 || value.charAt(x) > 9) && (value.charAt(x) != " " && value.charAt(x) != "," && value.charAt(x) != ".")) { isValid = false; } } if (value == "") { isValid = false; } var oldVal = String(value); if (oldVal.indexOf(trueDecimal)>=0) { while (oldVal.charAt(oldVal.length-1)=="0" || oldVal.charAt(oldVal.length-1) == trueDecimal) { if (oldVal.charAt(oldVal.length-1) == trueDecimal) { oldVal = oldVal.substring(0,oldVal.length-1); break; } else oldVal = oldVal.substring(0,oldVal.length-1); } if (oldVal.indexOf(trueDecimal)==0) oldVal = "0" + oldVal; } if (String(allowDecimals) !="" ) { if (String(value).indexOf(".") > 0 && ((String(value).indexOf(".") + allowDecimals + 2 <= String(value).length) || allowDecimals == 0)) { isValid = false; } } value = parseFloat(value); if (isNaN(value)) { isValid = false; } else if (String(value).length!=String(oldVal).length) { isValid = false; } else if ((minLength != "" && minLength > value) || (maxLength != "" && maxLength < value)) { isValid = false; } } if (!isValid) { WAAddError(formElement,errorMsg,focusIt,stopIt); } else { if (value != "") { if (roundDecimals != "") { value = Math.round(value*roundDecimals)/roundDecimals; } if (reformatDecimals != "") { value = String(value); if (value.indexOf(trueDecimal)<0) value += trueDecimal; if (value.indexOf(trueDecimal) < value.length - reformatDecimals) { value = value.substring(0,value.indexOf(trueDecimal) + reformatDecimals + 1); } else { while (value.indexOf(trueDecimal) > value.length - reformatDecimals - 1) { value += "0"; } } } } if (trueDecimal != theDecimal) { value = String(value); while (value.indexOf(trueDecimal)>=0) { value = value.substring(0,value.indexOf(trueDecimal)) + theDecimal + value.substring(value.indexOf(trueDecimal)+1); } } if (roundDecimals != "" || reformatDecimals != "") formElement.value = value; } } function WAAlertErrors(errorHead,errorFoot,setFocus,submitForm) { if (!document.WAFV_StopAlert) { document.WAFV_StopAlert = true; if (document.WAFV_InvalidArray) { document.WAFV_Stop = true; var errorMsg = document.WAFV_Error; if (errorHead!="") errorMsg = errorHead + "\n" + errorMsg; if (errorFoot!="") errorMsg += "\n" + errorFoot; document.MM_returnValue = false; if (document.WAFV_Error!="") alert(errorMsg.replace(/"/g,'"')); else if (submitForm) submitForm.submit(); if (setFocus && document.WAFV_Focus) { document.tempFocus = document.WAFV_Focus; setTimeout("document.tempFocus.focus();setTimeout('document.WAFV_Stop = false;document.WAFV_StopAlert = false;',1)",1); } else { document.WAFV_Stop = false; document.WAFV_StopAlert = false; } for (var x=0; x<document.WAFV_InvalidArray.length; x++) { document.WAFV_InvalidArray[x].WAFV_Stop = false; } } else { document.WAFV_Stop = false; document.WAFV_StopAlert = false; if (submitForm) { submitForm.submit(); } document.MM_returnValue = true; } document.WAFV_Focus = false; document.WAFV_Error = false; document.WAFV_InvalidArray = false; } } //--> </script> <script language="JavaScript" type="text/JavaScript"> <!-- function WAValidateUR(formElement,value,errorMsg,force,reformat,focusIt,stopIt,required) { var isValid = true; if ((!document.WAFV_Stop && !formElement.WAFV_Stop) && !(!required && value=="")) { if (force.toLowerCase() == "none") { if (value.indexOf(":")>=0) isValid = false; } if (value.indexOf("?")!=value.lastIndexOf("?") || value.indexOf(" ") >= 0) { isValid = false; } if (isValid) { var valURL = value; if (valURL.indexOf(":")>=0) { valURL = valURL.substring(valURL.indexOf(":")+1); } if (valURL.indexOf("?")>0) { valURL = valURL.substring(0,valURL.indexOf("?")); } if (valURL.indexOf(";") >= 0 || valURL.indexOf(":") >= 0 || valURL.indexOf("&") >= 0 || valURL.indexOf("=") >= 0 || valURL.indexOf(",") >= 0) { isValid = false; } } if (force.toLowerCase() != "false" && force.toLowerCase() != "none" && isValid) { force = force.replace(/\s*,\s*/g,","); force = force.split(","); isValid = false; for (var x=0; x<force.length && !isValid; x++) { if (value.toLowerCase().indexOf(force[x].toLowerCase())==0) isValid = true; } } } if (required && value=="") isValid = false; if (!isValid) { WAAddError(formElement,errorMsg,focusIt,stopIt); } else { if (reformat!="none" && String(reformat).toLowerCase() != "false") { if (value.indexOf(reformat)!=0) { if (value.indexOf(":")>=0) { value = value.substring(value.indexOf(":")+1); while (value.charAt(0)=="/") value = value.substring(1); } formElement.value = reformat+value; } } else if (String(reformat).toLowerCase()=="false") { if (value.indexOf(":")>=0) { value = value.substring(value.indexOf(":")+1); while (value.charAt(0)=="/") value = value.substring(1); formElement.value = value; } } } } //--> </script> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="box"> <tr> <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="1" class="box-header"><img src="../themes/<%= strTheme %>/box-header-left.jpg"></td> <td width="100%" class="box-header"><a href="pictures_listing.asp?iChannel=<%= Request.QueryString("iChannel") %>&nChannel=<%= Request.QueryString("nChannel") %>">Immagini</a> › Modifica</td> <td width="1" class="box-header"><img src="../themes/<%= strTheme %>/box-header-right.jpg"></td> </tr> </table></td> </tr> <tr> <td align="left" valign="top" class="box-main"><% If Not rsChannelCats.EOF Or Not rsChannelCats.BOF Then %> <table width="100%" border="0" cellspacing="1" cellpadding="0" class="content"> <tr> <td>Seleziona una categoria parent per l'immagine</td> </tr> </table> <table width="100%"> <% startrw = 0 endrw = HLooper1__index numberColumns = 2 numrows = -1 while((numrows <> 0) AND (Not rsChannelCats.EOF)) startrw = endrw + 1 endrw = endrw + numberColumns %> <tr valign="top"> <% While ((startrw <= endrw) AND (Not rsChannelCats.EOF)) %> <td width="50%" align="left" valign="top"><table border="0" cellspacing="1" cellpadding="0" class="content"> <tr> <td valign="baseline"><img src="../images/icon_folder.gif" alt="Categoria" border="0"></td> <td><a href="pictures_edit.asp?iData=<%= Request.QueryString("iData") %>&iCat=<%=(rsChannelCats.Fields.Item("CAT_ID").Value)%>&lCat=.<%=(rsChannelCats.Fields.Item("CAT_ID").Value)%>.<%= Request.QueryString("lCat") %>"><strong><%=(rsChannelCats.Fields.Item("CAT_NAME").Value)%></strong></a><br> <% Dim rsChannelSubs__numRows rsChannelSubs__numRows = 3 Dim rsChannelSubs__index rsChannelSubs__index = 0 rsChannelSubs_numRows = rsChannelSubs_numRows + rsChannelSubs__numRows rsChannelSubs.Filter = "CAT_PARENT=" & rsChannelCats.Fields.Item("CAT_ID").Value %> <% While ((rsChannelSubs__numRows <> 0) AND (NOT rsChannelSubs.EOF)) %> <%=(rsChannelSubs.Fields.Item("CAT_NAME").Value)%> <% If rsChannelSubs__index - 1 > 0 Then Response.Write("...") Else Response.Write(", ") End If %> <% rsChannelSubs__index=rsChannelSubs__index+1 rsChannelSubs__numRows=rsChannelSubs__numRows-1 rsChannelSubs.MoveNext() Wend %></td> </tr> </table></td> <% startrw = startrw + 1 rsChannelCats.MoveNext() Wend %> </tr> <% numrows=numrows-1 Wend %> </table> <% End If ' end Not rsChannelCats.EOF Or NOT rsChannelCats.BOF %> <% If Request.QueryString("iCat") > 0 Then %> <br> <form ACTION="<%=MM_editAction%>" method="post" enctype="multipart/form-data" name="form1" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',false,'','','','','','PIC_WIDTH','PIC_HEIGHT');WAValidateFE(document.form1.PIC_FILE,document.form1.PIC_FILE.value,'* Il campo File accetta le seguenti estensioni: .gif, .jpg, .jpeg, .bmp, .png','.gif, .jpg, .jpeg, .bmp, .png',document.form1.PIC_FILE,0,false);WAValidateUR(document.form1.PIC_URL,document.form1.PIC_URL.value,'* Il campo Link deve iniziare con http:// o https://','http://, https://','none',document.form1.PIC_URL,0,false);WAValidateNM(document.form1.MAX_WIDTH,'* Il campo Larghezza è obbligatorio ed accetta un valore compreso tra 100 e 1600',100,1600,0,'','',' ,',document.form1.MAX_WIDTH,0,true);WAValidateNM(document.form1.MAX_HEIGHT,'* Il campo Altezza è obbligatorio ed accetta un valore compreso tra 100 e 1600',100,1600,0,'','',' ,',document.form1.MAX_HEIGHT,0,true);WAValidateNM(document.form1.MAX_THUMB,'* Il campo Miniatura è obbligatorio ed accetta un valore compreso tra 60 e 320',60,320,0,'','',' ,',document.form1.MAX_THUMB,0,true);WAValidateNM(document.form1.MAX_QUALITY,'* Il campo Qualità è obbligatorio ed accetta un valore compreso tra 10 e 100',10,100,0,'','',' ,',document.form1.MAX_QUALITY,0,true);WAAlertErrors('','',true,false);showProgressWindow('../progress/<%= strProgress %>/default.htm',300,100);return document.MM_returnValue"> <table border="0" align="center" cellpadding="0" cellspacing="1" class="content"> <tr valign="baseline"> <td nowrap align="right"> </td> <td align="right" colspan="2"><a href="pictures_edit.asp?iData=<%= Request.QueryString("iData") %>"><img src="../images/icon_edit.gif" alt="Cambia Categoria" border="0" align="absmiddle">Cambia Categoria?</a></td> </tr> <tr valign="baseline"> <td nowrap align="right">Categoria:</td> <td colspan="2"><% FillArray For i = UBound(arrayId) to 0 Step - 1 If NOT arrayId(i) = "" then Response.Write "<strong>" & (arrayName(i)) & "</strong> › " End If Next %> <input name="CAT_FULL" type="hidden" id="CAT_FULL" value="<% FillArray For i = UBound(arrayId) to 0 Step - 1 If NOT arrayId(i) = "" then Response.Write (arrayName(i)) & " › " End If Next %>"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">Autore:</td> <td colspan="2"><span class="evidence"><%=(rsEdit.Fields.Item("PIC_USER").Value)%></span> <input name="USE_EMAIL" type="hidden" id="USE_EMAIL" value="<%=(rsEdit.Fields.Item("USE_EMAIL").Value)%>"> <input name="USE_NAME" type="hidden" id="USE_NAME" value="<%=(rsEdit.Fields.Item("USE_NAME").Value)%>"></td> </tr> <tr valign="baseline" <% If (rsEdit.Fields.Item("PIC_APPROVED").Value) = 0 Then Response.Write("style='display:none;'") %>> <td nowrap align="right">File:</td> <td colspan="2"><input name="PIC_FILE" type="file" id="PIC_FILE" onChange="checkOneFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',false,'','','','','','PIC_WIDTH','PIC_HEIGHT')" value="" size="48"></td> </tr> <tr valign="baseline"> <td align="right" valign="top" nowrap>File attuale: </td> <td colspan="2"><a href="javascript:OpenImage('<%= strPublicPath %>/<%=(rsEdit.Fields.Item("PIC_FILE").Value)%>')"><img src="<%= strPublicPath %>/<%= Thumbnail("_small",(rsEdit.Fields.Item("PIC_FILE").Value)) %>" alt="<%=(rsEdit.Fields.Item("PIC_FILE").Value)%>" border="0"></a> <input name="PIC_NAME" type="hidden" id="PIC_NAME" value="<%=(rsEdit.Fields.Item("PIC_FILE").Value)%>"> </td> </tr> <tr> <td nowrap align="right">Titolo:</td> <td colspan="2"><input name="PIC_TITLE" type="text" id="PIC_TITLE" value="<%=(rsEdit.Fields.Item("PIC_TITLE").Value)%>" size="48"></td> </tr> <tr> <td nowrap align="right" valign="top">Descrizione:</td> <td colspan="2" valign="baseline"><textarea name="PIC_DESCRIPTION" cols="48" rows="5" id="PIC_DESCRIPTION"><%=(rsEdit.Fields.Item("PIC_DESCRIPTION").Value)%></textarea> </td> </tr> <tr> <td nowrap align="right">Link:</td> <td colspan="2"><input name="PIC_URL" type="text" id="PIC_URL" value="<%=(rsEdit.Fields.Item("PIC_URL").Value)%>" size="48"> </td> </tr> <tr> <td nowrap align="right">*Larghezza: </td> <td width="96"><input name="MAX_WIDTH" type="text" id="MAX_WIDTH" value="<%= strImgFullWidth %>" size="4" maxlength="4"> px Max</td> <td width="200" rowspan="5" valign="top"><p><strong>Note</strong>:<br> <span class="evidence">1</span>. Nel campo Descrizione è possibile usare UBB Code (es. [b]questo testo verrà stampato in grassetto[/b]). <br> <span class="evidence">2</span>. I valori di default per il ridimensionamento immagine vengono modificati nella pagina <a href="../admin/configuration.asp">Configurazione</a></p></td> </tr> <tr> <td nowrap align="right">*Altezza:</td> <td><input name="MAX_HEIGHT" type="text" id="MAX_HEIGHT" value="<%= strImgFullHeight %>" size="4" maxlength="4"> px Max</td> </tr> <tr> <td nowrap align="right">*Miniatura:</td> <td><input name="MAX_THUMB" type="text" id="MAX_THUMB" value="<%= strImgThumb %>" size="4" maxlength="3"> px Max</td> </tr> <tr> <td nowrap align="right">*Qualità:</td> <td><input name="MAX_QUALITY" type="text" id="MAX_QUALITY" value="<%= strImgQuality %>" size="4" maxlength="3"> %</td> </tr> <tr> <% If (rsEdit.Fields.Item("PIC_APPROVED").Value) = 0 Then %> <td nowrap align="right"><input name="PIC_APPROVED" type="checkbox" id="PIC_APPROVED" value=1></td> <td>Approvata? <input name="PIC_ACTIVE" type="hidden" value="1"> <input name="PIC_NOTIFY" type="hidden" value="1"></td> <% End If %> <% If (rsEdit.Fields.Item("PIC_APPROVED").Value) = 1 Then %> <td nowrap align="right"><input <%If (CStr((rsEdit.Fields.Item("PIC_ACTIVE").Value)) = CStr("1")) Then Response.Write("checked") : Response.Write("")%> name="PIC_ACTIVE" type="checkbox" id="PIC_ACTIVE" value=1></td> <td>Attiva? <input name="PIC_APPROVED" type="hidden" value="1"> <input name="PIC_NOTIFY" type="hidden" value="0"></td> <% End If %> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td colspan="2"><input name="Submit" type="submit" id="Submit" value="Salva modifiche" class="button"> <input name="PIC_WIDTH" type="hidden" id="PIC_WIDTH" value="<%=(rsEdit.Fields.Item("PIC_WIDTH").Value)%>"> <input name="PIC_HEIGHT" type="hidden" id="PIC_HEIGHT" value="<%=(rsEdit.Fields.Item("PIC_HEIGHT").Value)%>"></td> </tr> </table> <input type="hidden" name="PIC_CATEGORY" value="<%= Request.QueryString("iCat") %>" size="32"> <input type="hidden" name="PIC_LISTING" value="<%= Request.QueryString("lCat") %>" size="32"> <input type="hidden" name="MM_update" value="form1"> <input type="hidden" name="MM_recordId" value="<%= rsEdit.Fields.Item("PIC_ID").Value %>"> </form> <% End If %> </td> </tr> <tr> <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="1" align="left" class="box-bottom"><img src="../themes/<%= strTheme %>/box-bottom-left.jpg"></td> <td width="100%" class="box-bottom"><img src="../images/shim.gif" width="1" height="1"></td> <td width="1" align="right" class="box-bottom"><img src="../themes/<%= strTheme %>/box-bottom-right.jpg"></td> </tr> </table></td> </tr> </table> <% rsEdit.Close() Set rsEdit = Nothing %> <% rsChannelCats.Close() Set rsChannelCats = Nothing %> <% rsChannelSubs.Close() Set rsChannelSubs = Nothing %>
[
Íàçàä
]