1 |
dpavlin |
29 |
<?php |
2 |
|
|
/* |
3 |
|
|
Following are global scope parameters for the LibData system. |
4 |
|
|
|
5 |
|
|
File name: global_vars.php |
6 |
|
|
Institution: University of Minnesota |
7 |
|
|
Last Modified: January 28, 2003 |
8 |
|
|
Modified By: Paul F. Bramscher <brams006@umn.edu> |
9 |
|
|
*/ |
10 |
|
|
|
11 |
|
|
// General globals |
12 |
dpavlin |
76 |
$GLOBAL_SYS_NAME = "LibData (v2.0-xx)"; |
13 |
dpavlin |
42 |
$GLOBAL_ADMIN_NAME = "Dobrica Pavlinusic"; |
14 |
|
|
$GLOBAL_ADMIN_EMAIL = "dpavlin@mjesec.ffzg.hr"; |
15 |
dpavlin |
29 |
|
16 |
|
|
$host = $_SERVER["HTTP_HOST"]; |
17 |
dpavlin |
62 |
$path = "/"; |
18 |
dpavlin |
29 |
|
19 |
dpavlin |
62 |
# if host name is not libdata, we will automatically |
20 |
|
|
# assume that it's alias installation (see etc/httpd-alias.conf) |
21 |
|
|
# with url http://host/libdata-dev/ |
22 |
|
|
if (! stristr($host, "libdata")) { |
23 |
dpavlin |
77 |
$path = dirname($_SERVER["SCRIPT_URL"]); |
24 |
dpavlin |
62 |
} |
25 |
|
|
|
26 |
dpavlin |
29 |
// URL path information |
27 |
dpavlin |
62 |
$GLOBAL_RQS_URL = "http://".$host.$path; |
28 |
|
|
$GLOBAL_SCRIBE_URL = "http://".$host.$path; |
29 |
|
|
$GLOBAL_PUBLIC_URL = "http://".$host.$path; |
30 |
|
|
$GLOBAL_ADMIN_URL = "http://".$host.$path."admin/"; |
31 |
|
|
$GLOBAL_AUTH_URL = "http://".$host.$path."admin/login.phtml"; |
32 |
dpavlin |
29 |
$GLOBAL_NO_ACCESS = "no_access.phtml"; |
33 |
|
|
|
34 |
|
|
// Admininistrative include directory |
35 |
|
|
$GLOBAL_ADMIN_INC = "include/"; |
36 |
|
|
|
37 |
|
|
// Header/footer/CSS |
38 |
|
|
$GLOBAL_ADMIN_CSS = "include/libdata.css"; |
39 |
|
|
$GLOBAL_ADMIN_HEADER = "include/libdata_header.phtml"; |
40 |
|
|
$GLOBAL_ADMIN_FOOTER = "include/libdata_footer.phtml"; |
41 |
|
|
|
42 |
|
|
// Debugging PHP |
43 |
|
|
// ini_set("error_reporting", E_ALL); |
44 |
|
|
// ini_set("display_errors", "1"); |
45 |
|
|
|
46 |
dpavlin |
77 |
if (stristr($host, 'pg') || stristr($path, 'pg')) { |
47 |
dpavlin |
42 |
include_once("xx_pgsql.php"); |
48 |
|
|
$GLOBAL_SYS_NAME .= " [pgsql]"; |
49 |
dpavlin |
77 |
} elseif (stristr($host, 'my') || stristr($path, 'my')) { |
50 |
dpavlin |
42 |
include_once("xx_mysql.php"); |
51 |
|
|
$GLOBAL_SYS_NAME .= " [mysql]"; |
52 |
dpavlin |
50 |
} else { |
53 |
|
|
include_once("xx_pear_db.php"); |
54 |
|
|
$GLOBAL_SYS_NAME .= " [pear-db]"; |
55 |
dpavlin |
42 |
} |
56 |
|
|
|
57 |
dpavlin |
29 |
?> |