123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- <?php
- $password='qq396919548';
- if($password!=$_GET['pw']) exit('验证密码错误');
- define('EmpireCMSAdmin','1');
- require("../class/connect.php");
- require("../class/db_sql.php");
- require("../class/huoche.php");
- require LoadLang("pub/fun.php");
- require("../class/delpath.php");
- require("../class/copypath.php");
- require("../class/t_functions.php");
- require("../data/dbcache/class.php");
- require("../data/dbcache/MemberLevel.php");
- foreach($class_r as $kv)
- {
- if($kv['modid']=='5')
- {
- $cates[]=array('cname'=>$kv['classname'],'cid'=>$kv['classid'],'pid'=>$kv['bclassid']);
- }
- }
- if(empty($_POST))
- {
-
- echo "<select name='list'>";
- echo maketree($cates,0,'');
- echo '</select>';
- exit();
- }
- $link=db_connect();
- $empire=new mysqlquery();
- $loginin=$_POST['username'];
- $lur=$empire->fetch1("select * from {$dbtbpre}enewsuser where `username`='$loginin'");
- if(!$lur) exit('不存在的用户名'.$loginin);
- $logininid=$lur['userid'];
- $loginrnd=$lur['rnd'];
- $loginlevel=$lur['groupid'];
- $loginadminstyleid=$lur['adminstyleid'];
- $incftp=0;
- if($public_r['phpmode'])
- {
- include("../class/ftp.php");
- $incftp=1;
- }
- require("../class/hinfofun.php");
- $navtheid=(int)$_POST['filepass'];
- $newstime=$_POST['newstime'];
- $cid=$_POST['cid'];
- $classid=$_POST['classid'];
- $title=$_POST['title'];
- $newstime=empty($newstime)?time():to_time($newstime);
- $cr=$empire->fetch1("select classid from www_jianzhanzj_com_enewsclass where classname='$classid' limit 1");
- if (!$cr[classid]){
- exit('分类不存在');
- }else{
- $_POST['classid']=$cr[classid];
- }
- $r=$empire->fetch1("select id from www_jianzhanzj_com_ecms_movie where cid='$cid' or title='$title' limit 1");
- if ($r[id]){
- $istop=0;
- if ($_POST[istop]>0) $istop = 1;
- $empire->query("update www_jianzhanzj_com_ecms_movie set title='$_POST[title]',xhyid='$_POST[xhyid]',istop='$istop',titlepic='$titlepic',live='$_POST[live]',typename='$_POST[typename]',livename='$_POST[livename]',zd='$_POST[zd]',kd='$_POST[kd]',newstime='$newstime' where id='$r[id]' limit 1");
- exit('增加信息成功');
- }else{
- AddNews($_POST,$logininid,$loginin);
- }
- db_close();
- $empire=null;
- function maketree($ar,$id,$pre)
- {
- $ids='';
- foreach($ar as $k=>$v){
- $pid=$v['pid'];
- $cname=$v['cname'];
- $cid=$v['cid'];
- if($pid==$id)
- {
- $ids.="<option value='$cid'>{$pre}{$cname}</option>";
- foreach($ar as $kk=>$vv)
- {
- $pp=$vv['pid'];
- if($pp==$cid)
- {
- $ids.=maketree($ar,$cid,$pre." ");
- break;
- }
- }
- }
- }
- return $ids;
- }
- ?>
|