php error_reporting E_ALL session_start ini_set session use_cookies re

 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
54
55
56
57
58
59
60
61
<?php
error_reporting(E_ALL);
session_start();
ini_set("session.use_cookies", 0);
require_once('config.inc.php');
require_once('functions.inc.php');
require_once('db_connect.inc.php');
require_once('smarty/Smarty.class.php');
include('adodb/adodb.inc.php');
$smarty = new Smarty();
$smarty->left_delimiter = '{{';
$smarty->right_delimiter = '}}';
$smarty->template_dir = 'template/unnamed/';
$smarty->compile_dir = 'template/template_c/';
$smarty->config_dir = 'template/unnamed/config/';
$smarty->cache_dir = 'template/cache/';
//$smarty->debugging = true;
$db = ADONewConnection('mysql');
$db->debug = false;
$db->Connect('localhost', 'root', 'asdf12345', 'itv0030');
$message = Array();
$error = Array();
$smarty->assign("title", "Estonian tourism Info");
$objects = Array
(
'theaters' => Array('Estonian Theater', 'Vene Theater', 'Finland Theater'),
'restaurants' => Array('cafes', 'pubs', 'wine', 'pizzza'),
'museums' => Array('Eesti muuseumid', 'Välismaa muuseumid', 'Vene muuseumid', 'Inglise Muuseumid'),
'attractions' => Array('Old Town', 'Center city', 'Architecture', 'Some else'),
'concerts' => Array('Rock contserts', 'Pop Contserts', 'Classic music', 'Piano')
);
$object = (isset($_GET['object'])) ? $_GET['object'] : false;
$smarty->assign('object', $object);
$smarty->assign('objects', $objects);
$admin = (isset($_SESSION['user']) && $_SESSION['user']['id'] == 1) ? true : false;
$smarty->assign('admin', $admin);
if(isset($_GET['module']))
{
$moduleName = strtolower($_GET['module']);
require_once("modules/".$moduleName.".php");
}
else require_once("modules/index.php");
?>