<% Server.Execute("header.asp") %> <% If str_users_name = "" Then Response.Redirect("noentry.asp") End If %> <% Dim isCodeValid Dim str_stato, str_name 'Creo una nuova stringa SQL If Request.QueryString("userCode") <> "" Then validateSQL = "SELECT * FROM tbl_Authors WHERE code = '" & Request.QueryString("userCode") & "'" Else validateSQL = "SELECT * FROM tbl_Authors WHERE code = '" & str_code & "'" End If '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 setta isCodeValid = false If rs_validate.EOF _ Or rs_validate.BOF Then isCodeValid = false Else isCodeValid = true str_stato = rs_validate("stato") str_name = rs_validate("name") End If 'Chiudo rs_validate set rs_validate = Nothing %> <% If Request.QueryString("step") = "2" AND isCodeValid = true AND str_users_stato = "Active" Then 'Setto tutte le variabili da inserire nel database Dim new_nome, new_cognome, new_password, new_email, new_tel, new_authority, new_stato new_nome = Request.Form("nome") new_cognome = Request.Form("cognome") new_password = Request.Form("pw1") new_email = Request.Form("email") new_tel = Request.Form("Tel") 'new_citta = Request.Form("citta") 'new_provincia = Request.Form("provincia") 'new_cap = Request.Form("cap") 'new_pagina_web = Request.Form("pagina_web") new_utentesospeso = Request.Form("utentesospesoInput") If new_nome = "" OR new_cognome = "" OR new_password = "" OR new_email = "" OR new_tel = "" OR (Request.Form("stato") = "Disabled" AND Request.Form("utentesospesoInput") = "") Then emptyValue = True ElseIf Request.Form("pw1") <> Request.Form("pw2") Then badPass = True Else emptyValue = False If Request.Form("newAuthority") <> "" Then new_authority = Request.Form("newAuthority") Else new_authority = Request.Form("authority") End If If Request.Form("userStato") <> "" Then new_stato = Request.Form("userStato") Else new_stato = rs_viewuser("stato") End If If Request.QueryString("userCode") <> "" AND Request.Form("userStato") <> "" Then tempID = Request.QueryString("userCode") Else tempID = str_code End If Set RS = Server.CreateObject ("ADODB.RecordSet") Sql = "SELECT * FROM tbl_authors WHERE code='" & tempID & "'" RS.Open Sql,adoCon,2,3 RS("nome") = new_nome RS("cognome") = new_cognome RS("pass") = new_password RS("email") = new_email RS("Tel") = new_Tel ' ################################ ' TOLTO CAMPI ' ################################# 'RS("citta") = new_citta 'RS("provincia") = new_provincia 'RS("cap") = new_cap 'RS("pagina_web") = new_pagina_web RS("authority") = new_authority RS("stato") = new_stato RS("utentesospeso") = new_utentesospeso RS.Update RS.Close If Request.QueryString("userCode") <> "" AND str_users_authority <> "user" AND Request.QueryString("userCode") <> Request.Form("userCode") Then Response.Redirect("lista_utenti.asp") Else Response.Redirect("visualizza_profilo.asp") End If End If End If %> <%=pageTitle%> - Aggiorna Profilo <% If isCodeValid = false Then %>

User Code non valido. Riprova

<% ElseIf str_stato = "Attesa" AND str_users_authority = "user" Then %>

Il tuo account è in Attesa di conferma.  Per attivare l'account controllare l'email e clikkare sul link. In caso di problemi contatta il Webmaster.

<% ElseIf str_stato = "Disabled" AND str_users_authority = "user" Then %>

Il tuo account è stato sospeso.  Se pensi che possa essere riattivato, contatta il Webmaster.

Il tuo account è stato sospeso:

    <% curReason = Split(str_users_utentesospeso, ";") i = 0 For Each reason In curReason %>
  • <%=curReason(i)%>
  • <% i = i + 1 Next %>
<% ElseIf (rs_viewuser("authority") = "admin" AND str_users_authority <> "admin") or (rs_viewuser("authority") = "mod" AND str_users_authority = "user") Then %>

<%=str_users_name%>!  Stai tentando di modificare un account con privilegi di amministratore.  Tu puoi aggiornare solo il tuo profilo

<% Else %>

"" Then Response.Write("&userCode=" & Request.QueryString("userCode")) End If %>" name="updateForm" method="post"> "> "" Then Response.Write(Replace(rs_viewuser("utentesospeso"), "''", "'")) End If%>">
<% If emptyValue = True Then %> <% If new_stato = "Disabled" AND new_utentesospeso = "" Then %> <% End If %> <% End If %> <% If badPass = True Then %> <% End If %> <% If str_users_authority = "admin" AND rs_viewuser("authority") <> "admin" Then %> <% End If %>
Alcuni campi richiesti, sono vuoti. 
Specifica una ragione per sospendere un account.
Le password devono essere uguali
I campi con * sono obbligatori.

Ciao, <%=rs_viewuser("name")%>

<%If emptyValue = True AND new_nome = "" Then Response.Write("Nome") Else Response.Write("Nome") End If%> * ">
<%If emptyValue = True AND new_cognome = "" Then Response.Write("Nome") Else Response.Write("Cognome") End If%> * ">
<%If emptyValue = True AND new_password = "" OR badPass = True Then Response.Write("Password") Else Response.Write("Password") End If%> * " <%If str_users_authority <> "admin" AND str_users_name <> rs_viewuser("name") Then%> disabled<%End If%>>
<%If emptyValue = True AND new_password = "" OR badPass = True Then Response.Write("Conferma Password") Else Response.Write("Conferma Password") End If%> * " <%If str_users_authority <> "admin" AND str_users_name <> rs_viewuser("name") Then%> disabled<%End If%>>
<%If emptyValue = True AND new_email = "" Then Response.Write("Email") Else Response.Write("Email") End If%> * ">
<%If emptyValue = True AND new_Tel = "" Then Response.Write("Tel./Cell.") Else Response.Write("Tel") End If%> * ">
Autorizzazione *
Stato*
<%If rs_viewuser("stato")="Disabled" Then%> Ecco perchè il tuo account è stato sospeso*
<%End If%>
<%If rs_viewuser("stato")="Disabled" Then%> <%End If%>
<% End If %> <% Server.Execute("footer.asp") %>