include("../config/conn.php"); include("../config/function.php"); sesCheck(); $bh=$_GET[bh]; $userid=returnuserid($_SESSION[SHOPUSER]); while0("*","yjcode_news where bh='".$bh."' and userid=".$userid);if(!$row=mysql_fetch_array($res)){php_toheader("newslist.php");} if($_GET[control]=="add"){ $sj=date("Y-m-d H:i:s"); $tyid=preg_split("/xcf/",sqlzhuru($_POST[d1])); if(panduan("bh,type1","yjcode_tp where bh='".$bh."' and type1='资讯'")==1){$iftp=1;}else{$iftp=0;} $txt=sqlzhuru1($_POST[content]); $wdes=sqlzhuru($_POST[twdes]);if(empty($wdes)){$wdes=strgb2312(strip_tags($txt),0,220);} $tit=sqlzhuru($_POST[ttit]); $wkey=sqlzhuru($_POST[twkey]);if(empty($wkey)){$wkey=$tit;} updatetable("yjcode_news"," type1id=".$tyid[0].", type2id=".$tyid[1].", tit='".$tit."', txt='".$txt."', lastsj='".$sj."', ifjc=".$_POST[tifjc].", titys='".sqlzhuru($_POST[ttitys])."', zze='".sqlzhuru($_POST[tzze])."', ly='".sqlzhuru($_POST[tly])."', lyurl='".sqlzhuru($_POST[tlyurl])."', wkey='".$wkey."', wdes='".$wdes."', zt=1, iftp=".$iftp." where bh='".$bh."' and userid=".$row[userid]); php_toheader("newslist.php"); } ?>