[ Index ] |
|
Code source de Seagull 0.6.1 |
1 <?php 2 3 $rootDir = dirname(__FILE__) . '/..'; 4 $varDir = dirname(__FILE__) . '/../var'; 5 6 // check for lib cache 7 define('SGL_CACHE_LIBS', (is_file($varDir . '/ENABLE_LIBCACHE.txt')) 8 ? true 9 : false); 10 11 require_once $rootDir .'/lib/SGL/FrontController.php'; 12 13 class AjaxInit extends SGL_FrontController 14 { 15 function run() 16 { 17 define('SGL_TEST_MODE', true); 18 19 if (!defined('SGL_INITIALISED')) { 20 SGL_FrontController::init(); 21 } 22 // assign request to registry 23 $input = &SGL_Registry::singleton(); 24 $req = SGL_Request::singleton(); 25 26 if (PEAR::isError($req)) { 27 // stop with error page 28 SGL::displayStaticPage($req->getMessage()); 29 } 30 $input->setRequest($req); 31 $output = &new SGL_Output(); 32 33 $process = new SGL_Task_Init( 34 new SGL_Task_SetupORM( 35 new SGL_Task_CreateSession( 36 new SGL_Void() 37 ))); 38 39 $process->process($input, $output); 40 } 41 } 42 43 AjaxInit::run(); 44 require_once 'HTML/AJAX/Server.php'; 45 46 class AutoServer extends HTML_AJAX_Server 47 { 48 // this flag must be set for your init methods to be used 49 var $initMethods = true; 50 51 function initMediaAjaxProvider() 52 { 53 require_once SGL_MOD_DIR . '/media/classes/MediaAjaxProvider.php'; 54 $provider = & MediaAjaxProvider::singleton(); 55 $this->registerClass($provider); 56 } 57 58 function initEcommAjaxProvider() 59 { 60 require_once SGL_MOD_DIR . '/ecomm/classes/EcommAjaxProvider.php'; 61 $provider = & EcommAjaxProvider::singleton(); 62 $this->registerClass($provider); 63 } 64 65 function initCmsAjaxProvider() 66 { 67 require_once SGL_MOD_DIR . '/cms/classes/CmsAjaxProvider.php'; 68 $provider = & CmsAjaxProvider::singleton(); 69 $this->registerClass($provider); 70 } 71 } 72 73 $server = new AutoServer(); 74 $server->clientJsLocation = SGL_WEB_ROOT . '/js/html_ajax/'; 75 $server->handleRequest(); 76 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 30 01:27:52 2007 | par Balluche grâce à PHPXref 0.7 |