📄 addnewer.php
字号:
<?
include('session.php');
include('../function.php');
include('../config.php');
include('../addclass.php');
$add=new addclass($dbname);
if (islogin($_SESSION['username'],$_SESSION['userpass'])&&isadmin($_SESSION['username'],1))
$accept=true;
else
{
$accept=false;
echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.php\">";
exit;
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加新会员</title>
<link href="../css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#F3F7FC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="right" cellpadding="0" cellspacing="0" class="table_kuang">
<tr>
<td background="../images/dmid.jpg" class="tianchong"><font class="size10">添加新会员</font></td>
</tr>
<tr>
<td class="tianchong"><font color="#FF0000">
<?php
if ($accept&&$_POST['min_mod']=="addworker")
{
$login_name=$_POST['login_name'];
$pass_n=$_POST['login_pass_n'];
$pass_c=$_POST['login_pass_c'];
$worker_mod=$_POST['worker_mod'];
$worker_job=$_POST['classlist'];
if (isuser($login_name))
{
echo "此登陆名已有人使用";
$flag=true;
}
elseif(!isuser($login_name)&&$login_name!=""&&$pass_n==$pass_c&&$worker_mod!=no)
{
if ($add->addsql("worker"," '$login_name','$pass_n',null,'$worker_mod','$worker_job',null,null,null,null,null,null,0,null"));
echo "会员: ".$login_name." 添加成功";
$flag=false;
}
else
{
echo "请仔细检查所填资料";
$flag=true;
}
}
?> </font> </td>
</tr>
<tr>
<td height="97" class="tian4" valign="top"> <form name="form1" method="post" action="">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_kuang" >
<tr>
<td class="tianchong"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%">登陆名:</td>
<td><input name="login_name" type="text" id="login_name3"> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%">密码:</td>
<td><input name="login_pass_n" type="text" id="login_name_n3">
</td>
</tr>
<tr>
<td width="24%">重复密码:</td>
<td><input name="login_pass_c" type="text" id="login_pass_c"></td>
</tr>
<tr>
<td width="24%">所属部门:</td>
<td><select name="classlist" id="classlist">
<option value="no" selected>部门列表</option>
<? classlist(); ?>
</select>
系统管理员能修改</td>
</tr>
<tr>
<td>职务:</td>
<td><select name="worker_mod" id="worker_mod">
<option value="普通会员" selected>普通会员</option>
<option value="系统管理员">系统管理员</option>
<option value="部门管理员">部门管理员</option>
</select>
普通会员不能修改
<input type="submit" name="Submit" value="添加"></td>
</tr>
<tr>
<td colspan="2">------以下内容不必填写可由会员自行添加</td>
</tr>
<tr>
<td width="24%">姓名:</td>
<td><input name="worker_name" type="text" id="worker_name9"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%"> </td>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%">电子邮箱:</td>
<td> <input name="worker_email" type="text" id="worker_email4"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%">公司电话:</td>
<td> <input name="class_phone" type="text" id="class_phone4"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%">移动电话:</td>
<td> <input name="handphone" type="text" id="handphone4"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%">家用电话:</td>
<td> <input name="homephone" type="text" id="homephone4"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%" valign="top">家庭住址:</td>
<td> <textarea name="home_add" cols="30" id="textarea5"></textarea></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="biaoge">
<tr>
<td width="24%" valign="top">备注:</td>
<td> <textarea name="other_conn" cols="30" rows="5" id="textarea6"></textarea></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="14%"> </td>
<td width="51%"><input name="min_mod" type="hidden" id="addmod4" value="addworker"></td>
<td width="35%"> </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td class="tian4"><div align="center"> </div></td>
</tr>
</table></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -