<span class="unnamed3">reguse.inc.php处理注册用户时的信息 <br><br> <br><br>function regok($mess,$reginfo) //记录成功后输出用户信息 <br>{ <br>echo "<table width="70%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" align="center">"; <br>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>"; <br>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>"; <br>echo "<td width="15%"><div align="left">用户:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[0]."</font></div></td> </tr>"; <br>echo "<tr> <td width="15%"><div align="left">密码:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[1]."</font></div></td>"; <br>echo "<td width="15%"><div align="left">主页:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[9]."</font></div></td> </tr>"; <br>echo "<tr> <td width="15%"><div align="left">邮箱:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[8]."</font></div></td>"; <br>echo "<td width="15%"><div align="left">oicq:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[3]."</font></div></td> </tr>"; <br>echo "<tr> <td width="15%"><div align="left">昵称:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[2]."</font></div></td>"; <br>echo "<td width="15%"><div align="left">等级:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[11]."</font></div></td> </tr>"; <br>echo "<tr> <td width="15%"><div align="left">性别:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[4]."</font></div></td>"; <br>echo "<td width="15%"><div align="left">年龄:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[5]."</font></div></td> </tr>"; <br>echo "<tr> <td width="15%"><div align="left">职业:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[6]."</font></div></td>"; <br>echo "<td width="15%"><div align="left">来自:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[7]."</font></div></td> </tr>"; <br>echo "<tr> <td width="15%"><div align="left">信息保密:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[12]."</font></div></td>"; <br>echo "<td width="15%"><div align="left">签名:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[10]."</font></div></td> </tr>"; <br>echo "<tr> <td width="15%"><div align="left">邮件通知:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[18]."</font></div></td>"; <br>echo "<td width="15%"><div align="left">注册时间:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[15]."</font></div></td> </tr>"; <br>echo "<tr> <td width="15%"><div align="left">登录时间:</div></td> <td width="35%"><div align="center"><font color="#FF0000">".$reginfo[16]."</font></div></td>"; <br>echo "<td width="15%"><div align="left">头像:</div></td> <td width="35%"><div align="center"><img src="images/%22.%24reginfo%5B14%5D.%22.gif" alt="我的论坛源代码(十)" ></div></td> </tr>"; <br>$reginfo=$reginfo[0]; <br>echo "<tr bgcolor="#006699"><td colspan="4"><div align="center"><a href="reguse.php?action=dl&use=%22.%24reginfo.%22">用户登录</a></div></td></tr>"; <br>echo "</table></td></tr> </table>"; <br><br><br>} <br><br><br><br> //检查信息并写入记录 <br>function reg($usename,$usepass,$usemail,$useweb,$useni,$useoicq,$usesex,$useage,$usezy,$useaddr,$useinf,$usety,$usebq,$useqm) <br>{ <br> if ($usename) //如果有用户名传入则处理 用户注册模块 <br> { <br> if(strlen($usename)>8) return 1; <br> else if(strlen($usepass)>8) return 2; <br> else if(strlen($useoicq)>12) return 3; <br> else if(!uinfo($usepass,pass)) return 4; <br> else if(!uinfo($usename,name)) return 5; <br> else if(!uinfo($useoicq,oicq)) return 6; <br> else if(!uinfo($usemail,mail)) return 7; <br> else <br> { <br> if(!$useinf) $useinf=2; <br> $query="select * from useinfo where usename='".$usename."'"; //是否已经存在用户 <br> $req=mysql_query($query); <br> $useinfp=mysql_fetch_array($req); <br> if ($useinfp[0]) return 8; <br> else <br> { <br> $time=date(Y年n月j日G时i分); <br> $useqm=nl2br($useqm); //写入用户信息 <br> $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."','".$usety."','".$usebq."','".$useqm."',1,now(),'".$time."')"; <br> $req=mysql_query($query); <br> if ($req) <br> { <br> $query="select * from useinfo where usename='".$usename."'"; //取出用户信息,并传出用户端 <br> $req=mysql_query($query); <br> $useinfo=mysql_fetch_array($req); <br> return $useinfo; <br> } <br> else return 10; <br> } <br> } <br> return 9; <br> } <br>} <br><br>function usemess($mess,$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm) //信息输入表单 <br>{ <br>echo "<form method="post">"; <br>echo "<table width="90%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" align="center">"; <br>echo "<tr><td><table width="100%" border="0" cellspacing="1" cellpadding="1" align="center">"; <br>echo "<tr bgcolor="#006699"><td colspan="2"><font color="ffffff"><div align="center">狐网论坛用户注册---<font color="00ff00">".$mess."</font> </div></font></td></tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left"> 用 户 名:<font color="#FF0000">八位,第一位必须是字母</font> </div></td> <td width="52%"><input></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">密 码:<font color="#FF0000">八位,数字和字母组合.</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="30" maxlength="8"></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">电子信箱:<font color="#FF0000">请填写真实的邮箱地址。</font> </div></td> <td width="52%"><input></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">个人主页:</div></td> <td width="52%"><div align="left"><input></div></td> </tr>"; <br>echo "<tr bgcolor="#006699"><td colspan="2"><div align="center"><font color="#FFFFFF">个人信息设定</font></div></td></tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">你的昵称:</div></td> <td width="52%"><div align="left"><input></div></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">OICQ:</div></td> <td width="52%"><div align="left"><input></div></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">性 别:</div></td> <td width="52%"><div align="left"><select>我是女生</select></div></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">年 龄:</div></td> <td width="52%"><div align="left"><select>17 岁"; <br>echo "<option value="18">18 岁</option> <option value="19">19 岁</option> <option value="20" selected>20 岁</option> <option value="21">21 岁</option> <option value="22">22 岁</option> <option value="23">23 岁</option> <option value="24">24 岁</option> <option value="25">25 岁</option> <option value="26">26 岁</option> <option value="27">27 岁</option> <option value="28">28 岁</option> <option value="29">29 岁</option> <option value="30">30或以上</option></select></div></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">职 业:</div></td> <td width="52%"><div align="left"><select>不告诉你</select></div></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">来自何方:</div></td> <td width="52%"><div align="left"><input></div></td> </tr>"; <br>echo "<tr bgcolor="#006699"><td colspan="2"> <div align="left"></div> <div align="center"><font color="#FFFFFF">参数设定</font></div> </td></tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">是否充许他人查看你的信息:</div></td> <td width="52%"><div align="left"> <input type="radio" name="useinf" value="2">否 <input type="radio" name="useinf2" value="1" checked>是</div></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%" valign="top"><div align="left">个人签名档:</div></td> <td width="52%"><div align="left"><textarea>".$useqm."</textarea></div></td> </tr>"; <br>echo "<tr bgcolor="#eeeeee"> <td width="40%"><div align="left">是否允许版主或管理员给你发邮件通知:</div></td> <td width="52%"><div align="left"> <input type="radio" name="usety" value="2">否 <input type="radio" name="usee2" value="1" checked>是</div></td> </tr>"; <br>echo "<tr bgcolor="#006699"><td colspan="2"><div align="center"><font color="#FFFFFF">头像设定</font></div></td></tr>"; <br>echo "<tr bgcolor="#eeeeee"><td colspan="2"><div align="center"> <input type="radio" name="bq[0]" value="a"><img src="http://edu.cnzz.cn/NewsInfo/images/a.gif" style="max-width:90%" style="max-width:90%" checked alt="我的论坛源代码(十)" > <input type="radio" name="bq[1]" value="1"><img src="http://edu.cnzz.cn/NewsInfo/images/1.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > <input type="radio" name="bq[2]" value="2"><img src="http://edu.cnzz.cn/NewsInfo/images/2.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > <input type="radio" name="bq[3]" value="3"><img src="http://edu.cnzz.cn/NewsInfo/images/3.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > <input type="radio" name="ba[4]" value="4"><img src="http://edu.cnzz.cn/NewsInfo/images/4.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > "; <br>echo "<input type="radio" name="bq[5]" value="5"><img src="http://edu.cnzz.cn/NewsInfo/images/5.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > <input type="radio" name="bq[6]" value="6"><img src="http://edu.cnzz.cn/NewsInfo/images/6.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > <input type="radio" name="ba7" value="[7]"><img src="http://edu.cnzz.cn/NewsInfo/images/7.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > <input type="radio" name="ba[8]" value="8"><img src="http://edu.cnzz.cn/NewsInfo/images/8.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > <input type="radio" name="ba[9]" value="9"><img src="http://edu.cnzz.cn/NewsInfo/images/9.gif" style="max-width:90%" style="max-width:90%" alt="我的论坛源代码(十)" > </div></td></tr>"; <br>echo "<tr bgcolor="#eeeeee"><td colspan="2"></td></tr>"; <br>echo "</table></td></tr> </table>"; <br>echo "<div align="center"> <input type="HIDDEN" name="action" value="add"><input class="bott" type="SUBMIT" name="submit" value="提 交!"><input class="bott" type="RESET" name="Reset" value="重 填"> </div>"; <br>} <br>function dlmes($mess) <br>{ <br>echo "<table width="50%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" align="center">"; <br>echo "<tr><td>"; <br>echo "<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#eeeeee"><form method="post">"; <br>echo "<tr bgcolor="#009999"><td><div align="center"><font color="#FFFFFF">".$mess."</font></div></td></tr>"; <br>echo "<tr><td><div align="center">用户名:<input type="text" name="uname"> </div></td></tr>"; <br>echo "<tr><td><div align="center">密 码:<input type="password" name="upass"> </div></td></tr>"; <br>echo "<tr><td><div align="center"><input type="submit" name="Submit" value="确定"></div></td></tr>"; <br>echo "<tr><td><input type="hidden" name="action" value="dl"></td></tr>"; <br>echo "<tr><td><div align="center"> <a href="useinfo.php?action=pass">[忘记密码]</a> <a href="reguse.php?action=xy">[我要注册]</a> </div></td></tr>"; <br>echo "<tr bgcolor="#009999"><td height="20"></td></tr>"; <br>echo "</form></table> </td></tr> </table>"; <br>} <br>?> </form></span> <p style="width:100%;text-align:center;margin:10px 0"> <br> <br> </p> <p style="width:100%;text-align:center;margin:10px 0"> </p> <p class="clear"></p>