gusucode.com > 4004网博士成品网站管理系统 PHP网站源码程序 > 4004/4004/service_backup_1242004010/admin/chang.php
<?php define("ROOTPATH", "../../"); include(ROOTPATH."includes/admin.inc.php"); include(ROOTPATH."includes/pages.inc.php"); include("language/".$sLan.".php"); NeedAuth(108); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="css/style.css" type="text/css" rel="stylesheet"> <title><?php echo $strAdminTitle; ?></title> </head> <body> <div class="formzone"> <div class="addnew" onClick="window.location='chang.php?step=add'" ><?php echo $strServiceChangAdd; ?></div> <?php $step=$_REQUEST["step"]; if($step=="add"){ $msql->query("select max(id) from {P}_service_chang"); if($msql->next_record()){ $newtitle=$strServiceChangTitle.$msql->f('max(id)'); } //入库 $msql->query("insert into {P}_service_chang set `title`='$newtitle', `msg`='' "); } if($step=="modify"){ $title=htmlspecialchars($_POST["title"]); $msg=htmlspecialchars($_POST["msg"]); $msql->query("update {P}_service_chang set `title`='$title', `msg`='$msg' where id='$id'"); } ?> <?php $msql->query("select * from {P}_service_chang order by id"); while($msql->next_record()){ $id=$msql->f('id'); $title=$msql->f('title'); $msg=$msql->f('msg'); ?> <div class="tablezone"> <form name="form1" id="form1" method="post" action="chang.php"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td width="100" align="right"><?php echo $strServiceChang1; ?>:</td> <td><input name="title" type="text" class="input" id="title" value="<?php echo $title; ?>" size="30" maxlength="30" /> <input type="submit" name="Submit" value="<?php echo $strModify; ?>" class="button" /> <input name="id" type="hidden" id="id" value="<?php echo $id; ?>" /> <input name="step" type="hidden" id="step" value="modify" /></td> </tr> <tr> <td width="100" align="right"><?php echo $strServiceChang1; ?>:</td> <td><textarea name="msg" cols="50" rows="5" class="textarea" id="msg"><?php echo $msg; ?></textarea></td> </tr> </table> </form> </div> <?php } ?> </div> </body> </html>