vorrei chiedervi se è possibile creare una pagina (ad es. statistiche.asp) nella quale vengano visualizzate tutte leinformazioni inerenti alle "Attività sito" - In pratica vorrei spostare il contenuto dal blocco ad una nuova pagina.
Ho già provato una volta, inserendo la parte del dysplay-inc.asp inerente le attività, ma la pagina risulta essere vuota.
16 gennaio 2005 alle 18:54:54 Bhe, si, è possibile, devi seguire almeno un pò la struttura di aspnuke, e cioè, creare nella root un file, che userai anche come link nel menù, ad esempio: ACCOUNTINFO.ASP e che dovrà contenere + o - questo codice:
rSQL = "SELECT count(*) FROM users WHERE uValid=1" Set oRs = DBRecordSet(oCn, rSQL) If Not oRs.EOF Then Response.Write "<img src=""" & Global_SITE_IMAGES_PATH & "profile.gif"" border=""0"" alt=""""> " & Replace(GetTranslation("LANG_ACCOUNTS_INFO"), "%1%", oRs(0)) & vbCrlf Response.Write "<br>" & vbCrlf End If oRs.Close Set oRs = Nothing
rSQL = "SELECT uLogin FROM users WHERE uValid=1 ORDER BY uDate DESC" Set oRs = DBRecordSet(oCn, rSQL) If Not oRs.EOF Then Response.Write GetTranslation("LANG_LAST_ACCOUNT") & " : <a href=""" & GLOBAL_SITE_PATH & GLOBAL_SITE_PROFILE_PAGE & "?id=" & Server.URLEncode(oRs(0)) & """>" & Server.HTMLEncode(oRs(0)) & "</a>" & vbCrlf Response.Write "<br>" & vbCrlf End If oRs.Close Set oRs = Nothing
' Process account's actions ' Process actions ' IN : - ' OUT : - Sub DoMyAccount() Dim oCn, rSQL, bNewsLetter, bProfile Dim sUploadFile, sAllowExt, este, corto
If Request.Form("uEmail") <> "" Then If Request.Form("uNewsletter") <> "" Then bNewsLetter = "1" Else bNewsLetter = "0" End If If Request.Form("uProfile") <> "" Then bProfile = "1" Else bProfile = "0" End If If ModifyAccount(sPseudo, Request.Form("uEmail"), Request.Form("uMSN"), Request.Form("uYahoo"), Request.Form("uICQ"), Request.Form("uAIM"), Request.Form("nome"), Request.Form("foto"), Request.Form("ris1"), Request.Form("ris2"), Request.Form("ris3"), Request.Form("ris4"), Request.Form("ris5"), Request.Form("ris6"), Request.Form("ris7"), Request.Form("ris8"), Request.Form("ris9"), Request.Form("ris10"), Request.Form("ris11"), Request.Form("ris12"), Request.Form("ris13"), Request.Form("ris14"), Request.Form("ris15"), Request.Form("uURL"), Request.Form("uSignature"), bNewsletter, bProfile) Then sInfoPage = GetTranslation("LANG_ACCOUNT") & " - " & GetTranslation("LANG_MODIFY_SUCCESS") Else sInfoPage = GetTranslation("LANG_ACCOUNT") & " - " & GetTranslation("LANG_MODIFY_ERROR") End If ElseIf Request.Form("uPassword") <> "" And Request.Form("uNewPassword") <> "" Then If ModifyAccountPassword(sPseudo, Request.Form("uPassword"), Request.Form("uNewPassword")) Then sInfoPage = GetTranslation("LANG_PASSWORD") & " - " & GetTranslation("LANG_MODIFY_SUCCESS") Else sInfoPage = GetTranslation("LANG_MODIFY_ERROR") & " (" & GetTranslation("LANG_BAD_PASSWORD") & ")" End If ElseIf Request.Form("uAvatar") <> "" Or Request.Form("uPrivateAvatar") <> "" Then If ModifyAvatar(Request.Form("uAvatar"), Request.Form("uPrivateAvatar")) Then sInfoPage = GetTranslation("LANG_AVATAR") & " - " & GetTranslation("LANG_MODIFY_SUCCESS") Else sInfoPage = GetTranslation("LANG_AVATAR") & " - " & GetTranslation("LANG_MODIFY_ERROR") End If End If
If Request.QueryString("act") = "9" And Request.QueryString("fil") <> "" Then sUploadFile = "" & Session("UploadFile") If trim(sUploadFile) <> "" Then sAllowExt = "" & Session("AllowExt") If trim(sAllowExt) = "" Or lcase(sAllowExt) = "default" Then sUploadFile = GLOBAL_SITE_URL & Session("UploadFolder") & "/" & sUploadFile Else 'base name of file to upload corto = left(sUploadFile, InStrRev(sUploadFile, ".") - 1) 'extract extension of uploaded file sUploadFile = Request.QueryString("fil") este = mid(sUploadFile, InStrRev(sUploadFile, ".") + 1) If instr(sAllowExt, "*." & este) > 0 Then sUploadFile = GLOBAL_SITE_URL & Session("UploadFolder") & "/" & corto & "." & este Else sUploadFile = "" End If End If If ModifyAvatar("", sUploadFile) Then sInfoPage = GetTranslation("LANG_AVATAR") & " - " & GetTranslation("LANG_MODIFY_SUCCESS") Else sInfoPage = GetTranslation("LANG_AVATAR") & " - " & GetTranslation("LANG_MODIFY_ERROR") End If End If End If End Sub %>
Nel file Display-inc.asp, devi disabilitare il blocco AccountInfo, lo trovi quasi in fondo al file, è il Case 2, metti un apostrofo davanti alle 2 righe che riguardano il blocco. Prova così, in locale, e, se ti soddisfa, esegui l'upload dei files modificati e aggiunti. Ciauzz DJ
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!
ma io avrei bisogno di portare solo le attività sito, mentre le informazioni sugli iscritti devono rimanere in blocco...(forse basta che disabilito solo le attività in display-inc.asp...)
16 gennaio 2005 alle 20:55:31 Non è necessario, puoi disabilitare le attività del sito in configuration.xml, poi, puoi creare il file che ti serve. Ciauzz DJ
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!
17 gennaio 2005 alle 08:49:27 E' logico, se lasci attivo il flag If bUseSiteActivity nel file creato, ovviamente non vedrai nulla, elimina il flag e il relativo End If, potrai così vedere l'attività del sito in una pagina a parte. Ciauzz DJ
--------------- A lavare la testa ai somari, ci si rimette l'acqua e il sapone!