1 |
<?php |
1 |
<?php |
2 |
|
2 |
|
3 |
/** |
3 |
/** |
4 |
* Modern Template by Ross Howard |
4 |
* Modern Template by Ross Howard |
5 |
* http://www.abitcloser.com/projects/singapore |
5 |
* http://www.abitcloser.com/projects/singapore |
6 |
*/ |
6 |
*/ |
7 |
|
7 |
|
8 |
//debugging code |
8 |
//debugging code |
9 |
//error_reporting(E_ALL); |
9 |
//error_reporting(E_ALL); |
10 |
|
10 |
|
11 |
// set embed to false |
11 |
// set embed to false |
12 |
$embed = false; |
12 |
$embed = false; |
13 |
|
13 |
|
14 |
//load user details (must be done after session_start) |
14 |
//load user details (must be done after session_start) |
15 |
$sg->loadUser(); |
15 |
$sg->loadUser(); |
16 |
|
16 |
|
17 |
//if slideshow then set external |
17 |
//if slideshow then set external |
18 |
if($sg->action == 'slideshow') {$embed = true;} |
18 |
if($sg->action == 'slideshow') {$embed = true;} |
19 |
|
19 |
|
20 |
//include header file |
20 |
//include header file |
21 |
if ($embed == false) { |
21 |
if ($embed == false) { |
22 |
include $sg->config->base_path.$sg->config->pathto_current_template."header.tpl.php"; |
22 |
include $sg->config->base_path.$sg->config->pathto_current_template."header.tpl.php"; |
23 |
} |
23 |
} |
24 |
|
24 |
|
25 |
//watch actions and pagetypes |
25 |
//watch actions and pagetypes |
26 |
switch($sg->action) { |
26 |
switch($sg->action) { |
27 |
case "addcomment" : |
27 |
case "addcomment" : |
28 |
include $sg->config->base_path.$sg->config->pathto_current_template."addcomment.tpl.php"; |
28 |
include $sg->config->base_path.$sg->config->pathto_current_template."addcomment.tpl.php"; |
29 |
default : |
29 |
default : |
30 |
if($sg->action == 'slideshow') { |
30 |
if($sg->action == 'slideshow') { |
31 |
//this is an 'slideshow' page so include the 'slideshow' template file |
31 |
//this is an 'slideshow' page so include the 'slideshow' template file |
32 |
include $sg->config->base_path.$sg->config->pathto_current_template."slideshow.tpl.php"; |
32 |
include $sg->config->base_path.$sg->config->pathto_current_template."slideshow.tpl.php"; |
33 |
} elseif($sg->isImagePage()) { |
33 |
} elseif($sg->isImagePage()) { |
34 |
//this is an 'image' page so include the 'image' template file |
34 |
//this is an 'image' page so include the 'image' template file |
35 |
include $sg->config->base_path.$sg->config->pathto_current_template."image.tpl.php"; |
35 |
include $sg->config->base_path.$sg->config->pathto_current_template."image.tpl.php"; |
36 |
} elseif($sg->isAlbumPage()) { |
36 |
} elseif($sg->isAlbumPage()) { |
37 |
//this is an 'album' page so include the 'album' template file |
37 |
//this is an 'album' page so include the 'album' template file |
38 |
include $sg->config->base_path.$sg->config->pathto_current_template."album.tpl.php"; |
38 |
include $sg->config->base_path.$sg->config->pathto_current_template."album.tpl.php"; |
39 |
} else { |
39 |
} else { |
40 |
//this is a 'gallery' page so include the 'gallery' template file |
40 |
//this is a 'gallery' page so include the 'gallery' template file |
41 |
include $sg->config->base_path.$sg->config->pathto_current_template."gallery.tpl.php"; |
41 |
include $sg->config->base_path.$sg->config->pathto_current_template."gallery.tpl.php"; |
42 |
} |
42 |
} |
43 |
} |
43 |
} |
44 |
|
44 |
|
45 |
//include footer file |
45 |
//include footer file |
46 |
if ($embed == false) { |
46 |
if ($embed == false) { |
47 |
include $sg->config->base_path.$sg->config->pathto_current_template."footer.tpl.php"; |
47 |
include $sg->config->base_path.$sg->config->pathto_current_template."footer.tpl.php"; |
48 |
} |
48 |
} |
49 |
?> |
49 |
?> |