-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload.php
41 lines (33 loc) · 1.36 KB
/
load.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
session_start();
require "includes/constants.php";
require "includes/dbConnection.php";
require "lang/en.php";
// Class Auto Load
function classAutoLoad($classname){
$directories = ["contents", "layouts", "menus", "forms", "processes", "global"];
foreach($directories AS $dir){
$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . $classname . ".php";
if(file_exists($filename) AND is_readable($filename)){
require_once $filename;
}
}
}
spl_autoload_register('classAutoLoad');
$ObjGlob = new fncs();
$ObjSendMail = new SendMail();
// Create instances of all classes
$ObjLayouts = new layouts();
$ObjMenus = new menus();
$ObjHeadings = new headings();
$ObjCont = new contents();
$ObjForm = new user_forms();
$conn = new dbConnection(DBTYPE, HOSTNAME, DBPORT, HOSTUSER, HOSTPASS, DBNAME);
// Create process instances
$ObjAuth = new auth();
$ObjAuth->signup($conn, $ObjGlob, $ObjSendMail, $lang, $conf);
$ObjAuth->verify_code($conn, $ObjGlob, $ObjSendMail, $lang, $conf);
$ObjAuth->set_passphrase($conn, $ObjGlob, $ObjSendMail, $lang, $conf);
$ObjAuth->signin($conn, $ObjGlob, $ObjSendMail, $lang, $conf);
$ObjAuth->signout($conn, $ObjGlob, $ObjSendMail, $lang, $conf);
$ObjAuth->save_details($conn, $ObjGlob, $ObjSendMail, $lang, $conf);