📄 editusers.php.bak
字号:
<?
include_once("../include/check.php");
include_once("../../globla.php");
require $movie_root.("/Connections/showmov.php");
$uid=$_POST['uid'];
if ($_GET['action']=="save")
{
$password=trim($_POST['password']);
$regdate=formatdate($_POST['regdate']);
if ($password=="")
{
$sql="update jdzcnnet_members set userlevel=".$_POST['userlevel'].",usertype=".$_POST['usertype'].",email='".$_POST['email']."',regdate='".$regdate."',logins=".$_POST['logins'].",location='".$_POST['location']."',oicq='".$_POST['oicq']."',gender=".$_POST['gender'].",tuij='".$_POST['tuij']."' where uid=".$uid."";
}
else
{
$sql="update jdzcnnet_members set userlevel=".$_POST['userlevel'].",usertype=".$_POST['usertype'].",email='".$_POST['email']."',regdate='".$regdate."',logins=".$_POST['logins'].",location='".$_POST['location']."',oicq='".$_POST['oicq']."',gender=".$_POST['gender'].",tuij='".$_POST['tuij']."',password='".md5($password)."' where uid=".$uid."";
}
$exe="update jdzcnnet_memberdata set money=".$_POST['money'].",onlineip='".$_POST['onlineip']."',endtime='".formatdate($_POST['endtime'])."',credit=".$_POST['credit']." where uid=".$uid."";
mysql_query($sql);
mysql_query($exe);
echo "<script>alert('修改成功!');location.href='listusers.php';</script>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="../Images/Admin_Style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?
if($_GET['id']=="")
{
$sql="select * from jdzcnnet_members where username='".$_GET['username']."'";
}
else
{
$sql="select * from jdzcnnet_members where uid=".$_GET['id']."";
}
echo $sql;
$rs=mysql_fetch_array(mysql_query($sql));
if ($rs['uid']=="")
{
echo "没有这个用户";
exit;
}
?>
<table width="700" border="1" align="center" cellpadding="5" cellspacing="0" class="border" style="border-collapse:collapse">
<form id="form1" name="form1" method="post" action="?action=save">
<tr>
<td colspan="2" align="center" class="title">用户编辑</td>
</tr>
<tr>
<td width="30%">用户名:</td>
<td width="70%"><?=$rs['username']?></td>
</tr>
<tr>
<td>新密码(如不更改请留空):</td>
<td><label>
<input name="password" type="text" class="Input" id="password" />
</label></td>
</tr>
<tr>
<td>用户等级:</td>
<td><label>
<select name="userlevel" id="userlevel">
<option value="0" <? if ($rs['userlevel']==0) echo "selected=\"selected\"";?>>免费会员</option>
<option value="1" <? if ($rs['userlevel']==1) echo "selected=\"selected\"";?>>普通会员</option>
<option value="2" <? if ($rs['userlevel']==2) echo "selected=\"selected\"";?>>黄金会员</option>
<option value="3" <? if ($rs['userlevel']==3) echo "selected=\"selected\"";?>>钻石会员</option>
<option value="4" <? if ($rs['userlevel']==4) echo "selected=\"selected\"";?>>永久会员</option>
<option value="5" <? if ($rs['userlevel']==5) echo "selected=\"selected\"";?>>管理员</option>
</select>
</label></td>
</tr>
<tr>
<td>消费模式:</td>
<td><label>
<input name="usertype" type="radio" value="1" <? if ($rs['usertype']==1) echo "checked=\"checked\"";?>/>
包月消费
</label>
<label>
<input type="radio" name="usertype" value="0" <? if ($rs['usertype']==0) echo "checked=\"checked\"";?> />
扣点消费</label></td>
</tr>
<?
$exe="select * from jdzcnnet_memberdata where uid=".$rs['uid']."";
$rs1=mysql_fetch_array(mysql_query($exe));
?>
<tr>
<td>包月到期:</td>
<td><input name="endtime" type="text" class="Input" id="endtime" value="<?=date("Y-m-d H:i:s",$rs1['endtime'])?>" /></td>
</tr>
<tr>
<td>Email:</td>
<td><input name="email" type="text" class="Input" id="email" value="<?=$rs['email']?>" /></td>
</tr>
<tr>
<td>金钱:</td>
<td><input name="money" type="text" class="Input" id="money" value="<?=$rs1['money']?>" /></td>
</tr>
<tr>
<td>登陆IP:</td>
<td><input name="onlineip" type="text" class="Input" id="onlineip" value="<?=$rs1['onlineip']?>" /></td>
</tr>
<tr>
<td>注册日期(格式 yyyy-mm-dd):</td>
<td><input name="regdate" type="text" class="Input" id="regdate" value="<?=date("Y-m-d H:i:s",$rs['regdate'])?>" /></td>
</tr>
<tr>
<td>登陆次数:</td>
<td><input name="logins" type="text" class="Input" id="logins" value="<?=$rs['logins']?>" /></td>
</tr>
<tr>
<td>来自:</td>
<td><input name="location" type="text" class="Input" id="location" value="<?=$rs['location']?>" /></td>
</tr>
<tr>
<td>QICQ:</td>
<td><input name="oicq" type="text" class="Input" id="oicq" value="<?=$rs['oicq']?>" /></td>
</tr>
<tr>
<td>性别:</td>
<td><label>
<select name="gender" id="gender">
<option value="0" <? if ($rs['gender']==0) echo "selected=\"selected\"";?>>保密</option>
<option value="1" <? if ($rs['gender']==1) echo "selected=\"selected\"";?>>男</option>
<option value="2" <? if ($rs['gender']==2) echo "selected=\"selected\"";?>>女</option>
</select>
</label></td>
</tr>
<tr>
<td>贡献次数:</td>
<td><label>
<input name="credit" type="text" class="Input" id="credit" value="<?=$rs1['credit']?>" />
*推广成功用户的次数</label></td>
</tr>
<tr>
<td>推广用户:</td>
<td><input name="tuij" type="text" class="Input" id="tuij" value="<?=$rs['tuij']?>" /></td>
</tr>
<tr>
<td> </td>
<td>
<label>
<input name="Submit" type="submit" class="Button" value="提交" />
</label> <label>
<input name="Submit2" type="reset" class="Button" value="重置" />
</label></td>
</tr><input name="uid" type="hidden" value="<?=$rs['uid']?>" />
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -