Пример #1
0
function install_check()
{
    if (!file_exists(BH_INCLUDE_PATH . "config.inc.php")) {
        header_redirect('./install/index.php');
    }
    install_check_php_version();
    install_check_php_extensions();
    install_check_mysql_version();
    if (@file_exists('./install/index.php') && !defined("BEEHIVE_DEVELOPER_MODE")) {
        install_draw_top();
        echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"400\">\n";
        echo "    <tr>\n";
        echo "      <td align=\"left\">\n";
        echo "        <table class=\"box\">\n";
        echo "          <tr>\n";
        echo "            <td align=\"left\" class=\"posthead\">\n";
        echo "              <table class=\"posthead\" width=\"500\">\n";
        echo "                <tr>\n";
        echo "                  <td align=\"left\" colspan=\"2\" class=\"subhead\">Installation Incomplete</td>\n";
        echo "                </tr>\n";
        echo "                <tr>\n";
        echo "                  <td align=\"center\">\n";
        echo "                    <table class=\"posthead\" width=\"95%\">\n";
        echo "                      <tr>\n";
        echo "                        <td align=\"left\">Your Beehive Forum would appear to be already installed, but you have not removed the installation files. You must delete the 'install' directory before your Beehive Forum can be used.</td>\n";
        echo "                      </tr>\n";
        echo "                    </table>\n";
        echo "                  </td>\n";
        echo "                </tr>\n";
        echo "                <tr>\n";
        echo "                  <td align=\"left\">&nbsp;</td>\n";
        echo "                </tr>\n";
        echo "              </table>\n";
        echo "            </td>\n";
        echo "          </tr>\n";
        echo "        </table>\n";
        echo "      </td>\n";
        echo "    </tr>\n";
        echo "  </table>\n";
        echo "  <form accept-charset=\"utf-8\" method=\"get\" action=\"index.php\">\n";
        echo "    <table cellpadding=\"0\" cellspacing=\"0\" width=\"500\">\n";
        echo "      <tr>\n";
        echo "        <td align=\"left\" width=\"500\">&nbsp;</td>\n";
        echo "      </tr>\n";
        echo "      <tr>\n";
        echo "        <td align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Retry\" class=\"button\" /></td>\n";
        echo "      </tr>\n";
        echo "    </table>\n";
        echo "  </form>\n";
        install_draw_bottom();
        exit;
    }
}
Пример #2
0
function check_install()
{
    // Check the config file exists.
    if (!file_exists(BH_INCLUDE_PATH . "config.inc.php")) {
        header_redirect('./install/index.php');
    }
    // Check the PHP version
    install_check_php_version();
    // Check the PHP extensions
    install_check_php_extensions();
    // Check the MySQL version
    install_check_mysql_version();
    // Check if the installer files still exist. Ignore them
    // if the BEEHIVE_DEVELOPER_MODE constant has been defined.
    if (@file_exists('./install/index.php') && !defined("BEEHIVE_DEVELOPER_MODE")) {
        echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
        echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
        echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\" dir=\"ltr\">\n";
        echo "<head>\n";
        echo "<title>Beehive Forum ", BEEHIVE_VERSION, " - Installation</title>\n";
        echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
        echo html_include_css(html_get_forum_file_path('styles/default/style.css')), "\n";
        echo "</head>\n";
        echo "<body>\n";
        echo "<h1>Beehive Forum Installation Error</h1>\n";
        echo "<br />\n";
        echo "<div align=\"center\">\n";
        echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"400\">\n";
        echo "    <tr>\n";
        echo "      <td align=\"left\">\n";
        echo "        <table class=\"box\">\n";
        echo "          <tr>\n";
        echo "            <td align=\"left\" class=\"posthead\">\n";
        echo "              <table class=\"posthead\" width=\"500\">\n";
        echo "                <tr>\n";
        echo "                  <td align=\"left\" colspan=\"2\" class=\"subhead\">Installation Incomplete</td>\n";
        echo "                </tr>\n";
        echo "                <tr>\n";
        echo "                  <td align=\"center\">\n";
        echo "                    <table class=\"posthead\" width=\"95%\">\n";
        echo "                      <tr>\n";
        echo "                        <td align=\"left\">Your Beehive Forum would appear to be already installed, but you have not removed the installation files. You must delete the 'install' directory before your Beehive Forum can be used.</td>\n";
        echo "                      </tr>\n";
        echo "                    </table>\n";
        echo "                  </td>\n";
        echo "                </tr>\n";
        echo "                <tr>\n";
        echo "                  <td align=\"left\">&nbsp;</td>\n";
        echo "                </tr>\n";
        echo "              </table>\n";
        echo "            </td>\n";
        echo "          </tr>\n";
        echo "        </table>\n";
        echo "      </td>\n";
        echo "    </tr>\n";
        echo "  </table>\n";
        echo "  <form accept-charset=\"utf-8\" method=\"get\" action=\"index.php\">\n";
        echo "    <table cellpadding=\"0\" cellspacing=\"0\" width=\"500\">\n";
        echo "      <tr>\n";
        echo "        <td align=\"left\" width=\"500\">&nbsp;</td>\n";
        echo "      </tr>\n";
        echo "      <tr>\n";
        echo "        <td align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Retry\" class=\"button\" /></td>\n";
        echo "      </tr>\n";
        echo "    </table>\n";
        echo "  </form>\n";
        echo "</div>\n";
        echo "</body>\n";
        echo "</html>\n";
        exit;
    }
}
Пример #3
0
// Server checking functions
require_once BH_INCLUDE_PATH . 'server.inc.php';
// Caching functions
require_once BH_INCLUDE_PATH . 'cache.inc.php';
// Installation checking functions
require_once BH_INCLUDE_PATH . 'install.inc.php';
$install_method = null;
$admin_password = null;
$admin_cpassword = null;
$error_html = null;
unregister_globals();
disable_magic_quotes();
set_server_protocol();
cache_disable_aol();
cache_disable_proxy();
install_check_php_version();
install_check_php_extensions();
if (isset($_POST['install_method'])) {
    install_msie_buffer_fix();
    $config = array();
    $config_saved = false;
    $error_array = array();
    $valid = true;
    if (isset($_POST['install_method']) && is_numeric($_POST['install_method'])) {
        $install_method = $_POST['install_method'];
    } else {
        $error_array[] = "You must choose an installation method.\n";
        $valid = false;
    }
    if (isset($_POST['forum_webtag']) && strlen(trim($_POST['forum_webtag'])) > 0) {
        $forum_webtag = mb_strtoupper(trim($_POST['forum_webtag']));