Пример #1
0
function EditGbooktemp($temptext, $userid, $username)
{
    global $empire, $public_r, $dbtbpre;
    if (!$temptext) {
        printerror("EmptyTemptext", "history.go(-1)");
    }
    //验证权限
    CheckLevel($userid, $username, $classid, "template");
    $temptext = RepPhpAspJspcode($temptext);
    $gid = (int) $_POST['gid'];
    $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set gbooktemp='" . eaddslashes2($temptext) . "' limit 1");
    //备份模板
    AddEBakTemp('pubgbooktemp', $gid, 1, '', $temptext, 0, 0, '', 0, 0, '', 0, 0, 0, $userid, $username);
    if ($gid == $public_r['deftempid'] || !$public_r['deftempid'] && ($gid == 1 || $gid == 0)) {
        ReGbooktemp();
    }
    if ($sql) {
        //操作日志
        insert_dolog("gid={$gid}");
        printerror("EditGbooktempSuccess", "template/EditPublicTemp.php?tname=gbooktemp&gid={$gid}" . hReturnEcmsHashStrHref2(0) . "#gbooktemp");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}
Пример #2
0
function ReDtPage($userid, $username)
{
    //操作权限
    CheckLevel($userid, $username, $classid, "changedata");
    GetPlTempPage();
    //评论列表模板
    GetPlJsPage();
    //评论JS模板
    ReCptemp();
    //控制面板模板
    GetSearch();
    //三搜索表单模板
    GetPrintPage();
    //打印模板
    GetDownloadPage();
    //下载地址页面
    ReGbooktemp();
    //留言板模板
    ReLoginIframe();
    //登陆状态模板
    ReSchAlltemp();
    //全站搜索模板
    //操作日志
    insert_dolog("");
    printerror("ReDtPageSuccess", "history.go(-1)");
}
Пример #3
0
function Moreport_ChangeData($portr, $ecms = 0)
{
    global $empire, $dbtbpre, $public_r, $ecms_config;
    $ecms_config['sets']['deftempid'] = $portr['tempgid'];
    if ($ecms == 1) {
        GetPlTempPage();
        //评论列表模板
        GetPlJsPage();
        //评论JS模板
        ReCptemp();
        //控制面板模板
        GetSearch();
        //三搜索表单模板
        GetPrintPage();
        //打印模板
        GetDownloadPage();
        //下载地址页面
        ReGbooktemp();
        //留言板模板
        ReLoginIframe();
        //登陆状态模板
        ReSchAlltemp();
        //全站搜索模板
        //防采集缓存
        $yfile = ECMS_PATH . DASHBOARD . '/data/dbcache/notcj.php';
        $nfile = ECMS_SELFPATH . DASHBOARD . '/data/dbcache/notcj.php';
        @copy($yfile, $nfile);
    } elseif ($ecms == 2) {
        //临时文件目录
        $tmppath = ECMS_SELFPATH . DASHBOARD . '/data/tmp';
        $hand = @opendir($tmppath);
        while ($file = @readdir($hand)) {
            if ($file == '.' || $file == '..' || $file == 'test.txt' || $file == 'index.html' || $file == 'mod' || $file == 'temp' || $file == 'titlepic' || $file == 'cj') {
                continue;
            }
            $filename = $tmppath . '/' . $file;
            if (!is_dir($filename)) {
                DelFiletext($filename);
            }
        }
    } elseif ($ecms == 3) {
        $ypath = ECMS_PATH . 'd/js';
        $npath = ECMS_SELFPATH . 'd/js';
        CopyPath($ypath, $npath);
        $ypath = ECMS_PATH . DASHBOARD . '/data/fc';
        $npath = ECMS_SELFPATH . DASHBOARD . '/data/fc';
        CopyPath($ypath, $npath);
        $ypath = ECMS_PATH . DASHBOARD . '/data/html';
        $npath = ECMS_SELFPATH . DASHBOARD . '/data/html';
        CopyPath($ypath, $npath);
        $ypath = ECMS_PATH . DASHBOARD . '/data/template';
        $npath = ECMS_SELFPATH . DASHBOARD . '/data/template';
        CopyPath($ypath, $npath);
    } elseif ($ecms == 4) {
        if ($portr['mustdt'] || $public_r['indexpagedt']) {
            DelFiletext(ECMS_SELFPATH . 'index' . $public_r['indextype']);
            @copy(ECMS_SELFPATH . DASHBOARD . '/data/template/dtindexpage.txt', ECMS_SELFPATH . 'index.php');
        }
    } else {
        //更新参数设置
        GetConfig(1);
        //更新类别
        GetClass();
        //更新会员组
        GetMemberLevel();
        //更新全站搜索数据表
        GetSearchAllTb();
    }
}
Пример #4
0
 //--- 删除缓存文件 ---
 DelListEnews();
 //--- 更新动态页面 ---
 GetPlTempPage();
 //评论列表模板
 GetPlJsPage();
 //评论JS模板
 ReCptemp();
 //控制面板模板
 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);