My Forum source code (10)
Last Update:2017-02-28
Source: Internet
Author: User
reguse.inc.php information when processing a registered user
?
function Regok ($mess, $reginfo)//Record output user information after success
{
echo "<table width= ' 70% ' border= ' 0 ' cellspacing= ' 0 ' cellpadding= ' 0 ' bgcolor= ' #000000 ' align= ' center ' >";
echo "<tr><td><table width= ' 100% ' border= ' 0 ' cellspacing= ' 1 ' cellpadding= ' 1 ' align= ' center ' bgcolor= ' Eeeeee ' ><tr bgcolor= ' #006699 ' ><td colspan= ' 4 ' ><div align= ' center ' ><font color= ' ffffff ' > ". $mess." </font></div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' >id: </div></td><td width= ' 35% ' > <div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [13]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' > User: </div></td><td width= ' 35% ' ><div align= ' Center ' ><font color= ' #FF0000 ' > '. $reginfo [0]. " </div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' > Password: </div></td><td width= ' 35% ' >< Div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [1]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' > Homepage: </div></td><td width= ' 35% ' ><div align= ' Center ' ><font color= ' #FF0000 ' > '. $reginfo [9]. " </div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' > mailbox: </div></td><td width= ' 35% ' >< Div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [8]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' >oicq:</div></td><td width= ' 35% ' ><div align = ' Center ' ><font color= ' #FF0000 ' > '. $reginfo [3]. " </div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' > nickname: </div></td><td width= ' 35% ' >< Div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [2]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' > rank: </div></td><td width= ' 35% ' ><div ' Center ' ><font color= ' #FF0000 ' > '. $reginfo [11]. " </div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' > Sex: </div></td><td width= ' 35% ' >< Div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [4]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' > Age: </div></td><td width= ' 35% ' ><div align= ' Center ' ><font color= ' #FF0000 ' > '. $reginfo [5]. " </div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' > Occupation: </div></td><td width= ' 35% ' >< Div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [6]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' > from: </div></td><td width= ' 35% ' ><div align= ' Center ' ><font color= ' #FF0000 ' > '. $reginfo [7]. " </div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' > Information security: </DIV></TD><TD width= ' 35% ' > <div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [12]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' > Signature: </div></td><td width= ' 35% ' ><div align= ' Center ' ><font color= ' #FF0000 ' > '. $reginfo [10]. " </div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' > Mail notification: </div></td><td width= ' 35% ' > <div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [18]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' > Registration time: </DIV></TD><TD width= ' 35% ' ><div align = ' Center ' ><font color= ' #FF0000 ' > '. $reginfo [15]. " </div></td></tr> ";
echo "<tr ><td width= ' 15% ' ><div align= ' left ' > Login time: </div></td><td width= ' 35% ' > <div align= ' center ' ><font color= ' #FF0000 ' > '. $reginfo [16]. " </font></div></td> ";
echo "<td width= ' 15% ' ><div align= ' left ' > Avatar: </div></td><td width= ' 35% ' ><div align= ' Center ' ></div></td></tr> ';
$reginfo = $reginfo [0];
echo "<tr bgcolor= ' #006699 ' ><td colspan= ' 4 ' ><div align= ' center ' ><a href= ' reguse.php?action=dl &use= ". $reginfo." ' > User Login </a></div></td></tr> ";
echo "</table></td></tr></table>";
}
Checking information and writing to records
function Reg ($usename, $usepass, $usemail, $useweb, $useni, $useoicq, $usesex, $useage, $usezy, $USEADDR, $USEBQ, $USEQM)
{
if ($usename)///If a user name is passed in, process the user registration module
{
if (strlen ($usename) >8) return 1;
else if (strlen ($usepass) >8) return 2;
else if (strlen ($USEOICQ) >12) return 3;
else if (!uinfo ($usepass, pass)) return 4;
else if (!uinfo ($usename, name)) return 5;
else if (!uinfo ($USEOICQ, OICQ)) return 6;
else if (!uinfo ($usemail, Mail)) return 7;
Else
{
if (! $useinf) $useinf = 2;
$query = "SELECT * from Useinfo where usename= '". $usename. "'"; Whether the user already exists
$req =mysql_query ($query);
$USEINFP =mysql_fetch_array ($req);
if ($USEINFP [0]) return 8;
Else
{
$time =date (Y-year-N-month J-th G-time i);
$USEQM =nl2br ($USEQM); Write User Information
$query = "INSERT into Useinfo (Usename,usepass,usemail,useweb,useni,useoicq,usesex,useage,usezy,useaddr,useinf, Usety,usebq,useqm,useattr,regdate,enddate) VALUES (' ". $usename." ', ' ". $usepass." ', ' ". $usemail." ', ' ". $useweb." ', ' " . $useni. "', '". $useoicq. "', '". $usesex "', '". $useage. "', '". $usezy. "', '". $useaddr. "', '". $useinf. "', '" ". $usebq." ', ' ", $useqm." ', 1,now (), ' ". $time;" ') ";
$req =mysql_query ($query);
if ($req)
{
$query = "SELECT * from Useinfo where usename= '". $usename. "'"; Remove user information and outgoing user side
$req =mysql_query ($query);
$useinfo =mysql_fetch_array ($req);
return $useinfo;
}
else return 10;
}
}
return 9;
}
}
function usemess ($mess, $usename, $usemail, $useweb, $useni, $useoicq, $USEADDR, $USEQM)//Information Entry Form
{
echo "<form method=post>";
echo "<table width= ' 90% ' border= ' 0 ' cellspacing= ' 0 ' cellpadding= ' 0 ' bgcolor= ' #000000 ' align= ' center ' >";
echo "<tr><td><table width= ' 100% ' border= ' 0 ' cellspacing= ' 1 ' cellpadding= ' 1 ' align= ' center ' >";
echo "<tr bgcolor= ' #006699 ' ><td colspan= ' 2 ' ><font color= ' ffffff ' ><div align= ' center ' > Fox Web Forum user Registration---<font color= ' 00ff00 ' > '. $mess. " </font></div></font></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > Username: <font color= ' #FF0000 ' > eight-bit, The first must be the letter </font></div></td><td width= ' 52% ' ><input. $usename. "' ></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > Password: <font color= ' #FF0000 ' > eight-bit, A combination of numbers and letters. </FONT></DIV></TD><TD width= ' 52% ' ><input style= ' background-color: #ffffff; Border-bottom: #000000 1px dashed; Border-left: #000000 1px dashed; Border-right: #000000 1px dashed; Border-top: #000000 1px dashed ' type= ' password ' name= ' usepass ' ' size= ' 8 ' ></td></tr> ';
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > email: <font color= ' #FF0000 ' > Please fill in the real email address. </FONT></DIV></TD><TD width= ' 52% ' ><input '. $usemail. "' ></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > personal homepage: </div></td><td Width= ' 52% ' ><div align= ' left ' ><input '. $useweb. "' ></div></td></tr> ";
echo "<tr bgcolor= ' #006699 ' ><td colspan= ' 2 ' ><div align= ' center ' ><font color= ' #FFFFFF ' > Personal information setting </font></div></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > your nickname: </div></td><td Width= ' 52% ' ><div align= ' left ' ><input '. $useni. "' ></div></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' >OICQ:</DIV></TD><TD Width= ' 52% ' ><div align= ' left ' ><input '. $useoicq. "' ></div></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > Sex: </DIV></TD><TD Width= ' 52% ' ><div align= ' left ' ><select > I'm a girl </option></select></div></td> </tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > Age: </DIV></TD><TD Width= ' 52% ' ><div align= ' left ' ><select >17 years old </option> ';
echo "<option value= ' >18 years old </option><option value= ' >19 years </option><option value= ' 20 ' SELECTED>20-year-old </option><option value= ' >21-year-old </option><option value= ' >22-year-old </option ><option value= ' >23-year-old </option><option value= ' >24-year-old </option><option value= ' 25 ' >25-year-old </option><option value= ' >26-year-old </option><option value= ' >27 ' age </option>< Option Value= ' >28 years old </option><option value= ' >29 years </option><option ' value= ' or above </option></select></div></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > Occupation: </DIV></TD><TD Width= ' 52% ' ><div align= ' left ' ><select > Don't tell you </option></select></div></td> </tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > where from: </DIV></TD><TD Width= ' 52% ' ><div align= ' left ' ><input '. $useaddr. "' ></div></td></tr> ";
echo "<tr bgcolor= ' #006699 ' ><td colspan= ' 2 ' ><div align= ' left ' ></div><div ' center ' ><font color= ' #FFFFFF ' > parameter setting </font></div></td></tr>;
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > whether others are allowed to view your information: </div></td ><TD width= ' 52% ' ><div align= ' left ' ><input type= ' radio ' name= ' Useinf ' ' 2 ' > No value= <input ' Radio ' name= ' Useinf2 ' value= ' 1 ' checked> is </div></td></tr> ';
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' valign= ' top ' ><div ' left ' > personal signature file align= /TD><TD width= ' 52% ' ><div align= ' left ' ><textarea > '. $useqm. " </textarea></div></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td width= ' 40% ' ><div align= ' left ' > Allow moderators or administrators to send you an email notification:</div>< /TD><TD width= ' 52% ' ><div align= ' left ' ><input type= ' radio ' name= ' usety ' 2 ' > No value= Type= ' Radio ' name= ' usee2 ' value= ' 1 ' checked> is </div></td></tr> ';
echo "<tr bgcolor= ' #006699 ' ><td colspan= ' 2 ' ><div align= ' center ' ><font color= ' #FFFFFF ' > Avatar Settings </font></div></td></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td colspan= ' 2 ' ><div align= ' center ' ><input type= ' radio ' name= ' bq[0] ' Value= ' a ' > <input Type= ' Radio ' name= ' bq[1] ' value= ' 1 ' > <input type= ' Radio ' name= ' bq[2] ' value= ' 2 ' > <input type= ' Radio ' name= ' bq[3] ' value= ' 3 ' > <input type= ' Radio ' name= ' ba[4] ' value= ' 4 ' > ';
echo "<input type= ' Radio ' name= ' bq[5] ' value= ' 5 ' > <input type= ' Radio ' name= ' bq[6] ' value= ' 6 ' > <input type= ' Radio ' name= ' Ba7 ' ' value= ' [7] ' > <input type= ' Radio ' name= ' ba[8] ' value= ' 8 ' >< IMG src= ' http://edu.cnzz.cn/NewsInfo/images/8.gif ' width= ' height= ' > <input type= ' Radio ' name= ' ba[9 ' Value= ' 9 ' ></div></td ></tr> ";
echo "<tr bgcolor= ' #eeeeee ' ><td colspan= ' 2 ' ></td></tr>";
echo "</table></td></tr></table>";
echo "<div align= ' center ' ><input type= ' HIDDEN ' name= ' action ' value= ' Add ' ><input class= ' bott ' type= ' Submit ' Name= ' value= ' submitted! ' ><input class=bott type= ' reset ' name= ' reset ' value= ' refill ' ></form></div> ';
}
function Dlmes ($mess)
{
echo "<table width= ' 50% ' border= ' 0 ' cellspacing= ' 0 ' cellpadding= ' 0 ' bgcolor= ' #000000 ' align= ' center ' >";
echo "<tr><td>";
echo "<table width= ' 100% ' border= ' 0 ' cellspacing= ' 1 ' cellpadding= ' 1 ' bgcolor= ' #eeeeee ' ><form method= ' post ' > ";
echo "<tr bgcolor= ' #009999 ' ><td><div align= ' center ' ><font color= ' #FFFFFF ' > '. $mess." </font></div></td></tr> ";
echo "<tr><td><div align= ' center ' > Username: <input type= ' text ' name= ' uname ' ></div></td ></tr> ";
echo "<tr><td><div align= ' center ' > Password: <input type= ' password ' name= ' UPass '" ></div></ Td></tr> ";
echo "<tr><td><div align= ' center ' ><input type= ' submit ' name= ' submit ' value= ' OK ' ></div ></td></tr> ";
echo "<tr><td><input type= ' hidden ' name= ' action ' value= ' DL ' ></td></tr>";
echo "<tr><td><div align= ' center ' ><a href= ' useinfo.php?action=pass ' >[forgotten password]</a> href= ' reguse.php?action=xy ' >[I want to register]</a></div></td></tr> ";
echo "<tr bgcolor= ' #009999 ' ><td height= ' ></td></tr>";
echo "</form></table></td></tr></table>";
}
?>