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

📄 admin.php

📁 一个很好的同学录,PHP+TXT,没有数据库的网友的最好选择
💻 PHP
字号:
<?
session_start();
if($_SESSION['power']<2) {$error="你没有管理班级的权限";include("inc_error.php");die();}

$title="班级管理";
include("inc_head.php");
if(!$_CLASS_CONF) include("conf_class.php");
echo '
<table align=center border=1 cellpadding=0 cellspacing=0 width=762 bordercolor=#FFFFFF style="border-collapse: collapse">
  <tr>
    <td width=580 bgcolor=#6BBED6 valign="top" align="center">
      <div style="margin:8;background-color:#FFFFFF;width:560px;text-align:center">
		  <table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#F9F9EF>
            <tr>
              <td width=180 rowspan=2></td>
              <td width=200 style="border:1px solid #C7C7C3;border-top-width:0;height:24;background:#F0F3ED;font-size:16px" valign="middle" align="center">'.htmlspecialchars($class_name).'</td>
              <td width=180 rowspan=2></td>
            </tr>
            <tr><td align="center"><img src="images/bt_t07.gif" width=176 height=11></td></tr>
            <tr><td height=16 colspan=3></td></tr>
            <tr><td height=5 colspan=3 background="images/bj06.gif"></td></tr>
			<tr align="center"><td height=24 colspan=3 bgcolor=#FFFFFF>=> <a href="define.php" target="_blank" class="red"><b>班级管理的权利和义务</b></a></td></tr>
          </table>
          <table width=92% border=0 cellspacing=0 cellpadding=0 style="margin:5px">
            <tr><td height=22 bgcolor=#F0ECE6> 班 级 宣 言</td></tr>
            <tr>
              <td align="center">
			    <form action="deal_class.php?a=cb" method="post" name="cb" style="width:90%;text-align:left;margin:0">
                  <p><br>宣言内容:(可以使用HTML)<br>
                  <textarea name="brief" class="input" style="height:80;width:450">'.$alumni_brief.'</textarea>
                </form>
			  </td>
            </tr>
			<tr>
              <td align="right">
                <input type="button" class="input" value="发 表" onClick="document.cb.submit()"> <input type="button" class="input" value="重 写" onClick="document.cb.reset()"> &nbsp; &nbsp; &nbsp;
			  </td>
            </tr>
          </table>
          <table width=92% border=0 cellspacing=0 cellpadding=0 style="margin:5px">
            <tr><td height=22 bgcolor=#F0ECE6> 相 册 宣 言</td></tr>
            <tr> 
              <td align="center">
			    <form action="deal_class.php?a=ab" method="post" name="ab" style="width:90%;text-align:left;margin:0">
                  <p><br>班级相册简短介绍(21字节*7行内,可以使用HTML)<br>
                    <textarea name="brief" style="height:80;width:450" class="input">'.$album_brief.'</textarea>
                </form></td>
            </tr>
            <tr> 
              <td align="right">
				<input type="button" class="input" value="发 表" onClick="document.ab.submit()"> <input type="button" class="input" value="重 写" onClick="document.ab.reset()"> &nbsp; &nbsp; &nbsp;
			  </td>
            </tr>
          </table>
          <table width=92% border=0 cellspacing=0 cellpadding=0 style="margin:5px">
            <tr><td height=22 bgcolor=#F0ECE6> 班 级 名 称</td></tr>
            <tr> 
              <td align="center">
				<br>
				<form action="deal_class.php?a=cn" method="post" name="cn" style="width:90%;margin:5;text-align:left">
                  修改(HTML不可用): <input name="name" type="text" class="input" value="'.htmlspecialchars($class_name).'" size=30> &nbsp;  <input name="cn_sub" type="submit" class="input" id="cn_sub" value="确认修改">
                </form>
			  </td>
            </tr>
          </table>
          <form action="deal_mem.php?action=mmbrMng" method="post" name="mm">
            <table width=92% border=1 cellspacing=0 cellpadding=0 style="margin:5px" style="border-collapse: collapse" bordercolor=#F0ECE6>
            <tr><td height=22 colspan=4 bgcolor=#F0ECE6 style="border-bottom:1 solid #fff"> 成 员 管 理</td></tr>
            <tr> 
              <td height=24 bgcolor=#F0ECE6>&nbsp;  (<font color=#FF0000>★</font>表示管理员)</td>
              <td colspan=3 align="right" bgcolor=#F0ECE6 valign="bottom">将选中人员 
                  <input name="sj" type="image" src="images/b_sj.gif" width=82 height=16>
                  <input name="jj" type="image" src="images/b_jj.gif" width=82 height=16>
                  <input name="tc" type="image" src="images/b_tc.gif" width=82 height=16> &nbsp;
              </td>
            </tr>
';
if(!$_MYSQL_INC) include("conf_mysql.php");		//以下成员管理部分
$sql="select id,power from mc_member where power>0 order by id";
$Myres=mysql_query($sql,$Mylink);
$tmp_j=0;
while($row=mysql_fetch_row($Myres)){
	if($tmp_j%4==0) echo "<tr>";
	echo "<td width=25% height=32>&nbsp;<input type='radio' name='id' value='{$row[0]}'> <a href='member.php?id={$row[0]}' class='black' target='personal'>{$row[0]}</a>";
	if($row[1]>1) echo " <font color=#FF0000>★</font>";
	echo "</td>";
	if($tmp_j%4==3) echo "</tr>";
	$tmp_j++;
}
if($tmp_j%4) {
	for($tmp_k=0;$tmp_k<4-($tmp_j%4);$tmp_k++) echo "<td width=25% height=32>&nbsp;</td>";
	echo "</tr>";
}
echo '
          </table>
		</form>
		<form action="deal_mem.php?action=confNew" method="post" name="cn">
          <table width=92% border=0 cellspacing=0 cellpadding=0 style="margin:5px">
            <tr>
			  <td height=22 bgcolor=#F0ECE6> 新 成 员 加 入</td>
			  <td colspan=2 bgcolor=#F0ECE6 align="right" valign="bottom">
                  <input name="pz" type="image" src="images/b_pz.gif" width=40 height=16>
                  <input name="ju" type="image" src="images/b_ju.gif" width=40 height=16> &nbsp;
			  </td>
			</tr>
';
$sql="select name,id from mc_member where power=0";		//以下新加入者批准事宜
$Myres=mysql_query($sql,$Mylink);
if(mysql_num_rows($Myres))
{
	$tmp_i=0;
	$td_head=array("<td width=33% height=32 style='border-bottom:1 solid #F0ECE6'>","<td width=34% style='border:1 solid #F0ECE6;border-top-width:0'>","<td width=33% style='border-bottom:1 solid #F0ECE6'>");
	while($row=mysql_fetch_row($Myres)){
		if($tmp_i%3==0) echo "<tr>";
		echo $td_head[$tmp_i%3]."&nbsp;<input type='radio' name='id' value='{$row[1]}'> <a href='member.php?id={$row[1]}' class='black' target='personal'>{$row[0]}({$row[1]})</a></td>";
		if($tmp_i%3==2) echo "</tr>";
		$tmp_i++;
	}
	if($tmp_i%3==1) echo $td_head[1]."&nbsp;</td>".$td_head[2]."&nbsp;</td></tr>";
	else if($tmp_i%3==2) echo $td_head[2]."&nbsp;</td></tr>";
}
else echo '<td height=32 colspan=3 align=center style="border-bottom:1 solid #F0ECE6">近期没有新成员加入;还不赶快去把老同学们拉来:)</td>';
echo '
          </table>
		</form>
      </div>
	</td>
    <td width=184 bgcolor=#E1EFF6 valign="top" align="center"> 
';
include("inc_birth.php");
include("inc_nav.php");
echo '
    </td>
  </tr>
</table>
';
include("inc_foot.php");
?>

⌨️ 快捷键说明

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