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