Rev 229 Rev 243
1 <?php 1 <?php
2   2  
3 /** 3 /**
4 * Main file drives the gallery. 4 * Main file drives the gallery.
5 * 5 *
6 * Do not include this file into another page; include external.php instead. 6 * Do not include this file into another page; include external.php instead.
7 * 7 *
8 * @package singapore 8 * @package singapore
9 * @author Tamlyn Rhodes <tam at zenology dot co dot uk> 9 * @author Tamlyn Rhodes <tam at zenology dot co dot uk>
10 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License 10 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License
11 * @copyright (c)2003, 2004 Tamlyn Rhodes 11 * @copyright (c)2003, 2004 Tamlyn Rhodes
12 * @version $Id: index.php,v 1.21 2006/08/05 19:56:32 thepavian Exp $ 12 * @version $Id: index.php,v 1.21 2006/08/05 19:56:32 thepavian Exp $
13 */ 13 */
14   14  
15 //include main class 15 //include main class
16 require_once "includes/singapore.class.php"; 16 require_once "includes/singapore.class.php";
17   17  
18 //create a wrapper 18 //create a wrapper
19 $sg = new Singapore(); 19 $sg = new Singapore();
20   20  
21 //set session arg separator to be xml compliant 21 //set session arg separator to be xml compliant
22 ini_set("arg_separator.output", "&amp;"); 22 ini_set("arg_separator.output", "&amp;");
23   23  
24 //only start session if session is already registered 24 //only start session if session is already registered
25 if(isset($_REQUEST[$sg->config->session_name])) { 25 if(isset($_REQUEST[$sg->config->session_name])) {
26 //start session 26 //start session
27 session_name($sg->config->session_name); 27 session_name($sg->config->session_name);
28 @session_start(); 28 @session_start();
29 } 29 }
30   30  
31 //send content-type and character encoding header 31 //send content-type and character encoding header
32 @header("Content-type: text/html; charset=".$sg->character_set); 32 @header("Content-type: text/html; charset=".$sg->character_set);
33   33  
34 //pass control over to template 34 //pass control over to template
35 @include $sg->config->base_path.$sg->config->pathto_current_template."index.tpl.php"; 35 @include $sg->config->base_path.$sg->config->pathto_current_template."index.tpl.php";
36   36  
37 ?> 37 ?>