admin/usersAdd.php

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
require("../conn.php");

if($id!="")
{//取出users表数据用于修改
	$sql="select * from users where id=$id";
	$result=mysql_query($sql);
	$data=mysql_fetch_array($result);
}
?>
<?php
if($act=="save")
{
	if($id=="")
	{
	$sql="insert into users (bianhao,name,sex,teamid,pwd) values ('$bianhao','$name','$sex','$teamid','$pwd')";
$res=mysql_query($sql);
	if($res)
	{
	echo "<script>alert('添加成功');location.href='users.php';</script>";
	exit;
	}
	else
	{
	exit("添加失败了");
	}
	}
	$sql="update users set bianhao='$bianhao',name='$name',sex='$sex',teamid='$teamid',pwd='$pwd' where id=$id";
$res=mysql_query($sql);
	if($res)
	{
	echo "<script>alert('修改成功');location.href='users.php';</script>";
	exit;
	}
	else
	{
	exit ("修改失败了");
	}
}




?>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="images/main.css" rel="stylesheet" type="text/css">
<table width="96%"  border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#aec3de">
<form name="form1" method="post" action="?act=save&id=<?php echo $id?>" enctype="multipart/form-data" onSubmit="return check()">
 <tr>
    <td height="19" colspan="4" class="optiontitle"><div align="center" class="title"> 添加/修改比赛人员</div></td>
  </tr>
<tr align="center" bgcolor="#F2FDFF">
<td align="right"> 比赛人员编号:</td>
<td align="left"><input name="bianhao" type="text" id="bianhao" size="20" value=<?php echo $data[bianhao]?>></td>
</tr>
<tr align="center" bgcolor="#F2FDFF">
<td align="right"> 比赛人员名称:</td>
<td align="left"><input name="name" type="text" id="name" size="20" value=<?php echo $data[name]?>></td>
</tr>
<tr align="center" bgcolor="#F2FDFF">
后面还有 35 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。