PHP Classes

File: Core/Init.php

Recommend this page to a friend!
  Classes of jon   PHP Login Site with Cookie MD5 Hash   Core/Init.php   Download  
File: Core/Init.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP Login Site with Cookie MD5 Hash
User login system using cookies with MD5 tokens
Author: By
Last change:
Date: 2 months ago
Size: 1,300 bytes
 

Contents

Class file image Download
<?php

//Page name: Init.php.
//Page function: Initialises classes, functions, user, db connection, autoload, and more.
//Dependencies: Core/Define.php.
//Executes AJAX from page: Nil
//Includes: $_SERVER['DOCUMENT_ROOT'].'\\'.$s6.'\\classes\\'. $class . '.php';
//Techs: Php, session, db

//Start global settings session

//Autoload Functions:
/*
include $_SESSION['Sdir'].'Functions/Jsonerrorcheck.php';
include $_SESSION['Sdir'].'Functions/ModalError.php';
include $_SESSION['Sdir'].'Functions/Permissions.php';
*/
include $_SESSION['www_root'].$_SESSION['base_dir'].'Functions/Sanitise.php';
include
'Sanitize.php';

//Define Globals ConfigGlobal, Remember and Session
if(include $_SESSION['www_root'].$_SESSION['base_dir'].'Core/Globals.php')
{
   
//echo 'included';
}
else
{
    echo
'ERROR: Init.php: Line 28: (include $_SERVER[DOCUMENT_ROOT].\\.$_SESSION[B].\\Core\Globals.php) not included';
}
/*
if(include $_SESSION['www_root'].$_SESSION['base_dir'].'Core/GlobalsGuest.php')
{
    //echo 'included';
}
else
{
    echo 'ERROR: Init.php: Line 14: (include $_SERVER[DOCUMENT_ROOT].\\.$_SESSION[B].\\Core\Globals.php) not included';
}
*/
//Autoload Classes:
spl_autoload_register
(
    function(
$Class)
    {
        require_once
$_SESSION['www_root'].$_SESSION['base_dir'].'Classes/'. $Class . '.php';
    }
);