NewsFeaturesDownloadsDevelopmentSupportAbout Us

lifetype/branches/lifetype-1.0.6/blog.php

Go to the documentation of this file.
00001 <?php
00002 
00003     if (!defined( "PLOG_CLASS_PATH" )) {
00004         define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
00005     }
00006     
00007     include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
00008     include_once( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
00009         include_once( PLOG_CLASS_PATH."class/net/customurlhandler.class.php" );
00010     
00011     // get the configuration data
00012     $config =& Config::getConfig();
00013     
00014     // in order to maintain compatilibity with previous version, and the alternative
00015     // format of search-engine friendly urls
00016     if( $config->getValue( "request_format_mode" ) == SEARCH_ENGINE_FRIENDLY_MODE ) {
00017         include_once( PLOG_CLASS_PATH."error.php" );
00018         die();
00019     }
00020                           
00021     $server = HttpVars::getServer();
00022         $requestParser = new CustomUrlHandler();
00023         $requestParser->process( $server["REQUEST_URI"] );      
00024         $vars = $requestParser->getVars();
00025         $params = $requestParser->getParams();
00026         $includeFile = $requestParser->getIncludeFile();
00027         
00028         //
00029         // fill in the request with the parameters we need
00030         //
00031         $vars["op"] = "op";
00032         foreach( $vars as $key => $value ) {
00033                 if( is_array( $params ) && array_key_exists( $key, $params ) && $params["$key"] != "" ) 
00034                         HttpVars::setRequestValue( $vars["$key"], $params["$key"] );
00035         }
00036 
00037         // and transfer execution to the main script
00038     include_once( PLOG_CLASS_PATH.$includeFile );
00039 ?>