📄 adduser.php
字号:
<?
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=$_COOKIE['enewsloginuserid'];
$loginin=$_COOKIE['enewsloginusername'];
$loginrnd=$_COOKIE['enewsloginrnd'];
$loginlevel=$_COOKIE['enewsloginlevel'];
$editor=1;
is_login($logininid,$loginin,$loginrnd);
//验证权限
CheckLevel($logininid,$loginin,$classid,"user");
$enews=$_GET['enews'];
$url="控制面板 -> <a href=ListUser.php>用户管理</a> ->增加用户";
if($enews=="EditUser")
{
$userid=$_GET['userid'];
$r=$empire->fetch1("select username,adminclass,groupid,checked from phome_enewsuser where userid='$userid'");
$url="控制面板 -> <a href=ListUser.php>用户管理</a> ->修改用户:".$r[username];
if($r[checked])
{$checked=" checked";}
}
//-----------用户组
$sql=$empire->query("select groupid,groupname from phome_enewsgroup order by groupid desc");
while($gr=$empire->fetch($sql))
{
if($r[groupid]==$gr[groupid])
{$select=" selected";}
else
{$select="";}
$group.="<option value=".$gr[groupid].$select.">".$gr[groupname]."</option>";
}
//--------------------操作的栏目
$class=ShowClass_AddClass($r[adminclass],"n",0,"|-",0,3);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>增加用户 </title>
<link href="../../data/images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
<tr>
<td>位置:<?=$url?></td>
</tr>
</table>
<form name="form1" method="post" action="../enews.php">
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr class="header">
<td height="25" colspan="2"><strong><font color="#FFFFFF">增加用户
<input name="userid" type="hidden" id="userid" value="<?=$userid?>">
<input name="oldusername" type="hidden" id="oldusername" value="<?=$r[username]?>">
<input name="enews" type="hidden" id="enews" value="<?=$enews?>">
</font></strong></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="28%" height="25">用户名:</td>
<td width="72%" height="25"><input name="username" type="text" id="username" value="<?=$r[username]?>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">是否禁止:</td>
<td height="25"><input name="checked" type="checkbox" id="checked" value="1"<?=$checked?>>
是</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">密码:</td>
<td height="25"><input name="password" type="password" id="password">
(不想修改请留空)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">重复密码:</td>
<td height="25"><input name="repassword" type="password" id="repassword">
(不想修改请留空)</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25">用户组:</td>
<td height="25"><select name="groupid" id="groupid">
<?=$group?>
</select></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" valign="top"><p>管理栏目:<br>
(多个,请用ctrl。<br>
注意事项:<font color="#FF0000">只能选择蓝色栏目</font>) </p></td>
<td height="25" valign="top"> <select name="adminclass[]" size="12" multiple id="adminclass[]">
<?=$class?>
</select> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25"> </td>
<td height="25"><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form>
</body>
</html>
<?
db_close();
$empire=null;
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -