| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 | <?php// 启用所有级别的错误报告// error_reporting(E_ALL);// ini_set('display_errors', '1');/********密码验证***********/$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();//if($_POST['live']>1){//    // 从缓存中读取实时比分//    $redis = new Redis();//    // 连接到 Redis 服务器//    $redis->connect('127.0.0.1', 6379);//    // 如果 Redis 设置了密码,需要进行身份验证//    $password = '123456';//    $redis->auth($password);//    // 检查 Redis 连接//    if (!$redis->ping()) {//        die('Could not connect to Redis server.');//    }//    // 切换到指定的 Redis 数据库,例如数据库 1//    $redis->select(1);//    $titlepic = $redis->get($_POST['live']);//}//验证用户$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;}?>
 |