2011-04-26 16:12:10 +00:00
|
|
|
<?php
|
2006-12-02 04:36:16 +00:00
|
|
|
/*
|
2009-09-28 19:17:59 +00:00
|
|
|
* e107 website system
|
|
|
|
*
|
2011-12-02 16:33:31 +00:00
|
|
|
* Copyright (C) 2008-2011 e107 Inc (e107.org)
|
2009-09-28 19:17:59 +00:00
|
|
|
* Released under the terms and conditions of the
|
|
|
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
|
|
|
*
|
|
|
|
* News frontend
|
|
|
|
*
|
2011-12-02 16:33:31 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2009-09-28 19:17:59 +00:00
|
|
|
*/
|
|
|
|
|
2011-12-01 22:08:23 +00:00
|
|
|
// BOOTSTRAP START
|
2009-09-28 19:17:59 +00:00
|
|
|
|
2011-04-26 16:12:10 +00:00
|
|
|
|
2011-12-01 22:08:23 +00:00
|
|
|
define('e_SINGLE_ENTRY', TRUE);
|
|
|
|
|
|
|
|
$_E107['single_entry'] = true; // TODO - notify class2.php
|
|
|
|
|
|
|
|
define('ROOT', dirname(__FILE__));
|
|
|
|
set_include_path(ROOT.PATH_SEPARATOR.get_include_path());
|
|
|
|
|
|
|
|
require_once("class2.php");
|
|
|
|
|
|
|
|
$front = eFront::instance();
|
|
|
|
$front->init()
|
|
|
|
->run();
|
|
|
|
|
2011-12-05 15:12:56 +00:00
|
|
|
$request = $front->getRequest();
|
|
|
|
|
|
|
|
// If not already done - define legacy constants
|
|
|
|
$request->setLegacyQstring();
|
|
|
|
$request->setLegacyPage();
|
|
|
|
|
2011-12-01 22:08:23 +00:00
|
|
|
$inc = $front->isLegacy();
|
|
|
|
if($inc)
|
2006-12-02 04:36:16 +00:00
|
|
|
{
|
2011-12-01 22:08:23 +00:00
|
|
|
// last chance to set legacy env
|
2011-12-05 15:12:56 +00:00
|
|
|
|
|
|
|
$request->populateRequestParams();
|
2011-12-01 22:08:23 +00:00
|
|
|
if(!is_file($inc) || !is_readable($inc))
|
2008-08-25 15:25:19 +00:00
|
|
|
{
|
2011-12-01 22:08:23 +00:00
|
|
|
echo 'Bad request - destination unreachable - '.$inc;
|
2008-08-25 15:25:19 +00:00
|
|
|
}
|
2011-12-01 22:08:23 +00:00
|
|
|
include($inc);
|
|
|
|
exit;
|
2006-12-02 04:36:16 +00:00
|
|
|
}
|
2011-12-01 22:08:23 +00:00
|
|
|
|
|
|
|
$response = $front->getResponse();
|
|
|
|
if(e_AJAX_REQUEST)
|
2006-12-02 04:36:16 +00:00
|
|
|
{
|
2011-12-01 22:08:23 +00:00
|
|
|
$response->setParam('meta', false)
|
|
|
|
->setParam('render', false)
|
|
|
|
->send('default', false, true);
|
|
|
|
exit;
|
2009-09-28 19:17:59 +00:00
|
|
|
}
|
2011-12-01 22:08:23 +00:00
|
|
|
$response->sendMeta();
|
|
|
|
|
|
|
|
include_once(HEADERF);
|
|
|
|
eFront::instance()->getResponse()->send('default', false, true);
|
|
|
|
include_once(FOOTERF);
|
2009-09-28 19:17:59 +00:00
|
|
|
exit;
|
2008-01-12 16:51:43 +00:00
|
|
|
|
2011-12-01 22:08:23 +00:00
|
|
|
// BOOTSTRAP END
|
2006-12-02 04:36:16 +00:00
|
|
|
|