示例#1
0
function switch_cache($nsid = 0)
{
    global $channels, $catalogs, $cnodes, $commus, $mtpls, $sptpls, $btags, $utags, $ctags, $ptags, $rtags, $sid, $subsites, $templatedir;
    if ($nsid == $sid) {
        return;
    }
    load_cache('catalogs,cnodes,mtpls,sptpls,utags,ctags,ptags,rtags', $nsid);
    foreach (array('channels', 'btags', 'commus') as $var) {
        cache_merge(${$var}, $var, $nsid);
    }
    $nsid && ($templatedir = $subsites[$nsid]['templatedir']);
}
示例#2
0
 function arcid($aid)
 {
     global $db, $tblprefix;
     $this->init();
     $aid = max(0, intval($aid));
     if (!($this->archive = $db->fetch_one("SELECT a.*,s.*,r.* FROM {$tblprefix}archives a LEFT JOIN {$tblprefix}archives_sub s ON s.aid=a.aid LEFT JOIN {$tblprefix}archives_rec r ON r.aid=a.aid WHERE a.aid='{$aid}'"))) {
         return false;
     }
     $this->channel = read_cache('channel', $this->archive['chid']);
     $this->fields = read_cache('fields', $this->archive['chid']);
     cache_merge($this->channel, 'channel', $this->archive['sid']);
     arc_checkend($this->archive);
     $this->aid = $this->archive['aid'];
     return true;
 }
示例#3
0
<?php

