Source for file Chat.class.php

Documentation is available at Chat.class.php

  1. <?php
  2. /**
  3.  * Class Chat, chat page
  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 Chat extends EtChatConfig
  15. {
  16.     /**
  17.     * LangXml Obj for login page
  18.     * @var LangXml 
  19.     */
  20.     public $lang;
  21.  
  22.     /**
  23.     * Constructor
  24.     *
  25.     * @uses LangXml object creation
  26.     * @uses LangXml::getLang() parser method
  27.     * @return void 
  28.     */
  29.     public function __construct (){
  30.  
  31.         // call parent Constructor from class EtChatConfig
  32.         parent::__construct();
  33.         
  34.         // starts session in chat.php
  35.         session_start();
  36.  
  37.         // Sets charset and content-type for chat.php
  38.         header('content-type: text/html; charset=utf-8');
  39.         
  40.         // Disable Browser Chache
  41.         header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
  42.         
  43.         // For user reloader, if this documents is just reloaded "F5", the onlineUserReloader have to send all userdata even although there no changes in the online list.  
  44.         unset($_SESSION['etchat_'.$this->_prefix.'reload_user_anz']);
  45.         
  46.         // if direct requested whithout a login
  47.         if (empty($_SESSION['etchat_'.$this->_prefix.'username'])){
  48.             header('Location: ./');
  49.             return false;
  50.         }
  51.         
  52.         // create new LangXml Object
  53.         $langObj = new LangXml;
  54.         $this->lang=$langObj->getLang()->chat_php[0];
  55.  
  56.         // initialize chat template
  57.         $this->initTemplate();
  58.     }
  59.     
  60.     /**
  61.     * Initializer for template
  62.     *
  63.     * @return void 
  64.     */
  65.     private function initTemplate(){
  66.         // Include Template
  67.         include_once("styles/".$_SESSION['etchat_'.$this->_prefix.'style']."/chat.tpl.html");
  68.     }
  69.     
  70. }

Documentation generated on Tue, 22 Dec 2009 09:42:46 +0100 by phpDocumentor 1.4.1