pagina registrazione utente

  • Creatore Discussione Creatore Discussione geko99
  • Data di inizio Data di inizio

geko99

Nuovo Utente
31 Ott 2008
3
0
0
ciao a tutti,
sono nuovo del forum , vi ho trovati poichè ho un problema con la pagina di registrazione utente.... ho installato uno script di annunci ma la pagina di registrazione non viene completamente caricata... posto qui il codice nella speranza che qualcuno possa aiutarmi...
grazie

<!--#include file="header.asp"-->
<!--#include file="class_md5.asp"-->
<%
Dim msg, struOptValueArray(7)
If seclog then enc = GenerateKeys
session("sour" & strSUnique)= RandomNumber

If not CStr(session("user_logged_ID" & strSUnique)) = Empty Or not session("user_verif_ID" & strSUnique) = Empty then
If not CStr(session("user_logged_ID" & strSUnique)) = Empty then
userID = session("user_logged_ID" & strSUnique)
Else
userID = session("user_verif_ID" & strSUnique)
End If

set rs = objConn.Execute("SELECT " & tablUPfx & "User.* FROM " & tablUPfx & "User WHERE userID = " & userID & ";")
If rs.EOF then
IDfound = False
Else
IDfound = True
status = CLng(rs("status"))
Select Case status
Case 1
msg = "<div align='center'>" & strText_NotVerified & "&nbsp;<a href='reg.asp?action=dejavu'><b>" & strText_HERE & "</b></a>&nbsp;" & strText_ToVerify & "</div>"
Case 2
msg = "<div align='center'>" & strText_AcountSuspended & "</div><br>"
End Select

uEmail = CryptText(rs("email"), key, True)
uCity = rs("city")
uNick = rs("nick")
For I = 0 to 7
struOptValueArray(I) = rs("opt" & I+1)
Next
End If
rs.close
End If

If IDfound then
update = True
button = strText_UpdateAccount
msg = msg & "<div align='center'>" & strText_YouMayUpdate & "</div><br>"
Else
update = False
button = strText_CreateAccount
msg = "<div align='center'>" & strText_MustCreateAccount
msg = msg & "<br>" & strText_AlreadyRegistered & "</div><br>"
End If


%>

<div align="center">
<table border="0" width="100%" >
<tr>
<td height="20"><a href='default.asp'><%= strText_Home %></a>::<b><%= strText_UserRegistration %></b></td>
</tr>
<tr>
<td class="line">
</td>
</tr>
<tr>
<td >
<br>

<div align="center">
<table border="0" cellpadding="0" style="border-collapse: collapse" height="150">
<tr>
<td width="35" height="20"><img border="0" class="img" src="img/Mainbox_TL_<%= css %>.gif"></td>
<td width="100%"><img border="0" class="img" src="img/Mainbox_TC_<%= css %>.gif" width="100%" height="20"></td>
<td width="35" height="20"><img border="0" class="img" src="img/Mainbox_TR_<%= css %>.gif"></td>
</tr>
<tr>
<td colspan="3">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" height="100%">
<tr>
<td width="10" background="img/Mainbox_LC_<%= css %>.gif">
<img border="0" class="img" src="img/Mainbox_LC_<%= css %>.gif" width="10" height="100%"></td>
<th align="center" class="main_cell"><%= message %><table border="0" class="user_table" height="197" width="100%" cellspacing="1" cellpadding="2">
<tr>
<td height="50" colspan="2"><%= msg %></td>
</tr>
<tr>
<td height="21" align="right" width="50%" ></td>
<td height="21" align="left" width="50%" ><font color="#FF0000">* </font><%= strText_RequiredFields %></td>
</tr>
<tr>
<form method="post" action="reg.asp?action=<%= update %>" name="register">
<input type="hidden" name="ID" value="<%= userID %>">
<td height="30" align="right" >&nbsp;<%= strText_UserName %>&nbsp;</td>
<td height="21" align="left" nowrap ><input type="text" size="24" name="R1" class="forms" maxlength="15" value="<%= uNick %>"> <font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="30" align="right" >&nbsp;<%= strText_City %>:&nbsp;</td>
<td height="21" align="left" nowrap ><input type="text" size="24" name="R2" class="forms" maxlength="45" value="<%= uCity %>"> <font color="#FF0000">*</font></td>
</tr>
<tr>
<td align="right" height="30" ><%= strText_EmailAddress %>:&nbsp;</td>
<td height="21" align="left" nowrap ><input type="text" size="24" name="R3" maxlength="45" class="forms" value="<%= uEmail %>"> <font color="#FF0000">*</font></td>
</tr>

