Beispiel #1
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)");
}
            $br = " ";
        }
        $face = explode('##', $facer[$i]);
        $allface .= "<a href='#eface' onclick=\\\"eaddplface('" . $face[0] . "');\\\"><img src='" . $public_r[newsurl] . "e/data/face/" . $face[1] . "' border=0></a>" . $br;
    }
    $allface = "document.write(\"<script src='" . $public_r[newsurl] . "e/data/js/addplface.js'></script>\");document.write(\"" . $allface . "\");";
    WriteFiletext_n($filename, $allface);
}
//更新其它数据
if ($ecms == 'ChangeInstallOtherData') {
    //--- 删除缓存文件 ---
    DelListEnews();
    //--- 更新动态页面 ---
    GetPlTempPage();
    //评论列表模板
    GetPlJsPage();
    //评论JS模板
    ReCptemp();
    //控制面板模板
    GetSearch();
    //三搜索表单模板
    GetPrintPage();
    //打印模板
    GetDownloadPage();
    //下载地址页面
    ReGbooktemp();
    //留言板模板
    ReLoginIframe();
    //登陆状态模板
    ReSchAlltemp();
    //全站搜索模板
Beispiel #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();
    }
}
Beispiel #4
0
function EditOtherPubTemp($tempname, $temptext, $userid, $username)
{
    global $empire, $dbtbpre, $public_r;
    if (empty($temptext) || empty($tempname)) {
        printerror("EmptyEditDownTemp", "history.go(-1)");
    }
    //操作权限
    CheckLevel($userid, $username, $classid, "template");
    $edittemplist = ',pljstemp,downpagetemp,downsofttemp,onlinemovietemp,listpagetemp,';
    $temptext = RepPhpAspJspcode($temptext);
    $tempname = RepPostVar($tempname);
    if (!strstr($edittemplist, ',' . $tempname . ',')) {
        printerror("EmptyEditDownTemp", "history.go(-1)");
    }
    if ($tempname == 'downsofttemp') {
        $temptype = 'pubdownsofttemp';
    } elseif ($tempname == 'onlinemovietemp') {
        $temptype = 'pubonlinemovietemp';
    } elseif ($tempname == 'listpagetemp') {
        $temptype = 'publistpagetemp';
    } elseif ($tempname == 'pljstemp') {
        $temptype = 'pubpljstemp';
    } elseif ($tempname == 'downpagetemp') {
        $temptype = 'pubdownpagetemp';
    }
    $gid = (int) $_POST['gid'];
    $sql = $empire->query("update " . GetDoTemptb("enewspubtemp", $gid) . " set " . $tempname . "='" . eaddslashes2($temptext) . "'");
    //备份模板
    AddEBakTemp($temptype, $gid, 1, '', $temptext, 0, 0, '', 0, 0, '', 0, 0, 0, $userid, $username);
    if ($gid == $public_r['deftempid'] || !$public_r['deftempid'] && ($gid == 1 || $gid == 0)) {
        if ($tempname == "downsofttemp" || $tempname == "onlinemovietemp" || $tempname == "listpagetemp") {
            GetConfig();
        } elseif ($tempname == "downpagetemp") {
            GetDownloadPage();
        } elseif ($tempname == "pljstemp") {
            GetPlJsPage();
        } else {
        }
    }
    if ($sql) {
        //操作日志
        insert_dolog("temp={$tempname}&gid={$gid}");
        printerror("EditDownTempSuccess", "template/EditPublicTemp.php?tname={$tempname}&gid={$gid}" . hReturnEcmsHashStrHref2(0) . "#{$tempname}");
    } else {
        printerror("DbError", "history.go(-1)");
    }
}