您现在的位置: 军旅同心-旅游自驾-军旅文学 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 正文
基于mysql的论坛(5)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 14:35:30
sp;<td align="center">  
                <input type="submit" name="b2" value="修改">
                <input type="reset" name="Submit2" value="清除" >
              </td>
            </tr>
          </table>
        </form>
      </td>
    </tr>
  </table>
  <div align="center"><br>
  </div>
</div>
<?php include "footer.php";?>
</body>
</html>
<?php
}
else {
    show_error(4);
}
?>
## modify_l.php
<?php
require "func.php";
if ($b1) {
    if (is_user_exits($name) and check_user_password($name,$password)) {
    setcookie ("jl_forum[name]",$name);
    setcookie ("jl_forum[password]",$password);
    redirect2("modify.php");
    }
    else {
        show_error(4);
    }
}
else {
?>
<html>
<head>
<title>main</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/page.css">
</head>

<body bgcolor="#FFFFFF" background="image/bg.gif">
<table width="90%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#FFCC99" bordercolordark="#FFCC99">
  <tr bgcolor="#CCFF99">  
    <td>
      <div align="center"><b>修改资料登陆</b></div>
    </td>
  </tr>
  <tr align="center">  
    <td>
      <form method="post" action="modify_l.php">
        <table width="70%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="38%" align="right">用户名:</td>
            <td width="62%" align="left">
              <input type="text" name="name" size="17" maxlength="16">
            </td>
          </tr>
          <tr>
            <td width="38%" align="right">密码:</td>
            <td width="62%" align="left">
              <input type="password" name="password" size="17" maxlength="16">
            </td>
          </tr>
        </table>
        <input type="submit" name="b1" value="进入">
      </form>
    </td>
  </tr>
  <tr bgcolor="#CCFF99">  
    <td>
      <div align="center"><b>论坛信息</b></div>
    </td>
  </tr>
  <tr valign="top">  
    <td>  
<?php include "info.php";?>
    </td>
  </tr>
</table>
</body>
</html>
<?php
}
?>
## oper.php
<?php
require "func.php";
if (adminok()) {
    if (isset($add_board)) {
        if (isset($name) and isset($chinesename) and !is_board_exits($name)) {
            create_board_table($name,$chinesename);
        }
        else {
            echo "出现错误!(可能版面已经存在)";
            $founderr=1;
        }
    }
    elseif (isset($del_board)) {
        if (isset($board)) {
            drop_board_table($board);
        }
        else {
            echo "出现错误!(请选择要删除的版面)";
            $founderr=1;
        }
    }
    elseif (isset($modify)) {
        if (isset($name) and isset($chinesename)) {
            update_board($name,$chinesename);
        }
        else {
            echo "出现错误!(请填写完整)";
            $founderr=1;
        }
    }
    elseif (isset($add_admin)) {
        if (is_user_exits($name) and isset($board)) {
            add_admin($board,$name);
        }
        else {
            echo "出现错误!(极有可能是用户不存在)";
            $founderr=1;
        }
    }
    elseif (isset($delete_admin)) {
        if (is_user_exits($name)) {
            del_admin($name);
        }
        else {
            echo "出现错误!(极有可能是用户不存在)";
            $founderr=1;
        }
    }
    else {
        echo "你要干什么?";
        $founderr=1;
    }
    if (!$founderr) {
        redirect2("admin.php");
    }
}
else {
    show_error(1);
}
?>

上一页  [1] [2] [3] 


更多
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
  • 上一篇文章:
  • 下一篇文章:
  • 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 网站地图 | 版权申明 | 网站公告 | 管理登录 |