www.gusucode.com > 仿51.com的php源码 1.1 > admin/admin_system.php

    <?php
include("ck_login.php");
include("../include/dbclass.php");
$dbc=new DbConn();
$id=$_GET["id"];
$page=$_GET["page"];
$sql="select * from mysystem  where id='$id'";
$rs=$dbc->getRs($sql);
if($rs==null)
{
echo "<script>alert('找不到');history.back();</script>";
exit();
}
 
if($_GET["act"]=="save")
{
$id=$_GET["id"];
$Img_Max_upload=$_POST["img"];
$Music_Max_upload=$_POST["music"];
$filterTxt=$_POST["filterTxt"];
$Photo_Max_upload=$_POST["photo"];
$sqlr="update mysystem set Img_Max_upload='$Img_Max_upload',Music_Max_upload='$Music_Max_upload',filterTxt='$filterTxt',Photo_Max_upload='$Photo_Max_upload' where id='$id'";
$dbc->Execute($sqlr);
echo "<script>alert('设置完!');location.href='admin_system.php?id=1';</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 rel="stylesheet" href="Admin_Style.css">
</head>
<body>
<table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center>
<tr align="center">
    <td height=25 colspan=2 class="topbg"><strong>
	<font color="#FFFFFF">系统设置</font></strong></tr>
<tr><td>
</td>
</tr>
</table>
<br>
<form action="?act=save&id=<?php echo $rs["id"]; ?>" method="post" name="edit">
<table cellspacing="1" border="0" class="border" align=center width="100%" id="table1" height="25">
	<tr align=center>
		<td class="topbg" height="25" width="10%"><b>相册限制上传大小</b></td>
		<td class="tdbg" height="25" width="18%"><input type="text" name="img" value="<?php echo $rs["Img_Max_upload"]; ?>"  /></td>
		<td class="topbg" height="25" width="13%"><b>音乐限制上传大小</b></td>
		<td class="tdbg" height="25" width="17%"><input type="text" name="music" value="<?php echo $rs["Music_Max_upload"]; ?>"></td>
		<td class="topbg" height="25" width="11%"><b>图库限制上传大小</b></td>
		<td class="tdbg" height="25" width="31%"><input type="text" name="photo" value="<?php echo $rs["Photo_Max_upload"]; ?>"></td>		
	</tr>
		<tr align=center>
		<td class="topbg" height="25" width="10%"><b>过虑字符</b></td>
		<td height="25" colspan="5" class="tdbg"><textarea name="filterTxt" cols="80" rows="6" style="margin:8px 0;"><?php echo $rs['filterTxt']; ?></textarea></td>
	</tr>
			<tr align=center>
		<td class="tdbg" height="25" colspan="6"><input name="Submit" type="submit" class="btn" value="确定提交" /></td>			
	</tr>
	</table>
</form>
</body>
</html>