www.gusucode.com > 4004网博士成品网站管理系统 PHP网站源码程序 > 4004/4004/service_backup_1242004010/admin/group_set.php
<?php define("ROOTPATH", "../../"); include(ROOTPATH."includes/admin.inc.php"); include(ROOTPATH."includes/pages.inc.php"); include("language/".$sLan.".php"); NeedAuth(101); ?> <!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="namezone"><?php echo $strFormGroupSet; ?></div> <?php $step=$_REQUEST["step"]; $id=$_REQUEST["id"]; //修改 if($step=="modi"){ $groupname=htmlspecialchars($_POST["groupname"]); $allowtype=$_POST["allowtype"]; $xuhao=$_POST["xuhao"]; $ifano=$_POST["ifano"]; $allowservice=$_POST["allowservice"]; $intro=htmlspecialchars($_POST["intro"]); $allowmembertype="|".implode("|",$allowtype)."|"; $allowserviceid="|".implode("|",$allowservice)."|"; $msql->query("update {P}_service_group set groupname='$groupname', ifano='$ifano', xuhao='$xuhao', intro='$intro', allowservice='$allowserviceid', allowmembertype='$allowmembertype' where id='$id' "); echo "<script>window.location='group.php'</script>"; } ?> <form method="post" action="group_set.php"> <div class="tablezone"> <?php $msql->query("select * from {P}_service_group where id='$id'"); if($msql->next_record()){ $id=$msql->f("id"); $groupname=$msql->f("groupname"); $moveable=$msql->f("moveable"); $xuhao=$msql->f("xuhao"); $ifano=$msql->f("ifano"); $allowmembertype=$msql->f("allowmembertype"); $allowservice=$msql->f("allowservice"); $intro=$msql->f("intro"); } ?> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="130" align="right"><span class="biaoti"><?php echo $strXuhao; ?>:</span></td> <td><input name="xuhao" type="text" class="input" value="<?php echo $xuhao; ?>" size="10" maxlength="3" /> </td> </tr> <tr> <td width="130" align="right"><span class="biaoti"><?php echo $strGroupName; ?>:</span></td> <td><input type="text" name="groupname" class="input" size="30" value="<?php echo $groupname; ?>" /></td> </tr> <tr> <td width="130" align="right"><span class="biaoti"><?php echo $strFormGroupIntro; ?>:</span></td> <td><textarea name="intro" cols="50" rows="5" id="intro"><?php echo $intro; ?></textarea></td> </tr> <tr> <td width="130" align="right"><span class="biaoti"><?php echo $strFormAno; ?>:</span></td> <td><select name="ifano" id="ifano"> <option value="0" <?php echo seld($ifano,"0"); ?>>禁止</option> <option value="1" <?php echo seld($ifano,"1"); ?>>允许</option> </select></td> </tr> <tr> <td width="130" align="right"><span class="biaoti"><?php echo $strFormAllowMember; ?>:</span></td> <td><select name="allowtype[]" size="6" style="width:200px;" multiple="multiple"> <?php $fsql->query("select * from {P}_member_type"); while($fsql->next_record()){ $membertypeid=$fsql->f('membertypeid'); $membertype=$fsql->f('membertype'); if(strstr($allowmembertype,"|".$membertypeid."|")){ echo "<option value='".$membertypeid."' selected>".$membertype."</option>"; }else{ echo "<option value='".$membertypeid."' >".$membertype."</option>"; } } ?> </select></td> </tr> <tr> <td width="130" align="right"><span class="biaoti"><?php echo $strFormAllowService; ?>:</span></td> <td><select name="allowservice[]" size="6" style="width:200px;" multiple="multiple"> <?php $fsql->query("select * from {P}_base_admin"); while($fsql->next_record()){ $adminid=$fsql->f('id'); $name=$fsql->f('name'); $job=$fsql->f('job'); if(strstr($allowservice,"|".$adminid."|")){ echo "<option value='".$adminid."' selected>".$name."</option>"; }else{ echo "<option value='".$adminid."' >".$name."</option>"; } } ?> </select> </td> </tr> </table> </div> <div class="adminsubmit"> <input type="submit" name="cc" value="<?php echo $strSubmit; ?>" class="button" /> <input type="hidden" name="id" value="<?php echo $id; ?>" /> <input type="hidden" name="step" value="modi" /> </div> </form> </div> </body> </html>