コード例 #1
0
ファイル: SetEnews.php プロジェクト: novnan/meiju
function SetEnews($add, $userid, $username)
{
    global $empire, $dbtbpre;
    //操作权限
    CheckLevel($userid, $username, $classid, "public");
    $add[newsurl] = ehtmlspecialchars($add[newsurl], ENT_QUOTES);
    if (empty($add[indextype])) {
        $add[indextype] = ".html";
    }
    if (empty($add[searchtype])) {
        $add[searchtype] = ".html";
    }
    //备份目录
    if (empty($add[bakdbpath])) {
        $add[bakdbpath] = "bdata";
    }
    if (!file_exists("ebak/" . RepPathStr($add[bakdbpath]))) {
        printerror("NotBakDbPath", "");
    }
    if (empty($add[bakdbzip])) {
        $add[bakdbzip] = "zip";
    }
    if (!file_exists("ebak/" . RepPathStr($add[bakdbzip]))) {
        printerror("NotbakZipPath", "");
    }
    //函数是否存在
    if (!function_exists($add['listpagefun']) || !function_exists($add['textpagefun']) || !function_exists($add['listpagelistfun'])) {
        printerror("NotPageFun", "history.go(-1)");
    }
    //adfile
    $add['adfile'] = RepFilenameQz($add['adfile']);
    //修改ftp密码
    if ($add[ftppassword]) {
        $a = "ftppassword='******'ftppassword']}',";
    }
    //变量处理
    $add[filesize] = (int) $add[filesize];
    $add[hotnum] = (int) $add[hotnum];
    $add[newnum] = (int) $add[newnum];
    $add[relistnum] = (int) $add[relistnum];
    $add[renewsnum] = (int) $add[renewsnum];
    $add[min_keyboard] = (int) $add[min_keyboard];
    $add[max_keyboard] = (int) $add[max_keyboard];
    $add[search_num] = (int) $add[search_num];
    $add[search_pagenum] = (int) $add[search_pagenum];
    $add[newslink] = (int) $add[newslink];
    $add[checked] = (int) $add[checked];
    $add[searchtime] = (int) $add[searchtime];
    $add[loginnum] = (int) $add[loginnum];
    $add[logintime] = (int) $add[logintime];
    $add[addnews_ok] = (int) $add[addnews_ok];
    $add[register_ok] = (int) $add[register_ok];
    $add[goodlencord] = (int) $add[goodlencord];
    $add[goodnum] = (int) $add[goodnum];
    $add[exittime] = (int) $add[exittime];
    $add[smalltextlen] = (int) $add[smalltextlen];
    $add[defaultgroupid] = (int) $add[defaultgroupid];
    $add[phpmode] = (int) $add[phpmode];
    $add[install] = (int) $add[install];
    $add[hotplnum] = (int) $add[hotplnum];
    $add[dorepnum] = (int) $add[dorepnum];
    $add[loadtempnum] = (int) $add[loadtempnum];
    $add[firstnum] = (int) $add[firstnum];
    $add[min_userlen] = (int) $add[min_userlen];
    $add[max_userlen] = (int) $add[max_userlen];
    $add[min_passlen] = (int) $add[min_passlen];
    $add[max_passlen] = (int) $add[max_passlen];
    $add[filechmod] = (int) $add[filechmod];
    $add[sametitle] = (int) $add[sametitle];
    $add[addrehtml] = (int) $add[addrehtml];
    $add[loginkey_ok] = (int) $add[loginkey_ok];
    $add[limittype] = (int) $add[limittype];
    $add[redodown] = (int) $add[redodown];
    $add[candocode] = (int) $add[candocode];
    $add[opennotcj] = (int) $add[opennotcj];
    $add[reuserpagenum] = (int) $add[reuserpagenum];
    $add[revotejsnum] = (int) $add[revotejsnum];
    $add[readjsnum] = (int) $add[readjsnum];
    $add[qaddtran] = (int) $add[qaddtran];
    $add[qaddtransize] = (int) $add[qaddtransize];
    $add[ebakthisdb] = (int) $add[ebakthisdb];
    $add[delnewsnum] = (int) $add[delnewsnum];
    $add[markpos] = (int) $add[markpos];
    $add[adminloginkey] = (int) $add[adminloginkey];
    $add[php_outtime] = (int) $add[php_outtime];
    $add[addreinfo] = (int) $add[addreinfo];
    $add[rssnum] = (int) $add[rssnum];
    $add[rsssub] = (int) $add[rsssub];
    $add[dorepdlevelnum] = (int) $add[dorepdlevelnum];
    $add[listpagelistnum] = (int) $add[listpagelistnum];
    $add[infolinknum] = (int) $add[infolinknum];
    $add[searchgroupid] = (int) $add[searchgroupid];
    $add[opencopytext] = (int) $add[opencopytext];
    $add[reuserjsnum] = (int) $add[reuserjsnum];
    $add[reuserlistnum] = (int) $add[reuserlistnum];
    $add[opentitleurl] = (int) $add[opentitleurl];
    $add['qaddtranfile'] = (int) $add['qaddtranfile'];
    $add['qaddtranfilesize'] = (int) $add['qaddtranfilesize'];
    $add['sendmailtype'] = (int) $add['sendmailtype'];
    $add['loginemail'] = (int) $add['loginemail'];
    $add['feedbacktfile'] = (int) $add['feedbacktfile'];
    $add['feedbackfilesize'] = (int) $add['feedbackfilesize'];
    $add['searchtempvar'] = (int) $add['searchtempvar'];
    $add['showinfolevel'] = (int) $add['showinfolevel'];
    $add['spicwidth'] = (int) $add['spicwidth'];
    $add['spicheight'] = (int) $add['spicheight'];
    $add['spickill'] = (int) $add['spickill'];
    $add['jpgquality'] = (int) $add['jpgquality'];
    $add['markpct'] = (int) $add['markpct'];
    $add['redoview'] = (int) $add['redoview'];
    $add['reggetfen'] = (int) $add['reggetfen'];
    $add['regbooktime'] = (int) $add['regbooktime'];
    $add['revotetime'] = (int) $add['revotetime'];
    $add['fpath'] = (int) $add['fpath'];
    $add['openmembertranimg'] = (int) $add['openmembertranimg'];
    $add['memberimgsize'] = (int) $add['memberimgsize'];
    $add['openmembertranfile'] = (int) $add['openmembertranfile'];
    $add['memberfilesize'] = (int) $add['memberfilesize'];
    $add['openspace'] = (int) $add['openspace'];
    $add['realltime'] = (int) $add['realltime'];
    $add['textpagelistnum'] = (int) $add['textpagelistnum'];
    $add['memberlistlevel'] = (int) $add['memberlistlevel'];
    $add['ebakcanlistdb'] = (int) $add['ebakcanlistdb'];
    $add['keytog'] = (int) $add['keytog'];
    $add['keytime'] = (int) $add['keytime'];
    $add['regkey_ok'] = (int) $add['regkey_ok'];
    $add['opengetdown'] = (int) $add['opengetdown'];
    $add['gbkey_ok'] = (int) $add['gbkey_ok'];
    $add['fbkey_ok'] = (int) $add['fbkey_ok'];
    $add['newaddinfotime'] = (int) $add['newaddinfotime'];
    $add['classnavline'] = (int) $add['classnavline'];
    $add['docnewsnum'] = (int) $add['docnewsnum'];
    $add['dtcanbq'] = (int) $add['dtcanbq'];
    $add['dtcachetime'] = (int) $add['dtcachetime'];
    $add['regretime'] = (int) $add['regretime'];
    $add['regemailonly'] = (int) $add['regemailonly'];
    $add['repkeynum'] = (int) $add['repkeynum'];
    $add['getpasstime'] = (int) $add['getpasstime'];
    $add['acttime'] = (int) $add['acttime'];
    $add['regacttype'] = (int) $add['regacttype'];
    $add['opengetpass'] = (int) $add['opengetpass'];
    $add['hlistinfonum'] = (int) $add['hlistinfonum'];
    if (empty($add['hlistinfonum'])) {
        $add['hlistinfonum'] = 30;
    }
    $add['qlistinfonum'] = (int) $add['qlistinfonum'];
    if (empty($add['qlistinfonum'])) {
        $add['qlistinfonum'] = 30;
    }
    $add['dtncanbq'] = (int) $add['dtncanbq'];
    $add['dtncachetime'] = (int) $add['dtncachetime'];
    $add['readdinfotime'] = (int) $add['readdinfotime'];
    $add['qeditinfotime'] = (int) $add['qeditinfotime'];
    $add['ftpmode'] = (int) $add['ftpmode'];
    $add['ftpssl'] = (int) $add['ftpssl'];
    $add['ftppasv'] = (int) $add['ftppasv'];
    $add['ftpouttime'] = (int) $add['ftpouttime'];
    $add['onclicktype'] = (int) $add['onclicktype'];
    $add['onclickfilesize'] = (int) $add['onclickfilesize'];
    $add['onclickfiletime'] = (int) $add['onclickfiletime'];
    $add['closeqdt'] = (int) $add['closeqdt'];
    $add['settop'] = (int) $add['settop'];
    $add['qlistinfomod'] = (int) $add['qlistinfomod'];
    $add['gb_num'] = (int) $add['gb_num'];
    $add['member_num'] = (int) $add['member_num'];
    $add['space_num'] = (int) $add['space_num'];
    $add['infolday'] = (int) $add['infolday'];
    $add['filelday'] = (int) $add['filelday'];
    $add['baktempnum'] = (int) $add['baktempnum'];
    $add['dorepkey'] = (int) $add['dorepkey'];
    $add['dorepword'] = (int) $add['dorepword'];
    $add['indexpagedt'] = (int) $add['indexpagedt'];
    $add['closeqdtmsg'] = AddAddsData($add['closeqdtmsg']);
    $add['openfileserver'] = (int) $add['openfileserver'];
    $add['fieldandtop'] = (int) $add['fieldandtop'];
    $add['fieldandclosetb'] = $add['fieldandclosetb'] ? ',' . $add['fieldandclosetb'] . ',' : '';
    $add['firsttitlename'] = ehtmlspecialchars(str_replace("\r\n", "|", $add['firsttitlename']));
    $add['isgoodname'] = ehtmlspecialchars(str_replace("\r\n", "|", $add['isgoodname']));
    $add['closelisttemp'] = ehtmlspecialchars($add['closelisttemp']);
    $add['ipaddinfonum'] = (int) $add['ipaddinfonum'];
    $add['ipaddinfotime'] = (int) $add['ipaddinfotime'];
    $add['indexaddpage'] = (int) $add['indexaddpage'];
    $add['modmemberedittran'] = (int) $add['modmemberedittran'];
    $add['modinfoedittran'] = (int) $add['modinfoedittran'];
    //提交IP
    $doiptypes = '';
    $doiptype = $add['doiptype'];
    $doiptypecount = count($doiptype);
    if ($doiptypecount) {
        $doiptypes = ',';
        for ($di = 0; $di < $doiptypecount; $di++) {
            $doiptypes .= $doiptype[$di] . ',';
        }
    }
    //关闭相关模块
    $closemodss = '';
    $closemods = $add['closemods'];
    $closemodscount = count($closemods);
    if ($closemodscount) {
        $closemodss = ',';
        for ($cmi = 0; $cmi < $closemodscount; $cmi++) {
            $closemodss .= $closemods[$cmi] . ',';
        }
    }
    //关闭后台菜单
    $closehmenus = '';
    $closehmenu = $add['closehmenu'];
    $closehmenucount = count($closehmenu);
    if ($closehmenucount) {
        $closehmenus = ',';
        for ($chmi = 0; $chmi < $closehmenucount; $chmi++) {
            $closehmenus .= $closehmenu[$chmi] . ',';
        }
    }
    //限制操作的时间点
    $timecloses = '';
    $timeclose = $add['timeclose'];
    $timeclosecount = count($timeclose);
    if ($timeclosecount) {
        $timecloses = ',';
        for ($tci = 0; $tci < $timeclosecount; $tci++) {
            $timecloses .= $timeclose[$tci] . ',';
        }
    }
    //限制使用时间的操作
    $timeclosedos = '';
    $timeclosedo = $add['timeclosedo'];
    $timeclosedocount = count($timeclosedo);
    if ($timeclosedocount) {
        $timeclosedos = ',';
        for ($tcdi = 0; $tcdi < $timeclosedocount; $tcdi++) {
            $timeclosedos .= $timeclosedo[$tcdi] . ',';
        }
    }
    $add[filetype] = "|" . $add[filetype] . "|";
    $add[qimgtype] = "|" . $add['qaddtranimgtype'] . "|";
    $add[qfiletype] = "|" . $add['qaddtranfiletype'] . "|";
    $add[feedbackfiletype] = "|" . $add['feedbackfiletype'] . "|";
    $add[memberimgtype] = "|" . $add['memberimgtype'] . "|";
    $add[memberfiletype] = "|" . $add['memberfiletype'] . "|";
    $sql = $empire->query("update {$dbtbpre}enewspublic set " . $a . "sitename='{$add['sitename']}',newsurl='{$add['newsurl']}',email='{$add['email']}',filetype='{$add['filetype']}',filesize={$add['filesize']},hotnum={$add['hotnum']},newnum={$add['newnum']},relistnum={$add['relistnum']},renewsnum={$add['renewsnum']},min_keyboard={$add['min_keyboard']},max_keyboard={$add['max_keyboard']},search_num={$add['search_num']},search_pagenum={$add['search_pagenum']},newslink={$add['newslink']},checked={$add['checked']},searchtime={$add['searchtime']},loginnum={$add['loginnum']},logintime={$add['logintime']},addnews_ok={$add['addnews_ok']},register_ok={$add['register_ok']},indextype='{$add['indextype']}',goodlencord={$add['goodlencord']},goodtype='{$add['goodtype']}',goodnum={$add['goodnum']},searchtype='{$add['searchtype']}',exittime={$add['exittime']},smalltextlen={$add['smalltextlen']},defaultgroupid={$add['defaultgroupid']},fileurl='{$add['fileurl']}',phpmode={$add['phpmode']},ftphost='{$add['ftphost']}',ftpport='{$add['ftpport']}',ftpusername='******'ftpusername']}',ftppath='{$add['ftppath']}',ftpmode='{$add['ftpmode']}',install={$add['install']},hotplnum={$add['hotplnum']},dorepnum={$add['dorepnum']},loadtempnum={$add['loadtempnum']},firstnum={$add['firstnum']},bakdbpath='{$add['bakdbpath']}',bakdbzip='{$add['bakdbzip']}',downpass='******'downpass']}',min_userlen={$add['min_userlen']},max_userlen={$add['max_userlen']},min_passlen={$add['min_passlen']},max_passlen={$add['max_passlen']},filechmod={$add['filechmod']},loginkey_ok={$add['loginkey_ok']},limittype={$add['limittype']},redodown={$add['redodown']},candocode={$add['candocode']},opennotcj={$add['opennotcj']},reuserpagenum={$add['reuserpagenum']},revotejsnum={$add['revotejsnum']},readjsnum={$add['readjsnum']},qaddtran={$add['qaddtran']},qaddtransize={$add['qaddtransize']},ebakthisdb={$add['ebakthisdb']},delnewsnum={$add['delnewsnum']},markpos={$add['markpos']},markimg='{$add['markimg']}',marktext='{$add['marktext']}',markfontsize='{$add['markfontsize']}',markfontcolor='{$add['markfontcolor']}',markfont='{$add['markfont']}',adminloginkey={$add['adminloginkey']},php_outtime={$add['php_outtime']},listpagefun='{$add['listpagefun']}',textpagefun='{$add['textpagefun']}',adfile='{$add['adfile']}',notsaveurl='{$add['notsaveurl']}',rssnum={$add['rssnum']},rsssub={$add['rsssub']},dorepdlevelnum={$add['dorepdlevelnum']},listpagelistfun='{$add['listpagelistfun']}',listpagelistnum={$add['listpagelistnum']},infolinknum={$add['infolinknum']},searchgroupid={$add['searchgroupid']},opencopytext={$add['opencopytext']},reuserjsnum={$add['reuserjsnum']},reuserlistnum={$add['reuserlistnum']},opentitleurl='{$add['opentitleurl']}',qaddtranimgtype='{$add['qimgtype']}',qaddtranfile={$add['qaddtranfile']},qaddtranfilesize={$add['qaddtranfilesize']},qaddtranfiletype='{$add['qfiletype']}',sendmailtype={$add['sendmailtype']},smtphost='{$add['smtphost']}',fromemail='{$add['fromemail']}',loginemail={$add['loginemail']},emailusername='******'emailusername']}',emailpassword='******'emailpassword']}',smtpport='{$add['smtpport']}',emailname='{$add['emailname']}',feedbacktfile={$add['feedbacktfile']},feedbackfilesize={$add['feedbackfilesize']},feedbackfiletype='{$add['feedbackfiletype']}',searchtempvar={$add['searchtempvar']},showinfolevel={$add['showinfolevel']},navfh='" . eaddslashes($add[navfh]) . "',spicwidth={$add['spicwidth']},spicheight={$add['spicheight']},spickill={$add['spickill']},jpgquality={$add['jpgquality']},markpct={$add['markpct']},redoview={$add['redoview']},reggetfen={$add['reggetfen']},regbooktime={$add['regbooktime']},revotetime={$add['revotetime']},fpath={$add['fpath']},filepath='{$add['filepath']}',openmembertranimg={$add['openmembertranimg']},memberimgsize={$add['memberimgsize']},openmembertranfile={$add['openmembertranfile']},memberfilesize={$add['memberfilesize']},memberimgtype='{$add['memberimgtype']}',memberfiletype='{$add['memberfiletype']}',canposturl='{$add['canposturl']}',openspace='{$add['openspace']}',realltime={$add['realltime']},closeip='{$add['closeip']}',openip='{$add['openip']}',hopenip='{$add['hopenip']}',closewords='{$add['closewords']}',closewordsf='{$add['closewordsf']}',textpagelistnum={$add['textpagelistnum']},memberlistlevel={$add['memberlistlevel']},ebakcanlistdb={$add['ebakcanlistdb']},keytog='{$add['keytog']}',keyrnd='{$add['keyrnd']}',keytime='{$add['keytime']}',regkey_ok='{$add['regkey_ok']}',opengetdown='{$add['opengetdown']}',gbkey_ok='{$add['gbkey_ok']}',fbkey_ok='{$add['fbkey_ok']}',newaddinfotime='{$add['newaddinfotime']}',classnavline='{$add['classnavline']}',classnavfh='" . eaddslashes($add[classnavfh]) . "',sitekey='{$add['sitekey']}',siteintro='{$add['siteintro']}',docnewsnum='{$add['docnewsnum']}',dtcanbq='{$add['dtcanbq']}',dtcachetime='{$add['dtcachetime']}',regretime='{$add['regretime']}',regclosewords='{$add['regclosewords']}',regemailonly='{$add['regemailonly']}',repkeynum='{$add['repkeynum']}',getpasstime='{$add['getpasstime']}',acttime='{$add['acttime']}',regacttype='{$add['regacttype']}',acttext='" . eaddslashes($add[acttext]) . "',getpasstext='" . eaddslashes($add[getpasstext]) . "',acttitle='" . eaddslashes($add[acttitle]) . "',getpasstitle='" . eaddslashes($add[getpasstitle]) . "',opengetpass='******'opengetpass']}',hlistinfonum='{$add['hlistinfonum']}',qlistinfonum='{$add['qlistinfonum']}',dtncanbq='{$add['dtncanbq']}',dtncachetime='{$add['dtncachetime']}',readdinfotime='{$add['readdinfotime']}',qeditinfotime='{$add['qeditinfotime']}',ftpssl='{$add['ftpssl']}',ftppasv='{$add['ftppasv']}',ftpouttime='{$add['ftpouttime']}',onclicktype='{$add['onclicktype']}',onclickfilesize='{$add['onclickfilesize']}',onclickfiletime='{$add['onclickfiletime']}',closeqdt='{$add['closeqdt']}',settop='{$add['settop']}',qlistinfomod='{$add['qlistinfomod']}',gb_num='{$add['gb_num']}',member_num='{$add['member_num']}',space_num='{$add['space_num']}',opendoip='{$add['opendoip']}',closedoip='{$add['closedoip']}',doiptype='{$doiptypes}',infolday='{$add['infolday']}',filelday='{$add['filelday']}',baktempnum='{$add['baktempnum']}',dorepkey='{$add['dorepkey']}',dorepword='{$add['dorepword']}',onclickrnd='{$add['onclickrnd']}',indexpagedt='{$add['indexpagedt']}',keybgcolor='{$add['keybgcolor']}',keyfontcolor='{$add['keyfontcolor']}',keydistcolor='{$add['keydistcolor']}',closeqdtmsg='{$add['closeqdtmsg']}',openfileserver='{$add['openfileserver']}',closemods='{$closemodss}',fieldandtop='{$add['fieldandtop']}',fieldandclosetb='{$add['fieldandclosetb']}',firsttitlename='" . eaddslashes($add[firsttitlename]) . "',isgoodname='" . eaddslashes($add[isgoodname]) . "',closelisttemp='" . eaddslashes($add[closelisttemp]) . "',chclasscolor='" . eaddslashes($add[chclasscolor]) . "',timeclose='" . eaddslashes($timecloses) . "',timeclosedo='" . eaddslashes($timeclosedos) . "',ipaddinfonum='{$add['ipaddinfonum']}',ipaddinfotime='{$add['ipaddinfotime']}',closehmenu='{$closehmenus}',indexaddpage='{$add['indexaddpage']}',modmemberedittran='{$add['modmemberedittran']}',modinfoedittran='{$add['modinfoedittran']}';");
    DoSetFileServer($add);
    //远程附件更新
    GetConfig();
    //首页动态文件
    if ($add['indexpagedt'] != $add['oldindexpagedt']) {
        if ($add['indexpagedt']) {
            DelFiletext(ECMS_PATH . 'index' . $add[indextype]);
            @copy(ECMS_PATH . DASHBOARD . '/data/template/dtindexpage.txt', ECMS_PATH . 'index.php');
        } else {
            DelFiletext(ECMS_PATH . 'index.php');
            $indextemp = GetIndextemp();
            NewsBq(0, $indextemp, 1, 0);
        }
    }
    if ($sql) {
        insert_dolog("");
        //操作日志
        printerror("SetPublicSuccess", "SetEnews.php" . hReturnEcmsHashStrHref2(1));
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
コード例 #2
0
ファイル: chtmlfun.php プロジェクト: novnan/meiju
function ReIndex()
{
    $indextemp = GetIndextemp();
    //取得模板
    NewsBq($classid, $indextemp, 1, 0);
    insert_dolog("");
    //操作日志
    printerror("ReIndexSuccess", "history.go(-1)");
}
コード例 #3
0
ファイル: ListIndexpage.php プロジェクト: novnan/meiju
function DefIndexpage($tempid,$userid,$username){
	global $empire,$dbtbpre,$public_r;
	$tempid=(int)$tempid;
	if(empty($tempid))
	{
		printerror("NotChangeIndexpageid","history.go(-1)");
	}
	//验证权限
	CheckLevel($userid,$username,$classid,"template");
	$gid=(int)$_GET['gid'];
	$r=$empire->fetch1("select tempname,temptext from {$dbtbpre}enewsindexpage where tempid='$tempid'");
	if($tempid==$public_r['indexpageid'])
	{
		$def=0;
		$mess='NoDefIndexpageSuccess';
		$sql=$empire->query("update {$dbtbpre}enewspublic set indexpageid=0");
	}
	else
	{
		$def=1;
		$mess='DefIndexpageSuccess';
		$sql=$empire->query("update {$dbtbpre}enewspublic set indexpageid='$tempid'");
	}
	GetConfig();//更新缓存
	//刷新首页
	if($def)
	{
		NewsBq($classid,$r[temptext],1,0);
		//删除动态模板缓存文件
		DelOneTempTmpfile('indexpage');
	}
	else
	{
		$indextempr=$empire->fetch1("select indextemp from ".GetTemptb("enewspubtemp")." limit 1");
		$indextemp=$indextempr['indextemp'];
		NewsBq($classid,$indextemp,1,0);
		//删除动态模板缓存文件
		DelOneTempTmpfile('indexpage');
	}
	if($sql)
	{
		//操作日志
		insert_dolog("tempid=$tempid&tempname=$r[tempname]&def=$def");
		printerror($mess,"ListIndexpage.php?gid=$gid".hReturnEcmsHashStrHref2(0));
	}
	else
	{
		printerror("DbError","history.go(-1)");
	}
}
コード例 #4
0
function EditClass($add, $userid, $username)
{
    global $empire, $class_r, $dbtbpre;
    //修改外部栏目
    if ($add[ecmsclasstype]) {
        EditWbClass($add, $userid, $username);
    }
    $add[classid] = (int) $add[classid];
    $add[classpath] = trim($add[classpath]);
    $checkclasspath = $add['classpath'];
    if ($add['oldclasspath'] != $add['pripath'] . $add['oldcpath']) {
        $add[classpath] = $add['oldcpath'];
    }
    if (!$add[classname] || !$add[classpath] || !$add[modid] || !$add[classid]) {
        printerror("EmptyClass", "");
    }
    if ($add[islast] && (!$add[newstempid] || !$add[listtempid])) {
        printerror("LastMustChange", "");
    }
    //操作权限
    CheckLevel($userid, $username, $classid, "class");
    $add = DoPostClassVar($add);
    $add[oldmodid] = (int) $add[oldmodid];
    //改变目录
    $classpath = $add[pripath] . $add[classpath];
    if ($add[oldclasspath] != $classpath && $checkclasspath == $add['oldcpath']) {
        if (file_exists("../../" . $classpath)) {
            //检测目录是否存在
            printerror("ReClasspath", "");
        }
    }
    //取得表名
    $tabler = GetModTable($add[modid]);
    $tabler[tid] = (int) $tabler[tid];
    //修改大栏目
    if (!$add[islast]) {
        //改变大栏目
        if ($add[bclassid] != $add[oldbclassid]) {
            //转到主栏目
            if (empty($add[bclassid])) {
                $sonclass = "";
                $featherclass = "";
                //取得本栏目的子栏目
                $r = $empire->fetch1("select sonclass,featherclass,classpath from {$dbtbpre}enewsclass where classid='{$add['classid']}'");
                //改变父栏目的子栏目
                $where = ReturnClass($r[featherclass]);
                if (empty($where)) {
                    $where = "classid=0";
                }
                $osql = $empire->query("select sonclass,classid from {$dbtbpre}enewsclass where " . $where);
                while ($o = $empire->fetch($osql)) {
                    $newsonclass = str_replace($r[sonclass], "|", $o[sonclass]);
                    $uosql = $empire->query("update {$dbtbpre}enewsclass set sonclass='{$newsonclass}' where classid='{$o['classid']}'");
                }
                //修改子栏目的父栏目
                $osql = $empire->query("select featherclass,classid,classpath from {$dbtbpre}enewsclass where featherclass like '%|" . $add[classid] . "%|'");
                while ($o = $empire->fetch($osql)) {
                    $newclasspath = str_replace($r[classpath] . "/", $classpath . "/", $o[classpath]);
                    $newfeatherclass = str_replace($r[featherclass], "|", $o[featherclass]);
                    $uosql = $empire->query("update {$dbtbpre}enewsclass set featherclass='{$newfeatherclass}',classpath='{$newclasspath}' where classid='{$o['classid']}'");
                }
            } else {
                //大栏目跟原栏目相同
                if ($add[classid] == $add[bclassid]) {
                    printerror("BclassIsself", "");
                }
                //取得现在大栏目的值
                $b = $empire->fetch1("select featherclass,sonclass,islast,wburl from {$dbtbpre}enewsclass where classid='{$add['bclassid']}'");
                //检测大栏目是否为终级栏目
                if ($b[islast]) {
                    printerror("BclassNotLast", "");
                }
                if ($b[wburl]) {
                    printerror("BclassNotWb", "");
                }
                //是否非法父栏目
                if ($b[featherclass]) {
                    $c_nb_r = explode("|" . $add[classid] . "|", $b[featherclass]);
                    if (count($c_nb_r) != 1) {
                        printerror("BclassIssmall", "");
                    }
                }
                if (empty($b[featherclass])) {
                    $b[featherclass] = "|";
                }
                $featherclass = $b[featherclass] . $add[bclassid] . "|";
                //取得现在栏目本身的值
                $o = $empire->fetch1("select featherclass,sonclass,classpath from {$dbtbpre}enewsclass where classid='{$add['classid']}'");
                //修改子栏目的父栏目
                $osql = $empire->query("select featherclass,classid,classpath from {$dbtbpre}enewsclass where featherclass like '%|" . $add[classid] . "|%'");
                while ($or = $empire->fetch($osql)) {
                    $newclasspath = str_replace($o[classpath] . "/", $classpath . "/", $or[classpath]);
                    if (empty($o[featherclass])) {
                        $newfeatherclass = $b[featherclass] . $add[bclassid] . $or[featherclass];
                    } else {
                        $newfeatherclass = str_replace($o[featherclass], $featherclass, $or[featherclass]);
                    }
                    $uosql = $empire->query("update {$dbtbpre}enewsclass set featherclass='{$newfeatherclass}',classpath='{$newclasspath}' where classid='{$or['classid']}'");
                }
                //改变旧大栏目的所有子栏目
                $owhere = ReturnClass($o[featherclass]);
                if (empty($owhere)) {
                    $owhere = "classid=0";
                }
                $oosql = $empire->query("select sonclass,classid from {$dbtbpre}enewsclass where " . $owhere);
                while ($oo = $empire->fetch($oosql)) {
                    $newsonclass = str_replace($o[sonclass], "|", $oo[sonclass]);
                    $usql = $empire->query("update {$dbtbpre}enewsclass set sonclass='{$newsonclass}' where classid='{$oo['classid']}'");
                }
                //改变新大栏目的子栏目
                $where = ReturnClass($featherclass);
                if (empty($where)) {
                    $where = "classid=0";
                }
                $nbsql = $empire->query("select sonclass,classid from {$dbtbpre}enewsclass where " . $where);
                while ($nb = $empire->fetch($nbsql)) {
                    if (empty($nb[sonclass])) {
                        $nb[sonclass] = "|";
                    }
                    $newsonclass = $nb[sonclass] . substr($o[sonclass], 1);
                    $usql = $empire->query("update {$dbtbpre}enewsclass set sonclass='{$newsonclass}' where classid='{$nb['classid']}'");
                }
            }
            $change = ",bclassid={$add['bclassid']},featherclass='{$featherclass}'";
        }
        //绑定域名应用于子栏目
        if ($add['UrlToSmall']) {
            UpdateSmallClassDomain($add['classid'], $add['classurl'], $classpath);
        }
        //wap模板应用于子栏目
        if ($add['wapstylesclass']) {
            $empire->query("update {$dbtbpre}enewsclass set wapstyleid='{$add['wapstyleid']}' where featherclass like '%|" . $add[classid] . "|%'");
        }
        //修改数据库资料
        $sql = $empire->query("update {$dbtbpre}enewsclass set classname='{$add['classname']}',classpath='{$classpath}',classtype='{$add['classtype']}',newline={$add['newline']},hotline={$add['hotline']},goodline={$add['goodline']},classurl='{$add['classurl']}',groupid={$add['groupid']},myorder={$add['myorder']},filename_qz='{$add['filename_qz']}',hotplline={$add['hotplline']},modid={$add['modid']},checked={$add['checked']},firstline={$add['firstline']},bname='{$add['bname']}',islist={$add['islist']},listtempid={$add['listtempid']},lencord={$add['lencord']},searchtempid={$add['searchtempid']},tid={$tabler['tid']},tbname='{$tabler['tbname']}',maxnum={$add['maxnum']},checkpl={$add['checkpl']},down_num={$add['down_num']},online_num={$add['online_num']},listorder='{$add['listorder']}',reorder='{$add['reorder']}',intro='{$add['intro']}',classimg='{$add['classimg']}',jstempid={$add['jstempid']},listdt={$add['listdt']},showclass={$add['showclass']},showdt={$add['showdt']},qaddgroupid='{$add['qaddgroupid']}',qaddshowkey={$add['qaddshowkey']},adminqinfo={$add['adminqinfo']},doctime={$add['doctime']},classpagekey='{$add['classpagekey']}',dtlisttempid='{$add['dtlisttempid']}',classtempid='{$add['classtempid']}',nreclass={$add['nreclass']},nreinfo={$add['nreinfo']},nrejs={$add['nrejs']},nottobq={$add['nottobq']},ipath='{$add['ipath']}',addreinfo={$add['addreinfo']},haddlist={$add['haddlist']},sametitle={$add['sametitle']},definfovoteid={$add['definfovoteid']},wburl='',qeditchecked={$add['qeditchecked']},openadd={$add['openadd']},wapstyleid='{$add['wapstyleid']}',repreinfo='{$add['repreinfo']}',pltempid='{$add['pltempid']}',cgroupid='{$add['cgroupid']}',yhid='{$add['yhid']}',wfid='{$add['wfid']}',cgtoinfo='{$add['cgtoinfo']}',bdinfoid='{$add['bdinfoid']}'" . $change . " where classid='{$add['classid']}'");
        //副表
        $ret_cr = ReturnClassAddF($add, 1);
        $empire->query("update {$dbtbpre}enewsclassadd set classtext='" . addslashes($add[classtext]) . "'" . $ret_cr[0] . " where classid='{$add['classid']}'");
        GetClass();
        //生成栏目文件
        if ($add[islist] == 0 || $add[islist] == 2) {
            $classtemp = $add[islist] == 2 ? GetClassText($add[classid]) : GetClassTemp($add['classtempid']);
            NewsBq($add[classid], $classtemp, 0, 1);
        } elseif ($add[islist] == 3) {
            ReClassBdInfo($add[classid]);
        }
        if ($add[islist] == 2) {
            //删除动态模板缓存文件
            DelOneTempTmpfile('classpage' . $add[classid]);
        }
    } else {
        if ($add[modid] != $add[oldmodid]) {
            $chmtbr = GetModTable($add[oldmodid]);
            if ($chmtbr[tid] != $tabler[tid] && $chmtbr[tbname]) {
                $chmchecknum = $empire->gettotal("select count(*) as total from {$dbtbpre}ecms_" . $chmtbr[tbname] . " where classid='{$add['classid']}'");
                if ($chmchecknum) {
                    printerror("ClassChangeModHaveInfo", "history.go(-1)");
                }
            }
        }
        //改变大栏目
        if ($add[bclassid] != $add[oldbclassid]) {
            //转到主栏目
            if (empty($add[bclassid])) {
                $sonclass = "";
                $featherclass = "";
                //取得栏目原本的大栏目
                $r = $empire->fetch1("select featherclass,classpath from {$dbtbpre}enewsclass where classid='{$add['classid']}'");
                //改变原本大栏目的子栏目
                $where = ReturnClass($r[featherclass]);
                if (empty($where)) {
                    $where = "classid=0";
                }
                $bsql = $empire->query("select classid,sonclass from {$dbtbpre}enewsclass where " . $where);
                while ($br = $empire->fetch($bsql)) {
                    $newsonclass = str_replace("|" . $add[classid] . "|", "|", $br[sonclass]);
                    $usql = $empire->query("update {$dbtbpre}enewsclass set sonclass='{$newsonclass}' where classid='{$br['classid']}'");
                }
            } else {
                //取得现在大栏目的值
                $b = $empire->fetch1("select featherclass,islast,wburl from {$dbtbpre}enewsclass where classid='{$add['bclassid']}'");
                //检测大栏目是否为终级栏目
                if ($b[islast]) {
                    printerror("BclassNotLast", "");
                }
                if ($b[wburl]) {
                    printerror("BclassNotWb", "");
                }
                if (empty($b[featherclass])) {
                    $b[featherclass] = "|";
                }
                $featherclass = $b[featherclass] . $add[bclassid] . "|";
                //改变新大栏目的子栏目
                $where = ReturnClass($featherclass);
                if (empty($where)) {
                    $where = "classid=0";
                }
                $bsql = $empire->query("select sonclass,classid from {$dbtbpre}enewsclass where " . $where);
                while ($nb = $empire->fetch($bsql)) {
                    if (empty($nb[sonclass])) {
                        $nb[sonclass] = "|";
                    }
                    $newsonclass = $nb[sonclass] . $add[classid] . "|";
                    $usql = $empire->query("update {$dbtbpre}enewsclass set sonclass='{$newsonclass}' where classid='{$nb['classid']}'");
                }
                //改变旧大栏目的子栏目
                $o = $empire->fetch1("select sonclass,featherclass from {$dbtbpre}enewsclass where classid='{$add['classid']}'");
                $where = ReturnClass($o[featherclass]);
                if (empty($where)) {
                    $where = "classid=0";
                }
                $osql = $empire->query("select sonclass,classid from {$dbtbpre}enewsclass where " . $where);
                while ($ob = $empire->fetch($osql)) {
                    $newsonclass = str_replace("|" . $add[classid] . "|", "|", $ob[sonclass]);
                    $usql = $empire->query("update {$dbtbpre}enewsclass set sonclass='{$newsonclass}' where classid='{$ob['classid']}'");
                }
            }
            $change = ",bclassid={$add['bclassid']},featherclass='{$featherclass}'";
        }
        //应用于已生成的信息
        if ($add['tobetempinfo']) {
            $upsql = $empire->query("update {$dbtbpre}ecms_" . $tabler[tbname] . " set newstempid={$add['newstempid']} where classid='{$add['classid']}'");
        }
        //文件前缀
        $add[filename_qz] = RepFilenameQz($add[filename_qz]);
        $sql = $empire->query("update {$dbtbpre}enewsclass set classname='{$add['classname']}',classpath='{$classpath}',classtype='{$add['classtype']}',link_num={$add['link_num']},lencord={$add['lencord']},newstempid={$add['newstempid']},listtempid={$add['listtempid']},newspath='{$add['newspath']}',filename={$add['filename']},filetype='{$add['filetype']}',openpl={$add['openpl']},openadd={$add['openadd']},newline={$add['newline']},hotline={$add['hotline']},goodline={$add['goodline']},classurl='{$add['classurl']}',groupid={$add['groupid']},myorder={$add['myorder']},filename_qz='{$add['filename_qz']}',hotplline={$add['hotplline']},modid={$add['modid']},checked={$add['checked']},firstline={$add['firstline']},bname='{$add['bname']}',searchtempid={$add['searchtempid']},tid={$tabler['tid']},tbname='{$tabler['tbname']}',maxnum={$add['maxnum']},checkpl={$add['checkpl']},down_num={$add['down_num']},online_num={$add['online_num']},listorder='{$add['listorder']}',reorder='{$add['reorder']}',intro='{$add['intro']}',classimg='{$add['classimg']}',jstempid={$add['jstempid']},addinfofen={$add['addinfofen']},listdt={$add['listdt']},showclass={$add['showclass']},showdt={$add['showdt']},checkqadd={$add['checkqadd']},qaddlist={$add['qaddlist']},qaddgroupid='{$add['qaddgroupid']}',qaddshowkey={$add['qaddshowkey']},adminqinfo={$add['adminqinfo']},doctime={$add['doctime']},classpagekey='{$add['classpagekey']}',dtlisttempid='{$add['dtlisttempid']}',classtempid='{$add['classtempid']}',nreclass={$add['nreclass']},nreinfo={$add['nreinfo']},nrejs={$add['nrejs']},nottobq={$add['nottobq']},ipath='{$add['ipath']}',addreinfo={$add['addreinfo']},haddlist={$add['haddlist']},sametitle={$add['sametitle']},definfovoteid={$add['definfovoteid']},wburl='',qeditchecked={$add['qeditchecked']},wapstyleid='{$add['wapstyleid']}',repreinfo='{$add['repreinfo']}',pltempid='{$add['pltempid']}',cgroupid='{$add['cgroupid']}',yhid='{$add['yhid']}',wfid='{$add['wfid']}',cgtoinfo='{$add['cgtoinfo']}',bdinfoid='{$add['bdinfoid']}'" . $change . " where classid='{$add['classid']}'");
        //副表
        $ret_cr = ReturnClassAddF($add, 1);
        $empire->query("update {$dbtbpre}enewsclassadd set classtext='" . addslashes($add[classtext]) . "'" . $ret_cr[0] . " where classid='{$add['classid']}'");
        GetClass();
    }
    //移动目录
    if ($add[bclassid] != $add[oldbclassid] || $add[oldclasspath] != $classpath && $add['classpath'] == $add['oldcpath']) {
        $opath = "../../" . $add[oldclasspath];
        $newpath = "../../" . $classpath;
        MovePath($opath, $newpath);
        $opath = "../../d/file/" . $add[oldclasspath];
        $npath = "../../d/file/" . $classpath;
        CopyPath($opath, $npath);
    } else {
        if ($add['oldcpath'] != $add['classpath']) {
            AlterClassPath($add['classid'], $add['islast'], $add['oldclasspath'], $classpath);
            GetClass();
        }
    }
    //删除缓存文件
    if ($add[oldclassname] != $add[classname] || $add[bclassid] != $add[oldbclassid]) {
        DelListEnews();
        GetSearch($add[modid]);
    } else {
        if ($add[oldclasspath] != $classpath && $add['classpath'] == $add['oldcpath'] || $add[listdt] != $add[oldlistdt]) {
            DelListEnews();
        }
        if ($add[openadd] != $add[oldopenadd] || $add[modid] != $add[oldmodid]) {
            GetSearch($add[modid]);
            if ($add[modid] != $add[oldmodid]) {
                GetSearch($add[oldmodid]);
            }
        }
    }
    //修改栏目扩展名
    if ($add[oldclasstype] != $add[classtype]) {
        $todaytime = date("Y-m-d H:i:s");
        if ($add[islast]) {
            $query = "select count(*) as total from {$dbtbpre}ecms_" . $class_r[$add[classid]][tbname] . " where checked=1 and classid='{$add['classid']}'";
            $lencord = $add[oldlencord];
            $num = $empire->gettotal($query);
        } else {
            $lencord = $add[oldlencord];
            if ($add[oldislist] == 1) {
                $where = ReturnClass($class_r[$add[classid]][sonclass]);
                $query = "select count(*) as total from {$dbtbpre}ecms_" . $class_r[$add[classid]][tbname] . " where checked=1 and (" . $where . ")";
                $num = $empire->gettotal($query);
            } else {
                $num = 1;
            }
        }
        RenameListfile($add[classid], $lencord, $num, $add[oldclasstype], $add[classtype], $classpath);
    }
    //来源
    if ($add['from']) {
        $returnurl = "ListPageClass.php";
    } else {
        $returnurl = "ListClass.php";
    }
    TogNotReClass(1);
    if ($sql) {
        insert_dolog("classid=" . $add[classid] . "<br>classname=" . $add[classname]);
        //操作日志
        printerror("EditClassSuccess", $returnurl);
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
コード例 #5
0
function ReListHtml($classid, $enews = 0)
{
    global $empire, $class_r, $dbtbpre;
    $classid = (int) $classid;
    if (!$classid) {
        printerror("NotChangeReClassid", "history.go(-1)");
    }
    $r = $empire->fetch1("select classtempid,islist from {$dbtbpre}enewsclass where classid='{$classid}'");
    if ($class_r[$classid][islast]) {
        ListHtml($classid, $ret_r, 0);
    } else {
        if ($r[islist] == 1) {
            ListHtml($classid, $ret_r, 3);
        } elseif ($r[islist] == 3) {
            ReClassBdInfo($classid);
        } else {
            $classtemp = $r[islist] == 2 ? GetClassText($classid) : GetClassTemp($r['classtempid']);
            NewsBq($classid, $classtemp, 0, 0);
        }
    }
    if ($enews == 1) {
        return "";
    }
    insert_dolog("");
    //操作日志
    printerror("ReClassidSuccess", "history.go(-1)");
}
コード例 #6
0
 //控制面板模板
 GetSearch();
 //三搜索表单模板
 GetPrintPage();
 //打印模板
 GetDownloadPage();
 //下载地址页面
 ReGbooktemp();
 //留言板模板
 ReLoginIframe();
 //登陆状态模板
 ReSchAlltemp();
 //全站搜索模板
 //生成首页
 $indextemp = GetIndextemp();
 NewsBq(0, $indextemp, 1, 0);
 //--- 更新反馈表单 ---
 $sql = $empire->query("select bid,btemp from {$dbtbpre}enewsfeedbackclass order by bid");
 while ($r = $empire->fetch($sql)) {
     //替换公共变量
     $btemp = ReplaceTempvar($r['btemp']);
     $btemp = str_replace("[!--cp.header--]", "<? include(\"../../data/template/cp_1.php\");?>", $btemp);
     $btemp = str_replace("[!--cp.footer--]", "<? include(\"../../data/template/cp_2.php\");?>", $btemp);
     $file = "../tool/feedback/temp/feedback" . $r[bid] . ".php";
     $btemp = "<?\r\nif(!defined('InEmpireCMS'))\r\n{exit();}\r\n?>" . $btemp;
     WriteFiletext($file, $btemp);
 }
 //--- 评论表情文件 ---
 InstallGetPlfaceJs();
 echo "更新文件完毕.<script>self.location.href='index.php?enews=success&f=6&defaultdata={$defaultdata}';</script>";
 exit;
コード例 #7
0
function DoTimeRepage($time)
{
    global $empire, $dbtbpre;
    if (empty($time)) {
        $time = 120;
    }
    echo "<meta http-equiv=\"refresh\" content=\"" . $time . ";url=DoTimeRepage.php\">";
    DoAutoUpAndDownInfo();
    //自动上/下线
    $todaytime = time();
    $b = 0;
    $sql = $empire->query("select doing,classid,doid from {$dbtbpre}enewsdo where isopen=1 and lasttime+dotime*60<{$todaytime}");
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        if ($r[doing] == 1) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                ReListHtml($cr[$i], 1);
            }
        } elseif ($r[doing] == 2) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                ListHtml($cr[$i], $ret_r[0], 1);
            }
        } elseif ($r[doing] == 3) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                $ur = $empire->fetch1("select listid,pagetitle,filepath,filetype,totalsql,listsql,maxnum,lencord,listtempid from {$dbtbpre}enewsuserlist where listid='" . $cr[$i] . "'");
                ReUserlist($ur, "");
            }
        } elseif ($r[doing] == 4) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                $ur = $empire->fetch1("select id,path,pagetext,title,pagetitle,pagekeywords,pagedescription,tempid from {$dbtbpre}enewspage where id='" . $cr[$i] . "'");
                ReUserpage($ur[id], $ur[pagetext], $ur[path], $ur[title], $ur[pagetitle], $ur[pagekeywords], $ur[pagedescription], $ur[tempid]);
            }
        } elseif ($r[doing] == 5) {
            $cr = explode(',', $r[classid]);
            $count = count($cr) - 1;
            for ($i = 1; $i < $count; $i++) {
                if (empty($cr[$i])) {
                    continue;
                }
                $ur = $empire->fetch1("select jsid,jsname,jssql,jstempid,jsfilename from {$dbtbpre}enewsuserjs where jsid='" . $cr[$i] . "'");
                ReUserjs($ur, '');
            }
        } else {
            $indextemp = GetIndextemp();
            NewsBq($classid, $indextemp, 1, 0);
        }
        $empire->query("update {$dbtbpre}enewsdo set lasttime={$todaytime} where doid='{$r['doid']}'");
    }
    if ($b) {
        echo "最后执行时间:" . date("Y-m-d H:i:s", $todaytime) . "<br><br>";
    }
}
コード例 #8
0
ファイル: hinfofun.php プロジェクト: novnan/meiju
function hReIndex()
{
    $indextemp = GetIndextemp();
    NewsBq($classid, $indextemp, 1, 0);
}
コード例 #9
0
ファイル: tempfun.php プロジェクト: novnan/meiju
function LoadTempInClass($path, $start, $userid, $username)
{
    global $empire, $public_r, $dbtbpre;
    //验证权限
    CheckLevel($userid, $username, $classid, "template");
    $start = (int) $start;
    if (empty($public_r[loadtempnum])) {
        $public_r[loadtempnum] = 50;
    }
    $b = 0;
    $sql = $empire->query("select classid,classtempid,islist from {$dbtbpre}enewsclass where islast=0 and islist<>1 and classid>{$start} order by classid limit " . $public_r[loadtempnum]);
    while ($r = $empire->fetch($sql)) {
        $b = 1;
        $newstart = $r[classid];
        if ($r[islist] == 3) {
            continue;
        }
        $file = "../data/LoadTemp/" . $r[classid] . ".htm";
        if (file_exists($file)) {
            $data = addslashes(addslashes(ReadFiletext($file)));
            $data = RepPhpAspJspcode($data);
            if ($r[islist] == 2) {
                $usql = $empire->query("update {$dbtbpre}enewsclassadd set classtext='" . $data . "' where classid='{$r['classid']}'");
            } else {
                $usql = $empire->query("update {$dbtbpre}enewsclasstemp set temptext='" . $data . "' where tempid='{$r['classtempid']}'");
            }
            NewsBq($r[classid], $data, 0, 0);
        }
    }
    if (empty($b)) {
        //操作日志
        insert_dolog("");
        printerror("LoadClassTempSuccess", "template/LoadTemp.php" . hReturnEcmsHashStrHref2(1));
    }
    echo $fun_r['LoadOneTempSuccess'] . "(ID:<font color=red><b>" . $newstart . "</b></font>)<script>self.location.href='ecmstemp.php?enews=LoadTempInClass&start={$newstart}" . hReturnEcmsHashStrHref(0) . "';</script>";
    exit;
}