Source for file AdminPropertyIndex.class.php

Documentation is available at AdminPropertyIndex.class.php

  1. <?php
  2. /**
  3.  * Class PropertyIndex
  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. {
  15.  
  16.     /**
  17.     * Constructor
  18.     *
  19.     * @uses LangXml object creation
  20.     * @uses LangXml::getLang() parser method
  21.     * @uses ConnectDB::sqlSet()
  22.     * @uses ConnectDB::sqlGet()
  23.     * @uses ConnectDB::close()
  24.     * @return void 
  25.     */
  26.     public function __construct ()
  27.         
  28.         // call parent Constructor from class DbConectionMaker
  29.         parent::__construct()
  30.  
  31.         session_start();
  32.  
  33.         header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
  34.         
  35.         $this->configTabData2Session();
  36.         $this->dbObj->close();
  37.             
  38.         // create new LangXml Object
  39.         $langObj = new LangXml();
  40.         $lang=$langObj->getLang()->admin[0]->admin_prop[0];
  41.         
  42.         
  43.         if ($_SESSION['etchat_'.$this->_prefix.'user_priv']=="admin"){
  44.             
  45.             $handle opendir("styles/");
  46.             while($files readdir($handle))
  47.             {
  48.                 if($files != "." && $files != "..")
  49.                 {
  50.                     if (is_dir("styles/".$files&& $files!="admin_tpl" && $files!="install_tpl"{
  51.                         if ($_SESSION['etchat_'.$this->_prefix.'style']==$files$print_styles.= "<option value=\"".$files."\" selected>".$files."</option>\n";
  52.                         else $print_styles.= "<option value=\"".$files."\">".$files."</option>\n";
  53.                     }
  54.                 }        
  55.             }                
  56.             
  57.             $handle opendir("lang/");
  58.             while($files readdir($handle))
  59.             {
  60.                 if (!is_dir("lang/".$files&& ereg(".xml"$files)) {
  61.  
  62.                     $xml_file file_get_contents('lang/'.$files);
  63.                     $p = new XMLParser($xml_file);
  64.                     $p->Parse();
  65.                     if ($files == $_SESSION['etchat_'.$this->_prefix.'lang_xml_file']$print_lang_files.= "<option value=\"".$files."\" selected>".$p->document->tagAttrs['lang']."</option>";
  66.                     else $print_lang_files.=  "<option value=\"".$files."\">".$p->document->tagAttrs['lang']."</option>";
  67.                 }
  68.             }
  69.  
  70.             // initialize Template
  71.             include_once("styles/admin_tpl/indexProperty.tpl.html");
  72.             
  73.         }else{
  74.             echo $lang->error[0]->tagData;
  75.             return false;
  76.         }
  77.         
  78.     }
  79. }

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