Beispiel #1
0
// 全局的 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'];
// 描述
// 启动在线,将清理函数注册,不能写日志。
$runtime = runtime_init();
$sid = online_init();
$fid = 0;
// 检测浏览器
$browser = get__browser();
check_browser($browser);
// 检测站点运行级别
check_runlevel();
check_banip($ip);
// 记录 POST 数据
DEBUG and log_post_data();
// 全站的设置数据
$setting = cache_get('setting');
//DEBUG AND online_end();
//DEBUG AND ($method == 'POST' || $ajax) AND sleep(1);
list($tid, $thread) = parse_seo_url();
$route = param(0, 'index');
Beispiel #2
0
    $pwd = md5(md5($adminpass) . $salt);
    $admin = array('username' => $adminuser, 'email' => $adminemail, 'password' => $pwd, 'salt' => $salt, 'create_ip' => $longip, 'create_date' => $time);
    user_update(1, $admin);
    /*friendlink_create(array(
    		'name'         => 'Xiuno BBS',
    		'url'         => 'http://bbs.xiuno.com/',
    		'rank'         => 0,
    		'create_date'  => $time,
    	));*/
    $setting = array('sitebrief' => '', 'seo_title' => '', 'seo_keywords' => '', 'seo_description' => '', 'footer_code' => '');
    kv_set('setting', $setting);
    // 写测试数据
    if ($test_data == 1) {
        runtime_truncate();
        runtime_init();
        online_init();
        for ($i = 0; $i < 5; $i++) {
            $subject = '欢迎使用 Xiuno BBS 3.0 新一代论坛系统。' . $i;
            $message = '祝您使用愉快!';
            $thread = array('fid' => 1, 'uid' => 1, 'subject' => $subject, 'message' => $message, 'seo_url' => '', 'time' => $time, 'longip' => $longip);
            $tid = thread_create($thread, $pid);
            for ($j = 0; $j < 2; $j++) {
                $post = array('tid' => $tid, 'uid' => 1, 'create_date' => $time, 'userip' => $longip, 'isfirst' => 0, 'message' => $message . rand(1, 10000));
                $pid = post_create($post, 1);
            }
        }
    }
    message(0, '安装成功。');
}
// 写数据库
function write_database($filename, $echo = FALSE)