Revision: 1092
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1092&view=rev
Author:   cimorrison
Date:     2009-04-16 13:23:57 +0000 (Thu, 16 Apr 2009)

Log Message:
-----------
- Extended the theme capability by moving the print_header() function into the 
Themes directory to enable it to be more easily replaced by a plug-in.   This 
is designed for cases where styling changes alone cannot achieve the desired 
header look and feel and the mark-up itself needs to be changed (eg to change 
nav bars).   As suggested on the mailing list.   

- Also changed the way that themes work slightly:  MRBS now looks for the files 
styling.inc and header.inc in the directory Themes/$theme and if cannot find 
those uses the ones in Themes/default, which must be present.

Modified Paths:
--------------
    mrbs/trunk/web/config.inc.php
    mrbs/trunk/web/day.php
    mrbs/trunk/web/functions.inc
    mrbs/trunk/web/mrbs-js-overrides.css.php
    mrbs/trunk/web/mrbs-print.css.php
    mrbs/trunk/web/mrbs.css.php
    mrbs/trunk/web/week.php

Added Paths:
-----------
    mrbs/trunk/web/Themes/classic126/
    mrbs/trunk/web/Themes/classic126/styling.inc
    mrbs/trunk/web/Themes/default/
    mrbs/trunk/web/Themes/default/header.inc
    mrbs/trunk/web/Themes/default/styling.inc
    mrbs/trunk/web/theme.inc

Removed Paths:
-------------
    mrbs/trunk/web/Themes/classic126.inc
    mrbs/trunk/web/Themes/default.inc

Copied: mrbs/trunk/web/Themes/classic126/styling.inc (from rev 1091, 
mrbs/trunk/web/Themes/classic126.inc)
===================================================================
--- mrbs/trunk/web/Themes/classic126/styling.inc                                
(rev 0)
+++ mrbs/trunk/web/Themes/classic126/styling.inc        2009-04-16 13:23:57 UTC 
(rev 1092)
@@ -0,0 +1,111 @@
+<?php
+
+// $Id$
+
+// CLASSIC MRBS 1.2.6 THEME
+
+// ***** COLOURS ************************
+// Colours used in MRBS.    All the colours are defined here as PHP variables
+
+$body_background_color          = "#ffffed";    // background colour for the 
main body
+$standard_font_color            = "black";      // default font color
+$header_font_color              = "#ffffff";    // font color for text in 
headers
+$highlight_font_color           = "red";        // used for highlighting text 
(eg links, errors)
+$colour_key_font_color          = "#5B69A6";    // used in the colour key table
+
+$banner_back_color              = "#c0e0ff";    // background colour for banner
+$banner_border_color            = "#5B69A6";    // border colour for banner
+$banner_font_color              = $banner_border_color;       // font colour 
for banner
+
+$header_back_color              = "#999999";  // background colour for headers
+
+$admin_table_header_back_color  = $header_back_color;     // background colour 
for header and also border colour for table cells
+$admin_table_header_sep_color   = $body_background_color; // vertical 
separator colour in header
+$admin_table_header_font_color  = $header_font_color;     // font colour for 
header
+
+$main_table_border_color        = "#777777";                   // border 
colour for day/week/month tables - outside
+$main_table_header_border_color = $main_table_border_color;    // border 
colour for day/week/month tables - header
+$main_table_body_h_border_color = $main_table_border_color;    // border 
colour for day/week/month tables - body, horizontal
+$main_table_body_v_border_color = $main_table_body_h_border_color; // border 
colour for day/week/month tables - body, vertical
+$main_table_month_color         = "#ffffff";    // background colour for days 
in the month view
+$main_table_month_invalid_color = "#d1d9de";    // background colour for 
invalid days in the month view
+$main_table_labels_back_color   = "#fff0f0";    // background colour for the 
row labels column
+
+// border colours for the main table when it is printed.     These are used by 
mrbs-print.css.php
+$main_table_border_color_print        = "#777777";    // border colour for the 
main table (print view)
+$main_table_header_border_color_print = "#777777";    // border colour for 
day/week/month tables - header (print view)
+$main_table_body_h_border_color_print = "#777777";    // border colour for 
day/week/month tables - body, horizontal (print view)
+$main_table_body_v_border_color_print = "#777777";    // border colour for 
day/week/month tables - body, vertical (print view)
+
+$report_table_border_color      = $standard_font_color;
+$report_h2_border_color         = $banner_back_color;     // border colour for 
<h2> in report.php
+$report_h3_border_color         = "#879AA8";              // border colour for 
<h2> in report.php
+$report_entry_border_color      = "#C3CCD3";              // used to separate 
individual bookings in report.php
+
+$search_table_border_color      = $standard_font_color;
+
+$site_faq_entry_border_color    = $report_entry_border_color;    // used to 
separate individual FAQ's in help.php
+
+$trailer_border_color           = $main_table_border_color;
+
+$anchor_link_color              = "#5B69A6";          // link color
+$anchor_visited_color           = "#5B69A6";          // link color (visited)
+$anchor_hover_color             = "red";              // link color (hover)
+
+$anchor_link_color_banner       = $anchor_link_color;          // link color
+$anchor_visited_color_banner    = $anchor_visited_color;       // link color 
(visited)
+$anchor_hover_color_banner      = $anchor_hover_color;         // link color 
(hover)
+
+$anchor_link_color_header       = $anchor_link_color;          // link color
+$anchor_visited_color_header    = $anchor_visited_color;       // link color 
(visited)
+$anchor_hover_color_header      = $anchor_hover_color;         // link color 
(hover)
+
+$column_hidden_color            = $main_table_month_invalid_color;    // 
hidden days in the week and month views
+$calendar_hidden_color          = "#dae0e4";                          // 
hidden days in the mini-cals
+$row_even_color                 = "#ffffff";        // even rows in the day 
and week views
+$row_odd_color                  = "#eeeeee";        // even rows in the day 
and week views
+$row_highlight_color            = "#ffc0da";        // used for highlighting a 
row
+                                                    // NOTE: this colour is 
also used in xbLib.js (in more than one place)and 
+                                                    // if you change it here 
you will also need to change it there.
+
+$help_highlight_color           = "#ffe6f0";        // highlighting text on 
the help page
+
+$multiple_control_color         = "#ffff44";        // background colour for 
the multiple booking controls
+
+
+// These are the colours used for distinguishing between the dfferent types of 
bookings in the main
+// displays in the day, week and month views
+$color_types = array(
+    'A' => "#FFCCFF",
+    'B' => "#99CCCC",
+    'C' => "#FF9999",
+    'D' => "#FFFF99",
+    'E' => "#C0E0FF",
+    'F' => "#FFCC99",
+    'G' => "#FF6666",
+    'H' => "#66FFFF",
+    'I' => "#DDFFDD",
+    'J' => "#CCCCCC",
+    'PA' => "#D0A8D0", // PA-PJ are "Private" entry colors for A-J
+    'PB' => "#85b3b3",
+    'PC' => "#f08f8f",
+    'PD' => "#e6e38a",
+    'PE' => "#b2c8ed",
+    'PF' => "#e1ad7a",
+    'PG' => "#dc5959",
+    'PH' => "#50c6ce",
+    'PI' => "#aedeae",
+    'PJ' => "#959595"); 
+
+// ***** DIMENSIONS *******************
+$banner_border_width          = '1';  // (px)  border width for the outside of 
the banner
+$banner_border_cell_width     = '1';  // (px)  border width for the cells of 
the banner
+$main_table_border_width      = '1';  // (px)  the border width for the 
outside of the main day/week/month tables
+$main_table_cell_border_width = '1';  // (px)  the border width for the cells 
of the main day/week/month tables
+$main_cell_height             = '17'; // (px)  height of the cells in the main 
day/week tables
+    
+    
+// ***** FONTS ************************    
+$standard_font_family  = 'Arial, Verdana, sans-serif';
+
+?>


