require ROOTDIR . "/conf/config.inc.php"; require ROOTDIR . "/conf/config.constants.inc.php"; header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); common_set_error_reporting(); /* database connection. we put it here, so that it is the very first thing done, and we always an available connection ready to use */ if (!($link = @mysql_pconnect($cfgserver, $cfguser, $cfgpassword))) { header('Location: ' . ROOTDIR . '/install/install.php'); die('Error connecting to the db'); } $_SESSION['common_db'] = $db_common; check_db_status(); start_language(); $tpl = new template(); /* we almost always use this command var, so we get it here to make it available to other functions whithout other hassle */ if (isset($_REQUEST['command'])) { $command = $_REQUEST['command']; } else { $command = 'none'; } if (isset($_REQUEST['data'])) { $start_data = $_REQUEST['data']; } if ($_SESSION['section'] != "waiter") {
require_once ROOTDIR . "/includes.php"; require ROOTDIR . "/conf/config.inc.php"; require ROOTDIR . "/conf/config.constants.inc.php"; common_set_error_reporting(); if (isset($_SESSION['section']) && $_SESSION['section'] != "admin") { unset_session_vars(); $_SESSION['section'] = "admin"; } header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); if (!($link = @mysql_pconnect($cfgserver, $cfguser, $cfgpassword))) { die('Error connecting to the db'); } $_SESSION['common_db'] = $db_common; date_default_timezone_set(get_conf(__FILE__, __LINE__, "default_timezone")); check_db_status(true); start_language(); if (floor(phpversion()) < 5) { die('Smart Restaurant requires PHP version 5 or higher. After you have satisfied this, you can try re-installing.'); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <script type="text/javascript" language="JavaScript" src="./generic.js"></script> <link rel="stylesheet" href="./css/styles.css" type="text/css"> <title>SmartRes - (c) 2006 - 2008-2010 Smart Restaurant</title> <meta name="HandheldFriendly" content="True"> </head> <body class="login"> <div class="Container">