Modificare il file:
\iwgallery\admin\inc_home.asp
<% If LCase(Request.Cookies("IWGalleryAccess")) <> "amministratore" Then Response.Redirect("logout.asp?reason=Accesso negato") %> <!--#include virtual="/iwgallery/ScriptLibrary/incPureUpload.asp" --> <% pau_AutoCreatePath(Server.MapPath(strPublicPath & "/_templates")) %> <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> <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT> function DoDateTime(str, nNamedFormat, nLCID) dim strRet dim nOldLCID strRet = str If (nLCID > -1) Then oldLCID = Session.LCID End If On Error Resume Next If (nLCID > -1) Then Session.LCID = nLCID End If If ((nLCID < 0) Or (Session.LCID = nLCID)) Then strRet = FormatDateTime(str, nNamedFormat) End If If (nLCID > -1) Then Session.LCID = oldLCID End If DoDateTime = strRet End Function </SCRIPT> <!--#include virtual="/iwgallery/Connections/connIWGallery.asp" --> <% Dim rsUsers Dim rsUsers_numRows Set rsUsers = Server.CreateObject("ADODB.Recordset") rsUsers.ActiveConnection = MM_connIWGallery_STRING rsUsers.Source = "SELECT * FROM USERS WHERE USE_APPROVED = 0 ORDER BY USE_DATED" rsUsers.CursorType = 0 rsUsers.CursorLocation = 2 rsUsers.LockType = 1 rsUsers.Open() rsUsers_numRows = 0 %> <% Dim rsPictures Dim rsPictures_numRows Set rsPictures = Server.CreateObject("ADODB.Recordset") rsPictures.ActiveConnection = MM_connIWGallery_STRING rsPictures.Source = "SELECT * FROM PICTURES, USERS WHERE PIC_APPROVED = 0 AND PIC_USER = USE_NAME" rsPictures.CursorType = 0 rsPictures.CursorLocation = 2 rsPictures.LockType = 1 rsPictures.Open() rsPictures_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rsUsers_numRows = rsUsers_numRows + Repeat1__numRows %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = -1 Repeat2__index = 0 rsPictures_numRows = rsPictures_numRows + Repeat2__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rsUsers_total Dim rsUsers_first Dim rsUsers_last ' set the record count rsUsers_total = rsUsers.RecordCount ' set the number of rows displayed on this page If (rsUsers_numRows < 0) Then rsUsers_numRows = rsUsers_total Elseif (rsUsers_numRows = 0) Then rsUsers_numRows = 1 End If ' set the first and last displayed record rsUsers_first = 1 rsUsers_last = rsUsers_first + rsUsers_numRows - 1 ' if we have the correct record count, check the other stats If (rsUsers_total <> -1) Then If (rsUsers_first > rsUsers_total) Then rsUsers_first = rsUsers_total End If If (rsUsers_last > rsUsers_total) Then rsUsers_last = rsUsers_total End If If (rsUsers_numRows > rsUsers_total) Then rsUsers_numRows = rsUsers_total End If End If %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rsPictures_total Dim rsPictures_first Dim rsPictures_last ' set the record count rsPictures_total = rsPictures.RecordCount ' set the number of rows displayed on this page If (rsPictures_numRows < 0) Then rsPictures_numRows = rsPictures_total Elseif (rsPictures_numRows = 0) Then rsPictures_numRows = 1 End If ' set the first and last displayed record rsPictures_first = 1 rsPictures_last = rsPictures_first + rsPictures_numRows - 1 ' if we have the correct record count, check the other stats If (rsPictures_total <> -1) Then If (rsPictures_first > rsPictures_total) Then rsPictures_first = rsPictures_total End If If (rsPictures_last > rsPictures_total) Then rsPictures_last = rsPictures_total End If If (rsPictures_numRows > rsPictures_total) Then rsPictures_numRows = rsPictures_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rsUsers_total = -1) Then ' count the total records by iterating through the recordset rsUsers_total=0 While (Not rsUsers.EOF) rsUsers_total = rsUsers_total + 1 rsUsers.MoveNext Wend ' reset the cursor to the beginning If (rsUsers.CursorType > 0) Then rsUsers.MoveFirst Else rsUsers.Requery End If ' set the number of rows displayed on this page If (rsUsers_numRows < 0 Or rsUsers_numRows > rsUsers_total) Then rsUsers_numRows = rsUsers_total End If ' set the first and last displayed record rsUsers_first = 1 rsUsers_last = rsUsers_first + rsUsers_numRows - 1 If (rsUsers_first > rsUsers_total) Then rsUsers_first = rsUsers_total End If If (rsUsers_last > rsUsers_total) Then rsUsers_last = rsUsers_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rsPictures_total = -1) Then ' count the total records by iterating through the recordset rsPictures_total=0 While (Not rsPictures.EOF) rsPictures_total = rsPictures_total + 1 rsPictures.MoveNext Wend ' reset the cursor to the beginning If (rsPictures.CursorType > 0) Then rsPictures.MoveFirst Else rsPictures.Requery End If ' set the number of rows displayed on this page If (rsPictures_numRows < 0 Or rsPictures_numRows > rsPictures_total) Then rsPictures_numRows = rsPictures_total End If ' set the first and last displayed record rsPictures_first = 1 rsPictures_last = rsPictures_first + rsPictures_numRows - 1 If (rsPictures_first > rsPictures_total) Then rsPictures_first = rsPictures_total End If If (rsPictures_last > rsPictures_total) Then rsPictures_last = rsPictures_total End If End If %> <script language="javascript" src="../ScriptLibrary/OpenImage.js"></script> <script language="JavaScript" type="text/JavaScript"> <!-- function GP_popupConfirmMsg(msg) { //v1.0 document.MM_returnValue = confirm(msg); } //--> </script> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="box"> <tr> <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="1" align="left" class="box-header"><img src="../themes/<%= strTheme %>/box-header-left.jpg"></td> <td width="100%" class="box-header">Da approvare </td> <td width="1" align="right" 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"><table width="100%" border="0" cellspacing="1" cellpadding="0" class="content"> <tr> <td>Utenti: <span class="evidence"><%=(rsUsers_total)%></span></td> <td> </td> </tr> </table> <% If Not rsUsers.EOF Or Not rsUsers.BOF Then %> <table width="100%" border="0" cellspacing="1" cellpadding="0" class="grid"> <tr class="grid-header"> <td width="1%"> </td> <td>Login</td> <td>Nome e Cognome </td> <td width="1%" align="center">Data</td> <td width="1%"> </td> <td width="1%"> </td> </tr> <% While ((Repeat1__numRows <> 0) AND (NOT rsUsers.EOF)) %> <% If Repeat1__numRows Mod 2 Then %> <tr class="grid-main" onMouseOver="this.className='grid-over'" onMouseOut="this.className='grid-main'"> <% Else %> <tr class="grid-alt" onMouseOver="this.className='grid-over'" onMouseOut="this.className='grid-alt'"> <% End If %> <td width="1%" align="center"><a href="mailto:<%=(rsUsers.Fields.Item("USE_EMAIL").Value)%>"><img src="../images/icon_mail_0.gif" alt="E-mail" border="0"></a></td> <td><%=(rsUsers.Fields.Item("USE_NAME").Value)%></td> <td><%=(rsUsers.Fields.Item("USE_FIRST").Value)%> <%=(rsUsers.Fields.Item("USE_LAST").Value)%></td> <td align="center" nowrap><%= DoDateTime((rsUsers.Fields.Item("USE_DATED").Value), 2, 2057) %></td> <td align="center"><a href="users_edit.asp?iUser=<%=(rsUsers.Fields.Item("USE_ID").Value)%>&nUser=<%=(rsUsers.Fields.Item("USE_NAME").Value)%>"><img src="../images/icon_edit.gif" alt="Modifica/Approva" border="0"></a></td> <td align="center"><a href="users_delete.asp?iUser=<%=(rsUsers.Fields.Item("USE_ID").Value)%>&nUser=<%=(rsUsers.Fields.Item("USE_NAME").Value)%>" onClick="GP_popupConfirmMsg('Cancellare definitivamente l\'Utente selezionato (<%=(rsUsers.Fields.Item("USE_NAME").Value)%>)?');return document.MM_returnValue"><img src="../images/icon_delete.gif" alt="Cancella" border="0"></a></td> </tr> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsUsers.MoveNext() Wend %> </table> <% End If ' end Not rsUsers.EOF Or NOT rsUsers.BOF %> <hr size="1" noshade> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td>Immagini: <span class="evidence"><%=(rsPictures_total)%></span></td> <td> </td> </tr> </table> <% If Not rsPictures.EOF Or Not rsPictures.BOF Then %> <table width="100%" border="0" cellspacing="1" cellpadding="0" class="grid"> <tr class="grid-header"> <td width="1%" align="center">Immagine</td> <td>Autore</td> <td width="80" align="center">Data</td> <td width="1%"> </td> <td width="1%"> </td> </tr> <% While ((Repeat2__numRows <> 0) AND (NOT rsPictures.EOF)) %> <% If Repeat2__numRows Mod 2 Then %> <tr class="grid-main" onMouseOver="this.className='grid-over'" onMouseOut="this.className='grid-main'"> <% Else %> <tr class="grid-alt" onMouseOver="this.className='grid-over'" onMouseOut="this.className='grid-alt'"> <% End If %> <td align="center"><a href="javascript:OpenImage('<%= strPublicPath %>/<%=(rsPictures.Fields.Item("PIC_FILE").Value)%>')"><img src="<%= strPublicPath %>/<%= Thumbnail("_small",(rsPictures.Fields.Item("PIC_FILE").Value)) %>" title="<%=(rsPictures.Fields.Item("PIC_TITLE").Value)%> (<%=(rsPictures.Fields.Item("PIC_FILE").Value)%>)" alt="<%=(rsPictures.Fields.Item("PIC_TITLE").Value)%> (<%=(rsPictures.Fields.Item("PIC_FILE").Value)%>)" border="0"></a></td> <td><a href="mailto:<%=(rsPictures.Fields.Item("USE_EMAIL").Value)%>"><img src="../images/icon_mail_0.gif" alt="Scrivi" border="0" align="absmiddle"></a> <span class="evidence" title="<%=(rsPictures.Fields.Item("USE_NAME").Value)%> - <%=(rsPictures.Fields.Item("USE_FIRST").Value)%> <%=(rsPictures.Fields.Item("USE_LAST").Value)%>"><%=(rsPictures.Fields.Item("USE_NAME").Value)%></span></td> <td align="center"><%= DoDateTime((rsPictures.Fields.Item("PIC_DATED").Value), 2, 2057) %></td> <td align="center"><a href="pictures_edit.asp?iData=<%=(rsPictures.Fields.Item("PIC_ID").Value)%>&iCat=<%=(rsPictures.Fields.Item("PIC_CATEGORY").Value)%>&lCat=<%=(rsPictures.Fields.Item("PIC_LISTING").Value)%>"><img src="../images/icon_edit.gif" alt="Modifica" border="0"></a></td> <td align="center"><a href="pictures_delete.asp?iData=<%=(rsPictures.Fields.Item("PIC_ID").Value)%>&iCat=<%=(rsPictures.Fields.Item("PIC_CATEGORY").Value)%>&lCat=<%=(rsPictures.Fields.Item("PIC_LISTING").Value)%>" onClick="GP_popupConfirmMsg('Cancellare definitivamente l\'immagine <%=(rsPictures.Fields.Item("PIC_FILE").Value)%>?');return document.MM_returnValue"><img src="../images/icon_delete.gif" alt="Cancella" border="0"></a></td> </tr> <% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 rsPictures.MoveNext() Wend %> </table> <% End If ' end Not rsPictures.EOF Or NOT rsPictures.BOF %></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> <% rsUsers.Close() Set rsUsers = Nothing %> <% rsPictures.Close() Set rsPictures = Nothing %>
[
Íàçàä
]