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

班级管理部分:
   首页:superadmin.php
<?php
include ("class/config.php");
if ($superadmin){      //如果已经进行管理员登陆,进行密码验证
  if (!($supername==$supervisor)||!($superpass==$superpsw)){  
   echo "密码错误";
   exit;
   }else{ //用session记录管理员登陆
   session_start(); // 开始session
   session_register("superlogin");
   $superlogin=$supername;   
   }
}else{              //管理员登陆
echo "<form name='form1' method='post' action='$PHP_SELF'>";
echo "<div align='center'> 请输入管理员密码<br>";
echo "管理员";  
echo "<input type='text' name='supername'><br>";
echo "密码";
echo "<input type='password' name='superpass'><br>";
echo "<input type='submit' name='superadmin' value='进入'><br>";
echo "<input type='reset' name='cancel' value='重写'></div>";   
echo "</form>";
exit;
}
?>
<html>
<head>
<title>班级管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<p> </p>
<table width="73%" border="0" cellspacing="0" cellpadding="0" align="center" height="208">
  <tr>  
    <td>
      <div align="center"><img src="http://edu.cnzz.cn/NewsInfo/class/image/classlogo.gif" width="224" height="60"></div>
    </td>
  </tr>
  <tr>  
    <td>  
      <div align="center">班级管理</div>
    </td>
  </tr>
  <tr>  
    <td>  
      <div align="center">
        <a href="class/admin/addmember.php" target="_blank">添加成员</a><br>
        <a href="class/admin/member.php" target="_blank">显示、删除成员</a><br>
        <a href="class/admin/editmember.php" target="_blank">修改成员信息</a><br>
        <a href="class/notebook/delnote.php" target="_blank">班级留言管理</a><br>
        <a href="class/notebookg/delnote.php" target="_blank">客人留言管理</a></div>
    </td>
  </tr>
</table>
</body>
</html>
添加成员:class/admin/addmember.php
<?
session_start();
if(!session_is_registered("superlogin"))//检查是否注册
{
echo "<a href='../../superadmin.php'>请重新进行管理员登陆<BR>";
exit;
}
include "../config.php";
if ($submit){
if (!$username||!$name){           //检查是否填写完整
      echo "对不起,您必须填所有带*的项目!<BR>"."<a href='javascript:history.back()'>返回</a>";
      exit;
    }
$username=trim($username);
$psw=trim($psw);
$name=trim($name);
$birth=$year.'-'.$month.'-'.$day;
$work=trim($work);
$ad=trim($ad);
$post=trim($post);
$ph=trim($ph);
$bp=trim($bp);
$email=trim($email);