Update standards version & libawl dependencies.
[wrms.git] / config / config.php-kant
blob1368c8e6c8405cea7a4fc08a552c0f1c0c750bbb
1 <?php
3 if ( ! $dbconn = pg_Connect("port=5432 dbname=wrms user=general") ) {
4   if ( ! $dbconn = pg_Connect("port=5433 dbname=wrms user=general") ) {
5     echo "<html><head><title>Database Error</title></head><body>
6 <h1>Database Error</h1>
7 <h3>Could not connect to PGPool or to Postgres</h3>
8 </body>
9 </html>";
10     exit;
11   }
14 $admin_email = "andrew@catalyst.net.nz";
15 $basefont = "verdana,sans-serif";
16 $system_name = "Andrew's WRMS ";
17 $sysabbr = "wrms";
18 $debuglevel = 5;
19 $debug_email = 'andrew@catalyst.net.nz';
21 // //////////////////// Enable for debugging...
22 //$debuggroups['Session'] = 1;
23 //$debuggroups['Login'] = 1;
24 $debuggroups['querystring'] = 1;
25 $debuggroups['Request'] = 1;
26 $debuggroups['WorkSystem'] = 1;
28 $default_search_statuses = '@NRILKTQADSPZU';
29 $base_dns = "http://$HTTP_HOST";
30 $base_url = "";
31 $base_dir = $DOCUMENT_ROOT;
32 $attachment_dir = "attachments"; // ***** CHANGE THIS  *****
33 $module = "base";
34 $images = "images";
35 // $stylesheet = "andrew.css";
36 $colors = array(
37   "bg1" => "#ffffff", // primary background
38   "fg1" =>  "#000000", // text on primary background
39   "link1" =>  "#660000", // Links on row0/row1
40   "bg2" =>  "#660000", // secondary background (behind menus)
41   "fg2" =>  "#ffffff", // text on links
42   "bg3" =>  "#000000", // tertiary background
43   "fg3" =>  "#ffffff", // tertiary foreground
44   "hv1" =>  "#660000", // text on hover
45   "hv2" =>  "#f0ff4c", // other text on hover
46   "row0" =>  "#ffffff", // dark rows in listings
47   "row1" =>  "#f0ece8", // light rows in listings
48   "link2" =>  "#333333", // Links on row0/row1
49   "bghelp" => "#ffffff", // help background
50   "fghelp" =>  "#000000", // text on help background
51   8 =>  "#583818", // Form headings
52   9 =>  "#ccbea1", // Mandatory forms
53   10 =>  "#50a070", // whatever!
55 // Parts of a text block (default colors - some blocks might code around this
56     "blockfront" => "black",
57     "blockback" => "white",
58     "blockbg2" => "white",
59     "blocktitle" => "white",
60     "blocksides" => "#ffffff",
61     "blockextra" => "#660000"
64 $fonts = array( "tahoma",   // primary font
65     "verdana",  // secondary font
66     "help"  => "times",   // help text
67     "quote" => "times new roman, times, serif", // quotes in messages
68     "narrow"  => "arial narrow, helvetica narrow, times new roman, times", // quotes in messages
69     "fixed" => "courier, fixed",  // monospace font
70     "block" => "tahoma");   // block font
73 // Set the bebug variable initially to '0'. This variable is made available
74 // to all local routines for verbose printing.
75 if ( !isset($debuglevel) ) $debuglevel = 2;
77 function block_open(  $bgcolor="", $border_color="") {
78   global $colors;
79   if ( $bgcolor == "" ) $bgcolor=$colors["blockback"];
80   if ( $border_color == "" ) $border_color=$colors["blocksides"];
81   echo "<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" width=\"100%\" bgcolor=\"$border_color\" style=\" margin: 0 1px;\">\n";
82   echo "<tr><td>\n";
83   echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"$bgcolor\">\n";
86 //-----------------------------------------
87 // Function to title a block of options / menus / whatever
88 //-----------------------------------------
89 function block_title( $title="&nbsp;", $bgcolor="", $border_color="") {
90   global $colors;
91   if ( $bgcolor == "" ) $bgcolor=$colors["blocktitle"];
92   if ( $border_color == "" ) $border_color=$colors["blocksides"];
94   echo "<tr bgcolor=\"$bgcolor\">\n";
95   echo "<td class=blockhead align=center>$title</td>\n";
96   echo "</tr>\n";
100 //-----------------------------------------
101 // Function to finish a block of options / menus / whatever
102 //-----------------------------------------
103 function block_close() {
104   echo "</table>\n";
105   echo "</td></tr>\n";
106   echo "</table>\n";
110 require_once("organisation-selectors-sql.php");
112 //-----------------------------------------
113 // Function to do the page header, that is local to this installation
114 //-----------------------------------------
115 function local_page_header() {
116   global $system_name, $sysabbr, $session, $images;
118   echo '<div id="topbar"><a href="/"><img src="'.$images.'/logo_main.gif" border="0"></a></div>';
119   if ( $session->logged_in && !preg_match( "/(requestlist|wrsearch)\.php/i", $GLOBALS['REQUEST_URI'] ) ) {
120     echo '<div id="searchbar">';
121     echo '<form action="/requestlist.php" method="post" style="display:inline;" name="search">';
123     echo '<span class="prompt">Search:</span>';
124     echo '<span class="entry"><input type="text" name="search_for" /></span>';
126     $systems = new PgQuery(SqlSelectSystems($GLOBALS['org_code']));
127     $system_list = $systems->BuildOptionList($GLOBALS['system_id'],'Config::LocPgHdr');
128     echo '<span class="prompt">Systems</span>';
129     echo '<span class="entry"> <select name="system_id" class="flookup"><option value="0">-- select --</option>'.$system_list;
130     echo '</select></span>';
131     echo '<span class="entry"><input type="submit" alt="go" /></span>';
132     echo '</form></div>';
134   }
138 //-----------------------------------------
139 // Function to do the page footer, that is local to this installation
140 //-----------------------------------------
141 function local_menu_bar() {
142   global $system_name, $sysabbr, $session, $images;
144   echo '<div id="top_menu">';
145   echo '</div>';
148 //-----------------------------------------
149 // Function to do the page footer, that is local to this installation
150 //-----------------------------------------
151 function local_page_footer() {
152   global $sysabbr;
155 //-----------------------------------------
156 // Function to display stuff when a person is not logged in
157 //-----------------------------------------
158 function local_index_not_logged_in() {
159 global $admin_email, $system_name;
161 <blockquote>
162 <p><strong>
163 Welcome to <?php echo $system_name; ?>. For more information
164 on Catalyst, please visit  <a href="http://www.catalyst.net.nz">www.catalyst.net.nz</a>.
165 </strong></p>
166 </blockquote>
168 <p>Please e-mail <a href="mailto:<?php echo $admin_email; ?>"><?php echo $admin_email; ?></a> if you require further information.</p>
169 <?php