Property changes on: mrbs/trunk/web/Themes/classic126/styling.inc
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Deleted: mrbs/trunk/web/Themes/classic126.inc
===================================================================
--- mrbs/trunk/web/Themes/classic126.inc        2009-04-06 21:27:45 UTC (rev 
1091)
+++ mrbs/trunk/web/Themes/classic126.inc        2009-04-16 13:23:57 UTC (rev 
1092)
@@ -1,111 +0,0 @@
-<?php
-
-// $Id$
-
-// CLASSIC MRBS 1.2.6 THEME
-
-// ***** COLOURS ************************
-// Colours used in MRBS.    All the colours are defined here as PHP variables
-
-$body_background_color          = "#ffffed";    // background colour for the 
main body
-$standard_font_color            = "black";      // default font color
-$header_font_color              = "#ffffff";    // font color for text in 
headers
-$highlight_font_color           = "red";        // used for highlighting text 
(eg links, errors)
-$colour_key_font_color          = "#5B69A6";    // used in the colour key table
-
-$banner_back_color              = "#c0e0ff";    // background colour for banner
-$banner_border_color            = "#5B69A6";    // border colour for banner
-$banner_font_color              = $banner_border_color;       // font colour 
for banner
-
-$header_back_color              = "#999999";  // background colour for headers
-
-$admin_table_header_back_color  = $header_back_color;     // background colour 
for header and also border colour for table cells
-$admin_table_header_sep_color   = $body_background_color; // vertical 
separator colour in header
-$admin_table_header_font_color  = $header_font_color;     // font colour for 
header
-
-$main_table_border_color        = "#777777";                   // border 
colour for day/week/month tables - outside
-$main_table_header_border_color = $main_table_border_color;    // border 
colour for day/week/month tables - header
-$main_table_body_h_border_color = $main_table_border_color;    // border 
colour for day/week/month tables - body, horizontal
-$main_table_body_v_border_color = $main_table_body_h_border_color; // border 
colour for day/week/month tables - body, vertical
-$main_table_month_color         = "#ffffff";    // background colour for days 
in the month view
-$main_table_month_invalid_color = "#d1d9de";    // background colour for 
invalid days in the month view
-$main_table_labels_back_color   = "#fff0f0";    // background colour for the 
row labels column
-
-// border colours for the main table when it is printed.     These are used by 
mrbs-print.css.php
-$main_table_border_color_print        = "#777777";    // border colour for the 
main table (print view)
-$main_table_header_border_color_print = "#777777";    // border colour for 
day/week/month tables - header (print view)
-$main_table_body_h_border_color_print = "#777777";    // border colour for 
day/week/month tables - body, horizontal (print view)
-$main_table_body_v_border_color_print = "#777777";    // border colour for 
day/week/month tables - body, vertical (print view)
-
-$report_table_border_color      = $standard_font_color;
-$report_h2_border_color         = $banner_back_color;     // border colour for 
<h2> in report.php
-$report_h3_border_color         = "#879AA8";              // border colour for 
<h2> in report.php
-$report_entry_border_color      = "#C3CCD3";              // used to separate 
individual bookings in report.php
-
-$search_table_border_color      = $standard_font_color;
-
-$site_faq_entry_border_color    = $report_entry_border_color;    // used to 
separate individual FAQ's in help.php
-
-$trailer_border_color           = $main_table_border_color;
-
-$anchor_link_color              = "#5B69A6";          // link color
-$anchor_visited_color           = "#5B69A6";          // link color (visited)
-$anchor_hover_color             = "red";              // link color (hover)
-
-$anchor_link_color_banner       = $anchor_link_color;          // link color
-$anchor_visited_color_banner    = $anchor_visited_color;       // link color 
(visited)
-$anchor_hover_color_banner      = $anchor_hover_color;         // link color 
(hover)
-
-$anchor_link_color_header       = $anchor_link_color;          // link color
-$anchor_visited_color_header    = $anchor_visited_color;       // link color 
(visited)
-$anchor_hover_color_header      = $anchor_hover_color;         // link color 
(hover)
-
-$column_hidden_color            = $main_table_month_invalid_color;    // 
hidden days in the week and month views
-$calendar_hidden_color          = "#dae0e4";                          // 
hidden days in the mini-cals
-$row_even_color                 = "#ffffff";        // even rows in the day 
and week views
-$row_odd_color                  = "#eeeeee";        // even rows in the day 
and week views
-$row_highlight_color            = "#ffc0da";        // used for highlighting a 
row
-                                                    // NOTE: this colour is 
also used in xbLib.js (in more than one place)and 
-                                                    // if you change it here 
you will also need to change it there.
-
-$help_highlight_color           = "#ffe6f0";        // highlighting text on 
the help page
-
-$multiple_control_color         = "#ffff44";        // background colour for 
the multiple booking controls
-
-
-// These are the colours used for distinguishing between the dfferent types of 
bookings in the main
-// displays in the day, week and month views
-$color_types = array(
-    'A' => "#FFCCFF",
-    'B' => "#99CCCC",
-    'C' => "#FF9999",
-    'D' => "#FFFF99",
-    'E' => "#C0E0FF",
-    'F' => "#FFCC99",
-    'G' => "#FF6666",
-    'H' => "#66FFFF",
-    'I' => "#DDFFDD",
-    'J' => "#CCCCCC",
-    'PA' => "#D0A8D0", // PA-PJ are "Private" entry colors for A-J
-    'PB' => "#85b3b3",
-    'PC' => "#f08f8f",
-    'PD' => "#e6e38a",
-    'PE' => "#b2c8ed",
-    'PF' => "#e1ad7a",
-    'PG' => "#dc5959",
-    'PH' => "#50c6ce",
-    'PI' => "#aedeae",
-    'PJ' => "#959595"); 
-
-// ***** DIMENSIONS *******************
-$banner_border_width          = '1';  // (px)  border width for the outside of 
the banner
-$banner_border_cell_width     = '1';  // (px)  border width for the cells of 
the banner
-$main_table_border_width      = '1';  // (px)  the border width for the 
outside of the main day/week/month tables
-$main_table_cell_border_width = '1';  // (px)  the border width for the cells 
of the main day/week/month tables
-$main_cell_height             = '17'; // (px)  height of the cells in the main 
day/week tables
-    
-    
-// ***** FONTS ************************    
-$standard_font_family  = 'Arial, Verdana, sans-serif';
-
-?>

