/**
* website.php
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* @author Stephan Raabe
*/
// MB
if ((int)substr(phpversion(),0,1) >= 7) {
require("system/mysql.inc.php");
}
define("_ISLOADED",1);
if (file_exists("_config/config.php"))
{
require("_config/config.php");
$verify = integrity($db_server, $db_user, $db_password, $db_name);
}
else
{
die("openEngine ERROR: Choose Installation or check your current system");
}
require("system/00_settings/start.php");
if ($site_encoding != "noencoding")
{
header('content-type: text/html; charset='.$site_encoding);
}
require("system/01_user/start.php");
require("system/02_page/start.php");
if (isAdmin())
{
require("system/03_admin/start.php");
}
require("system/00_settings/end.php");
// --------------------------------------
// Functions
// --------------------------------------
// --------------------------------------
// Check Database for Integrity
// --------------------------------------
function integrity($db_server, $db_user, $db_password, $db_name){
// Connect to MySql Database
// -------------------------
$db = mysql_connect($db_server, $db_user, $db_password); // Connect to Database
if (!$db)
die("Error during mysql_connect attempt");
// Select Database
// ---------------
mysql_select_db($db_name, $db);
if (mysql_errno())
{
die("
" . mysql_errno().": ".mysql_error()."
");
}
// MenĂ¼ Position definieren
// ------------------------
$_menux = 150 ;
$_menuy = 150 ;
// Write Menu_Pos into Database
// ----------------------------
save_menu_pos($_menux, $_menuy);
// Close Database
// --------------
mysql_close();
return "true" ;
}
// -------------------------------------------------------------------------------
// --------------------------------------
// Write Menu_Pos into Database
// --------------------------------------
function save_menu_pos($_menux, $_menuy) {
// Update Record
$query = "UPDATE oe_account SET account_menux = '$_menux', account_menuy = '$_menuy'";
$result = mysql_query($query);
if (mysql_errno())
{
die("
" . mysql_errno().": ".mysql_error()."
");
}
}
?>