예제 #1
0
    }
} elseif ($deal == 'uclassadd') {
    if (!submitcheck('buclassesadd')) {
        $mstpls = load_mtconfig($memberid, 'setting');
        tabheader($cuidsarr[$cuid] . ' - ' . lang('addusercoclass'), 'uclassesadd', "?action=uclasses&deal=uclassadd&cuid={$cuid}", 2, 0, 1);
        trbasic(lang('coclasscname'), 'uclassadd[title]');
        trhidden('uclassadd[cuid]', $cuid);
        trbasic(lang('belongspacecatalog'), 'uclassadd[mcaid]', makeoption(array('0' => lang('nosetting')) + mcaidsarr(1, 1)), 'select');
        tabfooter('buclassesadd', lang('add'));
        $submitstr = makesubmitstr('uclassadd[title]', 1, 0, 0, $uclasslength);
        check_submit_func($submitstr);
    } else {
        $uclassadd['title'] = trim(strip_tags($uclassadd['title']));
        !$uclassadd['title'] && mcmessage('inputuclasscname', "?action=uclasses&deal=uclassadd&cuid={$cuid}");
        $uclassadd['title'] = cutstr($uclassadd['title'], $uclasslength, '');
        $uclasses = loaduclasses($memberid);
        if ($maxuclassnum && count($uclasses) > $maxuclassnum) {
            mcmessage('uclassoverlimit', "?action=uclasses&cuid={$cuid}");
        }
        //分析所在的栏目中的数量是否超出了限制
        if ($uclassadd['mcaid']) {
            if (@(!$mcatalogs[$uclassadd['mcaid']]['maxucid'])) {
                mcmessage('pccau', "?action=uclasses&cuid={$cuid}");
            }
            $num = 0;
            foreach ($uclasses as $k => $v) {
                if (@$v['mcaid'] == $uclassadd['mcaid']) {
                    $num++;
                }
            }
            if ($num >= $mcatalogs[$uclassadd['mcaid']]['maxucid']) {
예제 #2
0
        ${'u_' . $var} = $u_url['setting'][$var];
    }
    $vars = array('caids', 'chids', 'cuids', 'filters', 'lists', 'operates', 'imuids');
    foreach ($vars as $var) {
        if (!empty($u_url['setting'][$var])) {
            ${'u_' . $var} = explode(',', $u_url['setting'][$var]);
        }
    }
}
empty($u_filters) && ($u_filters = array('check', 'catalog'));
empty($u_lists) && ($u_lists = array('catalog', 'uclass', 'channel', 'check'));
if (empty($u_tplname) || !empty($u_onlyview)) {
    include_once M_ROOT . "./include/cuedit.cls.php";
    $catalogs =& $acatalogs;
    //关于文档的个人分类
    $uclasses = loaduclasses($curuser->info['mid']);
    $ocuids = $ucidsarr = array();
    foreach ($commus as $k => $v) {
        if ($v['cclass'] == 'offer') {
            $ocuids[] = $k;
        }
    }
    foreach ($uclasses as $k => $v) {
        if (in_array($v['cuid'], $ocuids)) {
            $ucidsarr[$k] = $v['title'];
        }
    }
    $page = empty($page) ? 1 : max(1, intval($page));
    submitcheck('bfilter') && ($page = 1);
    $caid = empty($caid) ? 0 : max(0, intval($caid));
    $checked = isset($checked) ? $checked : '-1';
예제 #3
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;