日期:2013-01-23  浏览次数:20512 次

注册部分:
   注册步骤1: class/register_step1.php
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>班级通讯录-注册第一步</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<?php
include "config.php";
if ($Submit){
$answers1=trim($answers1);
$answers2=trim($answers2);
if (!($answers1==$answer1)||!($answers2==$answer2)){
echo "回答错误!<a href='javascript:history.back()'>返回</a>";
exit;
}
echo "回答正确,<a href='register_step2.php?answer=right'>进入第二步</a>。";
exit;
}
?>
<table width="73%" border="0" cellspacing="0" cellpadding="0" align="center" height="190">
  <tr>  
    <td height="76">
      <div align="center"><img src="http://edu.cnzz.cn/NewsInfo/image/classlogo.gif" width="224" height="60"></div>
    </td>
  </tr>
  <tr>
    <td height="32">  
      <div align="center">注册第一步-身份验证</div>
    </td>
  </tr>
  <tr>
    <td height="153">
      <p align="center">请回答以下问题</p>
      <form name="form1" method="post" action="<? echo $PHP_SELF;?>">
        <div align="center">1.<? echo $question1?><br>
          您的回答  
          <input type="text" name="answers1">
          <br>
          2.<? echo $question2?><br>
          您的回答  
          <input type="text" name="answers2">
          <br>
          <input type="submit" name="Submit" value="确认">
          <input type="reset" name="cancel" value="重写">
        </div>
      </form>
      <p align="center"><br>
        <br>
        实在想不起来了,<a href="querypsw.php">问问管理员吧</a>。<br>
      </p>
    </td>
  </tr>
</table>
</BODY>
</HTML>
注册步骤2: class/register_step2.php
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>94级1班通讯录-注册第二步</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<?php
if (!$answer=="right"){          //页面保护
echo "请不要投机取巧!";
exit;
}
include "config.php";
if ($submit){
if (!$username||!$psw||!$psw2||!$name||!$ad||!$ph||!$email){           //检查是否填写完整
      echo "对不起,您2必须填所有带*的项目!<BR>"."<a href='javascript:history.back()'>返回</a>";
      exit;
  &nbs