session_start();
// Control Session Time
if (isset($_SESSION['startTime'])) {
    $timeDiff = time() - $_SESSION['startTime'];
    //destroy session
    if ($timeDiff > 3600) {
        // 60 minutes
        //echo "You've been logged in too long. ($timeDiff)";
        $_SESSION = array();
        session_destroy();
        setcookie('PHPSESSID', '', time() - 3600, '/', '', 0, 0);
    }
} else {
    $_SESSION['startTime'] = time();
}
$G_instance_Query_trace = Query_trace::getInstance();
// A2B INSTANCE
$A2B = new A2Billing();
// The system will not log for Public/index.php and signup/index.php
if (isset($_SERVER['REQUEST_URI'])) {
    $URI = $_SERVER['REQUEST_URI'];
} else {
    $URI = '';
}
// Enable UI Logger
define("ENABLE_LOG", 1);
include FSROOT . "lib/Class.Logger.php";
$log = new Logger();
// LOAD THE CONFIGURATION
if (stripos($URI, "Public/index.php") === FALSE) {
    $res_load_conf = $A2B->load_conf($agi, A2B_CONFIG_DIR . "a2billing.conf", 1);
Beispiel #2
0
 public function Table($table = null, $liste_fields = null, $fk_Tables = null, $fk_Fields = null, $id_Value = null, $fk_del_upd = true, $table_count = null)
 {
     $this->writelog = defined('WRITELOG_QUERY') ? WRITELOG_QUERY : false;
     $this->table = $table;
     $this->table_count = $table_count;
     $this->fields = $liste_fields;
     $this->mytopg = new MytoPg(0);
     // debug level 0 logs only >30ms CPU hogs
     if (count($fk_Tables) == count($fk_Fields) && count($fk_Fields) > 0) {
         $this->FK_TABLES = $fk_Tables;
         $this->FK_EDITION_CLAUSE = $fk_Fields;
         $this->FK_DELETE = $fk_del_upd;
         $this->FK_ID_VALUE = $id_Value;
     }
     $this->query_handler = Query_trace::getInstance();
 }