⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 personmanager.php3

📁 网络同学录程序
💻 PHP3
字号:
<?
/*大家好,我是豆腐
提供原码是我的一贯原则,但是希望大家能够尊重豆腐的工作
希望大家在使用的过程中随时和我联系 roboo@21cn.com
您可以随意修改代码,但是请保留我的注释(如果不保留,我也没办法)
如果您觉得这个程序对您有或多或少的帮助,豆腐希望能够得到您的鼓励
您的鼓励和支持,是我们工作的最大动力
    .  =======
   / \| O   O |
   \ /  \v_'/
    #   _| |_
   (#) (     )
    #\//|* *|\\
    #\/(  *  )/       //豆腐制作,都是精品
    #   =====
    #   (\ /)
    #   || ||
   .#---'| |----.
    #----' -----'
    //哲人说:用我的心换你的心,我们便拥有两颗心
*/
?>
<?
  include("conn.php3");
  include("db.php3");
  include("userfunc.php3");
  $conn=openconn();
?>
<?
 if(isset($name)){
   $count = count($name);
   echo "您选中了:<br>";
   $SQL="delete from " . $DataBaseOwerName . ".class_userrelation where ";
   for($i=0;$i<$count;$i++){
      $SQL=$SQL . "userid='" . $name[$i] . "' ";
      if(($i+1)<$count){
        $SQL=$SQL . " or ";
      }
   }
   $stmt=opensql($conn,$SQL);
}
?>
<?

  $SQL="select * from " . $DataBaseOwerName . ".class_class where classid='" . $classid . "'";
  $stmt1=opensql($conn,$SQL);
  $stmt=fecthrow($stmt1);
  if(getcolumn($stmt,"MANAGERID")!=$userid){
     echo "对不起,您不是这个班级的管理员!";
     exit;
  }
  $SQL="select * from " . $DataBaseOwerName . ".class_userRelation,class_userInfo where class_userRelation.classid='" . $classid . "' and class_userRelation.userid=class_userInfo.userid and class_userRelation.userid<>'" . $userid ."'";
  $stmt1=opensql($conn,$SQL);
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="class.css">
<title>班级管理</title>
</HEAD>
<BODY>
人员管理: <br>
  <form action=<? echo $PHP_SELF ?>?userid=<? echo $userid ?>&classid=<? echo $classid ?>  method="post">
   <table border=1>
   <?$i =0;?>
   <? while($stmt=fecthrow($stmt1)){ ?>
      <tr><td>
        <input type=checkbox name="name[]" value="<? echo getcolumn($stmt,"USERID") ?>"><? echo getcolumn($stmt,"USERID") ?>
      </td></tr>
   <? $i=$i+1;
     }?>
   </table>
   <input type=hidden name="num" value="<? echo $i; ?>">
   <input type=submit name="cmdDo" value="删除" class=buttonface>
  </form>
</BODY>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -