Exemple #1
0
function cn_allowstatic($urlstr)
{
    //类目页是否允许静态
    global $permissions, $sid;
    if (!($pmids = cn_pmids($urlstr, $sid))) {
        return true;
    }
    $vpmids = array();
    foreach ($permissions as $k => $v) {
        if (in_array($k, $pmids) && $v['cread']) {
            $vpmids[] = $k;
        }
    }
    return $vpmids ? false : true;
}
Exemple #2
0
include M_ROOT . 'wap/wap.fun.php';
parse_str($_SERVER['QUERY_STRING'], $temparr);
//处理子站id
$nsid = max(0, intval($sid));
$addno = max(0, intval(@$addno));
$page = max(1, intval(@$page));
if ($nsid && empty($subsites[$nsid])) {
    $nsid = 0;
}
switch_cache($nsid);
$sid = $nsid;
if_siteclosed($sid);
@extract($btags);
$cnstr = cnstr($temparr);
if ($cnstr && ($cnode = cnodearr($cnstr, $sid))) {
    if (!$curuser->pmbypmids('cread', cn_pmids($cnstr, $sid))) {
        message('wap_nocatabrowseperm');
    }
} else {
    $cnstr = '';
    $addno = 0;
}
$_da = array();
if (!$cnstr) {
    $tplname = !$sid ? $w_index_tpl : $btags['w_index_tpl'];
    $_da['rss'] = $cms_abs . 'rss.php' . ($sid ? "?sid={$sid}" : '');
} else {
    $_da = cn_parse($cnstr, $sid, -1);
    re_cnode($_da, $cnstr, $cnode);
    $tplname = cn_tplname($cnstr, $cnode, $addno);
}