Added: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc                            (rev 0)
+++ mrbs/trunk/web/Themes/default/header.inc    2009-04-16 13:23:57 UTC (rev 
1092)
@@ -0,0 +1,290 @@
+<?php
+
+// $Id$
+
+// Print the page header
+function print_theme_header($day, $month, $year, $area, $room)
+{
+  global $mrbs_company, $mrbs_company_logo, $mrbs_company_url, 
$mrbs_company_more_info,
+    $search_str, $locale_warning, $unicode_encoding, $vocab;
+
+  // If we dont know the right date then make it up 
+  if (!$day)
+  {
+    $day   = date("d");
+  }
+  if (!$month)
+  {
+    $month = date("m");
+  }
+  if (!$year)
+  {
+    $year  = date("Y");
+  }
+  if (empty($search_str))
+  {
+    $search_str = "";
+  }
+  
+  if ($unicode_encoding)
+  {
+    header("Content-Type: text/html; charset=utf-8");
+  }
+  else
+  {
+    // We use $vocab directly instead of get_vocab() because we have
+    // no requirement to convert the vocab text, we just output
+    // the charset
+    header("Content-Type: text/html; charset=".$vocab["charset"]);
+  }
+
+  header("Pragma: no-cache");                          // HTTP 1.0
+  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd";>
+<html>
+  <head>
+<?php
+  require_once "style.inc";
+?>
+    <title><?php echo get_vocab("mrbs") ?></title>
+    <script type="text/javascript">
+
+//<![CDATA[
+
+/*   Script inspired by "True Date Selector"
+     Created by: Lee Hinder, [email protected] 
+     
+     Tested with Windows IE 6.0
+     Tested with Linux Opera 7.21, Mozilla 1.3, Konqueror 3.1.0
+     
+*/
+
+function daysInFebruary (year)
+{
+  // February has 28 days unless the year is divisible by four,
+  // and if it is the turn of the century then the century year
+  // must also be divisible by 400 when it has 29 days
+  return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 
29 : 28 );
+}
+
+//function for returning how many days there are in a month including leap 
years
+function DaysInMonth(WhichMonth, WhichYear)
+{
+  var DaysInMonth = 31;
+  if (WhichMonth == "4" || WhichMonth == "6" || WhichMonth == "9" || 
WhichMonth == "11")
+  {
+    DaysInMonth = 30;
+  }
+  if (WhichMonth == "2")
+  {
+    DaysInMonth = daysInFebruary( WhichYear );
+  }
+  return DaysInMonth;
+}
+
+//function to change the available days in a months
+function ChangeOptionDays(formObj, prefix)
+{
+  var DaysObject = eval("formObj." + prefix + "day");
+  var MonthObject = eval("formObj." + prefix + "month");
+  var YearObject = eval("formObj." + prefix + "year");
+
+  if (typeof DaysObject.selectedIndex == 'number' && DaysObject.options)
+  { // The DOM2 standard way
+    // alert("The DOM2 standard way");
+    var DaySelIdx = DaysObject.selectedIndex;
+    var Month = parseInt(MonthObject.options[MonthObject.selectedIndex].value);
+    var Year = parseInt(YearObject.options[YearObject.selectedIndex].value);
+  }
+  else if (DaysObject.selectedIndex && DaysObject[DaysObject.selectedIndex])
+  { // The legacy MRBS way
+    // alert("The legacy MRBS way");
+    var DaySelIdx = DaysObject.selectedIndex;
+    var Month = parseInt(MonthObject[MonthObject.selectedIndex].value);
+    var Year = parseInt(YearObject[YearObject.selectedIndex].value);
+  }
+  else if (DaysObject.value)
+  { // Opera 6 stores the selectedIndex in property 'value'.
+    // alert("The Opera 6 way");
+    var DaySelIdx = parseInt(DaysObject.value);
+    var Month = parseInt(MonthObject.options[MonthObject.value].value);
+    var Year = parseInt(YearObject.options[YearObject.value].value);
+  }
+
+  // alert("Day="+(DaySelIdx+1)+" Month="+Month+" Year="+Year);
+
+  var DaysForThisSelection = DaysInMonth(Month, Year);
+  var CurrentDaysInSelection = DaysObject.length;
+  if (CurrentDaysInSelection > DaysForThisSelection)
+  {
+    for (i=0; i<(CurrentDaysInSelection-DaysForThisSelection); i++)
+    {
+      DaysObject.options[DaysObject.options.length - 1] = null
+    }
+  }
+  if (DaysForThisSelection > CurrentDaysInSelection)
+  {
+    for (i=0; i<DaysForThisSelection; i++)
+    {
+      DaysObject.options[i] = new Option(eval(i + 1));
+    }
+  }
+  if (DaysObject.selectedIndex < 0)
+  {
+    DaysObject.selectedIndex = 0;
+  }
+  if (DaySelIdx >= DaysForThisSelection)
+  {
+    DaysObject.selectedIndex = DaysForThisSelection-1;
+  }
+  else
+  {
+    DaysObject.selectedIndex = DaySelIdx;
+  }
+}
+
+//]]>
+    </script>
+  </head>
+  <?php
+  // Put the filename in as a class to aid styling.   
+  // (Use a class rather than id to avoid specificity problems)
+  echo "<body class=\"" . basename($PHP_SELF,".php" ) . "\">\n";
+  ?>
+    <div class="screenonly">
+
+<?php // show a warning if this is using a low version of php
+  if (substr(phpversion(), 0, 1) == 3)
+  {
+    echo "<h1>" . get_vocab("not_php3") . "</h1>\n";
+  }
+  if (!empty($locale_warning))
+  {
+    echo "[Warning: ".$locale_warning."]";
+  }
+?>
+
+  <table id="banner">
+    <tr>
+      <td id="company">
+        <div>
+          <?php
+          echo "<div id=\"logo\">\n";
+          if (!empty($mrbs_company_url))
+          {
+            echo "<a href=\"$mrbs_company_url\">\n";
+          }
+          if (empty($mrbs_company_logo))
+          {
+            echo "<span>$mrbs_company</span>\n";
+          }
+          else
+          {
+            $logo_size = getimagesize($mrbs_company_logo);
+            echo "<img src=\"$mrbs_company_logo\" " . $logo_size[3] . " 
alt=\"logo\">\n";
+          }
+          if (!empty($mrbs_company_url))
+          {
+            echo "</a>\n";
+          }
+          echo "</div>\n";
+          if (!empty($mrbs_company_more_info))
+          {
+            echo "<div id=\"more_info\">$mrbs_company_more_info</div>\n";
+          }
+          ?>
+          <div id="mrbs">
+            <a href="index.php"><?php echo get_vocab("mrbs") ?></a>
+          </div>
+        </div>
+      </td>
+      <td>
+        <form action="day.php" method="get" id="Form1">
+          <div>
+            <?php
+            genDateSelector("", $day, $month, $year); // Note: The 1st arg 
must match the last arg in the call to ChangeOptionDays below.
+            if (!empty($area))
+            {
+              echo "<input type=\"hidden\" name=\"area\" value=\"$area\">\n";
+            }
+            if (!empty($room))
+            {
+              echo "<input type=\"hidden\" name=\"room\" value=\"$room\">\n";
+            }
+  
+            ?>
+            <script type="text/javascript">
+              //<![CDATA[
+              // fix number of days for the $month/$year that you start with
+              ChangeOptionDays(document.getElementById('Form1'), ''); // Note: 
The 2nd arg must match the first in the call to genDateSelector above.
+              //]]>
+            </script>
+            <input type="submit" value="<?php echo get_vocab("goto") ?>">
+          </div>
+        </form>
+      </td>
+      <?php
+      $query_str = "day=$day&amp;month=$month&amp;year=$year";
+      if (!empty($area))
+      {
+        $query_str .= "&amp;area=$area";
+      }
+      if (!empty($room))
+      {
+        $query_str .= "&amp;room=$room";
+      }
+      
+      echo "<td>\n";
+      echo "<a href=\"help.php?$query_str\">" . get_vocab("help") . "</a>\n";
+      echo "</td>\n";
+      
+      echo "<td>\n";
+      echo "<a href=\"admin.php?$query_str\">" . get_vocab("admin") . "</a>\n";
+      echo "</td>\n";
+      
+      echo "<td>\n";
+      echo "<a href=\"report.php?$query_str\">" . get_vocab("report") . 
"</a>\n";
+      echo "</td>\n";
+      ?>
+      
+      <td>
+        <form id="header_search" method="get" action="search.php">
+          <div>
+            <a href="search.php?advanced=1"><?php echo get_vocab("search") 
?>:</a>
+            <input type="text"   name="search_str" value="<?php echo 
$search_str ?>">
+            <input type="hidden" name="day"        value="<?php echo $day      
  ?>">
