--- trunk/global_vars.php 2004/03/04 21:02:31 29 +++ branches/pear-db/include/global_vars.php 2004/03/06 19:26:11 62 @@ -9,18 +9,26 @@ */ // General globals -$GLOBAL_SYS_NAME = "LibData (v1.04)"; -$GLOBAL_ADMIN_NAME = "System Administrator"; -$GLOBAL_ADMIN_EMAIL = "libdata@knjiznice.ffzg.hr"; +$GLOBAL_SYS_NAME = "LibData (v1.04-pear-db)"; +$GLOBAL_ADMIN_NAME = "Dobrica Pavlinusic"; +$GLOBAL_ADMIN_EMAIL = "dpavlin@mjesec.ffzg.hr"; $host = $_SERVER["HTTP_HOST"]; +$path = "/"; + +# if host name is not libdata, we will automatically +# assume that it's alias installation (see etc/httpd-alias.conf) +# with url http://host/libdata-dev/ +if (! stristr($host, "libdata")) { + $path = "/libdata-dev/"; +} // URL path information -$GLOBAL_RQS_URL = "http://$host/"; -$GLOBAL_SCRIBE_URL = "http://$host/"; -$GLOBAL_PUBLIC_URL = "http://$host/"; -$GLOBAL_ADMIN_URL = "http://$host/admin/"; -$GLOBAL_AUTH_URL = "http://$host/admin/login.phtml"; +$GLOBAL_RQS_URL = "http://".$host.$path; +$GLOBAL_SCRIBE_URL = "http://".$host.$path; +$GLOBAL_PUBLIC_URL = "http://".$host.$path; +$GLOBAL_ADMIN_URL = "http://".$host.$path."admin/"; +$GLOBAL_AUTH_URL = "http://".$host.$path."admin/login.phtml"; $GLOBAL_NO_ACCESS = "no_access.phtml"; // Admininistrative include directory @@ -35,4 +43,15 @@ // ini_set("error_reporting", E_ALL); // ini_set("display_errors", "1"); +if (stristr($host, 'pg')) { + include_once("xx_pgsql.php"); + $GLOBAL_SYS_NAME .= " [pgsql]"; +} elseif (stristr($host, 'my')) { + include_once("xx_mysql.php"); + $GLOBAL_SYS_NAME .= " [mysql]"; +} else { + include_once("xx_pear_db.php"); + $GLOBAL_SYS_NAME .= " [pear-db]"; +} + ?>