-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_template.inc.php
53 lines (48 loc) · 1.95 KB
/
index_template.inc.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: Waris Agung Widodo <user>
# @Date: 2018-01-21T11:36:53+07:00
# @Email: [email protected]
# @Filename: index_template.inc.php
# @Last modified by: user
# @Last modified time: 2018-01-26T11:37:10+07:00
//$a = get_defined_vars();
//$a['sysconf'] = null;
//$a['main_content'] = null;
//echo '<pre>'; print_r($a); echo '</pre>'; die();
//echo '<pre>'; print_r($_SESSION); echo '</pre>'; die();
// ----------------------------------------------------------------------------
// load function library for classic template
// ----------------------------------------------------------------------------
include_once 'classic.php';
// ----------------------------------------------------------------------------
// load header
// ----------------------------------------------------------------------------
include 'parts/header.php';
// ----------------------------------------------------------------------------
// load content by URI
// ----------------------------------------------------------------------------
if (isset($_GET['p']) || isset($_GET['search'])) {
// --------------------------------------------------------------------------
// handle result search
if (isset($_GET['search'])) {
// ------------------------------------------------------------------------
// load parts result search template
include 'parts/_result-search.php';
} else {
// --------------------------------------------------------------------------
// handle member page
if ($_GET['p'] == 'member') {
include 'parts/_member.php';
} else {
include 'parts/_other.php';
}
}
} else {
// --------------------------------------------------------------------------
// not found query string: load home page
include 'parts/_home.php';
}
// ----------------------------------------------------------------------------
// load footer
// ----------------------------------------------------------------------------
include 'parts/footer.php';