+            <input type="hidden" name="month"      value="<?php echo $month    
  ?>">
+            <input type="hidden" name="year"       value="<?php echo $year     
  ?>">
+            <?php
+            if (!empty($area))
+            {
+              echo "<input type=\"hidden\" name=\"area\" value=\"$area\">\n";
+            }
+            if (!empty($room))
+            {
+              echo "<input type=\"hidden\" name=\"room\" value=\"$room\">\n";
+            }
+            ?>
+          </div>
+        </form>
+      </td>
+      <?php
+      // For session protocols that define their own logon box...
+      if (function_exists('PrintLogonBox'))
+      {
+        echo "<td>\n";
+        echo "<div id=\"logon_box\">\n";
+        PrintLogonBox(); 
+        echo "</div>\n";
+        echo "</td>\n";
+      }
+      ?>
+    </tr>
+  </table>
+</div>
+<?php
+
+} // end of print_theme_header()
+?>


Property changes on: mrbs/trunk/web/Themes/default/header.inc
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Copied: mrbs/trunk/web/Themes/default/styling.inc (from rev 1091, 
mrbs/trunk/web/Themes/default.inc)
===================================================================
--- mrbs/trunk/web/Themes/default/styling.inc                           (rev 0)
+++ mrbs/trunk/web/Themes/default/styling.inc   2009-04-16 13:23:57 UTC (rev 
1092)
@@ -0,0 +1,111 @@
+<?php
+
+// $Id$
+
+// DEFAULT THEME
+
+// ***** COLOURS ************************
+// Colours used in MRBS.    All the colours are defined here as PHP variables
+
+$body_background_color          = "#e7ebee";    // background colour for the 
main body
+$standard_font_color            = "#0B263B";    // default font color
+$header_font_color              = "#ffffff";    // font color for text in 
headers
+$highlight_font_color           = "#ff0066";    // used for highlighting text 
(eg links, errors)
+$colour_key_font_color          = $standard_font_color;    // used in the 
colour key table
+
+$banner_back_color              = "#4b667b";    // background colour for banner
+$banner_border_color            = $body_background_color;    // border colour 
for banner
+$banner_font_color              = $header_font_color;       // font colour for 
banner
+
+$header_back_color              = $banner_back_color;  // background colour 
for headers
+
+$admin_table_header_back_color  = $header_back_color;     // background colour 
for header and also border colour for table cells
+$admin_table_header_sep_color   = $body_background_color; // vertical 
separator colour in header
+$admin_table_header_font_color  = $header_font_color;     // font colour for 
header
+
+$main_table_border_color        = $body_background_color; // border colour for 
day/week/month tables - outside
+$main_table_header_border_color = $body_background_color; // border colour for 
day/week/month tables - header
+$main_table_body_h_border_color = "#ffffff";              // border colour for 
day/week/month tables - body, horizontal
+$main_table_body_v_border_color = $body_background_color; // border colour for 
day/week/month tables - body, vertical
+$main_table_month_color         = "#ffffff";    // background colour for days 
in the month view
+$main_table_month_invalid_color = "#d1d9de";    // background colour for 
invalid days in the month view
+$main_table_labels_back_color   = $header_back_color;     // background colour 
for the row labels column
+
+// border colours for the main table when it is printed.     These are used by 
mrbs-print.css.php
+$main_table_border_color_print        = "#879AA8";    // border colour for the 
main table (print view)
+$main_table_header_border_color_print = "#879AA8";    // border colour for 
day/week/month tables - header (print view)
+$main_table_body_h_border_color_print = "#879AA8";    // border colour for 
day/week/month tables - body, horizontal (print view)
+$main_table_body_v_border_color_print = "#879AA8";    // border colour for 
day/week/month tables - body, vertical (print view)
+
+$report_table_border_color      = $standard_font_color;
+$report_h2_border_color         = $banner_back_color;     // border colour for 
<h2> in report.php
+$report_h3_border_color         = "#879AA8";              // border colour for 
<h2> in report.php
+$report_entry_border_color      = "#C3CCD3";              // used to separate 
individual bookings in report.php
+
+$search_table_border_color      = $standard_font_color;
+
+$site_faq_entry_border_color    = $report_entry_border_color;    // used to 
separate individual FAQ's in help.php
+
+$trailer_border_color           = $standard_font_color;
+
+$anchor_link_color              = $standard_font_color;        // link color
+$anchor_visited_color           = $anchor_link_color;          // link color 
(visited)
+$anchor_hover_color             = $highlight_font_color;       // link color 
(hover)
+
+$anchor_link_color_banner       = $header_font_color;          // link color
+$anchor_visited_color_banner    = $anchor_link_color_banner;   // link color 
(visited)
+$anchor_hover_color_banner      = $anchor_link_color_banner;   // link color 
(hover)
+
+$anchor_link_color_header       = $header_font_color;          // link color
+$anchor_visited_color_header    = $anchor_link_color_header;   // link color 
(visited)
+$anchor_hover_color_header      = $anchor_link_color_header;   // link color 
(hover)
+
+$column_hidden_color            = $main_table_month_invalid_color;    // 
hidden days in the week and month views
+$calendar_hidden_color          = "#dae0e4";                          // 
hidden days in the mini-cals
+$row_even_color                 = "#ffffff";        // even rows in the day 
and week views
+$row_odd_color                  = "#f2f4f6";        // even rows in the day 
and week views
+$row_highlight_color            = "#ffc0da";        // used for highlighting a 
row
+                                                    // NOTE: this colour is 
also used in xbLib.js (in more than one place)and 
+                                                    // if you change it here 
you will also need to change it there.
+
+$help_highlight_color           = "#ffe6f0";        // highlighting text on 
the help page
+
+$multiple_control_color         = "#ffff22";        // background colour for 
the multiple booking controls
+
+// These are the colours used for distinguishing between the dfferent types of 
bookings in the main
+// displays in the day, week and month views
+$color_types = array(
+    'A' => "#ffff99",
+    'B' => "#99cccc",
+    'C' => "#ffffcd",
+    'D' => "#cde6e6",
+    'E' => "#6dd9c4",
+    'F' => "#82adad",
+    'G' => "#ccffcc",
+    'H' => "#d9d982",
+    'I' => "#99cc66",
+    'J' => "#e6ffe6",
+    'PA' => "#D8D871", // PA-PJ are "Private" entry colors for A-J
+    'PB' => "#85b3b3",
+    'PC' => "#e9e9c0",
+    'PD' => "#b5c7c7",
+    'PE' => "#5db6a7",
+    'PF' => "#668484",
+    'PG' => "#aed8ae",
+    'PH' => "#bdbd71",
+    'PI' => "#99aa44",
+    'PJ' => "#c9dcc9"); 
+
+    
+// ***** DIMENSIONS *******************
+$banner_border_width          = '0';  // (px)  border width for the outside of 
the banner
+$banner_border_cell_width     = '1';  // (px)  border width for the cells of 
the banner
+$main_table_border_width      = '0';  // (px)  border width for the outside of 
the main day/week/month tables    
+$main_table_cell_border_width = '1';  // (px)  border width for the cells of 
the main day/week/month tables
+$main_cell_height             = '17'; // (px)  height of the cells in the main 
day/week tables
+         
+    
+// ***** FONTS ************************    
+$standard_font_family  = 'Arial, Verdana, sans-serif';
+
+?>


