root/trunk/src/index.php
| Revision 6, 3.8 kB (checked in by bermi, 3 years ago) | |
|---|---|
| |
| Line | |
|---|---|
| 1 | <?php |
| 2 | |
| 3 | // +----------------------------------------------------------------------+ |
| 4 | // Editam is a content management platform developed by Akelos Media, S.L.| |
| 5 | // Copyright (C) 2006 - 2007 Akelos Media, S.L. | |
| 6 | // | |
| 7 | // This program is free software; you can redistribute it and/or modify | |
| 8 | // it under the terms of the GNU General Public License version 3 as | |
| 9 | // published by the Free Software Foundation. | |
| 10 | // | |
| 11 | // This program is distributed in the hope that it will be useful, but | |
| 12 | // WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 14 | // See the GNU General Public License for more details. | |
| 15 | // | |
| 16 | // You should have received a copy of the GNU General Public License | |
| 17 | // along with this program; if not, see http://www.gnu.org/licenses or | |
| 18 | // write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth | |
| 19 | // Floor, Boston, MA 02110-1301 USA. | |
| 20 | // | |
| 21 | // You can contact Akelos Media, S.L. headquarters at | |
| 22 | // C/ Pasodoble Amparito Roca, 6, 46240 - Carlet (Valencia) - Spain | |
| 23 | // or at email address contact@akelos.com. | |
| 24 | // | |
| 25 | // The interactive user interfaces in modified source and object code | |
| 26 | // versions of this program must display Appropriate Legal Notices, as | |
| 27 | // required under Section 5 of the GNU General Public License version 3. | |
| 28 | // | |
| 29 | // In accordance with Section 7(b) of the GNU General Public License | |
| 30 | // version 3, these Appropriate Legal Notices must retain the display of | |
| 31 | // the "Powered by Editam" logo. If the display of the logo is not | |
| 32 | // reasonably feasible for technical reasons, the Appropriate Legal | |
| 33 | // Notices must display the words "Powered by Editam". | |
| 34 | // +----------------------------------------------------------------------+ |
| 35 | |
| 36 | if(!defined('AK_CONFIG_INCLUDED')){ |
| 37 | if(!file_exists('config'.DIRECTORY_SEPARATOR.'config.php')){ |
| 38 | define('AK_ENVIRONMENT', 'setup'); |
| 39 | require('includes'.DIRECTORY_SEPARATOR.'editam'.DIRECTORY_SEPARATOR.'controllers'.DIRECTORY_SEPARATOR.'editam_setup_controller.php'); |
| 40 | exit; |
| 41 | }else{ |
| 42 | include_once('config'.DIRECTORY_SEPARATOR.'config.php'); |
| 43 | |
| 44 | session_start(); |
| 45 | if(EDITAM_CACHE_ENABLED && empty($_POST) && empty($_SESSION['__credentials']) ){ |
| 46 | $Cache =& Ak::cache(); |
| 47 | $Cache->init(EDITAM_CACHE_LIFE); |
| 48 | $cache_group = AK_HOST; |
| 49 | $cache_id = Ak::lang().'-'.@$_GET['ak']; |
| 50 | |
| 51 | if($cached = $Cache->get($cache_id, $cache_group)){ |
| 52 | |
| 53 | if(EDITAM_COMPRESS_OUTPUT && |
| 54 | function_exists('ob_gzhandler') && |
| 55 | preg_match('/gzip|deflate/', @$_SERVER['HTTP_ACCEPT_ENCODING'])){ |
| 56 | ob_start('ob_gzhandler'); |
| 57 | } |
| 58 | |
| 59 | list($headers, $cached) = split('~~',$cached,2); |
| 60 | $headers = unserialize($headers); |
| 61 | header('Status: HTTP/1.1 304 Not Modified'); |
| 62 | foreach ($headers as $header){ |
| 63 | header($header); |
| 64 | } |
| 65 | echo $cached; |
| 66 | exit; |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | require_once(AK_LIB_DIR.DS.'AkDispatcher.php'); |
| 73 | $Dispatcher =& new AkDispatcher(); |
| 74 | $Dispatcher->dispatch(); |
| 75 | |
| 76 | ?> |
| 77 |
Note: See TracBrowser for help on using the browser.
