Ejemplo n.º 1
0
<?php

header("Content-Type: text/html; charset=utf-8");
header("Cache-Control: no-cache, must-revalidate");
ini_set("session.gc_maxlifetime", 120 * 60 * 60);
session_set_cookie_params(120 * 60 * 60, '/');
session_start();
include_once 'admin/defines/globals.php';
include_once 'admin/functions.php';
$TRANS = array();
$lang = isset($_GET['lang']) ? $_GET['lang'] : '';
$DB = new Db_MySQL();
$DB->connect(DB_HOST, DB_USER, DB_PASS);
$DB->selectDb(DB_NAME);
$_S = new Session();
if (defined('SESSION_PREFIX')) {
    $_S->prefix = SESSION_PREFIX;
}
$TPL = new TemplateParser();
$TPL->tplsPath = TEMPLATES_PATH;
$TPL->tplsExt = TEMPLATES_EXT;
$TPL->tplsMain = TEMPLATES_CONTAINER_FILE;
/**
 * Initializing the log object.
 * Usage: $LOG->write($contentToWrite, 'filename');
 * The "filename.LOGS_EXT" will be created/updated in LOGS_PATH
 */
$LOG = new Log();
/**
 * Global variable $TIMER used for keeping the execution time calculated by Utils::startTimer() and Utils::endTimer() functions.
 * Usage:
Ejemplo n.º 2
0
function myErrorHandler($errno, $errstr, $errfile, $errline) {
//    $ErrorDB = new Db_OnImportErrors();
    $ErrorDB = new Db_MySQL();
    $ErrorDB->connect(DB_HOST, DB_USER, DB_PASS);
    $ErrorDB->selectDb(DB_NAME);
    $errdate = date('Y-m-d H:i:s');

    $dataArray = array(
        'errno'=>$errno ,
        'errstr' => $errstr ,
        'errfile'=>$errfile,
        'errline' => $errline,
        'errdate' => $errdate
    );
    $ErrorDB->insert(TAB_ERRORS,$dataArray);

}