include("../config/conn.php"); include("../config/function.php"); sesCheck(); $bh=$_GET[bh]; $sj=date("Y-m-d H:i:s"); while0("*","yjcode_adlx where bh='".$bh."' and fflx=2 and admin=1");if(!$row=mysql_fetch_array($res)){php_toheader("adlx1.php");} $id=$_GET[id]; $sqluser="select * from yjcode_user where uid='".$_SESSION[SHOPUSER]."'";mysql_query("SET NAMES 'GBK'");$resuser=mysql_query($sqluser); if(!$rowuser=mysql_fetch_array($resuser)){php_toheader("../reg/");} if($_GET[control]=="add"){ //表示新增 zwzr(); $d1=intval($_POST[d1]); while1("*","yjcode_adlx where id=".$d1);if(!$row1=mysql_fetch_array($res1)){php_toheader("adlx1.php");} if($rowuser[money1]<$row1[money1]){Audit_alert("余额不足,请先充值!","pay.php");} $dqsj=date("Y-m-d H:i:s",strtotime("+".$row1[tianshu]." day")); $nxh=$row1[xh]; $R1=sqlzhuru($_POST[R1]); $userid=$rowuser[id]; $mbh=time()."adu".$userid; if($R1=="图片"){$tp=inp_tp_upload(1,"../".returnjgdw($rowcontrol[addir],"","gg")."/",$mbh);}elseif($R1=="动画"){$tp=inp_tp_upload(2,"../".returnjgdw($rowcontrol[addir],"","gg")."/",$mbh);} if($tp!=""){$b=preg_split("/\./",$tp);$tptype=$b[1];}else{$tptype="";} if($R1=="图片"){$aurl=sqlzhuru($_POST[t1]);}elseif($R1=="文字"){$aurl=sqlzhuru($_POST[t3]);} if(panduan("*","yjcode_ad where adbh='".$row[adbh]."' and zt<>99 and xh=".$nxh."")==1){$zt=1;}else{$zt=0;} intotable("yjcode_ad","bh,type1,jpggif,tit,adbh,txt,sj,aurl,xh,aw,ah,dqsj,zt,money1,userid","'".$mbh."','".$R1."','".$tptype."','".sqlzhuru($_POST[at1])."','".$row[adbh]."','".sqlzhuru($_POST[s1])."','".$sj."','".$aurl."',".$nxh.",".sqlzhuru($_POST[t2]).",".sqlzhuru($_POST[t4]).",'".$dqsj."',".$zt.",".$row1[money1].",".$userid.""); PointUpdateM($userid,$row1[money1]*(-1)); PointIntoM($userid,"购买自助广告位".$row[adbh],$row1[money1]*(-1)); php_toheader("adlxlist.php?zt=".$zt); } ?>