Source for file InstallMake.class.php

Documentation is available at InstallMake.class.php

  1. <?php
  2. /**
  3.  * Class InstallMake - Install area
  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 InstallMake extends DbConectionMaker
  15. {
  16.  
  17.     /**
  18.     * Constructor
  19.     *
  20.     * @uses ConnectDB::sqlSet()
  21.     * @uses ConnectDB::sqlGet()
  22.     * @uses ConnectDB::close()
  23.     * @return void 
  24.     */
  25.     public function __construct ()
  26.         
  27.         // call parent Constructor from class DbConectionMaker
  28.         parent::__construct()
  29.  
  30.         header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
  31.         
  32.         if ($this->_usedDatabase == "mysql"$sql_dump="install/mysql_db.sql";
  33.         if ($this->_usedDatabase == "pgsql"$sql_dump="install/postgres_db.sql";
  34.  
  35.         if (file_exists($sql_dump)){
  36.             $sql=explode("-- limit --"file_get_contents($sql_dump));
  37.             for($a=0$a<(count($sql))$a++){
  38.                 $zeile=trim($sql[$a]);
  39.                 if (!empty$zeile )) {
  40.                     $zeile eregi_replace("###prefix###"$this->_prefix$zeile);
  41.                     $this->dbObj->sqlSet($zeile);
  42.                 }
  43.             }
  44.             $this->dbObj->close();
  45.             
  46.             include_once("styles/install_tpl/installed.tpl.html");
  47.         }
  48.         else 
  49.             echo "Install directory was not found.";
  50.         
  51.     }
  52. }

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