[ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/view/view.class.php" ); 4 lt_include( PLOG_CLASS_PATH."class/template/templateservice.class.php" ); 5 lt_include( PLOG_CLASS_PATH."class/template/template.class.php" ); 6 lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" ); 7 8 define( "ADMINLOGIN_TEMPLATE", "chooseblog" ); 9 10 /** 11 * \ingroup View 12 * @private 13 * 14 * Generates the view shown just after filling in the login form 15 */ 16 class AdminLoginView extends View 17 { 18 19 /** 20 * This initializes the class, but normally we'll only have to initialize the parent 21 * 22 * It gets the BlogSettings object since we need to know a few things about the blog we're 23 * rendering before doing this. 24 */ 25 function AdminLoginView() 26 { 27 $this->View(); 28 // Add the non cache headers to avoid proxy cache this page. 29 $this->addHeaderResponse( 'Cache-Control: no-cache, must-revalidate' ); 30 $this->addHeaderResponse( 'Last-Modified: ' . gmdate( "D, d M Y H:i:s" ) . ' GMT' ); 31 $this->addHeaderResponse( 'Expires: now' ); 32 $this->addHeaderResponse( 'Pragma: no-cache' ); 33 } 34 35 /** 36 * Renders the view. It simply gets all the parameters we've been adding to it 37 * and puts them in the context of the template renderer so that they can be accessed 38 * as normal parameters from within the template 39 */ 40 function render() 41 { 42 parent::render(); 43 44 // to find the template we need, we can use the TemplateService 45 $ts = new TemplateService(); 46 $template = $ts->AdminTemplate( ADMINLOGIN_TEMPLATE ); 47 // load the default locale 48 $config =& Config::getConfig(); 49 $locale =& Locales::getLocale( $config->getValue( "default_locale" )); 50 $this->setValue( "locale", $locale ); 51 // assign all the values 52 $template->assign( $this->_params->getAsArray()); 53 54 // and send the results 55 print $template->fetch(); 56 } 57 } 58 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |