include("../config/conn.php"); include("../config/function.php"); require("../config/tpclass.php"); sesCheck(); $sj=date("Y-m-d H:i:s"); $bh=returndeldian($_GET[bh]); $userid=returnuserid($_SESSION[SHOPUSER]); while0("*","yjcode_server where userid=".$userid." and bh='".$bh."'");if(!$row=mysql_fetch_array($res)){php_toheader("serverlist.php");} $tit=$row[tit]; $id=intval($_GET[id]); while0("*","yjcode_servertaocan where userid=".$userid." and id=".$id);if(!$row=mysql_fetch_array($res)){php_toheader("servertaocanlist.php?bh=".$bh);} //函数开始 if($_GET[control]=="update"){ zwzr(); if(panduan("*","yjcode_servertaocan where userid=".$userid." and serverbh='".$bh."' and admin=1 and tit1='".sqlzhuru($_POST[t1])."' and id<>".$id)==1){Audit_alert("该套餐内容已存在!","servertaocan1.php?id=".$_GET[id]."&bh=".$bh);} updatetable("yjcode_servertaocan","tit1='".sqlzhuru($_POST[t1])."', xh=".sqlzhuru($_POST[t2]).", money1=".sqlzhuru($_POST[tmoney1]).", money2=".sqlzhuru($_POST[tmoney2]).", zt=0 where id=".$id); updatetable("yjcode_servertaocan","tit1='".sqlzhuru($_POST[t1])."' where tit1='".sqlzhuru($_POST[oldty1])."' and serverbh='".$bh."'"); uploadtpnodata(2,"upload/".$row[userid]."/".$row[serverbh]."/","tc".$id.".png","allpic",254,167,254,167,"no"); php_toheader("servertaocan1.php?t=suc&id=".$id."&bh=".$bh); }elseif($_GET[control]=="del"){ zwzr(); delFile("../upload/".$row[userid]."/".$row[serverbh]."/tc".$row[id].".png"); php_toheader("servertaocan1.php?t=suc&id=".$id."&bh=".$bh); } //函数结果 ?>