@set_time_limit(0);
load_cache('btags,channels,cotypes,fchannels,fcatalogs,commus,mcommus,currencys,permissions,votes,vcps,mchannels,dbsources,vcatalogs,acatalogs,freeinfos');
load_cache('catalogs,sptpls', $sid);
cache_merge($channels, 'channels', $sid);
cache_merge($btags, 'btags', $sid);
include_once M_ROOT . './include/refresh.fun.php';
include_once M_ROOT . "./include/cparse.fun.php";
include_once M_ROOT . "./include/parse/general.php";
include_once M_ROOT . "./include/parse/func.php";
function _aenter(&$v, $init = 0, $add = array())
{
    global $_actid, $_midarr, $grouptypes, $cotypes;
    if ($init) {
        $_actid = $_midarr = array();
    }
    $arr = array('aid', 'mid', 'sid', 'ucid', 'chid', 'mchid', 'mcaid', 'fcaid', 'vid', 'addid', 'fid', 'matid', 'rgid');
    foreach ($grouptypes as $x => $y) {
        $arr[] = 'grouptype' . $x;
    }
    if ($add) {
        $arr = array_merge($arr, $add);
    }
    foreach ($arr as $x) {
        if (isset($v[$x])) {
            $_midarr[$x] = $v[$x];
        }
    }
    $arr = array('caid');
    foreach ($cotypes as $x => $y) {
示例#4
0
<?php

(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
load_cache('mconfigs,currencys,commus,channels,cotypes');
load_cache('mtpls', $sid);
cache_merge($channels, 'channels', $sid);
include_once M_ROOT . "./include/upload.cls.php";
include_once M_ROOT . "./include/fields.cls.php";
if ($sid) {
    $subsite = $subsites[$sid];
}
$action = $action ? $action : 'zh';
if ($action == 'xzly') {
    if (!submitcheck('bmconfigs')) {
        tabheader('选择TCBY的理由', 'cfsite', "?entry=extend&extend={$extend}&action=save", 2, 1);
        trspecial('图片1', 'mconfigsnew[xzly_1]', $mconfigs['xzly_1'], 'image', '显示大小: 宽 - 1200px 高 - 655px', '显示大小: 宽 - 1200px 高 - 655px');
        trbasic('文字1', 'mconfigsnew[xzly_2]', $mconfigs['xzly_2'], 'btext');
        trbasic('文字2', 'mconfigsnew[xzly_3]', $mconfigs['xzly_3'], 'textarea');
        trspecial('图片2', 'mconfigsnew[xzly_4]', $mconfigs['xzly_4'], 'image', '', '显示大小: 宽 - 1200px 高 - 470px');
        trbasic('文字3', 'mconfigsnew[xzly_5]', $mconfigs['xzly_5'], 'textarea');
        tabfooter('bmconfigs');
    }
}
if ($action == 'qxmd') {
    if (!submitcheck('bmconfigs')) {
        tabheader('旗下门店', 'cfsite', "?entry=extend&extend={$extend}&action=save", 2, 1);
        trspecial('', 'mconfigsnew[qxmd]', $mconfigs['qxmd'], 'htmltext');
        tabfooter('bmconfigs');
    }
}
示例#5
0
     $adds = $db->result_one("SELECT COUNT(*) FROM {$tblprefix}archives WHERE mid='{$memberid}' AND chid='{$chid}'");
     if ($adds >= $curuser->info['arcallowance']) {
         message('arcallowance');
     }
 }
 foreach (array('ccoids', 'citems', 'additems', 'coidscp', 'cpkeeps') as $var) {
     ${$var} = $channel[$var] ? explode(',', $channel[$var]) : array();
 }
 $forward = empty($forward) ? M_REFERER : $forward;
 $forwardstr = '&forward=' . rawurlencode($forward);
 $fields = read_cache('fields', $chid);
 if (!submitcheck('barchiveadd')) {
     $nsid = isset($nsid) ? max(-1, intval($nsid)) : -1;
     if ($nsid > 0) {
         switch_cache($nsid);
         cache_merge($channel, 'channel', $nsid);
         $sid = $nsid;
     }
     if (!($tplname = @$channel['addtpl'])) {
         _header();
         $pre_cns = array();
         $pre_cns['caid'] = empty($caid) ? 0 : max(0, intval($caid));
         foreach ($cotypes as $k => $v) {
             if (!$v['self_reg'] && !in_array($k, $ccoids) && !in_array($k, $additems)) {
                 $pre_cns['ccid' . $k] = empty(${'ccid' . $k}) ? '' : trim(${'ccid' . $k});
             }
         }
         //如果指定在某个合辑内添加,需要分析继承类目
         $pid = empty($pid) ? 0 : max(0, intval($pid));
         if ($pid && ($p_album = $db->fetch_one("SELECT * FROM {$tblprefix}archives WHERE aid={$pid}"))) {
             //指定合辑内添加文档的信息提示
示例#6
0
 }
 if (!$arc->archive['checked']) {
     message('poinarcnoche');
 }
 if ($commu['allowance'] && @$curuser->info['cuallowance'] <= @$curuser->info['cuaddmonth']) {
     message('owancecommuamooverlim');
 }
 if (empty($commu['setting']['repeat']) || !empty($commu['setting']['repeattime'])) {
     if (!empty($m_cookie['08cms_cuid_' . $commu['cuid'] . '_' . $aid])) {
         message(empty($commu['setting']['repeat']) ? 'norepeatoper' : 'overquick');
     }
 }
 switch_cache($arc->archive['sid']);
 $sid = $arc->archive['sid'];
 if_siteclosed($sid);
 cache_merge($commu, 'commu', $sid);
 if (!($tplname = @$commu['addtpl'])) {
     unset($arc);
     load_cache('mlangs,rfields,ucotypes');
     include_once M_ROOT . "./include/fields.cls.php";
     include_once M_ROOT . "./include/arcedit.cls.php";
     include_once M_ROOT . "./include/cheader.inc.php";
     _header();
     $aedit = new cls_arcedit();
     $aedit->set_aid($aid);
     $aedit->detail_data();
     $citems = empty($commu['setting']['citems']) ? array() : explode(',', $commu['setting']['citems']);
     if (!($oldmsg = $db->fetch_one("SELECT * FROM {$tblprefix}replys WHERE mid='{$memberid}' AND cuid='{$commu['cuid']}' ORDER BY cid DESC LIMIT 0,1"))) {
         $oldmsg = array();
     }
     tabheader(lang('add') . $commu['cname'], 'replyadd', "?aid={$aid}" . ($qtid ? "&qtid={$qtid}" : '') . "{$forwardstr}", 2, 1, 1);
示例#7
0
        a_guide('tplmchannel');
    } else {
        $db->query("UPDATE {$tblprefix}mchannels SET\n\t\t\taddtpl='{$mchannelnew['addtpl']}', \n\t\t\tsrhtpl='{$mchannelnew['srhtpl']}' \n\t\t\tWHERE mchid='{$mchid}'");
        adminlog(lang('det_modify_mchannel'));
        updatecache('mchannels');
        amessage('channelmodifyfinish', M_REFERER);
    }
} elseif ($action == 'tplcommu') {
    url_nav(lang('tplallconfig'), $urlsarr, 'commu', 12);
    load_cache('commus');
    if (!submitcheck('bcommu')) {
        tabheader(lang('archivecommu') . lang('tpl_set'), 'commu', "?entry=tplconfig&action=tplcommu{$param_suffix}");
        foreach ($commus as $k => $v) {
            if (in_array($v['cclass'], array('report', 'comment', 'answer', 'reply'))) {
                if ($sid) {
                    cache_merge($v, 'commu', $sid);
                }
                trbasic($v['cname'] . '-' . lang('add_page_tpl'), "commusnew[{$k}][addtpl]", makeoption(array('' => lang('noset')) + mtplsarr('commu'), $v['addtpl']), 'select');
            }
        }
        tabfooter('bcommu');
        a_guide('tplcommu');
    } else {
        if (!$sid) {
            foreach ($commus as $k => $v) {
                if (in_array($v['cclass'], array('report', 'comment', 'answer', 'reply'))) {
                    $addtpl = empty($commusnew[$k]['addtpl']) ? '' : $commusnew[$k]['addtpl'];
                    $db->query("UPDATE {$tblprefix}commus SET addtpl='{$addtpl}' WHERE cuid='{$k}'");
                }
            }
            updatecache('commus');
示例#8
0
(!defined('M_COM') || !defined('M_ADMIN')) && exit('No Permission');
aheader();
backallow('cfcommu') || amessage('no_apermission');
load_cache('grouptypes,currencys,rprojects,channels,permissions,ucotypes');
sys_cache('fieldwords');
include_once M_ROOT . "./include/fields.fun.php";
$cclassarr = array('praise' => lang('praise_no'), 'score' => lang('score'), 'report' => lang('pickbug'), 'favorite' => lang('favorite'), 'comment' => lang('comment'), 'answer' => lang('answer'), 'subscribe' => lang('subscribe'), 'purchase' => lang('purchase'), 'offer' => lang('offer'), 'reply' => lang('reply'), 'spread' => lang('spread'));
$url_type = 'commu';
include 'urlsarr.inc.php';
if ($action == 'commusedit') {
    if (!$sid) {
        url_nav(lang('docinterconfig'), $urlsarr, 'commu');
    }
    $commus = fetch_arr();
    cache_merge($commus, 'commus', $sid);
    if (!submitcheck('bcommusedit')) {
        tabheader(lang('citem_admin'), 'commusedit', "?entry=commus&action=commusedit{$param_suffix}", '7');
        trcategory(array(lang('delete'), array(lang('enable'), 'txtL'), array(lang('item_name'), 'txtL'), array(lang('type'), 'txtL'), array(lang('pick_url_style'), 'txtL'), array(lang('copy'), 'txtL'), array(lang('edit'), 'txtL')));
        foreach ($commus as $cuid => $commu) {
            $cclassstr = $cclassarr[$commu['cclass']];
            echo "<tr class=\"txt\">" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$cuid}]\" value=\"{$cuid}\"" . ($commu['issystem'] || $sid ? ' disabled' : '') . "></td>\n" . "<td class=\"txtC w30\"><input class=\"checkbox\" type=\"checkbox\" name=\"commusnew[{$cuid}][available]\" value=\"1\"" . (empty($commu['available']) ? '' : ' checked') . "></td>\n" . "<td class=\"txtL w200\">" . ($sid ? "{$commu['cname']}" : "<input type=\"text\" size=\"30\" maxlength=\"30\" name=\"commusnew[{$cuid}][cname]\" value=\"{$commu['cname']}\">") . "</td>\n" . "<td class=\"txtL w60\">{$cclassstr}</td>\n" . "<td class=\"txtL w60\"><a href=\"?entry=commus&action=commulink&cuid={$cuid}{$param_suffix}\" onclick=\"return floatwin('open_commusedit',this)\">" . lang('look') . "</a></td>\n" . "<td class=\"txtC w30\">" . ($commu['ch'] && !$sid ? "<a href=\"?entry=commus&action=commucopy&cuid={$cuid}{$param_suffix}\" onclick=\"return floatwin('open_commusedit',this)\">" . lang('copy') . "</a>" : '-') . "</td>\n" . "<td class=\"txtC w30\">" . (!$sid ? "<a href=\"?entry=commus&action=commudetail&cuid={$cuid}{$param_suffix}\" onclick=\"return floatwin('open_commusedit',this)\">" . lang('detail') . "</a>" : '-') . "</td></tr>\n";
        }
        tabfooter('bcommusedit', lang('modify'));
        a_guide('commusedit');
    } else {
        if (!$sid) {
            if (!empty($delete)) {
                foreach ($delete as $cuid) {
                    if ($commus[$cuid]['issystem']) {
                        continue;