-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
39 lines (29 loc) · 792 Bytes
/
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
<?php
session_start();
require_once('config/config.inc.php');
/*
require_once('DB.php');
$dsn = array(
'phptype' => 'sqlite',
'database' => "db/landoc",
'mode' => '0644'
);
$db = DB::Connect($dsn);
if (PEAR::isError($db)) {
die($db->getMessage());
}
$id = $db->nextId('groups');
if (PEAR::isError($id)) {
die($db->getMessage());
}
$q = $db->query('INSERT INTO groups (g_id, added, g_name, g_desc) VALUES ('.$id.', DATETIME("NOW", "LOCALTIME"), "Test2", "Dummy Group2")');
$res = $db->getAll('SELECT * FROM groups', DB_FETCHMODE_OBJECT);
print_r($res);
*/
$tpl = new Smarty_Site($tpl_defaults);
$tpl->assign('txt', 'MAIN_BLOCK');
$tpl->assign('long_title', 'Home Page');
$tpl->display('wrapper/header.tpl');
$tpl->display('index.tpl');
$tpl->display('wrapper/footer.tpl');
?>