当前位置:编程学习 > php >>

我的论坛源代码(八)

答案: reguse.php用户注册与登录页面

<?
if ($action==dl&&$uname)
{
$uinfo=$uname."|".$upass;
setcookie("FlyFoxNet",$uinfo,time()+3600);
}
?>
<html>
<head>
<title>用户注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>
P {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
DIV {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
</STYLE>
<LINK href=></head>
<?php
include "linkfox.inc.php";
include "info.inc.php";
include "reguse.inc.php";

function dlokey($user) //登录成功显示
{
echo "<script language='JavaScript'> alert('".$user3."欢迎你再次来到狐网论坛,站长飞狐||黑暗居士欢迎你!你上次来访的时间是".$user[2]."'); </script>";
echo "<table width='50%' border='0' cellspacing='0' cellpadding='0' align='center' bgcolor='#000000'>";
echo "<tr><td><table width='100%' border='0' cellspacing='1' cellpadding='1'><tr bgcolor='#006699'><td>";
echo "<div align='center'><font color='#FFFFFF'>欢迎你!<font color='00ff00'>".$user[3]."</font></font></div></td></tr><tr bgcolor='#eeeeee'><td>";
echo "<div align='center'>你上次访问本站的时间是:<font color='009900'>".$user[2]."</font></div></td></tr><tr bgcolor='#eeeeee'>";
echo "<td><div align='center'>你现在可以<a href=>echo "</table></td></tr></table>";
}




?>
<body bgcolor="#FFFFFF">
<table width="100%" cellpadding="4" cellspacing="0" border="0">
<tr>
<td height="20">
<div align="right"></div>
</td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
<td height="20" width="75"> </td>
</tr>
<tr>
<td height="20">
<div align="right"></div>
</td>
<td height="20" width="75">
<div align="center"><img src="images/top_register.gif" width="74" height="21" border="0"></div>
</td>
<td height="20" width="75">
<div align="center"><img src="images/top_members.gif" width="74" height="21"></div>
</td>
<td height="20" width="75"><img src="images/top_profile.gif" width="74" height="21"></td>
<td height="20" width="75"><a href=> </tr>
<tr>
<td height="20">
<div align="left">当前位置:<font color="#0000FF">狐网─>狐网论坛─>会员注册</font></div>
</td>
<td height="20" width="75">
<div align="center"><a href=> </td>
<td height="20" width="75">
<div align="center"><a href=> </td>
<td height="20" width="75"><a href=> <td height="20" width="75">
<div align="center"><a href=> </td>
</tr>
</table>
<?
if ($action==xy)
{
echo "<table width='100%' border='0' cellspacing='0' cellpadding='0' bgcolor='#000000'><tr><td>";
echo "<table width='100%' border='0' cellspacing='1' cellpadding='1'>";
echo "<tr bgcolor='#006699'><td height='20'><div align='center'><font color='#FFFFFF'>狐网论坛 规定</font></div></td></tr>";
echo "<tr bgcolor='#eeeeee'><td height='20'>";
echo "<div align='left'><p>你在这个论坛注册是完全免费的! 我们希望您遵守以下的论坛规定. 请仔细阅读下列条款. 如果您同意请按 '我同意' 按钮. 如果您不同意,";
echo "请按 '不同意' 按钮退出.</p>";
echo "<p> 1. 遵守中华人民共和国的各项有关法律法规.</p>";
echo "<p> 2. 不得在发布任何色情非法, 以及危害国家安全的言论.</p>";
echo "<p> 3. 严禁链接有关政治, 色情, 宗教, 迷信等违法信息.</p>";
echo "<p> 4. 承担一切因您的行为而直接或间接导致的民事或刑事法律责任; </p>";
echo "<p> 5. 互相尊重, 遵守互联网络道德; 严禁互相恶意攻击, 漫骂;</p>";
echo "<p> 6. 管理员及版主有权保留或删除论坛中的任意内容;</p>";
echo "<p> 7. 本站网管拥有一切管理权力. </p>";
echo "<p> 8. 在此论坛发表的原创文章,版权规作者与狐网共有。</p>";
echo "</div></td></tr></table>";
echo "</td></tr></table>";
echo "<div align='center'><FORM ACTION='reguse.php' METHOD='get'><INPUT TYPE='HIDDEN' NAME='action' VALUE='reg'>";
echo "<INPUT TYPE='SUBMIT' VALUE='我同意'></p></form>";
echo "<div align='center'><FORM ACTION='foxbbs.php' METHOD='get'><INPUT TYPE='SUBMIT' VALUE='不同意'></p></form>";
}
else if ($action==reg)
{
usemess("请在下表填写注册信息",'必填','必填','必填','必填','必填','必填','必填');
}
if ($action==add)
{
if ($useni) //如果有信息
{
for ($i=0;$i<10;$i++)
{
if ($bq[$i]) $usebq=$bq[$i];
}
$reginfo=reg($usename,$usepass,$usemail,$useweb,$useni,$useoicq,$usesex,$useage,$usezy,$useaddr,$useinf,$usety,$usebq,$useqm);
switch ($reginfo)
{
case ($reginfo==1):
usemess("错误!用户名超长",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==2):
usemess("错误!密码超长",$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm);
break;
case ($reginfo==3):
usemess(&q

上一个:PHP的FTP学习(一)
下一个:我的论坛源代码(三)

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,