add a json export script
[lifetype/.git] / comment
1 <?php
2     if (!defined( "PLOG_CLASS_PATH" )) {
3         define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
4     }
5
6         include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
7     lt_include( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
8     lt_include( PLOG_CLASS_PATH."class/net/prettyrequestparser.class.php" );
9         lt_include( PLOG_CLASS_PATH."class/net/requestgenerator.class.php" );
10         lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
11
12     // get the configuration data
13     $config =& Config::getConfig();
14     
15     // in order to maintain compatilibity with previous version, and the alternative
16     // format of search-engine friendly urls
17     if( $config->getValue( "request_format_mode" ) == SEARCH_ENGINE_FRIENDLY_MODE ) {   
18                 $server = HttpVars::getServer();
19                 $parser = new PrettyRequestParser( "comment", $server["PATH_INFO"]);
20                 $result = $parser->parse();
21                 HttpVars::setRequest( $result );
22                 lt_include( "index.php" );
23         }
24         else {
25                 lt_include( PLOG_CLASS_PATH."blog.php" );
26         }
27 ?>