Subversion Repositories Sigmater

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 Andrea 1
<?php
2
 
3
if (isset($_SERVER['SCRIPT_FILENAME']) && strpos($_SERVER['SCRIPT_FILENAME'], '/impiantodb/') !== false) {
4
 
5
	$arr_ini = parse_ini_file('../configs/LSTU_config.php');
6
	define ('OCI_DB_OLD_VERSION', true);
7
}	
8
else {
9
 
10
	$arr_ini = parse_ini_file('./configs/LSTU_config.php');
11
}
12
 
13
if (!is_array($arr_ini) || !count($arr_ini))
14
	die('Controllare il file di configurazione LSTU_config.php');
15
 
16
foreach ($arr_ini as $name_def => $val_def)
17
	eval("define('$name_def', '$val_def');");
18
 
19
define('APP_PATH', PARENT_DIR.'/sigmater/');
20
 
21
//////////////////////////////////////////////////////////////////////////
22
// COSTANTI CA
23
//////////////////////////////////////////////////////////////////////////
24
define('CA_C', 'it');
25
define('CA_O', 'Agenzia del Territorio');
26
define('CA_OU', 'Servizi Telematici');
27
define('CA_CN', 'CA Territorio');
28
 
29
//////////////////////////////////////////////////////////////////////////
30
// COSTANTI SOGGETTO CERTIFICATO
31
//////////////////////////////////////////////////////////////////////////
32
define('SC_C', 'it');
33
define('SC_O', 'Agenzia del Territorio');
34
define('SC_OU', 'Servizi Telematici');
35
define('SC_CN', 'Servizio Firma Ricevute');
36
 
37
define('MAXRICHROW', 100);
38
 
39
// ************************************************
40
// INCLUDE FUNZIONI ORACLE
41
// ************************************************
42
require_once(APP_PATH.'impiantodb/include/LSTM_OCI_DB_functions.inc');
43
 
44
// ************************************************
45
// INCLUDE FUNZIONI CONDIVISE
46
// ************************************************
47
require_once(APP_PATH.'include/LSTU_generic.inc');
48
 
49
// ************************************************
50
// INCLUDE FUNZIONI DATE
51
// ************************************************
52
require_once(APP_PATH.'include/LSTU_date.inc');
53
 
54
// Turn off all error reporting
55
//error_reporting(0);
56
 
57
// For production
58
// error_reporting  (E_ERROR | E_PARSE);
59
 
60
// Report simple running errors
61
//######################## SIMONEEEEE 
62
error_reporting  (E_ERROR | E_WARNING | E_PARSE);
63
 
64
// Reporting E_NOTICE can be good too (to report uninitialized
65
// variables or catch variable name misspellings ...)
66
//error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
67
 
68
// Report all errors except E_NOTICE
69
// This is the default value set in php.ini
70
//error_reporting (E_ALL ^ E_NOTICE);
71
 
72
// Report all PHP errors (bitwise 63 may be used in PHP 3)
73
//error_reporting (E_ALL);
74
 
75
// ***********************************************************************
76
// IMPOSTAZIONE CONNESSIONE DB INTERSCAMBIO ($conn)
77
// ***********************************************************************
78
if (!isset($conn) || !$conn)
79
	$conn = db_connect(DB_USER, DB_PWD, DB_ALIAS);
80
 
81
if (!$conn) {
82
 
83
	wlog(0, 0, 'Connessione fallita al database di Interscambio.', 0, 0, APP_PATH.'logs/db_connect.log');
84
	die('Connessione fallita al database di Interscambio.');
85
}
86
 
87
?>