function __construct($pagename) { set_error_handler("debug_handler"); if (ini_get("magic_quotes_gpc") !== false and get_magic_quotes_gpc()) { modify::stripslashes($_REQUEST); } if (ini_get("register_globals")) { modify::dropglobals(); } @ignore_user_abort(0); self::$time_start = sys_get_microtime(); if (!sql_connect(SETUP_DB_HOST, SETUP_DB_USER, sys_decrypt(SETUP_DB_PW, sha1(SETUP_ADMIN_USER)), SETUP_DB_NAME)) { $err = sprintf("{t}Cannot connect to database %s on %s.{/t}\n", SETUP_DB_NAME, SETUP_DB_HOST) . sql_error(); trigger_error($err, E_USER_ERROR); sys_die($err); } session_set_cookie_params(2592000); // 1 month session_name(SESSION_NAME); session_set_save_handler("_login_session_none", "_login_session_none", "_login_session_read", "_login_session_none", "_login_session_destroy", "_login_session_none"); session_start(); header("Cache-Control: private, max-age=1, must-revalidate"); header("Pragma: private"); $this->template = new template(); $this->pagename = $pagename; class_exists("modify"); // load class }
/** * @package Simple Groupware * @link http://www.simple-groupware.de * @copyright Simple Groupware Solutions Thomas Bley 2002-2012 * @license GPLv2 */ define("MAIN_SCRIPT", basename(__FILE__)); error_reporting(E_ALL); @(include "simple_store/config.php"); if (!defined("SETUP_DB_HOST")) { exit; } require "core/functions.php"; set_error_handler("debug_handler"); if (ini_get("register_globals")) { modify::dropglobals(); } @ignore_user_abort(1); header("Content-Type: text/plain; charset=utf-8"); if (!defined("SETUP_DB_HOST") or !sql_connect(SETUP_DB_HOST, SETUP_DB_USER, sys_decrypt(SETUP_DB_PW, sha1(SETUP_ADMIN_USER)), SETUP_DB_NAME)) { exit(sql_error()); } @set_time_limit(180); $lock_file = SIMPLE_STORE . "/cron/lock_cron"; $_SESSION["username"] = "******"; $_SESSION["password"] = ""; $_SESSION["groups"] = array(); $_SESSION["permission_sql"] = "1=1"; $cron_conf = trigger::sendmail_getconn("cron", ""); if (empty($cron_conf["smtp"])) { $message = t("{t}Mail identities{/t}") . ": " . t("{t}SMTP not configured for %s{/t}", "cron");