Property changes on: mrbs/trunk/web/Themes/default/styling.inc
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Deleted: mrbs/trunk/web/Themes/default.inc
===================================================================
--- mrbs/trunk/web/Themes/default.inc   2009-04-06 21:27:45 UTC (rev 1091)
+++ mrbs/trunk/web/Themes/default.inc   2009-04-16 13:23:57 UTC (rev 1092)
@@ -1,111 +0,0 @@
-<?php
-
-// $Id$
-
-// DEFAULT THEME
-
-// ***** COLOURS ************************
-// Colours used in MRBS.    All the colours are defined here as PHP variables
-
-$body_background_color          = "#e7ebee";    // background colour for the 
main body
-$standard_font_color            = "#0B263B";    // default font color
-$header_font_color              = "#ffffff";    // font color for text in 
headers
-$highlight_font_color           = "#ff0066";    // used for highlighting text 
(eg links, errors)
-$colour_key_font_color          = $standard_font_color;    // used in the 
colour key table
-
-$banner_back_color              = "#4b667b";    // background colour for banner
-$banner_border_color            = $body_background_color;    // border colour 
for banner
-$banner_font_color              = $header_font_color;       // font colour for 
banner
-
-$header_back_color              = $banner_back_color;  // background colour 
for headers
-
-$admin_table_header_back_color  = $header_back_color;     // background colour 
for header and also border colour for table cells
-$admin_table_header_sep_color   = $body_background_color; // vertical 
separator colour in header
-$admin_table_header_font_color  = $header_font_color;     // font colour for 
header
-
-$main_table_border_color        = $body_background_color; // border colour for 
day/week/month tables - outside
-$main_table_header_border_color = $body_background_color; // border colour for 
day/week/month tables - header
-$main_table_body_h_border_color = "#ffffff";              // border colour for 
day/week/month tables - body, horizontal
-$main_table_body_v_border_color = $body_background_color; // border colour for 
day/week/month tables - body, vertical
-$main_table_month_color         = "#ffffff";    // background colour for days 
in the month view
-$main_table_month_invalid_color = "#d1d9de";    // background colour for 
invalid days in the month view
-$main_table_labels_back_color   = $header_back_color;     // background colour 
for the row labels column
-
-// border colours for the main table when it is printed.     These are used by 
mrbs-print.css.php
-$main_table_border_color_print        = "#879AA8";    // border colour for the 
main table (print view)
-$main_table_header_border_color_print = "#879AA8";    // border colour for 
day/week/month tables - header (print view)
-$main_table_body_h_border_color_print = "#879AA8";    // border colour for 
day/week/month tables - body, horizontal (print view)
-$main_table_body_v_border_color_print = "#879AA8";    // border colour for 
day/week/month tables - body, vertical (print view)
-
-$report_table_border_color      = $standard_font_color;
-$report_h2_border_color         = $banner_back_color;     // border colour for 
<h2> in report.php
-$report_h3_border_color         = "#879AA8";              // border colour for 
<h2> in report.php
-$report_entry_border_color      = "#C3CCD3";              // used to separate 
individual bookings in report.php
-
-$search_table_border_color      = $standard_font_color;
-
-$site_faq_entry_border_color    = $report_entry_border_color;    // used to 
separate individual FAQ's in help.php
-
-$trailer_border_color           = $standard_font_color;
-
-$anchor_link_color              = $standard_font_color;        // link color
-$anchor_visited_color           = $anchor_link_color;          // link color 
(visited)
-$anchor_hover_color             = $highlight_font_color;       // link color 
(hover)
-
-$anchor_link_color_banner       = $header_font_color;          // link color
-$anchor_visited_color_banner    = $anchor_link_color_banner;   // link color 
(visited)
-$anchor_hover_color_banner      = $anchor_link_color_banner;   // link color 
(hover)
-
-$anchor_link_color_header       = $header_font_color;          // link color
-$anchor_visited_color_header    = $anchor_link_color_header;   // link color 
(visited)
-$anchor_hover_color_header      = $anchor_link_color_header;   // link color 
(hover)
-
-$column_hidden_color            = $main_table_month_invalid_color;    // 
hidden days in the week and month views
-$calendar_hidden_color          = "#dae0e4";                          // 
hidden days in the mini-cals
-$row_even_color                 = "#ffffff";        // even rows in the day 
and week views
-$row_odd_color                  = "#f2f4f6";        // even rows in the day 
and week views
-$row_highlight_color            = "#ffc0da";        // used for highlighting a 
row
-                                                    // NOTE: this colour is 
also used in xbLib.js (in more than one place)and 
-                                                    // if you change it here 
you will also need to change it there.
-
-$help_highlight_color           = "#ffe6f0";        // highlighting text on 
the help page
-
-$multiple_control_color         = "#ffff22";        // background colour for 
the multiple booking controls
-
-// These are the colours used for distinguishing between the dfferent types of 
bookings in the main
-// displays in the day, week and month views
-$color_types = array(
-    'A' => "#ffff99",
-    'B' => "#99cccc",
-    'C' => "#ffffcd",
-    'D' => "#cde6e6",
-    'E' => "#6dd9c4",
-    'F' => "#82adad",
-    'G' => "#ccffcc",
-    'H' => "#d9d982",
-    'I' => "#99cc66",
-    'J' => "#e6ffe6",
-    'PA' => "#D8D871", // PA-PJ are "Private" entry colors for A-J
-    'PB' => "#85b3b3",
-    'PC' => "#e9e9c0",
-    'PD' => "#b5c7c7",
-    'PE' => "#5db6a7",
-    'PF' => "#668484",
-    'PG' => "#aed8ae",
-    'PH' => "#bdbd71",
-    'PI' => "#99aa44",
-    'PJ' => "#c9dcc9"); 
-
-    
-// ***** DIMENSIONS *******************
-$banner_border_width          = '0';  // (px)  border width for the outside of 
the banner
-$banner_border_cell_width     = '1';  // (px)  border width for the cells of 
the banner
-$main_table_border_width      = '0';  // (px)  border width for the outside of 
the main day/week/month tables    
-$main_table_cell_border_width = '1';  // (px)  border width for the cells of 
the main day/week/month tables
-$main_cell_height             = '17'; // (px)  height of the cells in the main 
day/week tables
-         
-    
-// ***** FONTS ************************    
-$standard_font_family  = 'Arial, Verdana, sans-serif';
-
-?>

