Modificare il file:
\registrazione\visualizza_profilo.asp
<!--#include file="inc_common.asp" --> <!--#include file="inc_checklogin.asp" --> <!--#include file="inc_viewuser.asp" --> <% Server.Execute("header.asp") %> <% Dim isCodeValid Dim str_stato, str_name 'Credo stringa SQL validateSQL = "SELECT * FROM tbl_Authors WHERE code='" & str_code & "'" 'Creo un nuovo recordsheet Set rs_validate = Server.CreateObject ("ADODB.RecordSet") 'Apro il record sheet e eseguo SQL rs_validate.open validateSQL,adoCon 'Se il codice non è valido setto isCodeValid = false If rs_validate.EOF _ Or rs_validate.BOF Then isCodeValid = false Else isCodeValid = true End If %> <title><%=pageTitle%> - <%=str_users_name%></title> <% If str_users_stato = "Active" Then %> <% If Request.QueryString("mode") = "viewUser" AND isCodeValid = true AND str_users_authority <> "user" AND rs_viewuser("authority") <> "admin" AND str_users_code <> rs_viewuser("code") Then %> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <p>Benvenuto, <b><%=str_users_name%></b>!</p> <p align="center">:: <b><%=rs_viewuser("name")%></b> ::</p> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="238"> <tr> <td width="200"><b>Username</b></td> <td width="0" height="7"><%=rs_viewuser("name")%></td> </tr> <tr> <td width="200"><b>Nome</b></td> <td width="0" height="11"><%=rs_viewuser("nome")%></td> </tr> <tr> <td width="200"><b>Cognome</b></td> <td width="0" height="11"><%=rs_viewuser("cognome")%></td> </tr> <tr> <td width="200"><b>Password</b></td> <td width="0" height="17"> <% If str_users_authority = "admin" Then %> <a href="#" onclick="alert('<%=rs_viewuser("pass")%>')">Visualizza</a> <% Else %> ... <% End If %> </td> </tr> <tr> <td width="200"><b>Email</b></td> <td width="0" height="19"><a href="mailto:<%=rs_viewuser("email")%>"><%=rs_viewuser("email")%></a></td> </tr> <tr> <td width="200"><b>Telefono/Cellulare</b></td> <td width="0" height="19"><%=rs_viewuser("Tel")%></td> </tr> <tr> <td width="200"> </td> <td width="0" height="19"> </td> </tr> <tr> <td width="200"><b>Tipo di Account</b></td> <td width="0" height="19"><%=rs_viewuser("authority")%></td> </tr> <tr> <td width="200"><b>Data di Registrazione</b></td> <td width="0" height="19"><%=rs_viewuser("dataregistrazione")%></td> </tr> <tr> <td width="200"><b>User Code</b></td> <td width="0" height="19"><%=rs_viewuser("code")%></td> </tr> <% If rs_viewuser("stato") = "Disabled" Then %> <tr> <td width="200"><b>Motivo per la disattivazione</b></td> <td width="0" height="19"><%=rs_viewuser("utentesospeso")%></td> </tr> <% End If %> </table> </center> </div> <% If str_users_authority = "admin" Then %> <br> <table width="142" height="1" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" style="border-collapse: collapse"> <tr> <td width="149" height="1"> <input type="button" onclick="location.href='aggiorna_profilo.asp?userCode=<%=rs_viewuser("code")%>'" value="Aggiorna" name="UpdateProfile"> </td> <td height="1" width="5"></td> <td width="84" height="1"> <input type="button" onclick="var doDelete=confirm('Cancellare questo utente?'); if(doDelete) { location.href='cancella_utente.asp?userCode=<%=rs_viewuser("code")%>' }" value="Cancella" name="Logout"> </td> </tr> </table> <% End If %> <% ElseIf str_users_authority = "mod" AND (rs_viewuser("authority") <> "user" AND str_users_code <> rs_viewuser("code")) Then %> <p> <center> <%=str_users_name%>! Stai cercando di modificare un utente che ha permessi di amministrazione. </center> </p> <% Else %> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="191"> <tr> <td width="200"><b>Username</b></td> <td width="0" height="7"><%=str_users_name%></td> </tr> <tr> <td width="200"><b>Nome</b></td> <td width="0" height="11"><%=str_users_nome%></td> </tr> <tr> <td width="200"><b>Cognome</b></td> <td width="0" height="11"><%=str_users_cognome%></td> </tr> <tr> <td width="200"><b>Password</b></td> <td width="0" height="17"> <a href="#" onclick="alert('<%=str_users_password%>')">Visualizza</a></td> </tr> <tr> <td width="200"><b>Email</b></td> <td width="0" height="19"><%=str_users_email%></td> </tr> <tr> <td width="200"><b>Telefono/Cellulare</b></td> <td width="0" height="19"><%=str_users_Tel%></td> </tr> <tr> <td width="200"><b>Data di Registrazione</b></td> <td width="0" height="19"><%=str_users_date%></td> </tr> <tr> <td width="200"><b>User Code</b></td> <td width="0" height="19"><%=str_users_code%></td> </tr> </table> </center> </div> <br> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" height="1"> <tr> <td height="1"> <input type="button" onclick="location.href='aggiorna_profilo.asp?userCode=<%=rs_viewuser("code")%>'" value="Aggiorna" name="UpdateProfile"> </td> <td height="1" width="5"></td> <td height="1"> <input type="button" onclick="location.href='logout.asp'" value="Log Out" name="Logout"> </td> </tr> </table> <% End If %> <% If str_users_authority = "admin" Then %> <p>Opzioni di amministrazione:</p> <p> <a href="lista_utenti.asp">Lista degli utenti</a><br> <a href="setup.asp">Modifica le impostazioni</a></p> <% ElseIf str_users_authority = "mod" Then %> <p>Opzioni moderatore:</p> <p><a href="lista_utenti.asp">Visualizza la lista degli utenti</a></p> <% End If %> <% ElseIf str_users_stato = "Attesa" Then %> <p align="center">Il tuo account è in Attesa di conferma. Per attivare l'account controllare l'email e clikkare sul link. In caso di problemi contatta il <a href="mailto:<%=adminEmail%>">Webmaster</a>.</p> <% ElseIf str_users_stato = "Attesa" Then %> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1"> <tr> <td colspan="2"> <p align="center">Il tuo account è stato sospeso. Se pensi che possa essere riattivato, contatta il <a href="mailto:<%=adminEmail%>">Webmaster</a>.</p></td> </tr> <tr> <td height="8" colspan="2"></td> </tr> <tr> <td colspan="2"> <p align="center">Ragione per la sospensione:</p></td> </tr> <tr> <td height="8" colspan="2"></td> </tr> <tr> <td width="25%" height="1"></td> <td width="75%" height="1"> <ul> <% curReason = Split(str_users_utentesospeso, ";") i = 0 For Each reason In curReason %> <li><b><%=curReason(i)%></b></li> <% i = i + 1 Next %> </ul> </td> </tr> </table> </center> </div> <% Else Response.Redirect("login.asp") End If 'Close rs_validate rs_validate.Close %> <% Server.Execute("footer.asp") %>
[
Íàçàä
]