Forum 

Forum AspNuke.it - Il tuo Portale OpenSource in ASP

modifica per aggiungere nuovi campi nella iscrizione

Autore Messaggio
paparella81

Amatore
Amatore
30 Discussioni



Profilo - paparella81
14 aprile 2005 alle 17:20:39 Profilo - paparella81Invia un messaggio privato Rispondi quotando
E' una settimana che sto dietro a questa cosa apparentemente semplice,uso aspnuke 2.04 a chi volesse aiutarmi eventualmente mando i file modificati,interi ho incollato solo le parti che ho modificato..AIUTATEMI!PLEASE:::EVENTUALMENTE POSSO USARE ALTRE SOLUZIONI?QUALCHE SUGGERIMENTO??GRAZIE MILLE
Nunzia betline@email.it

Ho fatto le seguenti modifiche nell'ordine
includes/signup-inc.asp
ho incollato le seguenti parti

***********************************************
Response.Write " <tr class=""tableline2"">" & vbCRLF
Response.Write " <td>" & GetTranslation("LANG_NOME") & "</td>" & vbCRLF
Response.Write " <td align=""right""><input name=""nome"" maxlength=""20"" size=""20"" class=""cell""></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write " <tr class=""tableline1"">" & vbCRLF
Response.Write " <td>" & GetTranslation("LANG_COGNOME") & "</td>" & vbCRLF
Response.Write " <td align=""right""><input name=""cognome"" maxlength=""20"" size=""20"" class=""cell""></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
******************************************************
in SUB DoSignup