Modified: mrbs/trunk/web/config.inc.php
===================================================================
--- mrbs/trunk/web/config.inc.php       2009-04-06 21:27:45 UTC (rev 1091)
+++ mrbs/trunk/web/config.inc.php       2009-04-16 13:23:57 UTC (rev 1092)
@@ -75,12 +75,20 @@
  * Themes
  *******************/
 
-// Choose a theme for the MRBS styling. 
-  
-// The most commonly changed colours, dimensions and fonts have been extracted 
from the main CSS file and 
-// put into include files in the Themes directory.   If you want to change the 
colour scheme, you should
-// be able to do it by changing the values in the theme file.    More advanced 
styling changes can be made
-// by changing the rules in the CSS file.     
+// Choose a theme for the MRBS.   The theme controls two aspects of the look 
and feel:
+//   (a) the styling:  the most commonly changed colours, dimensions and fonts 
have been 
+//       extracted from the main CSS file and put into the styling.inc file in 
the appropriate
+//       directory in the Themes directory.   If you want to change the colour 
scheme, you should
+//       be able to do it by changing the values in the theme file.    More 
advanced styling changes
+//       can be made by changing the rules in the CSS file.
+//   (b) the header:  the header.inc file which contains the function used for 
producing the header.
+//       This enables organisations to plug in their own header functions 
quite easily, in cases where
+//       the desired corporate look and feel cannot be changed using the CSS 
alone and the mark-up
+//       itself needs to be changed.
+//
+//  MRBS will look for the files "styling.inc" and "header.inc" in the 
directory Themes/$theme and
+//  if it can't find them will use the files in Themes/default.    A theme 
directory can contain
+//  a replacement styling.inc file or a replacement header.inc file or both.
 
 // Available options are:
 

Modified: mrbs/trunk/web/day.php
===================================================================
--- mrbs/trunk/web/day.php      2009-04-06 21:27:45 UTC (rev 1091)
+++ mrbs/trunk/web/day.php      2009-04-16 13:23:57 UTC (rev 1092)
@@ -7,7 +7,7 @@
 require_once "dbsys.inc";
 require_once "mrbs_auth.inc";
 require_once "mincals.inc";
