-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
48 lines (42 loc) · 1.36 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
<?php
if (is_file('./_mypage/index.html')) {
echo file_get_contents('./_mypage/index.html');
exit;
}
require('./config/config.php');
require('./code/template.class.php');
require('./code/dbaccess.class.php');
$template = new Template();
if (!DICOLLECTE_ACTIVE) {
$template->SetTrunkVar('SYSMSG', '<div id="message_error"><p>' . DICOLLECTE_CLOSEMSG . '</p></div>');
}
else {
if (isset($_COOKIE['msg'])) {
$ui = parse_ini_file('./html/_default/ui.ini', TRUE);
$template->uiSystemMessage($_COOKIE['msg']);
setcookie('msg', FALSE);
}
$db = new Database();
if (!$db->connx) {
$template->SetBranchVars('msg', array('MESSAGE' => DICOLLECTE_CLOSEMSG));
}
else {
require('./code/dbaccess-projects.class.php');
$dbaProject = new dbaccessProjects($db);
list($ok, $result) = $dbaProject->listProjects();
if (!$ok) {
$template->SetBranchVars('msg', array('MESSAGE' => DICOLLECTE_CLOSEMSG));
}
else {
foreach ($result as $data) {
if (!$data['closed']) {
$template->SetBranchVars('project', array('PRJ' => $data['prj'],
'PROJECTLABEL' => $data['label']));
}
}
}
}
}
// display
$template->Grow('./html/index.div.tpl.html');
?>