Changeset 64 for trunk/Global.php


Ignore:
Timestamp:
Jan 1, 2016, 2:05:17 PM (9 years ago)
Author:
chronos
Message:
  • Modified: Basic application related code moved from Global.php to separate file Application.php.
  • Modified: Main index page converted to PHP class.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Global.php

    r63 r64  
    11<?php
    22
    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 }
    93include_once('Version.php');
    104include_once('Types.php');
     
    126include_once('Packages/Common/Common.php');
    137include_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);
     8include_once('Application.php');
    309
    3110function HumanDate($Time)
Note: See TracChangeset for help on using the changeset viewer.