-require_once "Themes/$theme.inc";
+require_once "theme.inc";
 
 // Get form variables
 $day = get_form_var('day', 'int');

Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc        2009-04-06 21:27:45 UTC (rev 1091)
+++ mrbs/trunk/web/functions.inc        2009-04-16 13:23:57 UTC (rev 1092)
@@ -39,297 +39,27 @@
 // Print the page header
 function print_header($day, $month, $year, $area, $room)
 {
-  global $mrbs_company, $mrbs_company_logo, $mrbs_company_url, 
$mrbs_company_more_info,
-    $search_str, $locale_warning, $unicode_encoding, $vocab, $done_header;
-
+  global $theme, $done_header;
+  
   if ($done_header)
   {
     return;
   }
-
-  // If we dont know the right date then make it up 
-  if (!$day)
-  {
-    $day   = date("d");
-  }
-  if (!$month)
-  {
-    $month = date("m");
-  }
-  if (!$year)
-  {
-    $year  = date("Y");
-  }
-  if (empty($search_str))
-  {
-    $search_str = "";
-  }
   
-  if ($unicode_encoding)
+  // Load the print_theme_header function appropriate to the theme.    If there
+  // isn't one then fall back to the default header.
+  @include_once "Themes/$theme/header.inc";
+  if (!function_exists("print_theme_header"))
   {
-    header("Content-Type: text/html; charset=utf-8");
+    require_once "Themes/default/header.inc";
   }
-  else
-  {
-    // We use $vocab directly instead of get_vocab() because we have
-    // no requirement to convert the vocab text, we just output
-    // the charset
-    header("Content-Type: text/html; charset=".$vocab["charset"]);
-  }
-
-  header("Pragma: no-cache");                          // HTTP 1.0
-  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd";>
-<html>
-  <head>
-<?php
-  require_once "style.inc";
-?>
-    <title><?php echo get_vocab("mrbs") ?></title>
-    <script type="text/javascript">
-
-//<![CDATA[
-
-/*   Script inspired by "True Date Selector"
-     Created by: Lee Hinder, [email protected] 
-     
-     Tested with Windows IE 6.0
-     Tested with Linux Opera 7.21, Mozilla 1.3, Konqueror 3.1.0
-     
-*/
-
-function daysInFebruary (year)
-{
-  // February has 28 days unless the year is divisible by four,
-  // and if it is the turn of the century then the century year
-  // must also be divisible by 400 when it has 29 days
-  return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 
29 : 28 );
+  // Now go and do it
+  print_theme_header($day, $month, $year, $area, $room);
+  $done_header = TRUE;
 }
 
-//function for returning how many days there are in a month including leap 
years
-function DaysInMonth(WhichMonth, WhichYear)
-{
-  var DaysInMonth = 31;
-  if (WhichMonth == "4" || WhichMonth == "6" || WhichMonth == "9" || 
WhichMonth == "11")
-  {
-    DaysInMonth = 30;
-  }
-  if (WhichMonth == "2")
-  {
-    DaysInMonth = daysInFebruary( WhichYear );
-  }
-  return DaysInMonth;
-}
 
-//function to change the available days in a months
-function ChangeOptionDays(formObj, prefix)
-{
-  var DaysObject = eval("formObj." + prefix + "day");
-  var MonthObject = eval("formObj." + prefix + "month");
-  var YearObject = eval("formObj." + prefix + "year");
 
-  if (typeof DaysObject.selectedIndex == 'number' && DaysObject.options)
-  { // The DOM2 standard way
-    // alert("The DOM2 standard way");
-    var DaySelIdx = DaysObject.selectedIndex;
-    var Month = parseInt(MonthObject.options[MonthObject.selectedIndex].value);
-    var Year = parseInt(YearObject.options[YearObject.selectedIndex].value);
-  }
-  else if (DaysObject.selectedIndex && DaysObject[DaysObject.selectedIndex])
-  { // The legacy MRBS way
-    // alert("The legacy MRBS way");
-    var DaySelIdx = DaysObject.selectedIndex;
-    var Month = parseInt(MonthObject[MonthObject.selectedIndex].value);
-    var Year = parseInt(YearObject[YearObject.selectedIndex].value);
-  }
-  else if (DaysObject.value)
-  { // Opera 6 stores the selectedIndex in property 'value'.
-    // alert("The Opera 6 way");
-    var DaySelIdx = parseInt(DaysObject.value);
-    var Month = parseInt(MonthObject.options[MonthObject.value].value);
-    var Year = parseInt(YearObject.options[YearObject.value].value);
-  }
-
-  // alert("Day="+(DaySelIdx+1)+" Month="+Month+" Year="+Year);
-
-  var DaysForThisSelection = DaysInMonth(Month, Year);
-  var CurrentDaysInSelection = DaysObject.length;
-  if (CurrentDaysInSelection > DaysForThisSelection)
-  {
-    for (i=0; i<(CurrentDaysInSelection-DaysForThisSelection); i++)
-    {
-      DaysObject.options[DaysObject.options.length - 1] = null
-    }
-  }
-  if (DaysForThisSelection > CurrentDaysInSelection)
-  {
-    for (i=0; i<DaysForThisSelection; i++)
-    {
-      DaysObject.options[i] = new Option(eval(i + 1));
-    }
-  }
-  if (DaysObject.selectedIndex < 0)
-  {
-    DaysObject.selectedIndex = 0;
-  }
-  if (DaySelIdx >= DaysForThisSelection)
-  {
-    DaysObject.selectedIndex = DaysForThisSelection-1;
-  }
-  else
-  {
-    DaysObject.selectedIndex = DaySelIdx;
-  }
-}
-
-//]]>
-    </script>
-  </head>
-  <?php
-  // Put the filename in as a class to aid styling.   
-  // (Use a class rather than id to avoid specificity problems)
-  echo "<body class=\"" . basename($PHP_SELF,".php" ) . "\">\n";
-  ?>
-    <div class="screenonly">
-
-<?php // show a warning if this is using a low version of php
-  if (substr(phpversion(), 0, 1) == 3)
-  {
-    echo "<h1>" . get_vocab("not_php3") . "</h1>\n";
-  }
-  if (!empty($locale_warning))
-  {
-    echo "[Warning: ".$locale_warning."]";
-  }
-?>
-
-  <table id="banner">
-    <tr>
-      <td id="company">
-        <div>
-          <?php
-          echo "<div id=\"logo\">\n";
-          if (!empty($mrbs_company_url))
-          {
-            echo "<a href=\"$mrbs_company_url\">\n";
-          }
-          if (empty($mrbs_company_logo))
-          {
-            echo "<span>$mrbs_company</span>\n";
-          }
-          else
-          {
-            $logo_size = getimagesize($mrbs_company_logo);
-            echo "<img src=\"$mrbs_company_logo\" " . $logo_size[3] . " 
alt=\"logo\">\n";
-          }
-          if (!empty($mrbs_company_url))
-          {
-            echo "</a>\n";
-          }
-          echo "</div>\n";
-          if (!empty($mrbs_company_more_info))
-          {
-            echo "<div id=\"more_info\">$mrbs_company_more_info</div>\n";
-          }
-          ?>
-          <div id="mrbs">
-            <a href="index.php"><?php echo get_vocab("mrbs") ?></a>
-          </div>
-        </div>
-      </td>
-      <td>
-        <form action="day.php" method="get" id="Form1">
-          <div>
-            <?php
-            genDateSelector("", $day, $month, $year); // Note: The 1st arg 
must match the last arg in the call to ChangeOptionDays below.
-            if (!empty($area))
-            {
-              echo "<input type=\"hidden\" name=\"area\" value=\"$area\">\n";
-            }
-            if (!empty($room))
-            {
-              echo "<input type=\"hidden\" name=\"room\" value=\"$room\">\n";
-            }
-  
-            ?>
-            <script type="text/javascript">
-              //<![CDATA[
-              // fix number of days for the $month/$year that you start with
-              ChangeOptionDays(document.getElementById('Form1'), ''); // Note: 
The 2nd arg must match the first in the call to genDateSelector above.
-              //]]>
-            </script>
-            <input type="submit" value="<?php echo get_vocab("goto") ?>">
-          </div>
-        </form>
-      </td>
-      <?php
-      $query_str = "day=$day&amp;month=$month&amp;year=$year";
-      if (!empty($area))
-      {
-        $query_str .= "&amp;area=$area";
-      }
-      if (!empty($room))
-      {
-        $query_str .= "&amp;room=$room";
-      }
-      
-      echo "<td>\n";
-      echo "<a href=\"help.php?$query_str\">" . get_vocab("help") . "</a>\n";
-      echo "</td>\n";
-      
-      echo "<td>\n";
-      echo "<a href=\"admin.php?$query_str\">" . get_vocab("admin") . "</a>\n";
-      echo "</td>\n";
-      
-      echo "<td>\n";
-      echo "<a href=\"report.php?$query_str\">" . get_vocab("report") . 
"</a>\n";
-      echo "</td>\n";
-      ?>
-      
-      <td>
-        <form id="header_search" method="get" action="search.php">
-          <div>
-            <a href="search.php?advanced=1"><?php echo get_vocab("search") 
?>:</a>
-            <input type="text"   name="search_str" value="<?php echo 
$search_str ?>">
-            <input type="hidden" name="day"        value="<?php echo $day      
  ?>">
