Source for file AdminIndex.class.php

Documentation is available at AdminIndex.class.php

  1. <?php
  2. /**
  3.  * Class AdminIndex
  4.  *
  5.  * LICENSE: CREATIVE COMMONS PUBLIC LICENSE  "Namensnennung — Nicht-kommerziell 2.0"
  6.  *
  7.  * @copyright  2009 <SEDesign />
  8.  * @license    http://creativecommons.org/licenses/by-nc/2.0/de/
  9.  * @version    $3.0.6$
  10.  * @link       http://www.sedesign.de/de_produkte_chat-v3.html
  11.  * @since      File available since Alpha 1.0
  12.  */
  13.  
  14. class AdminIndex extends EtChatConfig
  15. {
  16.  
  17.     /**
  18.     * Constructor
  19.     *
  20.     * @uses LangXml object creation
  21.     * @uses LangXml::getLang() parser method
  22.     * @return void 
  23.     */
  24.     public function __construct ()
  25.         
  26.         // call parent Constructor from class EtChatConfig
  27.         parent::__construct()
  28.  
  29.         session_start();
  30.  
  31.         header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
  32.         // Sets charset and content-type for index.php
  33.         header('content-type: text/html; charset=utf-8');
  34.         
  35.         // create new LangXml Object
  36.         $langObj = new LangXml();
  37.         $lang=$langObj->getLang()->admin[0]->index_php[0];
  38.         
  39.         
  40.         if ($_SESSION['etchat_'.$this->_prefix.'user_priv']=="admin"){
  41.             // initialize template
  42.             $this->initTemplate($lang);
  43.         }else{
  44.             header("Location: ./");
  45.         }
  46.         
  47.     }
  48.     
  49.     /**
  50.     * Initializer for template
  51.     *
  52.     * @return void 
  53.     */
  54.     private function initTemplate($lang){
  55.         // Include Template
  56.         include_once("styles/admin_tpl/index.tpl.html");
  57.     }
  58. }

Documentation generated on Thu, 05 May 2011 14:05:52 +0000 by phpDocumentor 1.4.3