Source for file InstallIndex.class.php

Documentation is available at InstallIndex.class.php

  1. <?php
  2. /**
  3.  * Class InstallIndex
  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 InstallIndex extends EtChatConfig
  15. {
  16.  
  17.     /**
  18.     * Constructor
  19.     *
  20.     * @return void 
  21.     */
  22.     public function __construct ()
  23.         
  24.         // call parent Constructor from class EtChatConfig
  25.         parent::__construct()
  26.         
  27.         
  28.         $install_error "";
  29.         
  30.         // Check Server param
  31.         if (version_compare(phpversion()'5.0.0''<')) $install_error .= "<div style=\"color:red\">PHP Version = ".phpversion()." (sollte jedoch >= 5.0.0 sein!)</div>";
  32.         
  33.         if ($this->_usedDatabaseExtension=="pdo"){
  34.             if (!extension_loaded('pdo')) $install_error .= "<div style=\"color:red\"> Keine PDO-Erweiterung gefunden.(PDO-Erweiterung sollte installiert sein!)</div>";
  35.             if (!extension_loaded('pdo_'.$this->_usedDatabase)) $install_error .= "<div style=\"color:red\"> Keine pdo_".$this->_usedDatabase."-Erweiterung gefunden.(pdo_".$this->_usedDatabase." sollte installiert sein!)</div>";
  36.         }
  37.         
  38.         if ($this->_usedDatabaseExtension=="mysqli")
  39.             if (!extension_loaded('mysqli')) $install_error .= "<div style=\"color:red\"> Keine MySQLi-Erweiterung gefunden.(MySQLi sollte installiert sein!)</div>";
  40.         
  41.         if (empty($install_error)) 
  42.             $start_install "<a href=\"./?InstallMake\">Installation starten &gt;&gt;&gt;</a>";
  43.         else 
  44.             $start_install "<b>Die Installation kann nicht durchgeführt werden.</b><br /><br /> Ursache/n:<br />".$install_error."<br /><br />Bitte korrigieren Sie die Einstellungen Ihres Webservers um den ET-Chat zu installieren.";
  45.         
  46.         
  47.         if (file_exists("./install"))
  48.             include_once("styles/install_tpl/index.tpl.html");
  49.         else 
  50.             echo "Install directory was not found.";
  51.     }
  52. }

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