bump Smarty to 2.6.31
[lifetype/.git] / blog.php
1 <?php
2
3     if (!defined( "PLOG_CLASS_PATH" )) {
4         define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
5     }
6     
7         include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
8     lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
9     lt_include( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
10         lt_include( PLOG_CLASS_PATH."class/net/customurlhandler.class.php" );
11         lt_include( PLOG_CLASS_PATH."class/net/request.class.php" );
12         lt_include( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
13     
14     // get the configuration data
15     $config =& Config::getConfig();
16     
17     // in order to maintain compatibility with previous version, and the alternative
18     // format of search-engine friendly urls
19     if( $config->getValue( "request_format_mode" ) == SEARCH_ENGINE_FRIENDLY_MODE ) {
20         lt_include( PLOG_CLASS_PATH."error.php" );
21         die();
22     }
23                           
24     $server = HttpVars::getServer();
25         $requestParser = new CustomUrlHandler();
26     $error = $requestParser->process($server["REQUEST_URI"]);
27     $vars = $requestParser->getVars();
28     $params = $requestParser->getParams();
29     $includeFile = $requestParser->getIncludeFile();
30
31     // Hack to force an error page in defaultaction
32     if(!$error){
33       $vars["userId"] = "userId";
34       $params["userId"] = "INVALID";
35     }
36
37         //
38         // fill in the request with the parameters we need
39         //
40         $vars["op"] = "op";
41         foreach( $vars as $key => $value ) {
42                 if( is_array( $params ) && array_key_exists( $key, $params ) && $params["$key"] != "" ) 
43                         HttpVars::setRequestValue( $vars["$key"], $params["$key"] );
44         }
45
46         // and transfer execution to the main script
47     lt_include( PLOG_CLASS_PATH.$includeFile );
48 ?>