-            <input type="hidden" name="month"      value="<?php echo $month    
  ?>">
-            <input type="hidden" name="year"       value="<?php echo $year     
  ?>">
-            <?php
-            if (!empty($area))
-            {
-              echo "<input type=\"hidden\" name=\"area\" value=\"$area\">\n";
-            }
-            if (!empty($room))
-            {
-              echo "<input type=\"hidden\" name=\"room\" value=\"$room\">\n";
-            }
-            ?>
-          </div>
-        </form>
-      </td>
-      <?php
-      // For session protocols that define their own logon box...
-      if (function_exists('PrintLogonBox'))
-      {
-        echo "<td>\n";
-        echo "<div id=\"logon_box\">\n";
-        PrintLogonBox(); 
-        echo "</div>\n";
-        echo "</td>\n";
-      }
-      ?>
-    </tr>
-  </table>
-</div>
-<?php
-
-  $done_header = TRUE;
-
-} // end of print_header()
-
-
 // Print the standard footer, currently very simple.  Pass $and_exit as
 // TRUE to exit afterwards
 function print_footer($and_exit)

Modified: mrbs/trunk/web/mrbs-js-overrides.css.php
===================================================================
--- mrbs/trunk/web/mrbs-js-overrides.css.php    2009-04-06 21:27:45 UTC (rev 
1091)
+++ mrbs/trunk/web/mrbs-js-overrides.css.php    2009-04-16 13:23:57 UTC (rev 
1092)
@@ -1,6 +1,5 @@
 <?php 
-require_once "config.inc.php";
-require_once "Themes/$theme.inc";
+require_once "theme.inc";
 header("Content-type: text/css"); 
 
 // $Id$

Modified: mrbs/trunk/web/mrbs-print.css.php
===================================================================
--- mrbs/trunk/web/mrbs-print.css.php   2009-04-06 21:27:45 UTC (rev 1091)
+++ mrbs/trunk/web/mrbs-print.css.php   2009-04-16 13:23:57 UTC (rev 1092)
@@ -3,8 +3,7 @@
 // $Id$
 
 header("Content-type: text/css");
-require_once "config.inc.php";
-include "Themes/$theme.inc"; 
+require_once "theme.inc"; 
 
 ?>
 

Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2009-04-06 21:27:45 UTC (rev 1091)
+++ mrbs/trunk/web/mrbs.css.php 2009-04-16 13:23:57 UTC (rev 1092)
@@ -4,7 +4,7 @@
 
 header("Content-type: text/css"); 
 require_once "config.inc.php";
-require_once "Themes/$theme.inc";
+require_once "theme.inc";
 
 
 // ***** SETTINGS ***********************

Added: mrbs/trunk/web/theme.inc
===================================================================
--- mrbs/trunk/web/theme.inc                            (rev 0)
+++ mrbs/trunk/web/theme.inc    2009-04-16 13:23:57 UTC (rev 1092)
@@ -0,0 +1,12 @@
+<?php
+
+// $Id$
+
+// Gets the styling appropriate to the theme.     If there isn't a styling file
+// present for the theme then the default styling is used.
+
+require_once "config.inc.php";
+require_once "Themes/default/styling.inc";
+...@include_once "Themes/$theme/styling.inc";   // overwrite the default with 
the specified styling if it exists
+
+?>


Property changes on: mrbs/trunk/web/theme.inc
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Modified: mrbs/trunk/web/week.php
===================================================================
--- mrbs/trunk/web/week.php     2009-04-06 21:27:45 UTC (rev 1091)
+++ mrbs/trunk/web/week.php     2009-04-16 13:23:57 UTC (rev 1092)
@@ -9,7 +9,7 @@
 require_once "dbsys.inc";
 require_once "mrbs_auth.inc";
 require_once "mincals.inc";
-require_once "Themes/$theme.inc";
+require_once "theme.inc";
 
 // Get form variables
 $debug_flag = get_form_var('debug_flag', 'int');


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to