Subversion Repositories personal-webbase

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. class WBConfigManager {
  4.         private $revision = '?';
  5.         private $rev_datum = '?';
  6.         private $mysql_access_data_server = 'localhost';
  7.         private $mysql_access_data_port = '';
  8.         private $mysql_access_data_prefix = 'webbase_';
  9.         private $mysql_access_data_username = 'root';
  10.         private $mysql_access_data_password = '';
  11.         private $mysql_access_data_database = 'webbase';
  12.         private $mysql_access_data_use_mysqli = false;
  13.         private $lock = false;
  14.         private $force_ssl = false;
  15.  
  16.         function getRevision() {
  17.                 return $this->revision;
  18.         }
  19.  
  20.         function getRevDatum() {
  21.                 return $this->rev_datum;
  22.         }
  23.  
  24.         function getMySQLServer() {
  25.                 return $this->mysql_access_data_server;
  26.         }
  27.  
  28.         function getMySQLPort() {
  29.                 return $this->mysql_access_data_port;
  30.         }
  31.  
  32.         function getMySQLPrefix() {
  33.                 return $this->mysql_access_data_prefix;
  34.         }
  35.  
  36.         function getMySQLUsername() {
  37.                 return $this->mysql_access_data_username;
  38.         }
  39.  
  40.         function getMySQLPassword() {
  41.                 return $this->mysql_access_data_password;
  42.         }
  43.  
  44.         function getMySQLDatabase() {
  45.                 return $this->mysql_access_data_database;
  46.         }
  47.  
  48.         function getMySQLUseMySQLI() {
  49.                 return $this->mysql_access_data_use_mysqli;
  50.         }
  51.  
  52.         function getLockFlag() {
  53.                 return $this->lock;
  54.         }
  55.  
  56.         function getForceSSLFlag() {
  57.                 return $this->force_ssl;
  58.         }
  59.  
  60.         function init() {
  61.                 $revision = '?';
  62.                 $rev_datum = '?';
  63.  
  64.                 if (file_exists('includes/revision.inc.php')) {
  65.                         include 'includes/revision.inc.php';
  66.                 }
  67.  
  68.                 $mysql_access_data = array();
  69.                 $mysql_access_data['server']   = 'localhost';
  70.                 $mysql_access_data['port']     = '';
  71.                 $mysql_access_data['prefix']   = 'webbase_';
  72.                 $mysql_access_data['username'] = 'root';
  73.                 $mysql_access_data['password'] = '';
  74.                 $mysql_access_data['database'] = 'webbase';
  75.                 $mysql_access_data['use_mysqli'] = false;
  76.                 $lock = false;
  77.                 $force_ssl = false;
  78.  
  79.                 if (file_exists('includes/config.inc.php')) {
  80.                         include 'includes/config.inc.php';
  81.                 }
  82.  
  83.                 $this->revision = $revision;
  84.                 $this->rev_datum = $rev_datum;
  85.                 $this->mysql_access_data_server = $mysql_access_data['server'];
  86.                 $this->mysql_access_data_port   = $mysql_access_data['port'];
  87.                 $this->mysql_access_data_prefix = $mysql_access_data['prefix'];
  88.                 $this->mysql_access_data_username = $mysql_access_data['username'];
  89.                 $this->mysql_access_data_password = $mysql_access_data['password'];
  90.                 $this->mysql_access_data_database = $mysql_access_data['database'];
  91.                 $this->mysql_access_data_use_mysqli = $mysql_access_data['use_mysqli'];
  92.                 $this->lock = $lock;
  93.                 $this->force_ssl = $force_ssl;         
  94.         }
  95. }
  96.  
  97. ?>
  98.