-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
53 lines (39 loc) · 1.03 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/*
* Author: Daniel Scott Worbis
* Index.php is the initial file, which stores general information.
* It defines the session and calls all web files.
*/
//General Information
$session_Name = "Name";
//Start session
session_name($session_Name);
session_start();
//Set session options
ini_set('memory_limit', '-1');
//Include libs
//include('lib/');
//Include controller-setup
include('controller/controller.inc.php');
function init(){
$_SESSION['controller'] = new Controller(true, new PGDatabaseConnection("localhost",3542,"postgres", "postgresuser", "password"));
$c = &$_SESSION['controller'];
//Adding Handler
$c->addHandler('example', new HandlerExample($c->getDbc(),$c->isDebug()));
}
function includeIncs(){
}
//Start
includeIncs();
init();
include "index.html.php";
if(isset($_POST['example'])){
//reacting on posts and calling controller
$_SESSION['controller']->getEntity(array(
'handler' => 'example',
'entity' => 'example',
'id' => 452
)
);
}
?>