Exemple #1
0
// Installation checking functions
require_once BH_INCLUDE_PATH . 'install.inc.php';
// Wordfilter
require_once BH_INCLUDE_PATH . 'word_filter.inc.php';
// Disable PHP's register_globals
unregister_globals();
// Disable PHP's magic quotes
disable_magic_quotes();
// Correctly set server protocol
set_server_protocol();
// Disable caching if on AOL
cache_disable_aol();
// Disable caching if proxy server detected.
cache_disable_proxy();
// Check that Beehive is installed correctly
install_check();
// Required includes
require_once BH_INCLUDE_PATH . 'banned.inc.php';
require_once BH_INCLUDE_PATH . 'constants.inc.php';
require_once BH_INCLUDE_PATH . 'format.inc.php';
require_once BH_INCLUDE_PATH . 'header.inc.php';
require_once BH_INCLUDE_PATH . 'html.inc.php';
require_once BH_INCLUDE_PATH . 'lang.inc.php';
require_once BH_INCLUDE_PATH . 'session.inc.php';
// End Required includes
// Initialise the session
session::init();
// Populate the session store.
session::start($_SESSION['UID']);
// Perform ban check
ban_check($_SESSION);
Exemple #2
0
    echo '</div>';
    die;
}
$all_tables_exist = $pony_db->all_tables_exist();
$some_tables_exist = $pony_db->some_tables_exist();
if (!$pony_db->state) {
    echo '<h4><font color="#b72525">Error! Server configuration problem!</font></h4>';
    echo '<div style="border:#ee0000 solid 1px;	background-color:#f6adad; color:#000000; width:500px; margin-bottom:20px">';
    echo 'Unknown MySQL error occured: ' . mysql_error() . '.';
    echo '</div>';
    die;
}
if (!install_check(false, true)) {
    echo '<h4><font color="#b72525">Attention! Server configuration problem!</font></h4>';
    echo '<div style="border:#ee0000 solid 1px;	background-color:#f6adad; color:#000000; width:500px; margin-bottom:20px">';
    install_check(true, true);
    echo '</div>';
}
$set_admin_pass = trim(assign($_REQUEST['set_admin_pass'])) == '1';
if (!$all_tables_exist && $set_admin_pass) {
    $admin_login = trim(assign($_REQUEST['login']));
    $admin_pass = trim(assign($_REQUEST['password']));
    $admin_pass_verify = trim(assign($_REQUEST['confirm_password']));
    if (!$admin_login) {
        die("Empty login names are now allowed!<br /><a href=\"" . $_SERVER['SCRIPT_NAME'] . "\">Go back and try again</a>.");
    }
    if (!$admin_pass) {
        die("Empty passwords are now allowed!<br /><a href=\"" . $_SERVER['SCRIPT_NAME'] . "\">Go back and try again</a>.");
    }
    if ($admin_pass != $admin_pass_verify) {
        die("Admin and confirm passwords mismatch!<br /><a href=\"" . $_SERVER['SCRIPT_NAME'] . "\">Go back and try again</a>.");