<%
For ruo = 0 to 6
If Not uOpt(ruo) = Empty Then
If CStr(uOptType(ruo)) = "0" then
strInput = "<input type='text' size='24' name='uO" & ruo & "' class='forms' maxlength='45' value=""" & struOptValueArray(ruo) & """>"
Else
set rsOpt = objConn.Execute("SELECT * FROM " & tablPfx & "OptTypes WHERE optionName = '" & uOptType(ruo) & "';")
If rsOpt.EOF then
strInput = "<input type='text' size='24' name='uO" & ruo & "' class='forms' maxlength='45' value=""" & struOptValueArray(ruo) & """>"
Else
inputMatch = False
noMatchDisable = Empty
ccheckBox = Empty
ctextBox = "disabled"
nextOptString = Empty
strCustom = Empty
nextOptValues = CStr(rsOpt(2))
nextAllowCustom = CBool(rsOpt(3))
nextCustomName = rsOpt(4)
nextOptBlank = CStr(rsOpt(5))
nextSearchOnly = CBool(rsOpt(8))
If nextSearchOnly then
strInput = vbcrlf & "<input id='z" & ruo & "' type='text' size='15' name='uO" & ruo & "' class='forms' maxlength='15' value=""" & struOptValueArray(ruo) & """> -Number Only" & vbcrlf
Else
nextOptValuesA = Split(nextOptValues, sf)
For bo = 0 to Ubound(nextOptValuesA)
optValue = nextOptValuesA(bo)
optText = optValue
If update AND optText = struOptValueArray(ruo) then sel = "selected": inputMatch = True: Else sel = "": End If
If nextOptBlank = optValue then optValue = Empty
nextOptString = nextOptString & "<option " & sel & " value=""" & optValue & """>" & optText & "</option>" & vbcrlf
Next
If nextAllowCustom then
If Not inputMatch AND update then
noMatchDisable = "disabled"
ccheckBox = "checked"
ctextBox = Empty
End If
strCustom = "&nbsp;&nbsp;" & nextCustomName & "&nbsp;<input type='checkbox' " & ccheckBox & " name='CC" & ruo & "' "
strCustom = strCustom & "onclick=""if (!this.checked){uO" & ruo & ".disabled=false;COF" & ruo & ".disabled=true;}else{uO" & ruo & ".disabled=true;COF" & ruo & ".disabled=false;}"">"
strCustom = strCustom & "&nbsp;<input maxlength='45' name='COF" & ruo & "' type='text' size='22' " & ctextBox & " class='forms' value=""" & struOptValueArray(ruo) & """>"
End If
strInput = vbcrlf & "<select " & noMatchDisable & " size='1' name='uO" & ruo & "' class='forms'>" & vbcrlf & nextOptString & "</select>" & vbcrlf & strCustom
End If
End If
rsOpt.close
End If
%>
<tr>
<td height="30" align="right" ><%= uOpt(ruo) %>:&nbsp;</td>
<td height="21" align="left" nowrap ><%= strInput %></td>
</tr>
<%
End If
Next
If uOpt(7) = "1" then
If update then compareStyle = lcase(struOptValueArray(7)): Else: compareStyle = lcase(dstyle): End If
Set sFolder = objFile.GetFolder(Server.MapPath("."))
For each fl in sFolder.Files
sName = lCase(fl.Name)
If Right(sName, 4) = ".css" then
sDisplayName = Replace(lcase(sName), ".css", "")
If lcase(sName) = compareStyle then
sOptions = sOptions & "<option selected value='" & sName & "'>" & sDisplayName & "</option>"
userSelected = True
Else: sOptions = sOptions & "<option value='" & sName & "'>" & sDisplayName & "</option>"
End If
End If
Next

%>
<tr>
<td height="30" align="right" ><%= strText_PreferredAdStyle %>:&nbsp;</td>
<td height="21" align="left" nowrap >
<select size="1" id="uO7" class="forms" name="uO7">
<%= sOptions %>
</select>&nbsp; <a href="#" onclick="popup('testpreview.asp?style='+document.getElementById('uO7').value,'ad_preview',',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=600,height=370,left=0,top=0');return false;"><%= strText_Preview %></a></td>
</tr>
<%
End If
%>


<tr>
<td height="30" align="right" >&nbsp;<%= strText_UserPassword %>&nbsp; </td>
<td height="21" align="left" nowrap ><input type="password" size="24" name="R4" class="forms" maxlength="12"> <font color="#FF0000">* </font></td>
</tr>
<tr>
<td height="30" align="right" >&nbsp;<%= strText_ConfirmPassword %>:&nbsp;</td>
<td height="21" align="left" nowrap ><input type="password" size="24" name="R5" class="forms" maxlength="12"> <font color="#FF0000">*</font></td>
</tr>
<!--#include file="tn.asp"-->
<tr>
<td height="41" ></td>
<td height="41" align="left"><input type="checkbox" value="1" name="R6" checked> <%= strText_AddtoEmailList %></td>
</tr>

<%
If not update then Response.Write "<tr><td width='165' height='30' valign='top'></td><td width='410' height='30' align='left' valign='top' colspan='2'>" & _
"<input type='checkbox' value='1' name='R7'> " & strText_Agreement & " <font size='1'><a href='terms.asp' target='_blank'>" & strText_Agreement1 & "</a> | <a href='#' onclick=""popup('privacy.asp','reply','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=300,height=270');"">" & strText_Agreement2 & "</a></font></td></tr>"
%>

<tr>
<td height="40" valign="top"></td>
<td height="40" align="left" valign="middle"><input type="button" value="<%= button %>" class="buttons" name="B1" onclick="validateInput('<%= enc %>', '<%= session("Nval" & strSUnique) %>', <%= lcase(CInt(seclog)) %>);"></td>
<input type="hidden" name="sour" value="<%= session("sour" & strSUnique) %>">
<input type="hidden" name="rhash" value="">
<input type="hidden" name="erhash" value="">
</form>
</tr>
</table>

</th>
<td width="10" background="img/Mainbox_RC_<%= css %>.gif">
<img border="0" class="img" src="img/Mainbox_RC_<%= css %>.gif" width="10" height="100%"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="35" height="16"><img border="0" class="img" src="img/Mainbox_BL_<%= css %>.gif"></td>
<td><img border="0" class="img" src="img/Mainbox_BC_<%= css %>.gif" width="100%" height="16"></td>
<td width="35" height="16"><img border="0" class="img" src="img/Mainbox_BR_<%= css %>.gif"></td>
</tr>
</table>
</div>

<br>

</td>
</tr>
</table>
</div>
<script language="Javascript" src="en.js"></script>
<script language="javascript">
<!--
function validateInput(enc,emod,seclog){
var errorm="";var oform=document.register;var nick=oform.R1.value.replace(/[\s<>']/g, "");oform.R1.value=nick;
oform.R3.value=oform.R3.value.toLowerCase();
<%
If not update then Response.Write "if (!oform.R7.checked){return alert('" & strText_TemsUseAgree & "');}"
%>
var city=oform.R2.value.replace(/[<>']/g, "");oform.R2.value=city;var email=oform.R3.value.replace(/[\s<>']/g, "");var email=email.toLowerCase();
var pass=oform.R4.value.replace(/[\s<>]/g, "");oform.R4.value=pass;var cpass=oform.R5.value.replace(/[\s<>]/g, "");
oform.R5.value=cpass;var ePat=/^([\w-\.]+)@([\w-]+)\.([\w-\.]+)$/g;var matchEmail=email.match(ePat);var nLen=nick.length;var pLen=pass.length;
if (nick=="" | email=="" | city=="" | pass=="" | cpass=="") {var errorm=errorm + (" -- <%= strText_RequiredFieldsEmpty %> \n");var trap=("error");}
if (email !== "") {if (matchEmail==null){var errorm=errorm + (" -- <%= strText_Emailformatisinvalid %> \n");var trap = ("error");}}
if (nick !=="") {if (nLen < 4){var errorm=errorm + (" -- <%= strText_NameMustbeatleast %> \n");var trap=("error");}}
if (pass !=="") {if (pLen < 6){var errorm=errorm + (" -- <%= strText_PasswordMustbeatleast %> \n");var trap=("error");}}
if (pass !==cpass) {var errorm=errorm + (" -- Password do not match! \n");var trap=("error");}
for (i=0; i < 6; i++) {if (document.getElementById("z"+i) !=null && isNaN(document.getElementById("z"+i).value)){
var nan=document.getElementById("z"+i).value;var errorm=errorm + (" -- <%= strText_Value %> ["+nan+"] <%= strText_IsInvalid %> \n");var trap=("error");}}
if (trap=="error") {alert ("<%= strText_PleaseFix %>\n\n" + errorm);} else {oform.B1.disabled = true;
if (seclog) {var hash = "";var enemail = encode64(email);var password = pass;var hash_auth = MD5(password);
for (i = 0; i <= hash_auth.length - 1; i++) {hash = hash + Mult( (hash_auth.charCodeAt(i)) , enc , emod ) + ","}
oform.rhash.value = hash;oform.erhash.value = enemail;oform.R4.value = '';oform.R5.value = '';oform.R3.value = '';}oform.submit();}}
//-->
</script>
<!--#include file="footer.asp"-->
 
In che senso non viene completamente caricata? Ricevi errori? Hai "On Error Resume Next" in qualche file di inclusione? Hai attivato sul browser la visualizzazione dell'errore 500?
 
semplicemente non va ne avanti ne indietro.... e nella parte sotto del browser mi da errore visualizzazione pagina...
 

Discussioni simili