iResult = AddAccount(Request.Form("pseudo"), Request.Form("nome"), Request.Form("cognome"), Request.Form("mdp").....
*********************************************************
nel file includes/variables-inc

Dim sNome ' User's name(if authenticated, else empty)
Dim sCognome ' User's name(if authenticated, else empty)
tra le variabili globali
sNome = Request.Cookies("nome")
sCognome = Request.Cookies("cognome")

*********************************************************
nel file IT.xml
<translation name="LANG_NOME">Nome</translation>
<translation name="LANG_COGNOME">Cognome</translation>
**********************************************************

modifica in account-inc

********************************************************
Function AddAccount(sMyLogin, sMyNome, sMyCognome, sMyPassword, sMyEmail)

*********************************************************
if bSecuredPassword then
rSQL = "INSERT INTO users (uLogin, uNome, uCognome, uPassword, uPasswordSecure, uEmail, uMSN, uYahoo, uICQ, uAIM, uURL, uSignature, uRole, uDate, uNewsletter, uProfile, uValid, uID, uPosts) VALUES ('" & SQLEncrypt(sMyLogin) & "', 'xxxxxxxx', '" & getSHAPassword(sMyPassword) & "', '" & SQLEncrypt(sMyEmail) & "', '', '', '', '', '', '', " & ROLE_USER & ", '" & DateTimeToString(Now()) & "', " & iif(bNewsletterSignup, "1", "0") & ", 0, " & uValid & ", " & sMyUserID & ", 0)"
else
rSQL = "INSERT INTO users (uLogin, uNome, uCognome, uPassword, uEmail, uMSN, uYahoo, uICQ, uAIM, uURL, uSignature, uRole, uDate, uNewsletter, uProfile, uValid, uID, uPosts) VALUES ('" & SQLEncrypt(sMyLogin) & "', '" & SQLEncrypt(sMyPassword) & "', '" & SQLEncrypt(sMyEmail) & "', '', '', '', '', '', '', " & ROLE_USER & ", '" & DateTimeToString(Now()) & "', " & iif(bNewsletterSignup, "1", "0") & ", 0, " & uValid & ", " & sMyUserID & ", 0)"
end if

**********************************************************
BodyText = GetTranslation("LANG_SIGNUP_TEXT") & "<br> <br>" & vbCRLF & vbCRLF
BodyText = BodyText & " " & GetTranslation("LANG_LOGIN") & " : " & sMyLogin & "<br>" & vbCRLF
BodyText = BodyText & " " & GetTranslation("LANG_NOME") & " : " & sMyNome & "<br>" & vbCRLF
BodyText = BodyText & " " & GetTranslation("LANG_COGNOME") & " : " & sMyCognome & "<br>" & vbCRLF
BodyText = BodyText & " " & GetTranslation("LANG_PASSWORD") & " : " & sMyPassword & "<br>" & vbCRLF
BodyText = BodyText & " " & GetTranslation("LANG_EMAIL") & " : " & sMyEmail & "<br>" & vbCRLF
************************************************************
sURL = GLOBAL_SITE_URL & GLOBAL_SITE_PATH & GLOBAL_SITE_SIGNUP_PAGE & "?confirm=1&login=" & Server.URLEncode(sMyLogin) & "&nome=" & Server.URLEncode(sMyNome) & "&cognome=" & Server.URLEncode(sMyCognome) & "&password=" & Server.URLEncode(sMyPassword) & "&id=" & Server.URLEncode(oRs2("uID"))
sURL = "<a href=""" & sURL & """>" & sURL & "</a>"
**************************************************************
Function ModifyAccount(sUserLogin, sUserNome, sUserCognome, sUserEmail, sUserMSN, sUserYahoo, sUserICQ, sUserAIM, sUserURL, sUserSignature, bUserNewsletter, bUserProfile)

**************************************************************
if bSecuredPassword then
rSQL = "UPDATE users SET uPasswordLost='" & getSHAPassword(sPassword) & "', uPasswordSecure='" & getSHAPassword(sPassword) & "', uEmail='" & SQLEncrypt(sUserEmail) & "', uNome='" & SQLEncrypt(sUserNome) & "', uCognome='" & SQLEncrypt(sUserCognome) & "', uMSN='" & SQLEncrypt(sUserMSN) & "', uYahoo='" & SQLEncrypt(sUserYahoo) & "', uICQ='" & SQLEncrypt(sUserICQ) & "', uAIM='" & SQLEncrypt(sUserAIM) & "', uURL='" & SQLEncrypt(sUserURL) & "', uSignature='" & SQLEncrypt(sUserSignature) & "', uNewsletter=" & bUserNewsLetter & ", uProfile=" & bUserProfile & ", uValid=" & uValid & " WHERE uID=" & sID & " AND uValid=1"
else
rSQL = "UPDATE users SET uPassword='" & SQLEncrypt(sPassword) & "', uEmail='" & SQLEncrypt(sUserEmail) & "', uNome='" & SQLEncrypt(sUserNome) & "', uCognome='" & SQLEncrypt(sUserCognome) & "', uMSN='" & SQLEncrypt(sUserMSN) & "', uYahoo='" & SQLEncrypt(sUserYahoo) & "', uICQ='" & SQLEncrypt(sUserICQ) & "', uAIM='" & SQLEncrypt(sUserAIM) & "', uURL='" & SQLEncrypt(sUserURL) & "', uSignature='" & SQLEncrypt(sUserSignature) & "', uNewsletter=" & bUserNewsLetter & ", uProfile=" & bUserProfile & ", uValid=" & uValid & " WHERE uID=" & sID & " AND uValid=1"
end if
*****************************************************************
Function ModifyAccount(sUserLogin, sUserNome, sUserCognome, sUserEmail, sUserMSN, sUserYahoo, sUserICQ, sUserAIM, sUserURL, sUserSignature, bUserNewsletter, bUserProfile)
Dim iPos, oCn, oCn2, rSQL, oRs, sOldEmail, uValid, BodyText, sURL, sID, sPassword

Set oCn = DBConnexion(DB_MAIN)
sUserEmail = Replace(sUserEmail, """", "")
rSQL = "SELECT uID, uEmail FROM users WHERE uLogin='" & SQLEncrypt(sUserLogin) & "' AND uValid=1"
Set oRs = DBRecordSet(oCn, rSQL)

If Not oRs.EOF Then
sOldEmail = oRs("uEmail")
sID = oRs("uID")

if sOldEmail <> sUserEmail And Not bAutoSignup then
'user invalid, change password and logoff
sPassword = CreatePassword(8)
uValid = "0"
if bSecuredPassword then
rSQL = "UPDATE users SET uPasswordLost='" & getSHAPassword(sPassword) & "', uPasswordSecure='" & getSHAPassword(sPassword) & "', uEmail='" & SQLEncrypt(sUserEmail) & "', uNome='" & SQLEncrypt(sUserNome) & "', uCognome='" & SQLEncrypt(sUserCognome) & "', uMSN='" & SQLEncrypt(sUserMSN) & "', uYahoo='" & SQLEncrypt(sUserYahoo) & "', uICQ='" & SQLEncrypt(sUserICQ) & "', uAIM='" & SQLEncrypt(sUserAIM) & "', uURL='" & SQLEncrypt(sUserURL) & "', uSignature='" & SQLEncrypt(sUserSignature) & "', uNewsletter=" & bUserNewsLetter & ", uProfile=" & bUserProfile & ", uValid=" & uValid & " WHERE uID=" & sID & " AND uValid=1"
else
rSQL = "UPDATE users SET uPassword='" & SQLEncrypt(sPassword) & "', uEmail='" & SQLEncrypt(sUserEmail) & "', uNome='" & SQLEncrypt(sUserNome) & "', uCognome='" & SQLEncrypt(sUserCognome) & "', uMSN='" & SQLEncrypt(sUserMSN) & "', uYahoo='" & SQLEncrypt(sUserYahoo) & "', uICQ='" & SQLEncrypt(sUserICQ) & "', uAIM='" & SQLEncrypt(sUserAIM) & "', uURL='" & SQLEncrypt(sUserURL) & "', uSignature='" & SQLEncrypt(sUserSignature) & "', uNewsletter=" & bUserNewsLetter & ", uProfile=" & bUserProfile & ", uValid=" & uValid & " WHERE uID=" & sID & " AND uValid=1"
end if
sURL = GLOBAL_SITE_URL & GLOBAL_SITE_PATH & GLOBAL_SITE_SIGNUP_PAGE & "?confirm=1&login=" & Server.URLEncode(sUserLogin) & "&password=" & Server.URLEncode(sPassword) & "&id=" & Server.URLEncode(sID)
BodyText = BodyText & vbCRLF & Replace(GetTranslation("LANG_SIGNUP_CONFIRM_LINK"), "%1%", "<a href=""" & sURL & """ target=""_blank"">" & sURL & "</a>") & "<br> <br>" & vbCRLF & vbCRLF
BodyText = BodyText & GetTranslation("LANG_LOGIN") & " : " & sUserLogin & "<br>" & vbCRLF
BodyText = BodyText & GetTranslation("LANG_NOME") & " : " & sUserNome & "<br>" & vbCRLF
BodyText = BodyText & GetTranslation("LANG_COGNOME") & " : " & sUserCognome & "<br>" & vbCRLF
BodyText = BodyText & GetTranslation("LANG_PASSWORD") & " : " & sPassword & "<br>" & vbCRLF
BodyText = BodyText & "<br> <br>" & vbCRLF & vbCRLF
BodyText = BodyText & GLOBAL_SITE_NAME & "<br> <br>" & vbCRLF & vbCRLF
SendMail GLOBAL_ACCOUNTS_EMAIL, sUserEmail, GetTranslation("LANG_SIGNUP_SUBJECT") & " - " & GLOBAL_SITE_NAME, BodyText, True
Else
uValid = "1"
rSQL = "UPDATE users SET uEmail='" & SQLEncrypt(sUserEmail) & "', uNome='" & SQLEncrypt(sUserNome) & "', uCognome='" & SQLEncrypt(sUserCognome) & "', uMSN='" & SQLEncrypt(sUserMSN) & "', uYahoo='" & SQLEncrypt(sUserYahoo) & "', uICQ='" & SQLEncrypt(sUserICQ) & "', uAIM='" & SQLEncrypt(sUserAIM) & "', uURL='" & SQLEncrypt(sUserURL) & "', uSignature='" & SQLEncrypt(sUserSignature) & "', uNewsletter=" & bUserNewsLetter & ", uProfile=" & bUserProfile & ", uValid=" & uValid & " WHERE uID=" & sID & " AND uValid=" & uValid
end if
DBExecute oCn, rSQL

ModifyAccount = True
Else
ModifyAccount = False
End if
oRs.close
set oRs = nothing
oCn.Close
Set oCn = Nothing
************************************************************************
Response.Write " <tr class=""tableline2"">" & vbCRLF
Response.Write " <td>" & GetTranslation("LANG_NOME") & "</td>" & vbCRLF
Response.Write " <td align=""right""><input name=""uNome"" size=""30"" maxlength=""50"" class=""cell"" value=""" & Server.HTMLEncode(oRs("uNome")) & """></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
Response.Write " <tr class=""tableline1"">" & vbCRLF
Response.Write " <td>" & GetTranslation("LANG_COGNOME") & "</td>" & vbCRLF
Response.Write " <td align=""right""><input name=""uCognome"" size=""30"" maxlength=""50"" class=""cell"" value=""" & Server.HTMLEncode(oRs("uCognome")) & """></td>" & vbCRLF
Response.Write " </tr>" & vbCRLF
************************************************************************
domyaccount
If ModifyAccount(sPseudo, Request.Form("uEmail"), Request.Form("uNome"), Request.Form("uCognome"), Request.Form("uMSN"), Request.Form("uYahoo"), Request.Form("uICQ"), Request.Form("uAIM"), Request.Form("uURL"), Request.Form("uSignature"), bNewsletter, bProfile) Then
djveleno

Amministratore

Esperto
Esperto
1025 Discussioni



Profilo - djveleno
14 aprile 2005 alle 19:33:09 Profilo - djvelenoInvia un messaggio privato Rispondi quotando
In buona sostanza, devi aggiungere 2 campi, il Nome e il Cognome di ogni nuovo iscritto...
Ti offro la soluzione più semplice, siccome esistono campi che, normalmente non vengono mai utilizzati, come ad esempio AIM, ICQ, MSN, YAHOO, puoi modificare 2 di questi, ad esempio, editando nel DB MAIN la tabella USERS, puoi modificare uAIM e uMSN, rinominadoli in uNome e uCognome, poi, la modifica per la visualizzazione dei campi va eseguita in 5 files, account-inc - admin_account-inc - profile-inc - admin_profile-inc e signup-inc, tutti presenti nella cartella includes.
Nei files dovrai modificare tutte le query che richiamano questi campi, e tutti i forms di visualizzazione, è un lavoro un pò lungo, ma, nel complesso facile.
Ciauzz DJ
---------------
A lavare la testa ai somari, ci si rimette l'acqua e il sapone!

http://aspnuke208.somee.com/Default.asp

Log in

Login
Password
Memorizza i tuoi dati:

Cerca

 

Sostieni AspNuke

Un piccolo gesto per aiutarci a mantenere AspNuke.it online

Promo

MusicWebItalia.it
Video Testi Traduzioni Spot Colonne sonore Accordi e Spartiti gratis.

Visitatori

Visitatori Correnti : 120
Membri : 0 offline Anna

Iscritti

 Utenti: 18940
Ultimo iscritto : glauco
Lista iscritti
Messaggi privati: 3373 Commenti: 2210 Immagini: 39 Downloads: 144 Articoli: 49 Pagine: 101 Siti web: 558 Notizie: 180 Sondaggi: 11 Preferiti: 5685296 Post sui forum: 51195 Libro degli ospiti: 4 Eventi: 7

Versioni

Temi