【 tulaoshi.com - PHP 】
###############################################
此篇文章属原创,如有引用,请标明作者信息。
作者:冷情疯子
Email: edincur@yeah.net
http://safebase.yeah.net
###############################################
## adduser.php ################################
###############################################
<?php
require("func.php");
if(empty($name) or empty($pwd1)){
show_error(2);
$founderr=1;
}
if (is_user_exits($name)){
show_error(3);
$founderr=1;
}
if ($pwd1<$pwd2){
show_error(5);
$founderr=1;
}
if (strlen($name)16 or strlen($pwd1)16 or strlen($qm)255){
show_error(6);
$founderr=1;
}
$password=$pwd1;
if (!$founderr){
adduser();
echo "成功!";
}
?
######################
### admin.php ########
######################
<?php
require "func.php";
if (adminok()) {
?
<html
<head
<title管理</title
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"
<link rel="stylesheet" type="text/css" href="css/index.css"
</head
<body bgcolor="#FFFFFF"
请选择版面进行操作<br
<table width="98%" border="0" cellspacing="0" cellpadding="0"
<tr
<td width="52%" valign="top"
<table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF"
<tr align="center" bgcolor="#eeeeee"
<td width="42%" height="18"Chinesename</td
<td width="33%" height="18"Name</td
</tr
<?php
$sql="select * from boardinfo";
$sql_result=mysql_query($sql);
while ($sql_row=mysql_fetch_array($sql_result)) {
?
<tr align="center"
<td width="42%"<a href="admin.php?board=<?php echo $sql_row[name];?"<?php echo $sql_row[chinesename];?</a</td
<td width="33%"<?php echo $sql_row[name];?</td
</tr
<?php
}
?
</table
<br
<form name="form5" action="oper.php"
英文名称:
<input type="text" name="name" size="20" maxlength="30"
<br
中文名称:
<input type="text" name="chinesename" size="20" maxlength="30"