NewsFeaturesDownloadsDevelopmentSupportAbout Us

lifetype-1.1.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         include_once( PLOG_CLASS_PATH."class/net/request.class.php" );
00011     
00012     // get the configuration data
00013     $config =& Config::getConfig();
00014     
00015     // in order to maintain compatilibity with previous version, and the alternative
00016     // format of search-engine friendly urls
00017     if( $config->getValue( "request_format_mode" ) == SEARCH_ENGINE_FRIENDLY_MODE ) {
00018         include_once( PLOG_CLASS_PATH."error.php" );
00019         die();
00020     }
00021                           
00022     $server = HttpVars::getServer();
00023         $requestParser = new CustomUrlHandler();
00024         $requestParser->process( $server["REQUEST_URI"] );      
00025         $vars = $requestParser->getVars();
00026         $params = $requestParser->getParams();
00027         $includeFile = $requestParser->getIncludeFile();
00028         
00029         //
00030         // fill in the request with the parameters we need
00031         //
00032         $vars["op"] = "op";
00033         foreach( $vars as $key => $value ) {
00034                 if( is_array( $params ) && array_key_exists( $key, $params ) && $params["$key"] != "" ) 
00035                         HttpVars::setRequestValue( $vars["$key"], $params["$key"] );
00036         }
00037 
00038         // and transfer execution to the main script
00039     include_once( PLOG_CLASS_PATH.$includeFile );
00040 ?>