function check_status() { global $page, $webimroot, $settings, $dbversion; $page['done'][] = getlocal2("install.0.php", array(phpversion())); if (!check_webimroot()) { return; } if (!check_files()) { return; } $link = check_connection(); if (!$link) { return; } if (!check_database($link)) { mysql_close($link); return; } if (!check_tables($link)) { mysql_close($link); return; } if (!check_columns($link)) { mysql_close($link); return; } check_sound(); $page['done'][] = getlocal("installed.message"); if (!check_admin($link)) { $page['nextstep'] = getlocal("installed.login_link"); $page['nextnotice'] = getlocal2("installed.notice", array("{$webimroot}/install/")); $page['nextstepurl'] = "{$webimroot}/operator/login.php?login=admin"; } $page['show_small_login'] = true; mysql_close($link); loadsettings(); $settings['dbversion'] = $dbversion; update_settings(); }
Package: zeroconf Version: 0.9-r0 Depends: libc6 (>= 2.4) Provides: libfontconfig-utils Replaces: libfontconfig-utils Conflicts: libfontconfig-utils Section: net Architecture: armv5te Maintainer: Angstrom Developers <*****@*****.**> MD5Sum: b8bd197224e24759d2162091a0fa727f Size: 12346 Filename: zeroconf_0.9-r0_armv5te.ipk Source: http://www.progsoc.org/~wildfire/zeroconf/download/zeroconf-0.9.tar.gz file://zeroconf-default file://debian-zeroconf Description: IPv4 link-local address allocator */ if (!check_database()) { die("Database not found and cannot be created."); } $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds"); if ($argc > 1 and $argv[1] == 'upgrades') { $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds WHERE f_type = 'upgrades'"); } $start = time(); $p_count = 0; foreach ($feeds as $feed) { print "Updating {$feed['f_name']}: "; db_query_n("DELETE FROM packages WHERE p_feed = '{$feed['f_id']}'"); $count = 0; $packagesgz_h = fopen("compress.zlib://{$feed['f_uri']}/Packages.gz", "r"); if ($packagesgz_h) { $package_info = array('name' => '', 'version' => '', 'arch' => '', 'depends' => '', 'maintainer' => '', 'homepage' => '', 'section' => '', 'replaces' => '', 'provides' => '', 'recommends' => '', 'conflicts' => '', 'size' => '', 'md5sum' => '', 'source' => '', 'feed' => $feed['f_id'], 'file' => '', 'desc' => '');
Redirects user to 3 cases: - CASE A: Server does not have permissions to write in this, so database cannot be installed or configured. Script redirects to error and tutorial to make it work again. - CASE B: Database 'G23' does not exist. Script redirects to an installation page in which the user can input the options for its server. Then, creates DB and writes config to disk. Also, if all goes well, give an option to user for inserting example data to the application - CASE C: All goes well. User gets redirected to list.php and the competition begins! */ //Checks $permissions = false; $database = false; $permissions = check_permissions(); $database = check_database(); if (!$permissions) { //Redirects user to error and suggestions on how to fix it header("Location: ./resources/config/permissions.php"); die; } if (!$database) { //Redirects user to application install header("Location: ./resources/config/install.php"); die; } //All goes well, open session and redirect user to the application if (!isset($_SESSION)) { session_start(); } header("Location: ./view/list.php");
require_once 'main/libs/utilfunc.php'; // Load every plugins foreach ($GLOBALS['PLUGIN'] as $plugin) { $fileName = 'main/plugin/' . $plugin . '/lib_' . $plugin . '.php'; if (is_file($fileName)) { require_once $fileName; } } __('LANG'); setcookie("CHECK_SD", "False", time() + 1800, "/", false, false); // Library required: require_once 'main/libs/db_set_common.php'; require_once 'main/libs/debug.php'; require_once 'main/libs/utilfunc_sd_card.php'; // Check database consistency check_database(); ?> <!DOCTYPE HTML> <html> <head> <title>Bulcky</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <link rel="icon" href="favicon.ico" /> <!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]--> <script src="js/jquery.min.js?v=<?php echo @filemtime('js/jquery.min.js'); ?> "></script>