Exemplo n.º 1
0
function forum_access_padding($gid, $fill = FALSE)
{
    $forumlist = forum_list_cache();
    foreach ($forumlist as $fid => $forum) {
        if (!$forum['accesson']) {
            continue;
        }
        $fill ? forum_access_create(array('fid' => $fid, 'gid' => $gid)) : forum_access_delete($fid, $gid);
    }
}
Exemplo n.º 2
0
chdir('../');
define('DEBUG', 0);
// 发布的时候改为 0
define('APP_NAME', 'mobile');
// 应用的名称
define('IN_SAE', class_exists('SaeKV'));
// 一般应用不需要支持 SAE,可以删掉
$conf = @(include './conf/conf.php') or exit(header('Location: ../install/'));
IN_SAE and (include './conf/sae.conf.php');
// 支持 SAE
include './xiunophp/xiunophp.php';
include './model.inc.php';
// 测试数据库连接
db_connect($err) or message(-1, $err);
$grouplist = group_list_cache();
$forumlist = forum_list_cache();
$user = user_token_get('', 'bbs');
// 全局的 user,全局变量除了 $conf, 其他全部加下划线
$uid = $user['uid'];
// 全局的 uid
$gid = $user['gid'];
// 全局的 gid
$group = $grouplist[$gid];
// 全局的 user,全局变量除了 $conf, 其他全部加下划线
$forumlist_show = forum_list_access_filter($forumlist, $gid);
// 有权限查看的板块
$header['title'] = $conf['sitename'];
// 网站标题
$header['keywords'] = $conf['sitename'];
// 关键词
$header['description'] = $conf['sitename'];