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.         // Sets charset and content-type for index.php
  35.         header('content-type: text/html; charset=utf-8');
  36.         
  37.         $this->configTabData2Session();
  38.         $this->dbObj->close();
  39.             
  40.         // create new LangXml Object
  41.         $langObj = new LangXml();
  42.         $lang=$langObj->getLang()->admin[0]->admin_prop[0];
  43.         
  44.         
  45.         if ($_SESSION['etchat_'.$this->_prefix.'user_priv']=="admin"){
  46.             
  47.             $handle opendir("styles/");
  48.             while($files readdir($handle))
  49.             {
  50.                 if($files != "." && $files != "..")
  51.                 {
  52.                     if (is_dir("styles/".$files&& $files!="admin_tpl" && $files!="install_tpl"{
  53.                         if ($_SESSION['etchat_'.$this->_prefix.'style']==$files$print_styles.= "<option value=\"".$files."\" selected>".$files."</option>\n";
  54.                         else $print_styles.= "<option value=\"".$files."\">".$files."</option>\n";
  55.                     }
  56.                 }        
  57.             }                
  58.             
  59.             $handle opendir("lang/");
  60.             while($files readdir($handle))
  61.             {
  62.                 if (!is_dir("lang/".$files&& stripos($files'.xml')!==false && substr($files,0,5)=='lang_'{
  63.  
  64.                     $xml_file file_get_contents('lang/'.$files);
  65.                     $p = new XMLParser($xml_file);
  66.                     $p->Parse();
  67.                     if ($files == $_SESSION['etchat_'.$this->_prefix.'lang_xml_file']$print_lang_files.= "<option value=\"".$files."\" selected>".$p->document->tagAttrs['lang']."</option>";
  68.                     else $print_lang_files.=  "<option value=\"".$files."\">".$p->document->tagAttrs['lang']."</option>";
  69.                 }
  70.             }
  71.  
  72.             // initialize Template
  73.             include_once("styles/admin_tpl/indexProperty.tpl.html");
  74.             
  75.         }else{
  76.             echo $lang->error[0]->tagData;
  77.             return false;
  78.         }
  79.         
  80.     }
  81. }

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