diff options
author | Steve Dibb <beandog@gentoo.org> | 2010-01-06 18:47:23 +0000 |
---|---|---|
committer | Steve Dibb <beandog@gentoo.org> | 2010-01-06 18:47:23 +0000 |
commit | b89cff169b3355bd5939be32855f64c69e821df6 (patch) | |
tree | 6168298e566b9dfb75d0e44b6ed7cb5640cb57d0 | |
parent | typo (diff) | |
download | znurt-org-backend-b89cff169b3355bd5939be32855f64c69e821df6.tar.gz znurt-org-backend-b89cff169b3355bd5939be32855f64c69e821df6.tar.bz2 znurt-org-backend-b89cff169b3355bd5939be32855f64c69e821df6.zip |
hostname vars
git-svn-id: file:///var/svn/portage@67 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
-rw-r--r-- | header.php | 29 |
1 files changed, 24 insertions, 5 deletions
@@ -1,12 +1,31 @@ <? - ini_set('include_path', ini_get('include_path').":/home/steve/php/inc:/home/steve/svn/znurt"); + $hostname = php_uname('n'); + switch($hostname) { - require_once "mdb2/charlie.portage.php"; - require_once 'class.common.php'; - require_once 'class.shell.php'; + case 'charlie': + + $include_path = ":/home/steve/php/inc:/home/steve/svn/znurt"; + $mdb2 = "mdb2/charlie.portage.php"; + + break; + + case 'rom': + + $include_path = ":/home/steve/php/inc:/home/steve/svn/znurt"; + $mdb2 = "mdb2/rom.portage.php"; + + break; - $c = new Common(); + } + + if($include_path) { + ini_set('include_path', ini_get('include_path').$include_path); + + require_once "mdb2/charlie.portage.php"; + require_once 'class.common.php'; + require_once 'class.shell.php'; + } $now = $db->getOne("SELECT NOW();"); |