Changeset 64 for trunk/Global.php
- Timestamp:
- Jan 1, 2016, 2:05:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Global.php
r63 r64 1 1 <?php 2 2 3 session_start();4 $FileName = dirname(__FILE__).'/config.php';5 if(file_exists($FileName)) include_once($FileName);6 else {7 die('Configuration file "'.$FileName.'" not found.');8 }9 3 include_once('Version.php'); 10 4 include_once('Types.php'); … … 12 6 include_once('Packages/Common/Common.php'); 13 7 include_once('Measure.php'); 14 15 $PrefixMultiplier = new PrefixMultiplier(); 16 $ErrorHandler = new ErrorHandler(); 17 $ErrorHandler->ShowError = $Config['Web']['ShowError']; 18 $ErrorHandler->Start(); 19 $Database = new Database(); 20 $Database->Connect($Config['Database']['Host'], $Config['Database']['User'], 21 $Config['Database']['Password'], $Config['Database']['Database']); 22 $Database->Prefix = $Config['Database']['Prefix']; 23 $Database->charset($Config['Database']['Charset']); 24 $Database->ShowSQLError = $Config['Web']['ShowSQLError']; 25 $Database->ShowSQLQuery = $Config['Web']['ShowSQLQuery']; 26 27 // SQL injection hack protection 28 foreach($_POST as $Index => $Item) $_POST[$Index] = addslashes($Item); 29 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item); 8 include_once('Application.php'); 30 9 31 10 function HumanDate($Time)
Note:
See TracChangeset
for help on using the changeset viewer.