Update standards version & libawl dependencies.
[wrms.git] / config / config-levy.php
blob046287f028a97b39db6790ef3da198b0861cb14d
1 <?php
3 # $dbconn = pg_pConnect("host=dewey.db port=5432 dbname=wrms user=general");
4 $dbconn = pg_Connect("host=dewey.db port=5432 dbname=wrms user=general");
5 $pg_version = 7.4;
7 $admin_email = "wrms@catalyst.net.nz";
8 $basefont = "verdana,sans-serif";
9 $system_name = "Catalyst WRMS2";
10 $sysabbr = "wrms2";
12 // Only admin/support can see the ranking report.
13 $rank_report_anyone = 0;
15 //$debuggroups['Session'] = 1;
16 //$debuggroups['Login'] = 1;
17 $debuggroups['querystring'] = 1;
18 $debuggroups['Request'] = 1;
19 //$debuggroups['WorkSystem'] = 1;
21 $base_dns = "https://$HTTP_HOST";
22 $base_url = "";
23 $external_base_url = $base_dns;
24 $base_dir = $DOCUMENT_ROOT;
25 $attachment_dir = "/home/wrms/wrms/html/attachments";
26 $module = "base";
27 $images = "catimg";
28 // $images = "images";
29 $stylesheet = "andrew.css";
30 // $stylesheet = "main.css";
31 $colors = array(
32 "bg1" => "#ffffff", // primary background
33 "fg1" => "#000000", // text on primary background
34 "link1" => "#880000", // Links on row0/row1
35 "bg2" => "#b00000", // secondary background (behind menus)
36 "fg2" => "#ffffff", // text on links
37 "bg3" => "#404040", // tertiary background
38 "fg3" => "#ffffff", // tertiary foreground
39 "hv1" => "#660000", // text on hover
40 "hv2" => "#f8f400", // other text on hover
41 "row0" => "#ffffff", // dark rows in listings
42 "row1" => "#f0f0f0", // light rows in listings
43 "link2" => "#333333", // Links on row0/row1
44 "bghelp" => "#ffffff", // help background
45 "fghelp" => "#000000", // text on help background
46 "mand" => "#c8c8c8", // Mandatory forms
48 // Parts of a text block (default colors - some blocks might code around this
49 "blockfront" => "black",
50 "blockback" => "white",
51 "blockbg2" => "white",
52 "blocktitle" => "white",
53 "blocksides" => "#ffffff",
54 "blockextra" => "#660000"
57 $fonts = array( "tahoma", // primary font
58 "verdana", // secondary font
59 "help" => "times", // help text
60 "quote" => "times new roman, times, serif", // quotes in messages
61 "narrow" => "arial narrow, helvetica narrow, times new roman, times", // quotes in messages
62 "fixed" => "courier, fixed", // monospace font
63 "block" => "tahoma"); // block font
66 // Set the debug variable initially to '0'. This variable is made available
67 // to all local routines for verbose printing.
68 if ( !isset($debuglevel) ) $debuglevel = 2;
70 if ( !function_exists('floatval') ) {
71 function floatval($x) {
72 return doubleval($x);
76 //-----------------------------------------
77 // Function to start a block in the sidebar
78 //-----------------------------------------
79 function block_open( $bgcolor="", $border_color="") {
80 echo '<div class="block">';
81 return;
84 //-----------------------------------------
85 // Function to title a block of options / menus / whatever
86 //-----------------------------------------
87 function block_title( $title="&nbsp;", $bgcolor="", $border_color="") {
88 echo '<div class="blockhead">'.$title.'</div>';
91 //-----------------------------------------
92 // Function to finish a block of options / menus / whatever
93 //-----------------------------------------
94 function block_close() {
95 echo '</div>';
99 //-----------------------------------------
100 // Function to do any styles, that are local to this installation
101 //-----------------------------------------
102 function local_inline_styles() {
104 echo <<<EOSTYLE
105 .submit {
106 background-image: url(/catimg/bar_red_tile.gif);
108 .submit:hover {
109 color: #f8f400;
110 border: thin inset;
112 EOSTYLE;
116 require_once("organisation-selectors-sql.php");
118 //-----------------------------------------
119 // Function to do the page header, that is local to this installation
120 //-----------------------------------------
121 function local_page_header() {
122 global $system_name, $sysabbr, $session, $images, $tmnu;
124 echo '<div id="topbar"><a href="http://catalyst.net.nz/"><img src="'.$images.'/logo_main.gif" width="180" height="50" border="0"></a></div>'."\n";
125 if ( $session->logged_in /* && !preg_match( "/(requestlist|wrsearch)\.php/i", $GLOBALS['REQUEST_URI'] ) */ ) {
126 echo '<div id="searchbar">';
127 echo '<form action="/wrsearch.php" method="post" name="search">';
129 echo '<span class="prompt" style="vertical-align: 0%;">Find:</span>';
130 echo '<span class="entry"><input class="search_for" type="text" name="search_for" value="'.$GLOBALS['search_for'].'"/></span>';
132 $systems = new PgQuery(SqlSelectSystems($GLOBALS['org_code']));
133 $system_list = $systems->BuildOptionList($GLOBALS['system_id'],'Config::LocPgHdr');
134 echo '<span class="prompt" style="vertical-align: 0%;">Systems:</span>';
135 echo '<span class="entry"><select name="system_id" class="search_for"><option value="">-- select --</option>'.$system_list;
136 echo '</select></span>';
137 echo '<span class="entry""><input type="submit" alt="go" class="fsubmit" value="Search" /></span>';
138 echo '</form>';
139 echo '</div>'."\n";
142 echo '<div id="top_menu">';
143 if ( $session->logged_in ) {
144 echo '<span style="float:right; margin-right:3px; margin-top:3px;">';
145 echo $session->fullname;
146 echo '</span>';
148 if ( isset($tmnu) && is_object($tmnu) && $tmnu->Size() > 0 ) {
149 echo $tmnu->Render();
151 echo '</div>'."\n";
155 //-----------------------------------------
156 // Function to do the bottom menu bar, that is local to this installation
157 //-----------------------------------------
158 function local_menu_bar(&$tmnu) {
161 //-----------------------------------------
162 // Function to do the page footer, that is local to this installation
163 //-----------------------------------------
164 function local_page_footer() {
165 global $session;
166 echo '<div id="page_footer">';
167 echo '</div>';
170 //-----------------------------------------
171 // Function to display stuff when a person is not logged in
172 //-----------------------------------------
173 function local_index_not_logged_in() {
174 global $admin_email, $system_name;
176 echo <<<INDEXNOTLOGGEDIN
177 <blockquote>
178 <p><strong>
179 Welcome to $system_name. For more information
180 on Catalyst, please visit <a href="http://www.catalyst.net.nz">www.catalyst.net.nz</a>.
181 </strong></p>
182 </blockquote>
184 <p>Please e-mail <a href="mailto:$admin_email">$admin_email</a> if you require further information.</p>
185 INDEXNOTLOGGEDIN;