Subversion Repositories Sigmater

Rev

Blame | Last modification | View Log | Download | RSS feed

<?php

if (isset($_SERVER['SCRIPT_FILENAME']) && strpos($_SERVER['SCRIPT_FILENAME'], '/impiantodb/') !== false) {
        
        $arr_ini = parse_ini_file('../configs/LSTU_config.php');
        define ('OCI_DB_OLD_VERSION', true);
}       
else {
        
        $arr_ini = parse_ini_file('./configs/LSTU_config.php');
}

if (!is_array($arr_ini) || !count($arr_ini))
        die('Controllare il file di configurazione LSTU_config.php');
        
foreach ($arr_ini as $name_def => $val_def)
        eval("define('$name_def', '$val_def');");

define('APP_PATH', PARENT_DIR.'/sigmater/');

//////////////////////////////////////////////////////////////////////////
// COSTANTI CA
//////////////////////////////////////////////////////////////////////////
define('CA_C', 'it');
define('CA_O', 'Agenzia del Territorio');
define('CA_OU', 'Servizi Telematici');
define('CA_CN', 'CA Territorio');

//////////////////////////////////////////////////////////////////////////
// COSTANTI SOGGETTO CERTIFICATO
//////////////////////////////////////////////////////////////////////////
define('SC_C', 'it');
define('SC_O', 'Agenzia del Territorio');
define('SC_OU', 'Servizi Telematici');
define('SC_CN', 'Servizio Firma Ricevute');

define('MAXRICHROW', 100);

// ************************************************
// INCLUDE FUNZIONI ORACLE
// ************************************************
require_once(APP_PATH.'impiantodb/include/LSTM_OCI_DB_functions.inc');

// ************************************************
// INCLUDE FUNZIONI CONDIVISE
// ************************************************
require_once(APP_PATH.'include/LSTU_generic.inc');

// ************************************************
// INCLUDE FUNZIONI DATE
// ************************************************
require_once(APP_PATH.'include/LSTU_date.inc');

// Turn off all error reporting
//error_reporting(0);

// For production
// error_reporting  (E_ERROR | E_PARSE);

// Report simple running errors
//######################## SIMONEEEEE 
error_reporting  (E_ERROR | E_WARNING | E_PARSE);

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
//error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// Report all errors except E_NOTICE
// This is the default value set in php.ini
//error_reporting (E_ALL ^ E_NOTICE);

// Report all PHP errors (bitwise 63 may be used in PHP 3)
//error_reporting (E_ALL);

// ***********************************************************************
// IMPOSTAZIONE CONNESSIONE DB INTERSCAMBIO ($conn)
// ***********************************************************************
if (!isset($conn) || !$conn)
        $conn = db_connect(DB_USER, DB_PWD, DB_ALIAS);
        
if (!$conn) {
        
        wlog(0, 0, 'Connessione fallita al database di Interscambio.', 0, 0, APP_PATH.'logs/db_connect.log');
        die('Connessione fallita al database di Interscambio.');
}

?>