forked from atmoner/Smarty-hook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·78 lines (59 loc) · 1.85 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/*
__ ________
_____ _/ |_ _____ ____ ____ \_____ \______
\__ \ __\/ \ / _ \ / \ _(__ <_ __ \
/ __ \| | | Y Y ( <_> ) | \/ \ | \/
(____ /__| |__|_| /\____/|___| /______ /__|
\/ \/ \/ \/
Website: http://atmoner.com/
Contact: [email protected]
Twitter: @atmon3r
Fix1 && Fix1 && Fix2
*/
$path = dirname(__FILE__);
require($path.'/libs/startup.php');
$smarty->assign("Name","First app",true);
// Hook assign
$hook->addMenu('home', 'Home', '/', 4);
$hook->addMenu('documentation', 'Documentation', '?p=documentation', 6,
array(
'hooks' => array(
'title' => 'Hooks',
'url' => '?p=documentation§ion=hooks'
),
'hooks_functions' => array(
'title' => 'Hooks functions',
'url' => '?p=documentation§ion=hook-functions'
)
));
$hook->addMainsidebar('main_links', 'Main links', '/', 5);
$hook->addMainsidebar('other_links', 'Other links', '/', 6);
$hook->addCss('bootstrap','bootstrap.css',5);
$hook->addCss('style','style.css',6);
$hook->addCss('bootstrap-responsive','bootstrap-responsive.css',7);
$hook->addJs('jquerymin','http://code.jquery.com/jquery-1.8.3.min.js',5);
$hook->addJs('bootstrap','bootstrap.js',6);
if ($hook->hook_exist('action'))
$hook->execute_hook('action');
switch (isset($_GET["p"])?$_GET["p"]:"") {
case 'admin':
require($path.'/pages/admin.main.php');
$smarty->display('admin.main.html');
break;
case 'documentation':
require($path.'/pages/doc.php');
$smarty->display('doc.html');
break;
case '':
case 'home':
require($path.'/pages/main.php');
$smarty->display('index.html');
break;
default:
if ($hook->hook_exist('new_page'))
$hook->execute_hook('new_page');
else
die('404');
break;
}