예제 #1
0
function mcaidsarr($nowmstpl = 0, $onlyadd = 0)
{
    //$onlyadd为1时只列出允许添加分类的空间栏目
    global $mcatalogs, $mstpls;
    $narr = array();
    foreach ($mcatalogs as $k => $v) {
        if ($v['maxucid'] || !$onlyadd) {
            $narr[$k] = $v['title'];
        }
    }
    if ($nowmstpl) {
        $narr = marray_intersect_key($narr, $mstpls);
    }
    return $narr;
}
예제 #2
0
<?php

//进入空间页面一定需要读取空间主的会员资料
$mid = empty($mid) ? 0 : max(0, intval($mid));
if (!($_da = $db->fetch_one("SELECT m.*,s.* FROM {$tblprefix}members m LEFT JOIN {$tblprefix}members_sub s ON s.mid=m.mid WHERE m.mid='{$mid}'"))) {
    message(lang('plepoimemid'));
}
$_da = array_merge($_da, $db->fetch_one("SELECT * FROM {$tblprefix}members_{$_da['mchid']} WHERE mid='{$mid}'"));
arr_tag2atm($_da, 'm');
$_da['cms_counter'] = "<script type=\"text/javascript\" src=\"" . $cms_abs . "tools/counter.php?mid={$mid}\"></script>";
load_cache('mtconfigs,mcatalogs');
$uclasses = loaduclasses($mid);
$mstpls = load_mtconfig($mid, 'setting');
$mcatalogs = marray_intersect_key($mcatalogs, $mstpls);
//提取当前模板中的全部生效栏目
function mcn_tpl($temparr = array(), $addno = 0)
{
    //首页直接读取而不用分析
    global $mstpls;
    $tplname = @$mstpls[$temparr['mcaid']][$addno ? 'list' : 'index'];
    return $tplname ? $tplname : '';
}
function ms_arctpl($chid, $mode = 'archive')
{
    global $mid;
    $arctpls = load_mtconfig($mid, 'arctpls');
    return @$arctpls[$mode][$chid];
}
function mcn_parse($temparr = array())
{
    global $mcatalogs, $uclasses;