### Eclipse Workspace Patch 1.0
#P mrbs_head
Index: web/auth_nis.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_nis.inc,v
retrieving revision 1.8
diff -u -r1.8 auth_nis.inc
--- web/auth_nis.inc	29 Mar 2005 14:10:24 -0000	1.8
+++ web/auth_nis.inc	2 Aug 2008 12:36:05 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: auth_nis.inc,v 1.8 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: auth_nis.inc,v 1.5.2.2 2005/03/29 13:26:15 jberanek Exp $
  *
  * Authentication scheme that uses NIS as the source for user
  * authentication.
@@ -86,4 +86,4 @@
 	return 1;
 }
 
-?>
+?>
\ No newline at end of file
Index: web/escapeshellarg.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/escapeshellarg.inc,v
retrieving revision 1.2
diff -u -r1.2 escapeshellarg.inc
--- web/escapeshellarg.inc	17 Dec 2004 11:24:37 -0000	1.2
+++ web/escapeshellarg.inc	2 Aug 2008 12:36:05 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: escapeshellarg.inc,v 1.2 2004/12/17 11:24:37 jberanek Exp $
+/* $Id: escapeshellarg.inc,v 1.1 2002/10/08 13:19:21 jberanek Exp $
  *
  * Included if your PHP version is less than 4.0.3 and therefore this
  * function doesn't exist.
Index: web/view_entry.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/view_entry.php,v
retrieving revision 1.17
diff -u -r1.17 view_entry.php
--- web/view_entry.php	17 Dec 2004 11:24:37 -0000	1.17
+++ web/view_entry.php	2 Aug 2008 12:36:07 -0000
@@ -1,11 +1,9 @@
 <?php
-# $Id: view_entry.php,v 1.17 2004/12/17 11:24:37 jberanek Exp $
+# $Id: view_entry.php,v 1.16 2004/06/23 21:06:52 gwalker Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
-MDB::loadFile("Date"); 
 include "$dbsys.inc";
 
 #If we dont know the right date then make it up
@@ -29,68 +27,62 @@
 
 if( $series ){
 	$sql = "
-SELECT $tbl_repeat.name,
-       $tbl_repeat.description,
-       $tbl_repeat.create_by,
-       $tbl_room.room_name,
-       $tbl_area.area_name,
-       $tbl_repeat.type,
-       $tbl_repeat.room_id,
-       $tbl_repeat.timestamp,
-       ($tbl_repeat.end_time - $tbl_repeat.start_time),
-       $tbl_repeat.start_time,
-       $tbl_repeat.end_time,
-       $tbl_repeat.rep_type,
-       $tbl_repeat.end_date,
-       $tbl_repeat.rep_opt,
-       $tbl_repeat.rep_num_weeks
-
-FROM  $tbl_repeat, $tbl_room, $tbl_area
-WHERE $tbl_repeat.room_id = $tbl_room.id
-  AND $tbl_room.area_id = $tbl_area.id
-  AND $tbl_repeat.id=$id
-";
-	$types = array('text', 'text', 'text', 'text', 'text', 'text', 'integer',
-               'integer', 'timestamp', 'integer', 'integer', 'integer',
-               'integer', 'integer', 'text', 'integer');
-
+	SELECT $tbl_repeat.name,
+	       $tbl_repeat.description,
+	       $tbl_repeat.create_by,
+	       $tbl_room.room_name,
+	       $tbl_area.area_name,
+	       $tbl_repeat.type,
+	       $tbl_repeat.room_id,
+	       " . sql_syntax_timestamp_to_unix("$tbl_repeat.timestamp") . ",
+	       ($tbl_repeat.end_time - $tbl_repeat.start_time),
+	       $tbl_repeat.start_time,
+	       $tbl_repeat.end_time,
+	       $tbl_repeat.rep_type,
+	       $tbl_repeat.end_date,
+	       $tbl_repeat.rep_opt,
+	       $tbl_repeat.rep_num_weeks
+
+	FROM  $tbl_repeat, $tbl_room, $tbl_area
+	WHERE $tbl_repeat.room_id = $tbl_room.id
+		AND $tbl_room.area_id = $tbl_area.id
+		AND $tbl_repeat.id=$id
+	";
 }
 else {
 	$sql = "
-SELECT $tbl_entry.name,
-       $tbl_entry.description,
-       $tbl_entry.create_by,
-       $tbl_room.room_name,
-       $tbl_area.area_name,
-       $tbl_entry.type,
-       $tbl_entry.room_id,
-       $tbl_entry.timestamp,
-       ($tbl_entry.end_time - $tbl_entry.start_time),
-       $tbl_entry.start_time,
-       $tbl_entry.end_time,
-       $tbl_entry.repeat_id
-
-FROM  $tbl_entry, $tbl_room, $tbl_area
-WHERE $tbl_entry.room_id = $tbl_room.id
-  AND $tbl_room.area_id = $tbl_area.id
-  AND $tbl_entry.id=$id
-";
-	$types = array('text', 'text', 'text', 'text', 'text', 'text', 'integer',
-               'timestamp', 'integer', 'integer', 'integer',
-               'integer');
-
-}
-
-$row = $mdb->queryRow($sql, $types);
-if (MDB::isError($row))
-{
-    fatal_error(0, $row->getMessage() . "\n" . $row->getUserInfo() . "\n");
+	SELECT $tbl_entry.name,
+	       $tbl_entry.description,
+	       $tbl_entry.create_by,
+	       $tbl_room.room_name,
+	       $tbl_area.area_name,
+	       $tbl_entry.type,
+	       $tbl_entry.room_id,
+	       " . sql_syntax_timestamp_to_unix("$tbl_entry.timestamp") . ",
+	       ($tbl_entry.end_time - $tbl_entry.start_time),
+	       $tbl_entry.start_time,
+	       $tbl_entry.end_time,
+	       $tbl_entry.repeat_id
+
+	FROM  $tbl_entry, $tbl_room, $tbl_area
+	WHERE $tbl_entry.room_id = $tbl_room.id
+		AND $tbl_room.area_id = $tbl_area.id
+		AND $tbl_entry.id=$id
+	";
+}
+
+$res = sql_query($sql);
+if (! $res) fatal_error(0, sql_error());
+
+if(sql_count($res) < 1) {
+	fatal_error(
+		0,
+		($series ? get_vocab("invalid_series_id") : get_vocab("invalid_entry_id"))
+	);
 }
 
-if (NULL == $row) 
-{
-    fatal_error(0, ($series ? get_vocab('invalid_series_id') : get_vocab('invalid_entry_id')));
-}
+$row = sql_row($res, 0);
+sql_free($res);
 
 # Note: Removed stripslashes() calls from name and description. Previous
 # versions of MRBS mistakenly had the backslash-escapes in the actual database
@@ -103,8 +95,7 @@
 $area_name    = htmlspecialchars($row[4]);
 $type         = $row[5];
 $room_id      = $row[6];
-
-$updated      = time_date_string(MDB_Date::mdbstamp2Unix($row[7]));
+$updated      = time_date_string($row[7]);
 # need to make DST correct in opposite direction to entry creation
 # so that user see what he expects to see
 $duration     = $row[8] - cross_dst($row[9], $row[10]);
@@ -119,6 +110,7 @@
 else
         $end_date = time_date_string($row[10]);
 
+
 $rep_type = 0;
 
 if( $series == 1 ){
@@ -132,41 +124,30 @@
 	# edit_entry.php
 	# So I will look for the first entry in the series where the entry is
 	# as per the original series settings
-
-	$types = array('integer');
-	$sql = "
-SELECT id
-FROM $tbl_entry
-WHERE repeat_id=\"$id\"
-  AND entry_type=\"1\"
-";
-#  ORDER BY start_time";
-
-	$row = $mdb->queryRow($sql, $types);
-
-	if (MDB::isError($row))
-	{
-        	fatal_error(0, $row->getMessage() . "\n" . $row->getUserInfo() . "\n");
-	}
-
-	if (NULL <> $row)
-	{
+	$sql = "SELECT id
+	        FROM $tbl_entry
+		WHERE repeat_id=\"$id\" AND entry_type=\"1\"
+		ORDER BY start_time
+		LIMIT 1";
+	$res = sql_query($sql);
+	if (! $res) fatal_error(0, sql_error());
+	if(sql_count($res) < 1) {
 		# if all entries in series have been modified then
 		# as a fallback position just select the first entry
 		# in the series
 		# hopefully this code will never be reached as
 		# this page will display the start time of the series
 		# but edit_entry.php will display the start time of the entry
-		$types = array('integer');
-		$row = $mdb->queryRow("SELECT id
-FROM $tbl_entry
-WHERE repeat_id=\"$id\"
-ORDER BY start_time",$types);
-		if (MDB::isError($row))
-		{
-        		fatal_error(0, $row->getMessage() . "\n" . $row->getUserInfo() . "\n");
-		}
+		sql_free($res);
+		$sql = "SELECT id
+			FROM $tbl_entry
+			WHERE repeat_id=\"$id\"
+			ORDER BY start_time
+			LIMIT 1";
+		$res = sql_query($sql);
+		if (! $res) fatal_error(0, sql_error());
 	}
+	$row = sql_row($res, 0);
 	$id = $row[0];
 	sql_free($res);
 }
@@ -176,20 +157,20 @@
 
 	if($repeat_id != 0)
 	{
-		$types = array('integer', 'integer', 'text', 'integer');
-		$row = $mdb->queryRow("SELECT rep_type, end_date, rep_opt, rep_num_weeks
-FROM $tbl_repeat WHERE id=$repeat_id", $types);
-		if (MDB::isError($row))
-		{
-        		fatal_error(0, $row->getMessage() . "\n" . $row->getUserInfo() . "\n");
-		}
-		if (NULL <> $row)
+		$res = sql_query("SELECT rep_type, end_date, rep_opt, rep_num_weeks
+				FROM $tbl_repeat WHERE id=$repeat_id");
+		if (! $res) fatal_error(0, sql_error());
+
+		if (sql_count($res) == 1)
 		{
+			$row = sql_row($res, 0);
+
 			$rep_type     = $row[0];
 			$rep_end_date = utf8_strftime('%A %d %B %Y',$row[1]);
 			$rep_opt      = $row[2];
 			$rep_num_weeks = $row[3];
 		}
+		sql_free($res);
 	}
 }
 
Index: web/lang.ja
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.ja,v
retrieving revision 1.16
diff -u -r1.16 lang.ja
--- web/lang.ja	11 Apr 2005 13:47:15 -0000	1.16
+++ web/lang.ja	2 Aug 2008 12:36:05 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.ja,v 1.16 2005/04/11 13:47:15 jberanek Exp $
+# $Id: lang.ja,v 1.15.2.1 2005/04/11 13:40:40 jberanek Exp $
 
 # This file contains PHP code that specifies language specific strings
 # The default strings come from lang.en, and anything in a locale
Index: web/site_faq_fr.html
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/site_faq_fr.html,v
retrieving revision 1.3
diff -u -r1.3 site_faq_fr.html
--- web/site_faq_fr.html	17 Dec 2004 11:24:37 -0000	1.3
+++ web/site_faq_fr.html	2 Aug 2008 12:36:07 -0000
@@ -1,4 +1,4 @@
-<!-- $Id: site_faq_fr.html,v 1.3 2004/12/17 11:24:37 jberanek Exp $ -->
+<!-- $Id: site_faq_fr.html,v 1.2 2003/01/12 20:34:09 thierry_bo Exp $ -->
 <p>
 
 <b><a name=top>Authentification</a></b>
Index: web/lang.es
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.es,v
retrieving revision 1.19
diff -u -r1.19 lang.es
--- web/lang.es	24 Feb 2007 20:35:19 -0000	1.19
+++ web/lang.es	2 Aug 2008 12:36:05 -0000
@@ -1,5 +1,5 @@
-<?
-# $Id: lang.es,v 1.19 2007/02/24 20:35:19 jberanek Exp $
+<?php
+# $Id: lang.es,v 1.18.2.2 2007/02/13 12:53:29 jberanek Exp $
 
 # This file contains PHP code that specifies language specific strings
 # The default strings come from lang.en, and anything in a locale
Index: web/session_http.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/session_http.inc,v
retrieving revision 1.3
diff -u -r1.3 session_http.inc
--- web/session_http.inc	20 Aug 2005 19:03:31 -0000	1.3
+++ web/session_http.inc	2 Aug 2008 12:36:07 -0000
@@ -1,20 +1,20 @@
 <?php 
 /*****************************************************************************\
 *                                                                             *
-*   File name       session_http.inc                                          *
+*   File name       auth_http.inc                                             *
 *                                                                             *
-*   Description     Get user identity using HTTP basic authentication.        *
+*   Description     Get user identity using the HTTP basic authentication.    *
 *                                                                             *
 *   Notes           To use this session scheme, set in config.inc.php:        *
 *                       $auth["session"]  = "http";                           *
 *                                                                             *
-*  History                                                                    *
-*   2003/11/12 JFL Created this file                                          *
-*   Remaining history in ChangeLog and CVS logs                               *
+*   History                                                                   *
+*    2003/11/12 JFL Created this file                                         *
+*    Remaining history in ChangeLog and CVS logs                              *
 *                                                                             *
 \*****************************************************************************/
 
-// $Id: session_http.inc,v 1.3 2005/08/20 19:03:31 jberanek Exp $
+// $Id: session_http.inc,v 1.1.4.2 2005/08/20 18:49:50 jberanek Exp $
 
 /* authGet()
  * 
@@ -29,7 +29,6 @@
     Header("HTTP/1.0 401 Unauthorized");
 }
 
-// Private function
 function getAuthPassword()
 {
     global $PHP_AUTH_PW;
@@ -91,7 +90,7 @@
           "From_year=$year&To_day=1&To_month=12&To_year=2030&areamatch=&".
           "roommatch=&namematch=&descrmatch=&summarize=1&sortby=r&display=d&".
           "sumby=d&creatormatch=$user"; ?>
-			
+
     <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
       <A name="logonBox" href="<?php echo "$search_string\" title=\""
          . get_vocab('show_my_entries') . "\">" . get_vocab('you_are')." "
Index: web/session_remote_user.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/session_remote_user.inc,v
retrieving revision 1.2
diff -u -r1.2 session_remote_user.inc
--- web/session_remote_user.inc	26 Apr 2006 10:34:35 -0000	1.2
+++ web/session_remote_user.inc	2 Aug 2008 12:36:07 -0000
@@ -19,7 +19,7 @@
 *                                                                                            *
 \*********************************************************************************************/
 
-// $Id: session_remote_user.inc,v 1.2 2006/04/26 10:34:35 jberanek Exp $
+// $Id: session_remote_user.inc,v 1.1.2.1 2006/04/26 10:01:43 jberanek Exp $
 
 /* authGet()
  * 
Index: web/trailer.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/trailer.inc,v
retrieving revision 1.10
diff -u -r1.10 trailer.inc
--- web/trailer.inc	15 Jan 2004 21:01:10 -0000	1.10
+++ web/trailer.inc	2 Aug 2008 12:36:07 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: trailer.inc,v 1.10 2004/01/15 21:01:10 jflarvoire Exp $
+# $Id: trailer.inc,v 1.10.2.1 2006/10/09 15:54:00 jberanek Exp $
 
 if ( $pview != 1 ) {
 
@@ -29,7 +29,9 @@
 	$cmonth = date("m", $ctime);
 	$cday   = date("d", $ctime);
 	if ($i != -6) echo " | ";
+	if ($i == 0) echo '<b>[ ';
 	echo "<a href=\"day.php?year=$cyear&month=$cmonth&day=$cday$params\">$str</a>\n";
+	if ($i == 0) echo ']</b> ';
 }
 
 echo "<BR><B>".get_vocab("viewweek").":</B>\n";
@@ -49,8 +51,18 @@
 	$cmonth = date("m", $ctime);
 	$cyear  = date("Y", $ctime);
 	if ($i != -4) echo " | ";
-    ($view_week_number) ? $str = $cweek : $str = utf8_strftime(empty($dateformat)? "%b %d" : "%d %b", $ctime);
-    echo "<a href=\"week.php?year=$cyear&month=$cmonth&day=$cday$params\">$str</a>\n";
+
+	if ($view_week_number)
+	{
+		$str = $cweek;
+	}
+	else
+	{
+		$str = utf8_strftime(empty($dateformat)? "%b %d" : "%d %b", $ctime);
+	}
+	if ($i == 0) echo '<b>[ ';
+	echo "<a href=\"week.php?year=$cyear&month=$cmonth&day=$cday$params\">$str</a>\n";
+	if ($i == 0) echo ']</b> ';
 }
 
 echo "<BR><B>".get_vocab("viewmonth").":</B>\n";
@@ -62,7 +74,9 @@
 	$cmonth = date("m", $ctime);
 	$cyear  = date("Y", $ctime);
 	if ($i != -2) echo " | ";
+	if ($i == 0) echo '<b>[ ';
 	echo "<a href=\"month.php?year=$cyear&month=$cmonth$params\">$str</a>\n";
+	if ($i == 0) echo ']</b> ';
 }
 
 echo "<HR>";
Index: web/edit_entry_handler.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/edit_entry_handler.php,v
retrieving revision 1.26
diff -u -r1.26 edit_entry_handler.php
--- web/edit_entry_handler.php	28 Apr 2005 20:43:10 -0000	1.26
+++ web/edit_entry_handler.php	2 Aug 2008 12:36:05 -0000
@@ -1,11 +1,9 @@
 <?php
-// $Id: edit_entry_handler.php,v 1.26 2005/04/28 20:43:10 gwalker Exp $
+// $Id: edit_entry_handler.php,v 1.22.2.5 2007/02/13 12:53:27 jberanek Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
-MDB::loadFile("Date"); 
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 include "mrbs_sql.inc";
@@ -33,6 +31,21 @@
     exit;
 }
 
+if ($name == '')
+{
+     print_header($day, $month, $year, $area);
+     ?>
+       <H1><?php echo get_vocab('invalid_booking'); ?></H1>
+       <?php echo get_vocab('must_set_description'); ?>
+   </BODY>
+</HTML>
+<?php
+     exit;
+}       
+
+# Support locales where ',' is used as the decimal point
+$duration = preg_replace('/,/', '.', $duration);
+
 if( $enable_periods ) {
 	$resolution = 60;
 	$hour = 12;
@@ -140,18 +153,9 @@
 if (isset($id))
 {
     $ignore_id = $id;
-    $res = $mdb->query("SELECT  repeat_id 
-                        FROM    $tbl_entry 
-                        WHERE   id=$id", 'integer');
-    if ( (MDB::isError($res)) or (1 <> $mdb->numRows($res)) )
-    {
+    $repeat_id = sql_query1("SELECT repeat_id FROM $tbl_entry WHERE id=$id");
+    if ($repeat_id < 0)
         $repeat_id = 0;
-        $mdb->freeResult($res);
-    }
-    else
-    {
-        $repeat_id = $mdb->fetchOne($res);
-    }
 }
 else
     $ignore_id = 0;
@@ -216,11 +220,11 @@
                     // details
                     if (MAIL_DETAILS)
                     {
-                        $types = array('integer', 'text', 'integer', 'text');
                         $sql = "SELECT r.id, r.room_name, r.area_id, a.area_name ";
                         $sql .= "FROM $tbl_room r, $tbl_area a ";
                         $sql .= "WHERE r.id=$room_id AND r.area_id = a.id";
-                        $row = $mdb->queryRow($sql, $types);
+                        $res = sql_query($sql);
+                        $row = sql_row($res, 0);
                         $room_name = $row[1];
                         $area_name = $row[3];
                     }
@@ -260,17 +264,17 @@
                     // details.
                     if (MAIL_DETAILS)
                     {
-                        $types = array('integer', 'text', 'integer', 'text');
                         $sql = "SELECT r.id, r.room_name, r.area_id, a.area_name ";
                         $sql .= "FROM $tbl_room r, $tbl_area a ";
                         $sql .= "WHERE r.id=$room_id AND r.area_id = a.id";
-                        $row = $mdb->queryRow($sql, $types);
+                        $res = sql_query($sql);
+                        $row = sql_row($res, 0);
                         $room_name = $row[1];
                         $area_name = $row[3];
                     }
                     // If this is a modified entry then call
                     // getPreviousEntryData to prepare entry comparison.
-                    if ( isset($id) )
+                   if ( isset($id) )
                     {
                         $mail_previous = getPreviousEntryData($id, 0);
                     }
@@ -315,5 +319,4 @@
 
 echo "<a href=\"$returl\">".get_vocab("returncal")."</a><p>";
 
-include "trailer.inc";
-?>
+include "trailer.inc"; ?>
\ No newline at end of file
Index: web/auth_imap.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_imap.inc,v
retrieving revision 1.8
diff -u -r1.8 auth_imap.inc
--- web/auth_imap.inc	29 Mar 2005 14:10:24 -0000	1.8
+++ web/auth_imap.inc	2 Aug 2008 12:36:04 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: auth_imap.inc,v 1.8 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: auth_imap.inc,v 1.6.2.3 2006/10/09 15:53:59 jberanek Exp $
  *
  * Authentication scheme that uses IMAP as the source for user
  * authentication.
@@ -100,17 +100,19 @@
 
 		// Connect to IMAP-server
 		$stream = fsockopen( $host, $all_imap_ports[$idx], $error_number, $error_string, 15 );
-		$response = fgets( $stream, 1024 );
 		if( $stream ) {
+			$response = fgets( $stream, 1024 );
 			$logon_str = "a001 LOGIN \"" . quoteIMAP( $user ) . "\" \"" . quoteIMAP( $pass ) . "\"\r\n";
 			fputs( $stream, $logon_str );
 			$response = fgets( $stream, 1024 );
 			if( substr( $response, 5, 2 ) == 'OK' ) {
-				fputs( $stream, "a001 LOGOUT\r\n" );
+				fputs( $stream, "a002 LOGOUT\r\n" );
 				$response = fgets( $stream, 1024 );
+				fclose( $stream );
 				return 1;
 			}
-			fputs( $stream, "a001 LOGOUT\r\n" );
+			fputs( $stream, "a002 LOGOUT\r\n" );
+			fclose( $stream );
 		}
 	}
 
Index: web/mrbs_sql.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/mrbs_sql.inc,v
retrieving revision 1.21
diff -u -r1.21 mrbs_sql.inc
--- web/mrbs_sql.inc	26 Jan 2006 13:51:45 -0000	1.21
+++ web/mrbs_sql.inc	2 Aug 2008 12:36:07 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: mrbs_sql.inc,v 1.21 2006/01/26 13:51:45 jberanek Exp $
+// $Id: mrbs_sql.inc,v 1.18.2.3 2006/01/26 11:34:02 jberanek Exp $
 
 /** mrbsCheckFree()
  * 
@@ -20,14 +20,11 @@
 	global $tbl_entry;
 	global $enable_periods;
     global $periods;
-    global $mdb;
 
     # Select any meetings which overlap ($starttime,$endtime) for this room:
-    $sql = "SELECT  id, name, start_time
-            FROM    $tbl_entry 
-            WHERE   start_time < $endtime 
-            AND     end_time > $starttime
-            AND     room_id = $room_id";
+	$sql = "SELECT id, name, start_time FROM $tbl_entry WHERE
+		start_time < $endtime AND end_time > $starttime
+		AND room_id = $room_id";
 
 	if ($ignore > 0)
 		$sql .= " AND id <> $ignore";
@@ -35,23 +32,20 @@
 		$sql .= " AND repeat_id <> $repignore";
 	$sql .= " ORDER BY start_time";
 
-    $types = array('integer', 'text', 'integer');
-    $res = $mdb->query($sql, $types);
-    if (MDB::isError($res))
-    {
-        return $res->getMessage() . "<br>" . $res->getUserInfo();
-    }
-    if (!$row = $mdb->fetchInto($res))
-    {
-        $mdb->freeResult($res);
-        return "";
-    }
+	$res = sql_query($sql);
+	if(! $res)
+		return sql_error();
+	if (sql_count($res) == 0)
+	{
+		sql_free($res);
+		return "";
+	}
 	# Get the room's area ID for linking to day, week, and month views:
 	$area = mrbsGetRoomArea($room_id);
-
+	
 	# Build a string listing all the conflicts:
 	$err = "";
-    do
+	for ($i = 0; ($row = sql_row($res, $i)); $i++)
 	{
 		$starts = getdate($row[2]);
 		$param_ym = "area=$area&year=$starts[year]&month=$starts[mon]";
@@ -71,9 +65,7 @@
 		. " | <A HREF=\"week.php?room=$room_id&$param_ymd\">".get_vocab("viewweek")."</a>"
 		. " | <A HREF=\"month.php?room=$room_id&$param_ym\">".get_vocab("viewmonth")."</a>)";
 	}
-    while ($row = $mdb->fetchInto($res));
-
-    $mdb->freeResult($res);
+	
 	return $err;
 }
 
@@ -94,67 +86,38 @@
 {
 	global $tbl_entry, $tbl_repeat;
 
-    global $mdb;
-    $repeat_id = $mdb->queryOne("SELECT repeat_id 
-                                 FROM   $tbl_entry 
-                                 WHERE  id=$id", 'integer');
-    if (MDB::isError($repeat_id) or (NULL === $repeat_id))
-    {
-        return 0;
-    }
-
-    $sql = "SELECT  create_by, id, entry_type 
-            FROM    $tbl_entry 
-            WHERE ";
-
+	$repeat_id = sql_query1("SELECT repeat_id FROM $tbl_entry WHERE id=$id");
+	if ($repeat_id < 0)
+		return 0;
+	
+	$sql = "SELECT create_by, id, entry_type FROM $tbl_entry WHERE ";
+	
 	if($series)
 		$sql .= "repeat_id=$repeat_id";
 	else
 		$sql .= "id=$id";
 	
-    $types = array('text', 'integer', 'integer');
-    $res = $mdb->query($sql, $types);
+	$res = sql_query($sql);
 	
 	$removed = 0;
 	
-    $query = "DELETE 
-              FROM      $tbl_entry 
-              WHERE     id=?";
-    $prepared_query = $mdb->prepareQuery($query);
-    if (!MDB::isError($prepared_query))
-    {
-        while ($row = $mdb->fetchInto($res))
-        {
-            if (!getWritable($row[0], $user))
-            {
-                continue;
-            }
-
-            if ($series && $row[2] == 2 && !$all)
-            {
-                continue;
-            }
-
-            $mdb->setParamInteger($prepared_query, 1, $row[1]);
-            if ($mdb->affectedRows($mdb->executeQuery($prepared_query)) > 0)
-            {
-                $removed++;
-            }
-        }
-    }
-    $mdb->freePreparedQuery($prepared_query);
-
-    if ($repeat_id > 0 &&
-        0 == $mdb->queryOne("SELECT count(*) 
-                             FROM   $tbl_entry 
-                             WHERE  repeat_id=$repeat_id", 'integer'))
-    {
-        $mdb->query("DELETE 
-                     FROM   $tbl_repeat 
-                     WHERE  id=$repeat_id");
-    }
-
-    return $removed > 0;
+	for ($i = 0; ($row = sql_row($res, $i)); $i++)
+	{
+		if(!getWritable($row[0], $user))
+			continue;
+		
+		if($series && $row[2] == 2 && !$all)
+			continue;
+		
+		if (sql_command("DELETE FROM $tbl_entry WHERE id=" . $row[1]) > 0)
+			$removed++;
+	}
+	
+	if ($repeat_id > 0 &&
+            sql_query1("SELECT count(*) FROM $tbl_entry WHERE repeat_id=$repeat_id") == 0)
+		sql_command("DELETE FROM $tbl_repeat WHERE id=$repeat_id");
+	
+	return $removed > 0;
 }
 
 /** mrbsCreateSingleEntry()
@@ -180,32 +143,21 @@
 {
 	global $tbl_entry;
 
-    global $mdb;
-    $name        = unslashes($name);
-    $description = unslashes($description);
+	$name        = slashes($name);
+	$description = slashes($description);
 	
 	# make sure that any entry is of a positive duration
 	# this is to trap potential negative duration created when DST comes
 	# into effect
 	if( $endtime > $starttime )
-    $id = $mdb->nextId("${tbl_entry}_id");
-    $sql = "INSERT INTO $tbl_entry ( id, start_time, end_time, entry_type,
-                                    repeat_id, room_id, timestamp, create_by,
-                                    name, type, description)
-            VALUES      ($id, $starttime, $endtime, $entry_type, $repeat_id,
-                        $room_id, " . $mdb->getTimestampValue(MDB_Date::mdbNow())
-                        . ", " . $mdb->getTextValue($owner) . ", " .
-                        $mdb->getTextValue($name) . ", " .
-                        $mdb->getTextValue($type) . ", " .
-                        $mdb->getTextValue($description) . ")";
-
-    $res = $mdb->query($sql);
-    if (MDB::isError($res))
-    {
-        return 0;
-    }
-
-    return $mdb->currId("${tbl_entry}_id");
+	$sql = "INSERT INTO $tbl_entry (  start_time,   end_time,   entry_type,    repeat_id,   room_id,
+	                                  create_by,    name,       type,          description)
+	                        VALUES ($starttime, $endtime, $entry_type, $repeat_id, $room_id,
+	                                '$owner',     '$name',    '$type',       '$description')";
+	
+	if (sql_command($sql) < 0) return 0;
+	
+	return sql_insert_id("$tbl_entry", "id");
 }
 
 /** mrbsCreateRepeatEntry()
@@ -230,40 +182,41 @@
 function mrbsCreateRepeatEntry($starttime, $endtime, $rep_type, $rep_enddate, $rep_opt,
                                $room_id, $owner, $name, $type, $description, $rep_num_weeks)
 {
-    global $tbl_repeat;
+	global $tbl_repeat;
 
-    global $mdb;
-    $name        = unslashes($name);
-    $description = unslashes($description);
-
-    $id = $mdb->nextId("${tbl_repeat}_id");
-
-    if ($rep_num_weeks == "")
-    {
-      $rep_num_weeks = "0";
-    }
-
-    /* Strangely with Mysql $rep_num_weeks (int) need to be quoted ONLY if there
-     * is no default value. Hope this will no break with other DBMS. */
-    $sql = "INSERT INTO $tbl_repeat (id, start_time, end_time, rep_type,
-                                    end_date, rep_opt, room_id, timestamp, 
-                                    create_by, type, name, description, 
-                                    rep_num_weeks)
-            VALUES      ($id, $starttime, $endtime, $rep_type, $rep_enddate, " .
-                        $mdb->getTextValue($rep_opt) . ", $room_id, " .
-                        $mdb->getTimestampValue(MDB_Date::mdbNow()) . ", " .
-                        $mdb->getTextValue($owner) . ", " . 
-                        $mdb->getTextValue($type) . ", " . 
-                        $mdb->getTextValue($name) . ", " .
-                        $mdb->getTextValue($description) . ", $rep_num_weeks)";
-
-    $res = $mdb->query($sql);
-    if (MDB::isError($res)) 
-    {
-        fatal_error(0, $res->getMessage() . "<br>" . $res->getUserInfo());
-    }
+	$name        = slashes($name);
+	$description = slashes($description);
+	
+	// Let's construct the sql statement:
+	$sql_coln = array(); $sql_val = array();
 
-    return $mdb->currId("${tbl_repeat}_id");
+        // Mandatory things:
+	$sql_coln[] = 'start_time'; 	$sql_val[] = $starttime;
+	$sql_coln[] = 'end_time'; 	$sql_val[] = $endtime;
+	$sql_coln[] = 'rep_type'; 	$sql_val[] = $rep_type;
+	$sql_coln[] = 'end_date';	$sql_val[] = $rep_enddate;
+	$sql_coln[] = 'room_id';	$sql_val[] = $room_id;
+	$sql_coln[] = 'create_by';	$sql_val[] = '\''.$owner.'\'';
+	$sql_coln[] = 'type';		$sql_val[] = '\''.$type.'\'';
+	$sql_coln[] = 'name';		$sql_val[] = '\''.$name.'\'';
+
+	// Optional things, pgsql doesn't like empty strings!
+	if (!empty($rep_opt))
+		{$sql_coln[] = 'rep_opt';	$sql_val[] = '\''.$rep_opt.'\'';}
+	else
+		{$sql_coln[] = 'rep_opt';	$sql_val[] = '\'0\'';}
+	if (!empty($description))
+		{$sql_coln[] = 'description';	$sql_val[] = '\''.$description.'\'';}
+	if (!empty($rep_num_weeks))
+		{$sql_coln[] = 'rep_num_weeks';	$sql_val[] = $rep_num_weeks;}
+
+	$sql = 'INSERT INTO ' . $tbl_repeat .
+	       ' (' . implode(', ',$sql_coln) . ') '.
+	       'VALUES (' . implode(', ',$sql_val) . ')';
+
+	if (sql_command($sql) < 0) return 0;
+	
+	return sql_insert_id("$tbl_repeat", "id");
 }
 
 /** same_day_next_month()
@@ -441,7 +394,7 @@
 	$reps = mrbsGetRepeatEntryList($starttime, $rep_enddate, $rep_type, $rep_opt, $max_rep_entrys, $rep_num_weeks);
 	if(count($reps) > $max_rep_entrys)
 		return 0;
-
+	
 	if(empty($reps))
 	{
 		$ent = mrbsCreateSingleEntry($starttime, $endtime, 0, 0, $room_id, $owner, $name, $type, $description);
@@ -451,6 +404,7 @@
 	$ent = mrbsCreateRepeatEntry($starttime, $endtime, $rep_type, $rep_enddate, $rep_opt, $room_id, $owner, $name, $type, $description, $rep_num_weeks);
 	if($ent)
 	{
+	
 		for($i = 0; $i < count($reps); $i++)
 		{
 			# calculate diff each time and correct where events
@@ -479,52 +433,41 @@
 {
 	global $tbl_entry;
 
-    global $mdb;
-    $sql = "SELECT  start_time, end_time, entry_type, repeat_id, room_id,
-                    timestamp, create_by, name, type, description
-            FROM    $tbl_entry 
-            WHERE   (id = $id)";
-
-    $types = array ('integer', 'integer', 'integer', 'integer', 'integer',
-                    'timestamp', 'text', 'text', 'text', 'text');
-    $res = $mdb->query($sql, $types);
-    if (MDB::isError($res)) 
-    {
-        return;
-    }
-
-    $ret = "";
-    while ($row = $mdb->fetchInto($res))
-    {
-        $ret["start_time"]  = $row[0];
-        $ret["end_time"]    = $row[1];
-        $ret["entry_type"]  = $row[2];
-        $ret["repeat_id"]   = $row[3];
-        $ret["room_id"]     = $row[4];
-        $ret["timestamp"]   = $row[5];
-        $ret["create_by"]   = $row[6];
-        $ret["name"]        = $row[7];
-        $ret["type"]        = $row[8];
-        $ret["description"] = $row[9];
-    }
-    $mdb->freeResult($res);
-    
-    return $ret;
+	$sql = "SELECT start_time, end_time, entry_type, repeat_id, room_id,
+	               timestamp, create_by, name, type, description
+                FROM $tbl_entry WHERE (ID = $id)";
+	
+	$res = sql_query($sql);
+	if (! $res) return;
+	
+	$ret = "";
+	if(sql_count($res) > 0)
+	{
+		$row = sql_row($res, 0);
+		
+		$ret["start_time"]  = $row[0];
+		$ret["end_time"]    = $row[1];
+		$ret["entry_type"]  = $row[2];
+		$ret["repeat_id"]   = $row[3];
+		$ret["room_id"]     = $row[4];
+		$ret["timestamp"]   = $row[5];
+		$ret["create_by"]   = $row[6];
+		$ret["name"]        = $row[7];
+		$ret["type"]        = $row[8];
+		$ret["description"] = $row[9];
+	}
+	sql_free($res);
+	
+	return $ret;
 }
 
 function mrbsGetRoomArea($id)
 {
 	global $tbl_room;
 
-    global $mdb;
-    $id = $mdb->queryOne("SELECT    area_id 
-                          FROM      $tbl_room 
-                          WHERE     (id = $id)", 'integer');
-    if ((MDB::isError($id)) or (NULL === $id)) 
-    {
-        return 0;
-    }
-    return $id;
+	$id = sql_query1("SELECT area_id FROM $tbl_room WHERE (id = $id)");
+	if ($id <= 0) return 0;
+	return $id;
 }
 
-?>
+?>
\ No newline at end of file
Index: web/help.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/help.php,v
retrieving revision 1.13
diff -u -r1.13 help.php
--- web/help.php	17 Dec 2004 11:24:37 -0000	1.13
+++ web/help.php	2 Aug 2008 12:36:05 -0000
@@ -1,12 +1,12 @@
 <?php
 
-# $Id: help.php,v 1.13 2004/12/17 11:24:37 jberanek Exp $
+# $Id: help.php,v 1.12.2.1 2007/01/24 10:40:16 jberanek Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
-require_once("database.inc.php");  
 include "$dbsys.inc";
 include "functions.inc";
+include "version.inc";
 
 #If we dont know the right date then make it up
 if(!isset($day) or !isset($month) or !isset($year))
@@ -21,7 +21,7 @@
 print_header($day, $month, $year, $area);
 
 echo "<H3>" . get_vocab("about_mrbs") . "</H3>\n";
-echo "<P><a href=\"http://mrbs.sourceforge.net\">".get_vocab("mrbs")."</a> - $mrbs_version\n";
+echo "<P><a href=\"http://mrbs.sourceforge.net\">".get_vocab("mrbs")."</a> - ".get_mrbs_version()."\n";
 echo "<BR>" . get_vocab("database") . sql_version() . "\n";
 echo "<BR>" . get_vocab("system") . php_uname() . "\n";
 echo "<BR>PHP: " . phpversion() . "\n";
Index: web/edit_entry.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/edit_entry.php,v
retrieving revision 1.36
diff -u -r1.36 edit_entry.php
--- web/edit_entry.php	29 Mar 2005 14:10:24 -0000	1.36
+++ web/edit_entry.php	2 Aug 2008 12:36:05 -0000
@@ -1,18 +1,14 @@
 <?php
-# $Id: edit_entry.php,v 1.36 2005/03/29 14:10:24 jberanek Exp $
+# $Id: edit_entry.php,v 1.30.2.4 2007/02/13 12:53:24 jberanek Exp $
 
 require_once('grab_globals.inc.php');
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 
 global $twentyfourhour_format;
 
-$edit_series = true;
-$room_order = "room_name";
-
 #If we dont know the right date then make it up
 if(!isset($day) or !isset($month) or !isset($year))
 {
@@ -46,22 +42,15 @@
 # If we had $id passed in then it's a modification.
 if (isset($id))
 {
-    $sql = "SELECT  name, create_by, description, start_time, end_time,
-                    type, room_id, entry_type, repeat_id
-            FROM    $tbl_entry
-            WHERE   id=$id";
-
-    $types = array('text', 'text', 'text', 'integer', 'integer', 'text',
-                   'integer', 'integer', 'integer');
-    $row = $mdb->queryRow($sql, $types);
-    if (MDB::isError($row))
-    {
-        fatal_error(1, $row->getMessage() . "<BR>" . $row->getUserInfo() . "<BR>");
-    }
-    if (NULL == $row)
-    {
-        fatal_error(1, get_vocab("entryid") . get_vocab("not_found"));
-    }
+	$sql = "select name, create_by, description, start_time, end_time,
+	        type, room_id, entry_type, repeat_id from $tbl_entry where id=$id";
+	
+	$res = sql_query($sql);
+	if (! $res) fatal_error(1, sql_error());
+	if (sql_count($res) != 1) fatal_error(1, get_vocab("entryid") . $id . get_vocab("not_found"));
+	
+	$row = sql_row($res, 0);
+	sql_free($res);
 # Note: Removed stripslashes() calls from name and description. Previous
 # versions of MRBS mistakenly had the backslash-escapes in the actual database
 # records because of an extra addslashes going on. Fix your database and
@@ -82,21 +71,16 @@
 	
 	if($entry_type >= 1)
 	{
-        $sql = "SELECT  rep_type, start_time, end_date, rep_opt, rep_num_weeks
-                FROM    $tbl_repeat 
-                WHERE   id=$rep_id";
-
-        $types = array('integer', 'integer', 'integer', 'text', 'integer');
-        $row = $mdb->queryRow($sql, $types);
-        if (MDB::isError($row))
-        {
-            fatal_error(1, $row->getMessage() . "<BR>" . $row->getUserInfo() . "<BR>");
-        }
-        if (NULL == $row)
-        {
-            fatal_error(1, get_vocab("repeat_id") . $rep_id . get_vocab("not_found"));
-        }
-
+		$sql = "SELECT rep_type, start_time, end_date, rep_opt, rep_num_weeks
+		        FROM $tbl_repeat WHERE id=$rep_id";
+		
+		$res = sql_query($sql);
+		if (! $res) fatal_error(1, sql_error());
+		if (sql_count($res) != 1) fatal_error(1, get_vocab("repeat_id") . $rep_id . get_vocab("not_found"));
+		
+		$row = sql_row($res, 0);
+		sql_free($res);
+		
 		$rep_type = $row[0];
 
 		if($edit_type == "series")
@@ -144,7 +128,7 @@
 {
 	# It is a new booking. The data comes from whichever button the user clicked
 	$edit_type   = "series";
-	$name        = getUserName();
+	$name        = "";
 	$create_by   = getUserName();
 	$description = "";
 	$start_day   = $day;
@@ -153,32 +137,7 @@
     // Avoid notices for $hour and $minute if periods is enabled
     (isset($hour)) ? $start_hour = $hour : '';
 	(isset($minute)) ? $start_min = $minute : '';
-	if (isset($nperiods))
-		{
-		if ($enable_periods)
-			$duration    = 60 * $nperiods;
-		else
-			$duration    = $nperiods * $resolution;
-		if (isset($shape)) switch ($shape)
-			{
-			case 1: // Rectangle.
-				break;
-			case 2: // Vertical chain.
-				$duration += (24 * ($nrooms-1) * ($enable_periods ? 60 : 60 * 60));
-				$nrooms = 1;
-				break;
-			case 3: // Horizontal chain.
-				$nrooms = 1;
-				break;
-			default:
-				$nrooms = 1;
-				break;
-			}
-		}
-	else
-		{
 	$duration    = ($enable_periods ? 60 : 60 * 60);
-		}
 	$type        = "I";
 	$room_id     = $room;
     unset($id);
@@ -197,9 +156,11 @@
 # If we have not been provided with a room_id
 if( empty( $room_id ) )
 {
-	$sql = "SELECT id 
-			FROM $tbl_room";
-	$room_id = $mdb->getOne($sql, 'integer');
+	$sql = "select id from $tbl_room limit 1";
+	$res = sql_query($sql);
+	$row = sql_row($res, 0);
+	$room_id = $row[0];
+
 }
 
 # If we have not been provided with starting time
@@ -291,75 +252,20 @@
 
   return true;
 }
-function findOptionIndex(select, val)
-{
-  for (i=0; i<select.length; i++) {
-    if (select.options[i].value == val) return i;
-  }
-  return -1;
-}
 function OnAllDayClick(allday) // Executed when the user clicks on the all_day checkbox.
 {
   form = document.forms["main"];
-  if (form.ampm && !form.ampm.item) form.ampm.item = function(i) {return form.ampm[i]}; // Make IE6 DOM compatible.
-  if (allday.checked) { // If checking the box...
-    form.duration.oldValue = form.duration.value;
-    form.dur_units.oldSelectedIndex = form.dur_units.selectedIndex;
-    <?php if ($enable_periods ) { ?>
-      form.period.oldValue = form.period.value;
-      form.duration.value = form.period.length;
-      form.dur_units.selectedIndex = findOptionIndex(form.dur_units, "periods");
-      form.period.options[0].selected = true;
-      form.period.disabled = true;
-    <?php } else { ?>
-      form.hour.oldValue = form.hour.value;
-      form.minute.oldValue = form.minute.value;
-    <?php
-      $start = $morningstarts;                  # First reservable time
-      if (!$twentyfourhour_format) {
-        echo("form.hour.oldPm = (form.ampm.item(1).checked) ? 1 : 0;\n");
-        $ix = 0;
-        if ($start >= 12) {
-          $ix = 1;
-          $start -= 12;
-        }
-        if ($start == 0) $start = 12;
-        printf("form.ampm.item(%d).checked = true;\n", $ix);
-        echo("form.ampm.item(0).disabled = true;\n");
-        echo("form.ampm.item(1).disabled = true;\n");
-      }
-      printf("form.hour.value = \"%02d\";\n", $start);
-      $daylength = $eveningends - $morningstarts;
-      if ($daylength <= 0) $daylength += 24;      # Just in case the duration is across midnight.
-      printf("form.duration.value = \"%d\";\n", $daylength);
-    ?> // ~~~~
+  if (allday.checked) // If checking the box...
+  {
+    <?php if( ! $enable_periods ) { ?>
+      form.hour.value = "00";
       form.minute.value = "00";
-      form.dur_units.selectedIndex = findOptionIndex(form.dur_units, "hours");
-
-      form.hour.disabled = true;
-      form.minute.disabled = true
-    <?php } ?>
-    form.duration.disabled = true;
-    form.dur_units.disabled = true;
-  } else {
-    form.duration.disabled = false;
-    form.dur_units.disabled = false;
-    <?php if ($enable_periods ) { ?>
-      form.period.disabled = false;
-      form.period.options[form.period.oldValue].selected = true;
-    <?php } else { ?>
-      form.hour.disabled = false;
-      form.minute.disabled = false
-      <?php if (!$twentyfourhour_format) { ?>
-        form.ampm.item(0).disabled = false;
-        form.ampm.item(1).disabled = false;
-        form.ampm.item(form.hour.oldPm).checked = true;
-      <?php } ?>
-      form.hour.value = form.hour.oldValue;
-      form.minute.value = form.minute.oldValue;
     <?php } ?>
-    form.duration.value = form.duration.oldValue;
-    form.dur_units.selectedIndex = form.dur_units.oldSelectedIndex;
+    if (form.dur_units.value!="days") // Don't change it if the user already did.
+    {
+      form.duration.value = "1";
+      form.dur_units.value = "days";
+    }
   }
 }
 </SCRIPT>
@@ -390,9 +296,9 @@
 if (!$twentyfourhour_format)
 {
   $checked = ($start_hour < 12) ? "checked" : "";
-  echo "<INPUT NAME=\"ampm\" type=\"radio\" value=\"am\" $checked>".utf8_date("a",mktime(1,0,0,1,1,2000));
+  echo "<INPUT NAME=\"ampm\" type=\"radio\" value=\"am\" $checked>".utf8_strftime("%p",mktime(1,0,0,1,1,2000));
   $checked = ($start_hour >= 12) ? "checked" : "";
-  echo "<INPUT NAME=\"ampm\" type=\"radio\" value=\"pm\" $checked>".utf8_date("a",mktime(13,0,0,1,1,2000));
+  echo "<INPUT NAME=\"ampm\" type=\"radio\" value=\"pm\" $checked>".utf8_strftime("%p",mktime(13,0,0,1,1,2000));
 }
 ?>
 </TD></TR>
@@ -437,16 +343,14 @@
 
 <?php
       # Determine the area id of the room in question first
-      $sql = "SELECT  area_id
-              FROM    $tbl_room
-              WHERE   id=$room_id";
-      $area_id = $mdb->getOne($sql, 'integer');
+      $sql = "select area_id from $tbl_room where id=$room_id";
+      $res = sql_query($sql);
+      $row = sql_row($res, 0);
+      $area_id = $row[0];
       # determine if there is more than one area
-      $sql = "SELECT id
-      		  FROM   $tbl_area";
-      $res = $mdb->query($sql, 'integer');
-      $num_areas = $mdb->numRows($res);
-      $mdb->freeResult($res);
+      $sql = "select id from $tbl_area";
+      $res = sql_query($sql);
+      $num_areas = sql_count($res);
       # if there is more than one area then give the option
       # to choose areas.
       if( $num_areas > 1 ) {
@@ -470,41 +374,24 @@
     switch (area){
 <?php
         # get the area id for case statement
-	$sql = "SELECT	 id, area_name
-            FROM	 $tbl_area
-            ORDER BY area_name";
-
-    $types = array('integer', 'text');
-    $res = $mdb->query($sql, $types);
-    if (MDB::isError($res))
-    {
-        fatal_error(1, $res->getMessage() . "<BR>" . $res->getUserInfo() . "<BR>");
-    }
-    while ($row = $mdb->fetchInto($res))
+	$sql = "select id, area_name from $tbl_area order by area_name";
+        $res = sql_query($sql);
+	if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
 	{
+
                 print "      case \"".$row[0]."\":\n";
         	# get rooms for this area
-		$sql2 = "SELECT   id, room_name
-        		 FROM     $tbl_room
-                 WHERE    area_id='".$row[0]."'
-                 ORDER BY $room_order";
-    	$types = array('integer', 'text');
-        $res2 = $mdb->query($sql2, $types);
-    	if (MDB::isError($res2))
-	    {
-    	    fatal_error(1, $res2->getMessage() . "<BR>" . $res2->getUserInfo() . "<BR>");
-	    }
-        for ($j = 0; ($row2 = $mdb->fetchInto($res2)); $j++)
-        {
-        	print "        roomsObj.options[$j] = new Option(\"".$row2[1]."\",".$row2[0] .")\n";
-        }
-        $mdb->freeResult($res2);
+		$sql2 = "select id, room_name from $tbl_room where area_id='".$row[0]."' order by room_name";
+        	$res2 = sql_query($sql2);
+		if ($res2) for ($j = 0; ($row2 = sql_row($res2, $j)); $j++)
+		{
+                	print "        roomsObj.options[$j] = new Option(\"".str_replace('"','\\"',$row2[1])."\",".$row2[0] .")\n";
+                }
 		# select the first entry by default to ensure
 		# that one room is selected to begin with
 		print "        roomsObj.options[0].selected = true\n";
 		print "        break\n";
 	}
-    $mdb->freeResult($res);
 ?>
     } //switch
 }
@@ -515,16 +402,9 @@
 this.document.writeln("          <select name=\"areas\" onChange=\"changeRooms(this.form)\">");
 <?php
 # get list of areas
-$sql = "SELECT   id, area_name
-		FROM     $tbl_area
-        ORDER BY area_name";
-$types = array('integer', 'text');
-$res = $mdb->query($sql, $types);
-if (MDB::isError($res))
-{
-    fatal_error(1, $res->getMessage() . "<BR>" . $res->getUserInfo() . "<BR>");
-}
-while ($row = $mdb->fetchInto($res))
+$sql = "select id, area_name from $tbl_area order by area_name";
+$res = sql_query($sql);
+if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
 {
 	$selected = "";
 	if ($row[0] == $area_id) {
@@ -532,7 +412,6 @@
 	}
 	print "this.document.writeln(\"            <option $selected value=\\\"".$row[0]."\\\">".$row[1]."\")\n";
 }
-$mdb->freeResult($res);
 ?>
 this.document.writeln("          </select>");
 this.document.writeln("</td></tr>");
@@ -545,30 +424,20 @@
   <td class=CL valign=top><table><tr><td><select name="rooms[]" multiple="yes">
   <?php
         # select the rooms in the area determined above
-    $sql = "SELECT   id, room_name
-            FROM     $tbl_room
-            WHERE    area_id=$area_id
-            ORDER BY $room_order";
-    $types = array('integer', 'text');
-    $res = $mdb->query($sql, $types);
+	$sql = "select id, room_name from $tbl_room where area_id=$area_id order by room_name";
+   	$res = sql_query($sql);
 
 
-    while ($row = $mdb->fetchInto($res))
+   	if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
    	{
 		$selected = "";
 		if ($row[0] == $room_id) {
 			$selected = "SELECTED";
-			$nroomsleft = $nrooms;
-		}
-		if ($nroomsleft) {
-			$selected = "SELECTED";
-			$nroomsleft -= 1;
 		}
 		echo "<option $selected value=\"".$row[0]."\">".$row[1];
         // store room names for emails
         $room_names[$i] = $row[1];
    	}
-    $mdb->freeResult($res);
   ?>
   </select></td><td><?php echo get_vocab("ctrl_click") ?></td></tr></table>
     </td></tr>
@@ -576,16 +445,13 @@
 <TR><TD CLASS=CR><B><?php echo get_vocab("type")?></B></TD>
   <TD CLASS=CL><SELECT NAME="type">
 <?php
-for ($letter = ord('A'); $letter <= ord('Z'); $letter++)
+for ($c = "A"; $c <= "Z"; $c++)
 {
-	$c = chr($letter);
 	if (!empty($typel[$c]))
 		echo "<OPTION VALUE=$c" . ($type == $c ? " SELECTED" : "") . ">$typel[$c]\n";
 }
 ?></SELECT></TD></TR>
 
-<?php if ($edit_series) { ?>
-
 <?php if($edit_type == "series") { ?>
 
 <TR>
@@ -670,8 +536,6 @@
 </TR>
 <?php } ?>
 
-<?php } ?><!-- End if ($edit_series) -->
-
 <TR>
  <TD colspan=2 align=center>
   <SCRIPT LANGUAGE="JavaScript">
@@ -693,4 +557,4 @@
 
 </FORM>
 
-<?php include "trailer.inc" ?>
+<?php include "trailer.inc" ?>
\ No newline at end of file
Index: web/lang.fi
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.fi,v
retrieving revision 1.10
diff -u -r1.10 lang.fi
--- web/lang.fi	2 Sep 2005 22:20:58 -0000	1.10
+++ web/lang.fi	2 Aug 2008 12:36:05 -0000
@@ -5,108 +5,108 @@
 # The default strings come from lang.en, and anything in a locale
 # specific file will overwrite the default. This is the Finnish version.
 #
-# Translation by Vesa Palmu ( vesa.palmu@no... ), Tom Ingberg 
-# (tom.ingberg@edu.vantaa.fi)
+# Translation by Vesa Palmu ( vesa.palmu@no... ),
+# 2005 Tom Ingberg (tom.ingberg@iki.fi.invalid)
 #
 # This file is PHP code. Treat it as such.
 
 # The charset to use in "Content-type" header
-$vocab["charset"]            = "iso-8859-1";
+$vocab["charset"]            = "utf-8";
 
 # Used in style.inc
-$vocab["mrbs"]               = "Huonetilojen varausj�rjestelm�";
+$vocab["mrbs"]               = "Huonetilojen varausjärjestelmä";
 
 # Used in functions.inc
 $vocab["report"]             = "Raportit";
-$vocab["admin"]              = "Yll�pito";
+$vocab["admin"]              = "Ylläpito";
 $vocab["help"]               = "Ohjeet";
 $vocab["search"]             = "Etsi:";
-$vocab["not_php3"]             = "Varoitus: J�rjestelm� ei valtt�m�tt� toimi PHP3:lla.</H1>";
+$vocab["not_php3"]             = "Varoitus: Järjestelmä ei välttämättä toimi PHP3:lla.</H1>";
 
 # Used in day.php
 $vocab["bookingsfor"]        = "Varaukset";
 $vocab["bookingsforpost"]    = ""; # Goes after the date
 $vocab["areas"]              = "Tilat";
-$vocab["daybefore"]          = "Edelliseen p�iv��n";
-$vocab["dayafter"]           = "Seuraavaan p�iv��n";
-$vocab["gototoday"]          = "T�h�n p�iv��n";
+$vocab["daybefore"]          = "Edelliseen päivään";
+$vocab["dayafter"]           = "Seuraavaan päivään";
+$vocab["gototoday"]          = "Tähän päivään";
 $vocab["goto"]               = "mene";
-$vocab["highlight_line"]     = "Highlight this line";
-$vocab["click_to_reserve"]   = "Click on the cell to make a reservation.";
+$vocab["highlight_line"]     = "Korosta tämä rivi";
+$vocab["click_to_reserve"]   = "Napsauta solua tehdäksesi varauksen.";
 
 # Used in trailer.inc
-$vocab["viewday"]            = "N�yt� p�iv�";
-$vocab["viewweek"]           = "N�yt� viikko";
-$vocab["viewmonth"]          = "N�yt� kuukausi";
+$vocab["viewday"]            = "Näytä päivä";
+$vocab["viewweek"]           = "Näytä viikko";
+$vocab["viewmonth"]          = "Näytä kuukausi";
 $vocab["ppreview"]           = "Tulostuksen esikatselu";
 
 # Used in edit_entry.php
-$vocab["addentry"]           = "Lis�� varaus";
+$vocab["addentry"]           = "Lisää varaus";
 $vocab["editentry"]          = "Muokkaa varausta";
 $vocab["editseries"]         = "Muokkaa varaussarjaa";
 $vocab["namebooker"]         = "Lyhyt kuvaus:";
-$vocab["fulldescription"]    = "T�ydellinen kuvaus:<br>&nbsp;&nbsp;(Montako ihmist�,<br>&nbsp;&nbsp;sis�inen/ulkoinen jne)";
-$vocab["date"]               = "P�iv�m��r�:";
+$vocab["fulldescription"]    = "Täydellinen kuvaus:<br>&nbsp;&nbsp;(Montako ihmistä,<br>&nbsp;&nbsp;sisäinen/ulkoinen jne)";
+$vocab["date"]               = "Päivämäärä:";
 $vocab["start_date"]         = "Aloitusaika:";
 $vocab["end_date"]           = "Lopetusaika:";
 $vocab["time"]               = "Aika:";
-$vocab["period"]             = "Period:";
+$vocab["period"]             = "Jakso:";
 $vocab["duration"]           = "Kesto:";
 $vocab["seconds"]            = "sekuntia";
 $vocab["minutes"]            = "minuuttia";
 $vocab["hours"]              = "tuntia";
-$vocab["days"]               = "p�iv��";
+$vocab["days"]               = "päivää";
 $vocab["weeks"]              = "viikkoa";
 $vocab["years"]              = "vuotta";
-$vocab["periods"]            = "periods";
-$vocab["all_day"]            = "Koko p�iv�n";
+$vocab["periods"]            = "jaksoa";
+$vocab["all_day"]            = "Koko päivän";
 $vocab["type"]               = "Tyyppi:";
-$vocab["internal"]           = "Sis�inen";
+$vocab["internal"]           = "Sisäinen";
 $vocab["external"]           = "Ulkoinen";
 $vocab["save"]               = "Tallenna";
 $vocab["rep_type"]           = "Toiston tyyppi:";
 $vocab["rep_type_0"]         = "Ei toistoa";
-$vocab["rep_type_1"]         = "P�ivitt�in";
+$vocab["rep_type_1"]         = "Päivittäin";
 $vocab["rep_type_2"]         = "Viikoittain";
 $vocab["rep_type_3"]         = "Kuukausittain";
 $vocab["rep_type_4"]         = "Vuosittain";
-$vocab["rep_type_5"]         = "Kuukausittain samana viikonp�iv�n�";
-$vocab["rep_type_6"]         = "M��r�aikainen viikoittainen";
-$vocab["rep_end_date"]       = "Toiston loppup�iv�m��r�:";
-$vocab["rep_rep_day"]        = "Toiston viikonp�iv�:";
+$vocab["rep_type_5"]         = "Kuukausittain samana viikonpäivänä";
+$vocab["rep_type_6"]         = "Määräaikainen viikoittainen";
+$vocab["rep_end_date"]       = "Toiston loppupäivämäärä:";
+$vocab["rep_rep_day"]        = "Toiston viikonpäivä:";
 $vocab["rep_for_weekly"]     = "(viikottaiselle toistolle)";
 $vocab["rep_freq"]           = "Tiheys:";
 $vocab["rep_num_weeks"]      = "Montako viikkoa";
-$vocab["rep_for_nweekly"]    = "(m��r�aikaiselle viikottaiselle)";
-$vocab["ctrl_click"]         = "Pid� CTRL-nappi pohjassa valitaksesi useita huoneita.";
+$vocab["rep_for_nweekly"]    = "(määräaikaiselle viikottaiselle)";
+$vocab["ctrl_click"]         = "Pidä CTRL-nappi pohjassa valitaksesi useita huoneita.";
 $vocab["entryid"]            = "Varauksen ID ";
 $vocab["repeat_id"]          = "Toiston ID "; 
 $vocab["you_have_not_entered"] = "Et ole antanut seuraavaa pakollista tietoa:";
-$vocab["you_have_not_selected"] = "You have not selected a";
-$vocab["valid_room"]         = "room.";
+$vocab["you_have_not_selected"] = "Et ole valinnut";
+$vocab["valid_room"]         = "huonetta.";
 $vocab["valid_time_of_day"]  = "Ajankohta ei ole kelpaa.";
 $vocab["brief_description"]  = "Lyhyt kuvaus";
-$vocab["useful_n-weekly_value"] = "M��r�aikaisen viikottaisen varauksen viikkom��r�.";
+$vocab["useful_n-weekly_value"] = "Määräaikaisen viikottaisen varauksen viikkomäärä.";
 
 # Used in view_entry.php
 $vocab["description"]        = "Kuvaus:";
 $vocab["room"]               = "Huone:";
-$vocab["createdby"]          = "Varauksen tekij�:";
-$vocab["lastupdate"]         = "P�ivitetty:";
+$vocab["createdby"]          = "Varauksen tekijä:";
+$vocab["lastupdate"]         = "Päivitetty:";
 $vocab["deleteentry"]        = "Poista varaus";
 $vocab["deleteseries"]       = "Poista varaussarja";
-$vocab["confirmdel"]         = "Oletko varma ett� haluat poistaa\\nt�m�n varauksen?\\n\\n";
+$vocab["confirmdel"]         = "Oletko varma että haluat poistaa\\ntämän varauksen?\\n\\n";
 $vocab["returnprev"]         = "Takaisin edelliselle sivulle";
 $vocab["invalid_entry_id"]   = "Virheellinen varauksen ID.";
-$vocab["invalid_series_id"]  = "Invalid series id.";
+$vocab["invalid_series_id"]  = "Virheellinen sarjan ID.";
 
 # Used in edit_entry_handler.php
 $vocab["error"]              = "Virhe";
-$vocab["sched_conflict"]     = "P��llekk�inen varaus";
-$vocab["conflict"]           = "Uusi varaus menee p��llekk�in seuraavien varausten kanssa:";
+$vocab["sched_conflict"]     = "Päällekkäinen varaus";
+$vocab["conflict"]           = "Uusi varaus menee päällekkäin seuraavien varausten kanssa:";
 $vocab["too_may_entrys"]     = "Valituilla ehdoilla tulisi liian monta varausta.<br>Valittuja ehtoja on muutettava.";
-$vocab["returncal"]          = "Paluu kalenterin�kym��n";
-$vocab["failed_to_acquire"]  = "Tietokantaan ei saatu (varauksetonta) yhteytt�."; 
+$vocab["returncal"]          = "Paluu kalenterinäkymään";
+$vocab["failed_to_acquire"]  = "Tietokantaan ei saatu (varauksetonta) yhteyttä."; 
 $vocab["mail_subject_entry"] = $mail["subject"];
 $vocab["mail_body_new_entry"] = $mail["new_entry"];
 $vocab["mail_body_del_entry"] = $mail["deleted_entry"];
@@ -114,41 +114,41 @@
 $vocab["mail_subject_delete"] = $mail["subject_delete"];
 
 # Authentication stuff
-$vocab["accessdenied"]       = "P��sy kielletty";
-$vocab["norights"]           = "Sinulla ei ole riitt�v�sti oikeuksia yritt�m�si toiminnon suorittamiseen.";
-$vocab["please_login"]       = "Ole hyv� ja kirjaudu sis��n";
-$vocab["user_name"]          = "K�ytt�j�tunnus";
+$vocab["accessdenied"]       = "Pääsy kielletty";
+$vocab["norights"]           = "Sinulla ei ole riittävästi oikeuksia yrittämäsi toiminnon suorittamiseen.";
+$vocab["please_login"]       = "Ole hyvä ja kirjaudu sisään";
+$vocab["user_name"]          = "Käyttäjätunnus";
 $vocab["user_password"]      = "Salasana";
-$vocab["unknown_user"]       = "Tuntematon k�ytt�j�";
+$vocab["unknown_user"]       = "Tuntematon käyttäjä";
 $vocab["you_are"]            = "Olet";
-$vocab["login"]              = "Kirjaudu sis��n";
+$vocab["login"]              = "Kirjaudu sisään";
 $vocab["logoff"]             = "Kirjaudu ulos";
 
 # Authentication database
-$vocab["user_list"]          = "User list";
-$vocab["edit_user"]          = "Edit user";
-$vocab["delete_user"]        = "Delete this user";
+$vocab["user_list"]          = "Käyttäjälista";
+$vocab["edit_user"]          = "Muokkaa käyttäjää";
+$vocab["delete_user"]        = "Poista tämä käyttäjä";
 #$vocab["user_name"]         = Use the same as above, for consistency.
 #$vocab["user_password"]     = Use the same as above, for consistency.
-$vocab["user_email"]         = "Email address";
-$vocab["password_twice"]     = "If you wish to change the password, please type the new password twice";
-$vocab["passwords_not_eq"]   = "Error: The passwords do not match.";
-$vocab["add_new_user"]       = "Add a new user";
-$vocab["rights"]             = "Rights";
-$vocab["action"]             = "Action";
-$vocab["user"]               = "User";
-$vocab["administrator"]      = "Administrator";
-$vocab["unknown"]            = "Unknown";
+$vocab["user_email"]         = "Sähköpostiosoite";
+$vocab["password_twice"]     = "Jos haluat vaihtaa salasanan, ole hyvä ja anna uusi salasana kahdesti";
+$vocab["passwords_not_eq"]   = "Virhe: Salasanat eivät täsmää.";
+$vocab["add_new_user"]       = "Lisää uusi käyttäjä";
+$vocab["rights"]             = "Oikeudet";
+$vocab["action"]             = "Toiminto";
+$vocab["user"]               = "Käyttäjä";
+$vocab["administrator"]      = "Ylläpitäjä";
+$vocab["unknown"]            = "Tuntematon";
 $vocab["ok"]                 = "OK";
 $vocab["show_my_entries"]    = "Click to display all my upcoming entries";
 
 # Used in search.php
-$vocab["invalid_search"]     = "Tyhj� tai kelpaamaton haku.";
+$vocab["invalid_search"]     = "Tyhjä tai kelpaamaton haku.";
 $vocab["search_results"]     = "Hakutulokset:";
-$vocab["nothing_found"]      = "Yht��n varausta ei l�ytynyt antamillasi ehdoilla. ";
+$vocab["nothing_found"]      = "Yhtään varausta ei löytynyt antamillasi ehdoilla. ";
 $vocab["records"]            = "Tulokset ";
 $vocab["through"]            = " - ";
-$vocab["of"]                 = " tuloksia yhteens�: ";
+$vocab["of"]                 = " tuloksia yhteensä: ";
 $vocab["previous"]           = "Edellinen";
 $vocab["next"]               = "Seuraava";
 $vocab["entry"]              = "Varaus";
@@ -160,45 +160,45 @@
 
 # Used in report.php
 $vocab["report_on"]          = "Raportti varauksista:";
-$vocab["report_start"]       = "Raportin alkup�iv�m��r�:";
-$vocab["report_end"]         = "Raportin loppup�iv�m��r�:";
+$vocab["report_start"]       = "Raportin alkupäivämäärä:";
+$vocab["report_end"]         = "Raportin loppupäivämäärä:";
 $vocab["match_area"]         = "Alue:";
-$vocab["match_room"]         = "Huone::";
-$vocab["match_type"]         = "Match type:";
-$vocab["ctrl_click_type"]    = "Use Control-Click to select more than one type";
+$vocab["match_room"]         = "Huone:";
+$vocab["match_type"]         = "Tyyppi:";
+$vocab["ctrl_click_type"]    = "Pidä Ctrl-näppäin alaspainettuna valitaksesi useamman tyypin.";
 $vocab["match_entry"]        = "Lyhyt kuvaus:";
-$vocab["match_descr"]        = "T�ydellinen kuvaus:";
-$vocab["include"]            = "Sis�lt�en:";
+$vocab["match_descr"]        = "Täydellinen kuvaus:";
+$vocab["include"]            = "Sisältäen:";
 $vocab["report_only"]        = "Ainoastaan raportti";
 $vocab["summary_only"]       = "Ainoastaan yhteenveto";
 $vocab["report_and_summary"] = "Molemmat";
 $vocab["summarize_by"]       = "Yhteenvedon peruste:";
 $vocab["sum_by_descrip"]     = "Lyhyt kuvaus";
 $vocab["sum_by_creator"]     = "Varaaja";
-$vocab["entry_found"]        = "varaus l�ytyi";
-$vocab["entries_found"]      = "varausta l�ytyi";
-$vocab["summary_header"]     = "Varausten tunnit yhteens�";
+$vocab["entry_found"]        = "varaus löytyi";
+$vocab["entries_found"]      = "varausta löytyi";
+$vocab["summary_header"]     = "Varausten tunnit yhteensä";
 $vocab["summary_header_per"] = "Summary of (Entries) Periods";
 $vocab["total"]              = "Kaikkiaan";
 $vocab["submitquery"]        = "Tee raportti";
-$vocab["sort_rep"]           = "Sort Report by:";
-$vocab["sort_rep_time"]      = "Start Date/Time";
-$vocab["rep_dsp"]            = "Display in report:";
-$vocab["rep_dsp_dur"]        = "Duration";
-$vocab["rep_dsp_end"]        = "End Time";
+$vocab["sort_rep"]           = "Raporttien lajittelun peruste:";
+$vocab["sort_rep_time"]      = "Aloitusaika";
+$vocab["rep_dsp"]            = "Näytä raportissa:";
+$vocab["rep_dsp_dur"]        = "Kesto";
+$vocab["rep_dsp_end"]        = "Loppumisaika";
  
 # Used in week.php
 $vocab["weekbefore"]         = "Edelliseen viikkoon";
 $vocab["weekafter"]          = "Seuraavaan viikkoon";
-$vocab["gotothisweek"]       = "T�h�n viikkoon";
+$vocab["gotothisweek"]       = "Tähän viikkoon";
 
 # Used in month.php
 $vocab["monthbefore"]        = "Edelliseen kuukauteen";
 $vocab["monthafter"]         = "Seuraavaan kuukauteen";
-$vocab["gotothismonth"]      = "T�h�n kuukauteen";
+$vocab["gotothismonth"]      = "Tähän kuukauteen";
 
 # Used in {day week month}.php
-$vocab["no_rooms_for_area"]  = "T�ll� alueella ei ole yht��n huonetta.";
+$vocab["no_rooms_for_area"]  = "Tällä alueella ei ole yhtään huonetta.";
 
 # Used in admin.php
 $vocab["edit"]               = "Muokkaa";
@@ -206,46 +206,46 @@
 $vocab["rooms"]              = "Huoneet";
 $vocab["in"]                 = "alueella";
 $vocab["noareas"]            = "Ei alueita";
-$vocab["addarea"]            = "Lis�� alue";
+$vocab["addarea"]            = "Lisää alue";
 $vocab["name"]               = "Nimi";
 $vocab["noarea"]             = "Ei valittua aluetta";
 $vocab["browserlang"]        = "Selaimesi kieliasetus on";
 $vocab["postbrowserlang"]    = ".";
-$vocab["addroom"]            = "Lis�� huone";
-$vocab["capacity"]           = "Maksimi henkil�m��r�";
+$vocab["addroom"]            = "Lisää huone";
+$vocab["capacity"]           = "Maksimi henkilömäärä";
 $vocab["norooms"]            = "Ei huoneita.";
-$vocab["administration"]     = "Yll�pito";
+$vocab["administration"]     = "Ylläpito";
 
 # Used in edit_area_room.php
 $vocab["editarea"]           = "Muokkaa alueen tietoja";
-$vocab["change"]             = "Talleta";
-$vocab["backadmin"]          = "Takaisin yll�pitoon";
+$vocab["change"]             = "Tallenna";
+$vocab["backadmin"]          = "Takaisin ylläpitoon";
 $vocab["editroomarea"]       = "Muokkaa alueen tai huoneen kuvausta";
 $vocab["editroom"]           = "Muokkaa huoneen tietoja";
-$vocab["update_room_failed"] = "Huoneen tietojen p�ivitys ep�onnistui: ";
+$vocab["update_room_failed"] = "Huoneen tietojen päivitys epäonnistui: ";
 $vocab["error_room"]         = "Virhe: huonetta ";
-$vocab["not_found"]          = " ei l�ytynyt";
-$vocab["update_area_failed"] = "Alueen tietojen p�ivitys ep�onnistui: ";
+$vocab["not_found"]          = " ei löytynyt";
+$vocab["update_area_failed"] = "Alueen tietojen päivitys epäonnistui: ";
 $vocab["error_area"]         = "Virhe: aluetta ";
-$vocab["room_admin_email"]   = "Room admin email:";
-$vocab["area_admin_email"]   = "Area admin email:";
-$vocab["invalid_email"]      = "Invalid email!";
+$vocab["room_admin_email"]   = "Huonevastaavan sähköposti:";
+$vocab["area_admin_email"]   = "Aluevastaavan sähköposti:";
+$vocab["invalid_email"]      = "Virheellinen sähköpostiosoite!";
 
 # Used in del.php
 $vocab["deletefollowing"]    = "Seuraavat varaukset poistetaan";
 $vocab["sure"]               = "Oletko varma?";
-$vocab["YES"]                = "KYLL�";
+$vocab["YES"]                = "KYLLÄ";
 $vocab["NO"]                 = "EN";
-$vocab["delarea"]            = "Sinun t�ytyy poistaa kaikki alueen huoneet ennnen kuin voit poistaa alueen.<p>";
+$vocab["delarea"]            = "Sinun täytyy poistaa kaikki alueen huoneet ennnen kuin voit poistaa alueen.<p>";
 
 # Used in help.php
-$vocab["about_mrbs"]         = "Tietoja varausj�rjestelm�st�";
+$vocab["about_mrbs"]         = "Tietoja varausjärjestelmästä";
 $vocab["database"]           = "Tietokanta: ";
-$vocab["system"]             = "K�ytt�j�rjestelm�: ";
-$vocab["please_contact"]     = "J�rjestelm�n yhteyshenkil� ";
-$vocab["for_any_questions"]  = "antaa lis�tietoja mik�li et l�yd� vastausta kysymykseesi n�ist� ohjeista.";
+$vocab["system"]             = "Käyttöjärjestelmä: ";
+$vocab["please_contact"]     = "Järjestelmän yhteyshenkilö ";
+$vocab["for_any_questions"]  = "antaa lisätietoja mikäli et löydä vastausta kysymykseesi näistä ohjeista.";
 
 # Used in mysql.inc AND pgsql.inc
-$vocab["failed_connect_db"]  = "J�rjestelm�virhe: Tietokantayhteyden avaaminen ei onnistu.";
+$vocab["failed_connect_db"]  = "Järjestelmävirhe: Tietokantayhteyden avaaminen ei onnistu.";
 
 ?>
Index: web/lang.no
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.no,v
retrieving revision 1.14
diff -u -r1.14 lang.no
--- web/lang.no	10 Jun 2005 08:54:14 -0000	1.14
+++ web/lang.no	2 Aug 2008 12:36:06 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.no,v 1.14 2005/06/10 08:54:14 jberanek Exp $
+# $Id: lang.no,v 1.13.2.1 2005/06/10 08:50:28 jberanek Exp $
 
 # This file contains PHP code that specifies language specific strings
 # The default strings come from lang.en, and anything in a locale
Index: web/auth_pop3.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_pop3.inc,v
retrieving revision 1.8
diff -u -r1.8 auth_pop3.inc
--- web/auth_pop3.inc	29 Mar 2005 14:10:24 -0000	1.8
+++ web/auth_pop3.inc	2 Aug 2008 12:36:05 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: auth_pop3.inc,v 1.8 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: auth_pop3.inc,v 1.6.2.2 2005/03/29 13:26:15 jberanek Exp $
  *
  * Authentication scheme that uses POP3 as the source for user
  * authentication.
Index: web/month.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/month.php,v
retrieving revision 1.34
diff -u -r1.34 month.php
--- web/month.php	26 Apr 2006 10:34:35 -0000	1.34
+++ web/month.php	2 Aug 2008 12:36:07 -0000
@@ -1,12 +1,11 @@
 <?php
-# $Id: month.php,v 1.34 2006/04/26 10:34:35 jberanek Exp $
+# $Id: month.php,v 1.31.2.4 2007/02/23 22:06:45 jberanek Exp $
 
 # mrbs/month.php - Month-at-a-time view
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 include "mincals.inc";
@@ -21,7 +20,7 @@
 
 # Default parameters:
 if (empty($debug_flag)) $debug_flag = 0;
-if (empty($month) || empty($year) || !checkdate($month, 1, $year))
+if (empty($month) || empty($year) || !checkdate(intval($month), 1, intval($year)))
 {
     $month = date("m");
     $year  = date("Y");
@@ -88,32 +87,22 @@
   # show either a select box or the normal html list
   if ($area_list_format == "select") {
     echo make_area_select_html('month.php', $area, $year, $month, $day); # from functions.inc
-    $this_area_name = $mdb->queryOne("SELECT    area_name 
-                                      FROM      $tbl_area
-                                      WHERE     id=$area", 'text');
-    $this_room_name = $mdb->queryOne("SELECT    room_name 
-                                      FROM      $tbl_room
-                                      WHERE     id=$room", 'text');
+    $this_area_name = sql_query1("select area_name from $tbl_area where id=$area");
+    $this_room_name = sql_query1("select room_name from $tbl_room where id=$room");
   } else {
-    $sql = "SELECT      id, area_name 
-            FROM        $tbl_area 
-            ORDER BY    area_name";
-    $types = array('integer', 'text');
-    $res = $mdb->query($sql, $types);
-    if (!MDB::isError($res))
+    $sql = "select id, area_name from $tbl_area order by area_name";
+    $res = sql_query($sql);
+    if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
     {
-        while ($row = $mdb->fetchInto($res))
+        if ( $pview != 1 )
+            echo "<a href=\"month.php?year=$year&month=$month&area=$row[0]\">";
+        if ($row[0] == $area)
         {
+            $this_area_name = htmlspecialchars($row[1]);
             if ( $pview != 1 )
-                echo "<a href=\"month.php?year=$year&month=$month&area=$row[0]\">";
-            if ($row[0] == $area)
-            {
-                $this_area_name = htmlspecialchars($row[1]);
-                if ( $pview != 1 )
-                    echo "<font color=\"red\">$this_area_name</font></a><br>\n";
-            }
-            else if ( $pview !=1 ) echo htmlspecialchars($row[1]) . "</a><br>\n";
+                echo "<font color=\"red\">$this_area_name</font></a><br>\n";
         }
+        else if ( $pview !=1 ) echo htmlspecialchars($row[1]) . "</a><br>\n";
     }
   } # end select if
 
@@ -129,26 +118,18 @@
   if ($area_list_format == "select") {
     echo make_room_select_html('month.php', $area, $room, $year, $month, $day); # from functions.inc
   } else {
-    $sql = "SELECT      id, room_name 
-            FROM        $tbl_room 
-            WHERE       area_id=$area 
-            ORDER BY    room_name";
-    $types = array('integer', 'text');
-    $res = $mdb->query($sql, $types);
-    if (!MDB::isError($res))
+    $sql = "select id, room_name from $tbl_room where area_id=$area order by room_name";
+    $res = sql_query($sql);
+    if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
     {
-        while ($row = $mdb->fetchInto($res))
+        echo "<a href=\"month.php?year=$year&month=$month&area=$area&room=$row[0]\">";
+        if ($row[0] == $room)
         {
-            echo "<a href=\"month.php?year=$year&month=$month&area=$area&room=$row[0]\">";
-            if ($row[0] == $room)
-            {
-                $this_room_name = htmlspecialchars($row[1]);
-                if ( $pview != 1 )
-                    echo "<font color=\"red\">$this_room_name</font></a><br>\n";
-            }
-            else if ( $pview != 1 ) echo htmlspecialchars($row[1]) . "</a><br>\n";
+            $this_room_name = htmlspecialchars($row[1]);
+            if ( $pview != 1 )
+                echo "<font color=\"red\">$this_room_name</font></a><br>\n";
         }
-        $mdb->freeResult($res);
+        else if ( $pview != 1 ) echo htmlspecialchars($row[1]) . "</a><br>\n";
     }
   } # end select if
 
@@ -204,30 +185,23 @@
 # row[2] = Entry ID
 # This data will be retrieved day-by-day fo the whole month
 for ($day_num = 1; $day_num<=$days_in_month; $day_num++) {
-	$sql = "SELECT      start_time, end_time, id, name
-        FROM        $tbl_entry
-        WHERE       room_id=$room
-        AND         start_time <= $midnight_tonight[$day_num]
-        AND         end_time > $midnight[$day_num]
-        ORDER BY    1";
+	$sql = "SELECT start_time, end_time, id, name
+	   FROM $tbl_entry
+	   WHERE room_id=$room
+	   AND start_time <= $midnight_tonight[$day_num] AND end_time > $midnight[$day_num]
+	   ORDER by 1";
 
 	# Build an array of information about each day in the month.
 	# The information is stored as:
 	#  d[monthday]["id"][] = ID of each entry, for linking.
 	#  d[monthday]["data"][] = "start-stop" times or "name" of each entry.
 
-	$types = array('integer', 'integer', 'integer', 'text');
-	$res = $mdb->query($sql, $types);
-	if (MDB::isError($res))
+	$res = sql_query($sql);
+	if (! $res) echo sql_error();
+	else for ($i = 0; ($row = sql_row($res, $i)); $i++)
 	{
-    	echo $res->getMessage() . "<br>" . $res->getUserInfo() . "<br>";
-	}
-	else
-	{
-    	while ($row = $mdb->fetchInto($res))
-    	{
-        	if ($debug_flag)
-            	echo "<br>DEBUG: result $i, id $row[2], starts $row[0], ends $row[1]\n";
+	    if ($debug_flag)
+        	echo "<br>DEBUG: result $i, id $row[2], starts $row[0], ends $row[1]\n";
 
             if ($debug_flag) echo "<br>DEBUG: Entry $row[2] day $day_num\n";
             $d[$day_num]["id"][] = $row[2];
@@ -245,28 +219,28 @@
               {
         	case "> < ":         # Starts after midnight, ends before midnight
         	case "= < ":         # Starts at midnight, ends before midnight
-                    $d[$day_num]["data"][] = date(hour_min_format(), $row[0]) . "~" . date(hour_min_format(), $row[1]);
+                    $d[$day_num]["data"][] = utf8_strftime(hour_min_format(), $row[0]) . "~" . utf8_strftime(hour_min_format(), $row[1]);
                     break;
         	case "> = ":         # Starts after midnight, ends at midnight
-                    $d[$day_num]["data"][] = date(hour_min_format(), $row[0]) . "~24:00";
+                    $d[$day_num]["data"][] = utf8_strftime(hour_min_format(), $row[0]) . "~24:00";
                     break;
         	case "> > ":         # Starts after midnight, continues tomorrow
-                    $d[$day_num]["data"][] = date(hour_min_format(), $row[0]) . "~====&gt;";
+                    $d[$day_num]["data"][] = utf8_strftime(hour_min_format(), $row[0]) . "~====>";
                     break;
         	case "= = ":         # Starts at midnight, ends at midnight
                     $d[$day_num]["data"][] = $all_day;
                     break;
         	case "= > ":         # Starts at midnight, continues tomorrow
-                    $d[$day_num]["data"][] = $all_day . "====&gt;";
+                    $d[$day_num]["data"][] = $all_day . "====>";
                     break;
         	case "< < ":         # Starts before today, ends before midnight
-                    $d[$day_num]["data"][] = "&lt;====~" . date(hour_min_format(), $row[1]);
+                    $d[$day_num]["data"][] = "<====~" . utf8_strftime(hour_min_format(), $row[1]);
                     break;
         	case "< = ":         # Starts before today, ends at midnight
-                    $d[$day_num]["data"][] = "&lt;====" . $all_day;
+                    $d[$day_num]["data"][] = "<====" . $all_day;
                     break;
         	case "< > ":         # Starts before today, continues tomorrow
-                    $d[$day_num]["data"][] = "&lt;====" . $all_day . "====&gt;";
+                    $d[$day_num]["data"][] = "<====" . $all_day . "====>";
                     break;
               }
 	    }
@@ -284,28 +258,27 @@
                     $d[$day_num]["data"][] = $start_str . "~24:00";
                     break;
         	case "> > ":         # Starts after midnight, continues tomorrow
-                    $d[$day_num]["data"][] = $start_str . "~====&gt;";
+                    $d[$day_num]["data"][] = $start_str . "~====>";
                     break;
         	case "= = ":         # Starts at midnight, ends at midnight
                     $d[$day_num]["data"][] = $all_day;
                     break;
         	case "= > ":         # Starts at midnight, continues tomorrow
-                    $d[$day_num]["data"][] = $all_day . "====&gt;";
+                    $d[$day_num]["data"][] = $all_day . "====>";
                     break;
         	case "< < ":         # Starts before today, ends before midnight
-                    $d[$day_num]["data"][] = "&lt;====~" . $end_str;
+                    $d[$day_num]["data"][] = "<====~" . $end_str;
                     break;
         	case "< = ":         # Starts before today, ends at midnight
-                    $d[$day_num]["data"][] = "&lt;====" . $all_day;
+                    $d[$day_num]["data"][] = "<====" . $all_day;
                     break;
         	case "< > ":         # Starts before today, continues tomorrow
-                    $d[$day_num]["data"][] = "&lt;====" . $all_day . "====&gt;";
+                    $d[$day_num]["data"][] = "<====" . $all_day . "====>";
                     break;
               }
             }
-        }
+
 	}
-    $mdb->freeResult($res);
 }
 if ($debug_flag)
 {
@@ -330,12 +303,11 @@
     {
     echo "<SCRIPT language=\"JavaScript\" type=\"text/javascript\" src=\"xbLib.js\"></SCRIPT>\n";
     echo "<SCRIPT language=\"JavaScript\">InitActiveCell("
-       . ($show_plus_link ? "true" : "false") . ", "			// Show (+)
-       . "false, "							// Highlight left title column
-       . "false, "							// Highlight right title column
-       . "\"$highlight_method\", "					// "bgcolor", "class", or "hybrid"
-       . "\"" . get_vocab("click_to_reserve") . "\", "			// Status bar message
-       . "3"								// Drag effect: 0=None; 1=Rectangle; 2=Columns; 3=Rows
+       . ($show_plus_link ? "true" : "false") . ", "
+       . "false, "
+       . "false, "
+       . "\"$highlight_method\", "
+       . "\"" . get_vocab("click_to_reserve") . "\""
        . ");</SCRIPT>\n";
     }
 
@@ -458,4 +430,4 @@
 echo "</tr></table>\n";
 
 include "trailer.inc";
-?>
\ No newline at end of file
+?>
Index: web/lang.ko
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.ko,v
retrieving revision 1.2
diff -u -r1.2 lang.ko
--- web/lang.ko	13 Jul 2005 10:30:25 -0000	1.2
+++ web/lang.ko	2 Aug 2008 12:36:06 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.ko,v 1.2 2005/07/13 10:30:25 jberanek Exp $
+# $Id: lang.ko,v 1.1.2.1 2005/07/13 10:29:18 jberanek Exp $
 
 # This file contains PHP code that specifies language specific strings
 # The default strings come from lang.en, and anything in a locale
Index: web/mrbs_auth.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/mrbs_auth.inc,v
retrieving revision 1.9
diff -u -r1.9 mrbs_auth.inc
--- web/mrbs_auth.inc	29 Mar 2005 14:10:24 -0000	1.9
+++ web/mrbs_auth.inc	2 Aug 2008 12:36:07 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: mrbs_auth.inc,v 1.9 2005/03/29 14:10:24 jberanek Exp $
+// $Id: mrbs_auth.inc,v 1.8.2.1 2005/03/29 13:26:27 jberanek Exp $
 
 // include the authentification wrappers
 include "auth_$auth[type].inc";
Index: web/session_ip.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/session_ip.inc,v
retrieving revision 1.3
diff -u -r1.3 session_ip.inc
--- web/session_ip.inc	29 Mar 2005 14:10:24 -0000	1.3
+++ web/session_ip.inc	2 Aug 2008 12:36:07 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: session_ip.inc,v 1.3 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: session_ip.inc,v 1.1.4.1 2005/03/29 13:26:27 jberanek Exp $
  *
  * Session management scheme that uses IP addresses to identify users.
  * Anyone who can access the server can make bookings.
Index: web/lang.nl
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.nl,v
retrieving revision 1.16
diff -u -r1.16 lang.nl
--- web/lang.nl	28 Jul 2004 10:01:13 -0000	1.16
+++ web/lang.nl	2 Aug 2008 12:36:06 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.nl,v 1.16 2004/07/28 10:01:13 jberanek Exp $
+# $Id: lang.nl,v 1.16.2.1 2004/09/14 09:01:26 jberanek Exp $
 
 # This file contains PHP code that specifies language specific strings
 # The default strings come from lang.en, and anything in a locale
@@ -21,7 +21,7 @@
 $vocab["admin"]              = "Admin";
 $vocab["help"]               = "Help";
 $vocab["search"]             = "Zoek:";
-$vocab["not_php3"]             = "<H1>WARNING: This probably doesn't work with PHP3</H1>";
+$vocab["not_php3"]             = "<H1>Waarschuwing: Werkt waarschijnlijk niet met PHP3</H1>";
 
 # Used in day.php
 $vocab["bookingsfor"]        = "Boekingen voor";
@@ -31,8 +31,8 @@
 $vocab["dayafter"]           = "Naar Volgende Dag";
 $vocab["gototoday"]          = "Naar Vandaag";
 $vocab["goto"]               = "ga naar";
-$vocab["highlight_line"]     = "Highlight this line";
-$vocab["click_to_reserve"]   = "Click on the cell to make a reservation.";
+$vocab["highlight_line"]     = "Markeer deze regel";
+$vocab["click_to_reserve"]   = "Klik op dit vak om een reservering te maken.";
 
 # Used in trailer.inc
 $vocab["viewday"]            = "Bekijk Dag";
@@ -78,15 +78,15 @@
 $vocab["rep_freq"]           = "Frequentie:";
 $vocab["rep_num_weeks"]      = "Aantal weken";
 $vocab["rep_for_nweekly"]    = "(Voor n-wekelijks)";
-$vocab["ctrl_click"]         = "Use Control-Click to select more than one room";
-$vocab["entryid"]            = "Entry ID ";
-$vocab["repeat_id"]          = "Repeat ID "; 
-$vocab["you_have_not_entered"] = "You have not entered a";
-$vocab["you_have_not_selected"] = "You have not selected a";
-$vocab["valid_room"]         = "room.";
-$vocab["valid_time_of_day"]  = "valid time of day.";
-$vocab["brief_description"]  = "Brief Description.";
-$vocab["useful_n-weekly_value"] = "useful n-weekly value.";
+$vocab["ctrl_click"]         = "Gebruik Control-Linker muis klik om meer dan 1 ruimte te reserveren";
+$vocab["entryid"]            = "Boeking-ID ";
+$vocab["repeat_id"]          = "Herhalings-ID "; 
+$vocab["you_have_not_entered"] = "U heeft het volgende niet ingevoerd : ";
+$vocab["you_have_not_selected"] = "U heeft het volgende niet geselecteerd : ";
+$vocab["valid_room"]         = "kamer.";
+$vocab["valid_time_of_day"]  = "geldige tijd.";
+$vocab["brief_description"]  = "Korte Omschrijving.";
+$vocab["useful_n-weekly_value"] = "bruikbaar n-wekelijks aantal.";
 
 # Used in view_entry.php
 $vocab["description"]        = "Omschrijving:";
@@ -97,16 +97,16 @@
 $vocab["deleteseries"]       = "Herhalingen verwijderen";
 $vocab["confirmdel"]         = "Weet U zeker\\ndat U deze\\nBoeking wilt verwijderen?\\n\\n";
 $vocab["returnprev"]         = "Terug naar vorige pagina";
-$vocab["invalid_entry_id"]   = "Invalid entry id.";
-$vocab["invalid_series_id"]  = "Invalid series id.";
+$vocab["invalid_entry_id"]   = "Ongeldig Boeking-ID.";
+$vocab["invalid_series_id"]  = "Ongeldig Herhalings-ID.";
 
 # Used in edit_entry_handler.php
 $vocab["error"]              = "Fout";
 $vocab["sched_conflict"]     = "Overlappende Boeking";
-$vocab["conflict"]           = "Er zijn overlappende boekingen";
+$vocab["conflict"]           = "De nieuwe boeking overlapt de volgende boeking(en):";
 $vocab["too_may_entrys"]     = "De door U geselecteerde opties zullen teveel boekingen genereren.<BR>Pas A.U.B. uw opties aan !";
 $vocab["returncal"]          = "Terug naar kalender overzicht";
-$vocab["failed_to_acquire"]  = "Failed to acquire exclusive database access"; 
+$vocab["failed_to_acquire"]  = "Het is niet gelukt om exclusive toegang tot de database te verkrijgen"; 
 $vocab["mail_subject_entry"] = $mail["subject"];
 $vocab["mail_body_new_entry"] = $mail["new_entry"];
 $vocab["mail_body_del_entry"] = $mail["deleted_entry"];
@@ -116,31 +116,31 @@
 # Authentication stuff
 $vocab["accessdenied"]       = "Geen Toegang";
 $vocab["norights"]           = "U heeft geen rechten om deze boeking aan te passen.";
-$vocab["please_login"]       = "Please log in";
-$vocab["user_name"]          = "Name";
-$vocab["user_password"]      = "Password";
-$vocab["unknown_user"]       = "Unknown user";
-$vocab["you_are"]            = "You are";
-$vocab["login"]              = "Log in";
-$vocab["logoff"]             = "Log Off";
+$vocab["please_login"]       = "Inloggen A.U.B";
+$vocab["user_name"]          = "Naam";
+$vocab["user_password"]      = "Wachtwoord";
+$vocab["unknown_user"]       = "Onbekende gebruiker";
+$vocab["you_are"]            = "U bent";
+$vocab["login"]              = "Inloggen";
+$vocab["logoff"]             = "Uitloggen";
 
 # Authentication database
-$vocab["user_list"]          = "User list";
-$vocab["edit_user"]          = "Edit user";
-$vocab["delete_user"]        = "Delete this user";
+$vocab["user_list"]          = "Gebruikerslijst";
+$vocab["edit_user"]          = "Gebruiker aanpassen";
+$vocab["delete_user"]        = "Deze gebruiker verwijderen";
 #$vocab["user_name"]         = Use the same as above, for consistency.
 #$vocab["user_password"]     = Use the same as above, for consistency.
-$vocab["user_email"]         = "Email address";
-$vocab["password_twice"]     = "If you wish to change the password, please type the new password twice";
-$vocab["passwords_not_eq"]   = "Error: The passwords do not match.";
-$vocab["add_new_user"]       = "Add a new user";
-$vocab["rights"]             = "Rights";
-$vocab["action"]             = "Action";
-$vocab["user"]               = "User";
-$vocab["administrator"]      = "Administrator";
-$vocab["unknown"]            = "Unknown";
+$vocab["user_email"]         = "Email adres";
+$vocab["password_twice"]     = "Als u het wachtwoord wilt wijzigen dient u het nieuwe wachtwoord tweemaal in te voeren.";
+$vocab["passwords_not_eq"]   = "Fout: De wachtwoorden komen niet overeen.";
+$vocab["add_new_user"]       = "Nieuwe gebruiker toevoegen";
+$vocab["rights"]             = "Rechten";
+$vocab["action"]             = "Handelingen";
+$vocab["user"]               = "Gebruiker";
+$vocab["administrator"]      = "Beheerder";
+$vocab["unknown"]            = "Onbekend";
 $vocab["ok"]                 = "OK";
-$vocab["show_my_entries"]    = "Click to display all my upcoming entries";
+$vocab["show_my_entries"]    = "Klikken om al mijn aankomende boekingen te tonen.";
 
 # Used in search.php
 $vocab["invalid_search"]     = "Niet bestaand of ongeldig zoek argument.";
@@ -155,8 +155,8 @@
 $vocab["view"]               = "Overzicht";
 $vocab["advanced_search"]    = "Advanced search";
 $vocab["search_button"]      = "Zoek";
-$vocab["search_for"]         = "Search For";
-$vocab["from"]               = "From";
+$vocab["search_for"]         = "Zoeken naar";
+$vocab["from"]               = "Van";
 
 # Used in report.php
 $vocab["report_on"]          = "Boekingsoverzicht:";
@@ -165,7 +165,7 @@
 $vocab["match_area"]         = "Gebied als:";
 $vocab["match_room"]         = "Kamer als:";
 $vocab["match_type"]         = "Match type:";
-$vocab["ctrl_click_type"]    = "Use Control-Click to select more than one type";
+$vocab["ctrl_click_type"]    = "Gebruik Control-Linker muis klik om meer dan 1 type te selekteren";
 $vocab["match_entry"]        = "Korte omschrijving als:";
 $vocab["match_descr"]        = "Volledige omschrijving als:";
 $vocab["include"]            = "Neem mee:";
@@ -180,12 +180,12 @@
 $vocab["summary_header"]     = "Totaal aan (geboekte) uren";
 $vocab["summary_header_per"] = "Summary of (Entries) Periods";
 $vocab["total"]              = "Totaal";
-$vocab["submitquery"]        = "Run Report";
-$vocab["sort_rep"]           = "Sort Report by:";
-$vocab["sort_rep_time"]      = "Start Date/Time";
-$vocab["rep_dsp"]            = "Display in report:";
-$vocab["rep_dsp_dur"]        = "Duration";
-$vocab["rep_dsp_end"]        = "End Time";
+$vocab["submitquery"]        = "Rapport uitvoeren";
+$vocab["sort_rep"]           = "Rapport sorteren op:";
+$vocab["sort_rep_time"]      = "Start Datum/Tijd";
+$vocab["rep_dsp"]            = "Weergeven in rapport:";
+$vocab["rep_dsp_dur"]        = "Duur";
+$vocab["rep_dsp_end"]        = "Eind Tijd";
 
 # Used in week.php
 $vocab["weekbefore"]         = "Ga naar vorige week";
@@ -201,51 +201,51 @@
 $vocab["no_rooms_for_area"]  = "Nog geen kamers gedefini�erd voor dit gebouw";
 
 # Used in admin.php
-$vocab["edit"]               = "Edit";
-$vocab["delete"]             = "Delete";
-$vocab["rooms"]              = "Rooms";
+$vocab["edit"]               = "Wijzig";
+$vocab["delete"]             = "Wis";
+$vocab["rooms"]              = "Kamers";
 $vocab["in"]                 = "in";
-$vocab["noareas"]            = "No Areas";
-$vocab["addarea"]            = "Add Area";
-$vocab["name"]               = "Name";
-$vocab["noarea"]             = "No area selected";
-$vocab["browserlang"]        = "Your browser is set to use";
-$vocab["postbrowserlang"]    = "language.";
-$vocab["addroom"]            = "Add Room";
-$vocab["capacity"]           = "Capacity";
-$vocab["norooms"]            = "No rooms.";
-$vocab["administration"]     = "Administration";
+$vocab["noareas"]            = "Gebouwen";
+$vocab["addarea"]            = "Gebouw toevoegen";
+$vocab["name"]               = "Naam";
+$vocab["noarea"]             = "Geen gebouw geselecteerd";
+$vocab["browserlang"]        = "Uw browser is ingesteld op ";
+$vocab["postbrowserlang"]    = "Nederlands.";
+$vocab["addroom"]            = "Kamer toevoegen";
+$vocab["capacity"]           = "Zitplaatsen";
+$vocab["norooms"]            = "Geen Kamers.";
+$vocab["administration"]     = "Beheer";
 
 # Used in edit_area_room.php
-$vocab["editarea"]           = "Edit Area";
-$vocab["change"]             = "Change";
-$vocab["backadmin"]          = "Back to Admin";
-$vocab["editroomarea"]       = "Edit Area or Room Description";
-$vocab["editroom"]           = "Edit Room";
-$vocab["update_room_failed"] = "Update room failed: ";
-$vocab["error_room"]         = "Error: room ";
-$vocab["not_found"]          = " not found";
-$vocab["update_area_failed"] = "Update area failed: ";
-$vocab["error_area"]         = "Error: area ";
-$vocab["room_admin_email"]   = "Room admin email:";
-$vocab["area_admin_email"]   = "Area admin email:";
-$vocab["invalid_email"]      = "Invalid email!";
+$vocab["editarea"]           = "Gebouw Wijzigen";
+$vocab["change"]             = "Wijzig";
+$vocab["backadmin"]          = "Terug naar Beheer";
+$vocab["editroomarea"]       = "Gebouw of Kamer wijzigen";
+$vocab["editroom"]           = "Kamer wijzigen";
+$vocab["update_room_failed"] = "Wijzigen kamer mislukt: ";
+$vocab["error_room"]         = "Fout: kamer ";
+$vocab["not_found"]          = " niet gevonden";
+$vocab["update_area_failed"] = "Wijzigen gebouw mislukt: ";
+$vocab["error_area"]         = "Fout: gebouw ";
+$vocab["room_admin_email"]   = "Kamer beheer email:";
+$vocab["area_admin_email"]   = "Gebouw beheer email:";
+$vocab["invalid_email"]      = "Ongeldig email adres !";
 
 # Used in del.php
-$vocab["deletefollowing"]    = "This will delete the following bookings";
-$vocab["sure"]               = "Are you sure?";
-$vocab["YES"]                = "YES";
-$vocab["NO"]                 = "NO";
-$vocab["delarea"]            = "You must delete all rooms in this area before you can delete it<p>";
+$vocab["deletefollowing"]    = "U gaat hiermee de volgende boekingen verwijderen";
+$vocab["sure"]               = "Weet U het zeker?";
+$vocab["YES"]                = "JA";
+$vocab["NO"]                 = "NEE";
+$vocab["delarea"]            = "U moet alle kamers in dit gebouw verwijderen voordat U het kunt verwijderen<p>";
 
 # Used in help.php
-$vocab["about_mrbs"]         = "About MRBS";
+$vocab["about_mrbs"]         = "Over MRBS";
 $vocab["database"]           = "Database: ";
-$vocab["system"]             = "System: ";
-$vocab["please_contact"]     = "Please contact ";
-$vocab["for_any_questions"]  = "for any questions that aren't answered here.";
+$vocab["system"]             = "Systeem: ";
+$vocab["please_contact"]     = "Neem contact op met ";
+$vocab["for_any_questions"]  = "Voor alle vragen die hier niet worden beantwoord.";
 
 # Used in mysql.inc AND pgsql.inc
-$vocab["failed_connect_db"]  = "Fatal Error: Failed to connect to database";
+$vocab["failed_connect_db"]  = "Fatale Fout: Verbinding naar database server mislukt";
 
 ?>
Index: web/functions.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/functions.inc,v
retrieving revision 1.39
diff -u -r1.39 functions.inc
--- web/functions.inc	17 Dec 2004 11:24:37 -0000	1.39
+++ web/functions.inc	2 Aug 2008 12:36:05 -0000
@@ -1,6 +1,6 @@
 <?php
 
-# $Id: functions.inc,v 1.39 2004/12/17 11:24:37 jberanek Exp $
+# $Id: functions.inc,v 1.34.2.5 2007/02/13 12:53:28 jberanek Exp $
 
 # probably a bad place to put this, but for error reporting purposes
 # $pview must be defined. if it's not then there's errors generated all
@@ -11,7 +11,7 @@
 }
 
 function print_header($day, $month, $year, $area)
-{ # Note: A 5th optional argument defines the name of a JavaScript procedure to call on body load.
+{
 	global $mrbs_company, $search_str, $locale_warning;
 
 	# If we dont know the right date then make it up 
@@ -43,12 +43,12 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                       "http://www.w3.org/TR/html4/loose.dtd">
 <HTML>
- <HEAD>
+  <HEAD>
 <?php
    include "style.inc";
 ?>
- <TITLE><?php echo get_vocab("mrbs") ?></TITLE>
- <SCRIPT LANGUAGE="JavaScript">
+    <TITLE><?php echo get_vocab("mrbs") ?></TITLE>
+    <SCRIPT LANGUAGE="JavaScript">
 
 <!-- Begin
 
@@ -133,10 +133,9 @@
 }
 
   //  End -->
-  </SCRIPT>
- </HEAD>
- <BODY BGCOLOR="#ffffed" TEXT=black LINK="#5B69A6" VLINK="#5B69A6" ALINK=red 
-       <?php if (func_num_args() > 4) echo "ONLOAD=\"".func_get_arg(4)."()\""; ?> >
+    </SCRIPT>
+  </HEAD>
+  <BODY BGCOLOR="#ffffed" TEXT=black LINK="#5B69A6" VLINK="#5B69A6" ALINK=red>
 	   <?php if ( $GLOBALS["pview"] != 1 ) { ?>
 
    <?php # show a warning if this is using a low version of php
@@ -146,57 +145,62 @@
                echo "[Warning: ".$locale_warning."]";
    ?>
 
-   <TABLE WIDTH="100%">
-    <TR>
-      <TD BGCOLOR="#5B69A6">
-       <TABLE WIDTH="100%" BORDER=0>
-        <TR>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF">
-          <FONT SIZE=4><B><?php echo $mrbs_company ?></B><BR>
-           <A HREF="index.php"><?php echo get_vocab("mrbs") ?></A>
-          </FONT>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF">
-          <FORM ACTION="day.php" METHOD=GET name="Form1">
-           <FONT SIZE=2>
+    <TABLE WIDTH="100%">
+      <TR>
+        <TD BGCOLOR="#5B69A6">
+          <TABLE WIDTH="100%" BORDER=0>
+            <TR>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF">
+                <FONT SIZE=4>
+                  <B><?php echo $mrbs_company ?></B><BR>
+                  <A HREF="index.php"><?php echo get_vocab("mrbs") ?></A>
+                </FONT>
+              </TD>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF">
+                <FORM ACTION="day.php" METHOD=GET name="Form1">
+                  <FONT SIZE=2>
 <?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>"
+        echo "
+                    <INPUT TYPE=HIDDEN NAME=area VALUE=$area>\n"
  
 ?>
-	    <SCRIPT LANGUAGE="JavaScript">
-	    <!--
-	    // fix number of days for the $month/$year that you start with
-	    ChangeOptionDays(document.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") ?>">
-           </FONT>
-          </FORM>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
-          <A HREF="help.php?day=<?php echo $day ?>&month=<?php echo $month ?>&year=<?php echo $year ?>"><?php echo get_vocab("help") ?></A>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
-          <A HREF="admin.php?day=<?php echo $day ?>&month=<?php echo $month ?>&year=<?php echo $year ?>"><?php echo get_vocab("admin") ?></A>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
-          <A HREF="report.php"><?php echo get_vocab("report") ?></A>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
-          <FORM METHOD=GET ACTION="search.php">
-           <FONT SIZE=2><A HREF="search.php?advanced=1"><?php echo get_vocab("search") ?></A> </FONT>
-           <INPUT TYPE=TEXT   NAME="search_str" VALUE="<?php echo $search_str ?>" SIZE=10>
-           <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       ?>"        >
+	            <SCRIPT LANGUAGE="JavaScript">
+                    <!--
+                    // fix number of days for the $month/$year that you start with
+                    ChangeOptionDays(document.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") ?>">
+                  </FONT>
+                </FORM>
+              </TD>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+                <A HREF="help.php?day=<?php echo $day ?>&month=<?php echo $month ?>&year=<?php echo $year ?>"><?php echo get_vocab("help") ?></A>
+              </TD>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+                <A HREF="admin.php?day=<?php echo $day ?>&month=<?php echo $month ?>&year=<?php echo $year ?>"><?php echo get_vocab("admin") ?></A>
+              </TD>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+                <A HREF="report.php"><?php echo get_vocab("report") ?></A>
+              </TD>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+                <FORM METHOD=GET ACTION="search.php">
+                  <FONT SIZE=2>
+                    <A HREF="search.php?advanced=1"><?php echo get_vocab("search") ?></A>
+                  </FONT>
+                  <INPUT TYPE=TEXT   NAME="search_str" VALUE="<?php echo $search_str ?>" SIZE=10>
+                  <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>"
+        echo "
+                  <INPUT TYPE=HIDDEN NAME=area VALUE=$area>\n"
 ?>
-          </FORM>
-         </TD>
+                </FORM>
+              </TD>
 <?php
     # For session protocols that define their own logon box...
     if (function_exists('PrintLogonBox'))
@@ -204,10 +208,10 @@
    	PrintLogonBox();
    	}
 ?>
-        </TR>
-       </TABLE>
-      </TD>
-     </TR>
+            </TR>
+          </TABLE>
+        </TD>
+      </TR>
     </TABLE>
 <?php } ?>
 <?php
@@ -298,31 +302,39 @@
 	if($month == 0) $month = date("m");
 	if($year  == 0) $year = date("Y");
 	
-	echo "<SELECT NAME=\"${prefix}day\">\n";
+	echo "
+                  <SELECT NAME=\"${prefix}day\">";
 	
 	for($i = 1; $i <= 31; $i++)
-		echo "<OPTION" . ($i == $day ? " SELECTED" : "") . ">$i\n";
+		echo "
+                    <OPTION" . ($i == $day ? " SELECTED" : "") . ">$i";
+
+	echo "
+                  </SELECT>
 
-	echo "</SELECT>";
-	echo "<SELECT NAME=\"${prefix}month\" onchange=\"ChangeOptionDays(this.form,'$prefix')\">\n";
+                  <SELECT NAME=\"${prefix}month\" onchange=\"ChangeOptionDays(this.form,'$prefix')\">";
 
 	for($i = 1; $i <= 12; $i++)
 	{
 		$m = utf8_strftime("%b", mktime(0, 0, 0, $i, 1, $year));
 		
-		print "<OPTION VALUE=\"$i\"" . ($i == $month ? " SELECTED" : "") . ">$m\n";
+		print "
+                    <OPTION VALUE=\"$i\"" . ($i == $month ? " SELECTED" : "") . ">$m";
 	}
 
-	echo "</SELECT>";
-	echo "<SELECT NAME=\"${prefix}year\" onchange=\"ChangeOptionDays(this.form,'$prefix')\">\n";
+	echo "
+                  </SELECT>
+	          <SELECT NAME=\"${prefix}year\" onchange=\"ChangeOptionDays(this.form,'$prefix')\">";
 
 	$min = min($year, date("Y")) - 5;
 	$max = max($year, date("Y")) + 5;
 
 	for($i = $min; $i <= $max; $i++)
-		print "<OPTION VALUE=\"$i\"" . ($i == $year ? " SELECTED" : "") . ">$i\n";
+		print "
+                    <OPTION VALUE=\"$i\"" . ($i == $year ? " SELECTED" : "") . ">$i";
 
-	echo "</SELECT>";
+	echo "
+                  </SELECT>";
 }
 
 # Error handler - this is used to display serious errors such as database
@@ -362,12 +374,9 @@
 # This could be changed to implement something like per-user defaults.
 function get_default_area()
 {
-    global $mdb;
-    global $tbl_area;
-
-    $default_area = $mdb->queryOne("SELECT id FROM $tbl_area ORDER BY area_name"
-    	   	, 'integer');
-    return ((MDB::isError($default_area) or ($default_area == NULL)) ? 0 : $default_area );
+	global $tbl_area;
+	$area = sql_query1("SELECT id FROM $tbl_area ORDER BY area_name LIMIT 1");
+	return ($area < 0 ? 0 : $area);
 }
 
 # Return a default room given a valid area; used if no room is already known.
@@ -375,12 +384,9 @@
 # This could be changed to implement something like per-user defaults.
 function get_default_room($area)
 {
-    global $mdb;
-    global $tbl_room;
-
-    $room = $mdb->queryOne("SELECT id FROM $tbl_room WHERE area_id=$area
-    						ORDER BY room_name", 'integer');
-    return ( ( MDB::isError($room) or ($room == NULL) ) ? 0 : $room );
+	global $tbl_room;
+	$room = sql_query1("SELECT id FROM $tbl_room WHERE area_id=$area ORDER BY room_name LIMIT 1");
+	return ($room < 0 ? 0 : $room);
 }
 
 # Get the local day name based on language. Note 2000-01-02 is a Sunday.
@@ -394,11 +400,11 @@
         global $twentyfourhour_format;
         if ($twentyfourhour_format)
 	{
-  	        return "H:i";
+  	        return "%H:%M";
 	}
 	else
 	{
-		return "h:ia";
+		return "%I:%M%p";
 	}
 }
 
@@ -429,16 +435,14 @@
 function time_date_string($t)
 {
         global $twentyfourhour_format;
-        # This bit's necessary, because it seems %p in strftime format
-        # strings doesn't work
-        $ampm = utf8_date("a",$t);
+
         if ($twentyfourhour_format)
 	{
   	        return utf8_strftime("%H:%M:%S - %A %d %B %Y",$t);
 	}
 	else
 	{
-	        return utf8_strftime("%I:%M:%S$ampm - %A %d %B %Y",$t);
+	        return utf8_strftime("%I:%M:%S%p - %A %d %B %Y",$t);
 	}
 }
 
@@ -464,22 +468,15 @@
 function show_colour_key()
 {
 	global $typel;
-	global $color_key_types_per_row;
-	
-	$types_per_row =
-		(($color_key_types_per_row && $color_key_types_per_row > 0)
-			? $color_key_types_per_row : "5");
-	
 	echo "<table border=0><tr>\n";
 	$nct = 0;
-	for ($letter = ord('A'); $letter <= ord('Z'); $letter++)
+	for ($ct = "A"; $ct <= "Z"; $ct++)
 	{
-		$ct = chr($letter);	
 		if (!empty($typel[$ct]))
 		{
-			if (++$nct > $types_per_row)
+			if (++$nct > 5)
 			{
-				$nct = 1;
+				$nct = 0;
 				echo "</tr><tr>";
 			}
 			tdcell($ct);
@@ -514,26 +511,19 @@
 # displayed.
 function make_area_select_html( $link, $current, $year, $month, $day )
 {
-    global $mdb;
-    global $tbl_area;
-    $out_html = "
+	global $tbl_area;
+	$out_html = "
 <form name=\"areaChangeForm\" method=get action=\"$link\">
   <select name=\"area\" onChange=\"document.areaChangeForm.submit()\">";
 
-    $sql = "SELECT      id, area_name
-            FROM        $tbl_area
-            ORDER BY    area_name";
-    $types = array('integer', 'text');
-    $res = $mdb->query($sql, $types);
-    if (!MDB::isError($res))
-    {
-        while ($row = $mdb->fetchInto($res))
-        {
-			$selected = ($row[0] == $current) ? "selected" : "";
-			$out_html .= "
-    	<option $selected value=\"".$row[0]."\">" . htmlspecialchars($row[1]);
-        }
-    }
+	$sql = "select id, area_name from $tbl_area order by area_name";
+   	$res = sql_query($sql);
+   	if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
+   	{
+		$selected = ($row[0] == $current) ? "selected" : "";
+		$out_html .= "
+    <option $selected value=\"".$row[0]."\">" . htmlspecialchars($row[1]);
+   	}
 	$out_html .= "
   </select>
 
@@ -543,32 +533,23 @@
   <input type=submit value=\"".get_vocab("change")."\">
 </form>\n";
 
-	$mdb->freeResult($res);
 	return $out_html;
 } # end make_area_select_html
 
 function make_room_select_html( $link, $area, $current, $year, $month, $day )
 {
-    global $mdb;
-    global $tbl_room;
+	global $tbl_room;
 	$out_html = "
 <form name=\"roomChangeForm\" method=get action=\"$link\">
   <select name=\"room\" onChange=\"document.roomChangeForm.submit()\">";
 
-    $sql = "SELECT      id, room_name
-            FROM        $tbl_room
-            WHERE       area_id=$area
-            ORDER BY    room_name";
-    $types = array('integer', 'text');
-    $res = $mdb->query($sql, $types);
-    if (!MDB::isError($res))
-    {
-        while ($row = $mdb->fetchInto($res))
-        {
-			$selected = ($row[0] == $current) ? "selected" : "";
-			$out_html .= "
-    	<option $selected value=\"".$row[0]."\">" . htmlspecialchars($row[1]);
-        }
+	$sql = "select id, room_name from $tbl_room where area_id=$area order by room_name";
+   	$res = sql_query($sql);
+   	if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
+   	{
+		$selected = ($row[0] == $current) ? "selected" : "";
+		$out_html .= "
+    <option $selected value=\"".$row[0]."\">" . htmlspecialchars($row[1]);
    	}
 	$out_html .= "
   </select>
@@ -579,7 +560,6 @@
   <input type=submit value=\"".get_vocab("change")."\">
 </form>\n";
 
-    $mdb->freeResult($res);
 	return $out_html;
 } # end make_area_select_html
 
Index: web/session_cookie.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/session_cookie.inc,v
retrieving revision 1.11
diff -u -r1.11 session_cookie.inc
--- web/session_cookie.inc	20 Aug 2005 19:03:31 -0000	1.11
+++ web/session_cookie.inc	2 Aug 2008 12:36:07 -0000
@@ -1,24 +1,34 @@
 <?php
 /*****************************************************************************\
-*                                                                             *
-*   File name       session_cookie.inc                                        *
-*                                                                             *
-*   Description     Manage sessions via cookies stored in the client browser. *
-*                                                                             *
-*   URL arguments   UserName            The user name                         *
-*                   UserPassword        His password                          *
-*                   TargetURL           Where we were going before login.     *
-*                                                                             *
-*   Notes           To use this session mechanism, set in config.inc.php:     *
-*                       $auth["session"]  = "cookie";                         *
-*                                                                             *
-*   History                                                                   *
-*    2003/11/09 JFL Created this file                                         *
+*									      *
+*   File name       session_cookie.inc					      *
+*									      *
+*   Description	    Manage sessions via cookies stored in the client browser. *
+*									      *
+*   URL arguments   UserName		The user name			      *
+*		    UserPassword	His password			      *
+*		    TargetURL		Where we were going before login.     *
+*									      *
+*   Notes	    To use this session mechanism, set in config.inc.php:     *
+*			$auth["session"]  = "cookie";			      *
+*									      *
+*   History								      *
+*    2003/11/09 JFL Created this file					      *
 *    Remaining history in ChangeLog and CVS logs                              *
-*                                                                             *
+*									      *
 \*****************************************************************************/
 
-// $Id: session_cookie.inc,v 1.11 2005/08/20 19:03:31 jberanek Exp $
+// $Id: session_cookie.inc,v 1.9.2.4 2007/02/13 12:53:34 jberanek Exp $
+
+if (isset($cookie_path_override))
+{
+  $cookie_path = $cookie_path_override;
+}
+else
+{
+  $cookie_path = $PHP_SELF;
+  $cookie_path = ereg_replace('[^/]*$', '', $cookie_path);
+}
 
 /*
   Target of the form with sets the URL argument "Action=SetName".
@@ -35,10 +45,11 @@
     if ($NewUserName == "") {
         // Delete cookie
 
-        setcookie("UserName", '', time()-42000);
+        setcookie("UserName", '', time()-42000, $cookie_path);
     } else {
         $NewUserName = unslashes($NewUserName);
         $NewPassword = unslashes($NewPassword);
+
         if (!authValidateUser($NewUserName, $NewUserPassword))
         {
             print_header(0, 0, 0, 0);
@@ -52,7 +63,7 @@
             $UserPassword = $NewUserPassword;
         }
 
-        setcookie("UserName", $UserName);
+        setcookie("UserName", $UserName, time()+(60*60*24*30), $cookie_path);
     }
     header ("Location: $TargetURL"); /* Redirect browser to initial page */
     /* Note HTTP 1.1 mandates an absolute URL. Most modern browsers support relative URLs,
@@ -159,9 +170,9 @@
         // report page with only entries created by xxx. Past entries are not
         // displayed but this can be changed
            $search_string = "report.php?From_day=$day&From_month=$month&".
-             "From_year=$year&To_day=1&To_month=12&To_year=2030&areamatch=&".
-             "roommatch=&namematch=&descrmatch=&summarize=1&sortby=r&".
-             "display=d&sumby=d&creatormatch=$user"; ?>
+             "From_year=$year&To_day=1&To_month=12&To_year=2030&".
+             "areamatch=&roommatch=&namematch=&descrmatch=&summarize=1&".
+             "sortby=r&display=d&sumby=d&creatormatch=$user"; ?>
 
     <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
       <A name="logonBox" href="<?php echo "$search_string\" title=\""
Index: web/lang.sv
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.sv,v
retrieving revision 1.18
diff -u -r1.18 lang.sv
--- web/lang.sv	26 Jan 2006 13:51:45 -0000	1.18
+++ web/lang.sv	2 Aug 2008 12:36:06 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.sv,v 1.18 2006/01/26 13:51:45 jberanek Exp $
+# $Id: lang.sv,v 1.17.2.3 2007/02/13 13:05:53 jberanek Exp $
 
 # This file contains PHP code that specifies language specific strings
 # The default strings come from lang.en, and anything in a locale
@@ -15,7 +15,7 @@
 $vocab["charset"]            = "iso-8859-1";
 
 # Used in style.inc
-$vocab["mrbs"]               = "MRBS - M�tesRums BokningsSystem";
+$vocab["mrbs"]               = "MRBS - M�tesRumsBokningsSystem";
 
 # Used in functions.inc
 $vocab["report"]             = "Rapport";
@@ -99,6 +99,7 @@
 $vocab["confirmdel"]         = "�r du s�ker att\\ndu vill radera\\nden h�r bokningen?\\n\\n";
 $vocab["returnprev"]         = "�ter till f�reg�ende sida";
 $vocab["invalid_entry_id"]   = "Ogiltigt boknings-ID!";
+$vocab["invalid_series_id"]  = "Ogiltigt serie-ID!";
 
 # Used in edit_entry_handler.php
 $vocab["error"]              = "Fel";
@@ -107,6 +108,8 @@
 $vocab["too_may_entrys"]     = "De valda inst�llningarna skapar f�r m�nga bokningar.<BR>V.g. anv�nd andra inst�llningar!";
 $vocab["returncal"]          = "�terg� till kalendervy";
 $vocab["failed_to_acquire"]  = "Kunde ej f� exklusiv databas�tkomst"; 
+$vocab["invalid_booking"]    = "Ogiltig bokning";
+$vocab["must_set_description"] = "Du m�ste ange en kort beskrivning f�r bokningen. V�nligen g� tillbaka och korrigera detta.";
 $vocab["mail_subject_entry"] = $mail["subject"];
 $vocab["mail_body_new_entry"] = $mail["new_entry"];
 $vocab["mail_body_del_entry"] = $mail["deleted_entry"];
@@ -141,6 +144,8 @@
 $vocab["unknown"]            = "Ok�nd";
 $vocab["ok"]                 = "OK";
 $vocab["show_my_entries"]    = "Klicka f�r att visa alla dina aktuella bokningar";
+$vocab["no_users_initial"]   = "Inga anv�ndare finns i databasen. Till�ter initialt skapande av anv�ndare.";
+$vocab["no_users_create_first_admin"] = "Skapa en administrativ anv�ndare f�rst. D�refter kan du logga in och skapa fler anv�ndare.";
 
 # Used in search.php
 $vocab["invalid_search"]     = "Tom eller ogiltig s�kstr�ng.";
Index: web/report.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/report.php,v
retrieving revision 1.25
diff -u -r1.25 report.php
--- web/report.php	26 Apr 2006 10:34:35 -0000	1.25
+++ web/report.php	2 Aug 2008 12:36:07 -0000
@@ -1,11 +1,9 @@
 <?php
-# $Id: report.php,v 1.25 2006/04/26 10:34:35 jberanek Exp $
+# $Id: report.php,v 1.22.2.3 2007/02/13 12:53:33 jberanek Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
-MDB::loadFile("Date");
 include "$dbsys.inc";
 
 
@@ -18,32 +16,33 @@
 	}
 	else
 	{
-                # This bit's necessary, because it seems %p in strftime format
-                # strings doesn't work
-                $ampm = utf8_date("a",$t);
-                $timeformat = "%I:%M:%S$ampm";
+                $timeformat = "%I:%M:%S%p";
 	}
 	return utf8_strftime("%A %d %B %Y ".$timeformat, $t);
 }
 
-# Convert a start time and end time to a plain language description.
-# This is similar but different from the way it is done in view_entry.
-function describe_span($starts, $ends)
+function hours_minutes_seconds_format()
 {
 	global $twentyfourhour_format;
-	$start_date = utf8_strftime('%A %d %B %Y', $starts);
+
         if ($twentyfourhour_format)
 	{
                 $timeformat = "%H:%M:%S";
 	}
 	else
 	{
-                # This bit's necessary, because it seems %p in strftime format
-                # strings doesn't work
-                $ampm = utf8_date("a",$starts);
-                $timeformat = "%I:%M:%S$ampm";
+                $timeformat = "%I:%M:%S%p";
 	}
-	$start_time = utf8_strftime($timeformat, $starts);
+	return $timeformat;
+}
+
+# Convert a start time and end time to a plain language description.
+# This is similar but different from the way it is done in view_entry.
+function describe_span($starts, $ends)
+{
+	global $twentyfourhour_format;
+	$start_date = utf8_strftime('%A %d %B %Y', $starts);
+	$start_time = utf8_strftime(hours_minutes_seconds_format(), $starts);
 	$duration = $ends - $starts;
 	if ($start_time == "00:00:00" && $duration == 60*60*24)
 		return $start_date . " - " . get_vocab("all_day");
@@ -68,32 +67,10 @@
 {
 	global $twentyfourhour_format;
 	$start_date = utf8_strftime('%A %d %B %Y', $starts);
-        if ($twentyfourhour_format)
-	{
-                $timeformat = "%H:%M:%S";
-	}
-	else
-	{
-                # This bit's necessary, because it seems %p in strftime format
-                # strings doesn't work
-                $ampm = utf8_date("a",$starts);
-                $timeformat = "%I:%M:%S$ampm";
-	}
-	$start_time = utf8_strftime($timeformat, $starts);
+	$start_time = utf8_strftime(hours_minutes_seconds_format(), $starts);
 
 	$end_date = utf8_strftime('%A %d %B %Y', $ends);
-        if ($twentyfourhour_format)
-	{
-                $timeformat = "%H:%M:%S";
-	}
-	else
-	{
-                # This bit's necessary, because it seems %p in strftime format
-                # strings doesn't work
-                $ampm = utf8_date("a",$ends);
-                $timeformat = "%I:%M:%S$ampm";
-	}
-	$end_time = utf8_strftime($timeformat, $ends);
+	$end_time = utf8_strftime(hours_minutes_seconds_format(), $ends);
 	return $start_date . " " . $start_time . " - " . $end_date . " " . $end_time;
 }
 
@@ -182,7 +159,7 @@
 	# Created by and last update timestamp:
 	echo "<tr><td class=\"BL\" colspan=2><small><b>".get_vocab("createdby")."</b> " .
 		htmlspecialchars($row[6]) . ", <b>".get_vocab("lastupdate")."</b> " .
-		date_time_string(MDB_Date::mdbstamp2Unix($row[7])) . "</small></td></tr>\n";
+		date_time_string($row[7]) . "</small></td></tr>\n";
 
 	echo "</table>\n";
 }
@@ -470,13 +447,13 @@
 #   9  [8]   Area name, must be HTML escaped
 #  10  [9]   Room name, must be HTML escaped
 
-    $sql = "SELECT e.id, e.start_time, e.end_time, e.name, e.description,
-            e.type, e.create_by, e.timestamp, a.area_name, r.room_name
-            FROM $tbl_entry e, $tbl_area a, $tbl_room r
-            WHERE e.room_id = r.id 
-            AND r.area_id = a.id
-            AND e.start_time < $report_end 
-            AND e.end_time > $report_start";
+	$sql = "SELECT e.id, e.start_time, e.end_time, e.name, e.description, "
+		. "e.type, e.create_by, "
+		.  sql_syntax_timestamp_to_unix("e.timestamp")
+		. ", a.area_name, r.room_name"
+		. " FROM $tbl_entry e, $tbl_area a, $tbl_room r"
+		. " WHERE e.room_id = r.id AND r.area_id = a.id"
+		. " AND e.start_time < $report_end AND e.end_time > $report_start";
 
 	if (!empty($areamatch))
 		$sql .= " AND" .  sql_syntax_caseless_contains("a.area_name", $areamatch);
@@ -512,23 +489,15 @@
 		# Order by Start date/time, Area, Room
 		$sql .= " ORDER BY 2,9,10";
 
-    if ($debug_flag) 
-    {
-        echo "<p>DEBUG: SQL: <tt> $sql </tt>\n";
-    }
-
-    $types = array('integer', 'integer', 'integer', 'text', 'text', 'text',
-                   'text', 'timestamp', 'text', 'text');
-    $res = $mdb->query($sql, $types);
-    if (MDB::isError($res))
-    {
-        fatal_error(0, $res->getMessage() . "\n" . $res->getUserInfo() . "\n");
-    }
-    $nmatch = $mdb->numRows($res);
-    if ($nmatch == 0)
-    {
+	# echo "<p>DEBUG: SQL: <tt> $sql </tt>\n";
+
+	$res = sql_query($sql);
+	if (! $res) fatal_error(0, sql_error());
+	$nmatch = sql_count($res);
+	if ($nmatch == 0)
+	{
 		echo "<P><B>" . get_vocab("nothing_found") . "</B>\n";
-        $mdb->freeResult($res);
+		sql_free($res);
 	}
 	else
 	{
@@ -538,7 +507,7 @@
 		. ($nmatch == 1 ? get_vocab("entry_found") : get_vocab("entries_found"))
 		.  "</B>\n";
 
-        while ($row = $mdb->fetchInto($res))
+		for ($i = 0; ($row = sql_row($res, $i)); $i++)
 		{
 			if ($summarize & 1)
 				reporton($row, $last_area_room, $last_date, $sortby, $display);
@@ -551,11 +520,9 @@
 					$room_hash, $name_hash)
                                 );
 		}
-        $mdb->freeResult($res);
 		if ($summarize & 2)
 			do_summary($count, $hours, $room_hash, $name_hash);
 	}
 }
 
-include "trailer.inc";
-?>
+include "trailer.inc";
\ No newline at end of file
Index: web/add.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/add.php,v
retrieving revision 1.7
diff -u -r1.7 add.php
--- web/add.php	29 Mar 2005 14:10:24 -0000	1.7
+++ web/add.php	2 Aug 2008 12:36:04 -0000
@@ -1,16 +1,12 @@
 <?php
 
-# $Id: add.php,v 1.7 2005/03/29 14:10:24 jberanek Exp $
+# $Id: add.php,v 1.5.2.1 2005/03/29 13:26:15 jberanek Exp $
 
-require_once("grab_globals.inc.php");
-require "config.inc.php";
-require "functions.inc";
-require_once("database.inc.php");
-require "$dbsys.inc";
-require "mrbs_auth.inc";
-
-global $tbl_area;
-global $tbl_room;
+require_once "grab_globals.inc.php";
+include "config.inc.php";
+include "functions.inc";
+include "$dbsys.inc";
+include "mrbs_auth.inc";
 
 if(!getAuthorised(2))
 {
@@ -25,37 +21,20 @@
 
 if ($type == "area")
 {
-    $area_name_q = unslashes($name);
-    $id = $mdb->nextId("${tbl_area}_id");
-    if (MDB::isError($id))
-    {
-        fatal_error(1, "<p>" . $id->getMessage() . "<br>" . $id->getUserInfo());
-    }
-    $sql = "INSERT INTO $tbl_area (id, area_name) 
-            VALUES      ($id, " . $mdb->getTextValue($area_name_q) . ")";
-    $res = $mdb->query($sql);
-    if (MDB::isError($res))
-    {
-        fatal_error(1, "<p>" . $res->getMessage() . "<br>" . $res->getUserInfo());
-    }
-    $area = $mdb->currId("${tbl_area}_id");
+	$area_name_q = slashes($name);
+	$sql = "insert into $tbl_area (area_name) values ('$area_name_q')";
+	if (sql_command($sql) < 0) fatal_error(1, "<p>" . sql_error());
+	$area = sql_insert_id("$tbl_area", "id");
 }
 
 if ($type == "room")
 {
-    $room_name_q = unslashes($name);
-    $description_q = unslashes($description);
+	$room_name_q = slashes($name);
+	$description_q = slashes($description);
 	if (empty($capacity)) $capacity = 0;
-    $id = $mdb->nextId("${tbl_room}_id");
-    $sql = "INSERT INTO $tbl_room (id, room_name, area_id, description, capacity)
-            VALUES      ($id, " . $mdb->getTextValue($room_name_q) . ", $area, "
-                        . $mdb->getTextValue($description_q) . ", $capacity)";
-    $res = $mdb->query($sql);
-    if (MDB::isError($res))
-    {
-        fatal_error(1, "<p>" . $res->getMessage() . "<br>" . $res->getUserInfo());
-    }
+	$sql = "insert into $tbl_room (room_name, area_id, description, capacity)
+	        values ('$room_name_q',$area, '$description_q',$capacity)";
+	if (sql_command($sql) < 0) fatal_error(1, "<p>" . sql_error());
 }
 
 header("Location: admin.php?area=$area");
-?>
Index: web/functions_mail.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/functions_mail.inc,v
retrieving revision 1.20
diff -u -r1.20 functions_mail.inc
--- web/functions_mail.inc	26 Apr 2006 10:34:35 -0000	1.20
+++ web/functions_mail.inc	2 Aug 2008 12:36:05 -0000
@@ -11,10 +11,10 @@
 // |        are likely to be used.                                             |
 // +---------------------------------------------------------------------------+
 // | @author    thierry_bo.                                                    |
-// | @version   $Revision: 1.20 $.                                              |
+// | @version   $Revision: 1.14.2.6 $.                                              |
 // +---------------------------------------------------------------------------+
 //
-// $Id: functions_mail.inc,v 1.20 2006/04/26 10:34:35 jberanek Exp $
+// $Id: functions_mail.inc,v 1.14.2.6 2006/04/26 10:01:42 jberanek Exp $
 
 // {{{ removeMailUnicode()
 
@@ -113,7 +113,6 @@
     global $rep_opt, $rep_num_weeks;
     global $tbl_room, $tbl_area, $tbl_entry, $tbl_users, $tbl_repeat;
     global $mail_previous, $auth;
-    global $mdb;
     
     //
     $recipients = '';
@@ -124,7 +123,6 @@
         // Look for list of area admins emails addresses
         if ($new_entry)
         {
-	        $types = array('text');
             $sql = "SELECT a.area_admin_email ";
             $sql .= "FROM $tbl_room r, $tbl_area a, $tbl_entry e ";
             // If this is a repeating entry...
@@ -134,11 +132,9 @@
                 $sql .= ", $tbl_repeat rep ";
             }
             $sql .= "WHERE ${id_table}.id=$new_id AND r.id=${id_table}.room_id AND a.id=r.area_id";
-            $row = $mdb->queryRow($sql, $types);
-            if (MDB::isError($row))
-            {
-              fatal_error(0, $row->getMessage() . "<br>" . $row->getUserInfo());
-            }
+            $res = sql_query($sql);
+            (! $res) ? fatal_error(0, sql_error()) : '';
+            $row = sql_row($res, 0);
             if ( !empty($recipients) && (NULL != $row[0]) )
             {
                 $recipients .= ',';
@@ -167,7 +163,6 @@
         // Look for list of room admins emails addresses
         if ($new_entry)
         {
-	        $types = array('text');
             $sql = "SELECT r.room_admin_email ";
             $sql .= "FROM $tbl_room r, $tbl_entry e ";
             // If this is a repeating entry...
@@ -177,11 +172,9 @@
                 $sql .= ", $tbl_repeat rep ";
             }
             $sql .= "WHERE ${id_table}.id=$new_id AND r.id=${id_table}.room_id";
-            $row = $mdb->queryRow($sql, $types);
-            if (MDB::isError($row))
-            {
-              fatal_error(0, $row->getMessage() . "<br>" . $row->getUserInfo());
-            }
+            $res = sql_query($sql);
+            (! $res) ? fatal_error(0, sql_error()) : '';
+            $row = sql_row($res, 0);
             if ( !empty($recipients) && (NULL != $row[0]) )
             {
                 $recipients .= ',';
@@ -215,15 +208,12 @@
                user is deleted from your user database, this will prevent all
                mails to admins when this user previously booked entries will
                be changed, as no user name will match the booker name */
-            $types = array('text');
             $sql = "SELECT email FROM $tbl_users WHERE name='";
             $sql .= ($new_entry) ? $create_by : $mail_previous['createdby'];
             $sql .= "'";
-            $row = $mdb->queryRow($sql, $types);
-            if (MDB::isError($row))
-            {
-              fatal_error(0, $row->getMessage() . "<br>" . $row->getUserInfo());
-            }
+            $res = sql_query($sql);
+            (! $res) ? fatal_error(0, sql_error()) : '';
+            $row = sql_row($res, 0);
             if ( !empty($recipients) && (NULL != $row[0]) )
             {
                 $recipients .= ',';
@@ -423,11 +413,6 @@
 	$body .= "\n";
     }
     $result = sendMail($recipients, $subject, $body, $mail_vocab['charset'] ,MAIL_CC);
-
-    if (is_object($result))
-    {
-      error_log("Error sending email: ".$result->getMessage());
-    }
     return $result;
 }
 
@@ -443,7 +428,6 @@
 function notifyAdminOnDelete($mail_previous)
 {
     global $mail_vocab, $typel, $enable_periods, $auth, $tbl_users;
-    global $mdb;
     //
     $recipients = '';
     (MAIL_ADMIN_ON_BOOKINGS) ? $recipients = MAIL_RECIPIENTS : '';
@@ -479,11 +463,12 @@
                user is deleted from your user database, this will prevent all
                mails to admins when this user previously booked entries will
                be changed, as no user name will match the booker name */
-            $types = array('text');
             $sql = "SELECT email
                     FROM $tbl_users
                     WHERE name='" . $mail_previous['createdby'] . "'";
-            $row = $mdb->queryRow($sql, $types);
+            $res = sql_query($sql);
+            (! $res) ? fatal_error(0, sql_error()) : '';
+            $row = sql_row($res, 0);
             if ( !empty($recipients) && (NULL != $row[0]) )
             {
                 $recipients .= ',';
@@ -589,12 +574,7 @@
 function getPreviousEntryData($id, $series)
 {
     global $tbl_area, $tbl_entry, $tbl_repeat, $tbl_room, $enable_periods;
-    global $mdb;
-    
     //
-    $types = array('text', 'text', 'text', 'text', 'text', 'text', 'integer',
-                   'integer', 'timestamp', 'integer', 'integer', 'integer',
-                   'text', 'text');
     $sql = "
     SELECT  e.name,
             e.description,
@@ -603,8 +583,8 @@
             a.area_name,
             e.type,
             e.room_id,
-            e.repeat_id,
-            e.timestamp,
+            e.repeat_id, " .
+            sql_syntax_timestamp_to_unix("e.timestamp") . ",
             (e.end_time - e.start_time) AS tbl_e_duration,
             e.start_time AS tbl_e_start_time,
             e.end_time AS tbl_e_end_time,
@@ -615,9 +595,6 @@
     // but for portability purpose I will not use it.
     if (1 == $series)
     {
-	    // Push extra fields onto types array
-	    array_push($types, 'integer', 'text', 'integer', 'integer', 'integer',
-	               'integer', 'integer');
         $sql .= ", re.rep_type, re.rep_opt, re.rep_num_weeks,
             (re.end_time - re.start_time) AS tbl_r_duration,
             re.start_time AS tbl_r_start_time,
@@ -633,8 +610,11 @@
     AND e.id=$id";
     (1 == $series) ? $sql .= " AND e.repeat_id = re.id" : '';
     //
-    $res = $mdb->query($sql, $types);
-    $row = $mdb->fetchRow($res, MDB_FETCHMODE_ASSOC);
+    $res = sql_query($sql);
+    (! $res) ? fatal_error(0, sql_error()) : '';
+    (sql_count($res) < 1) ? fatal_error(0, get_vocab("invalid_entry_id")) : '';
+    $row = sql_row_keyed($res, 0);
+    sql_free($res);
     // Store all needed values in $mail_previous array to pass to
     // notifyAdminOnDelete function (shorter than individual variables -:) )
     $mail_previous['namebooker']    = $row['name'];
@@ -645,7 +625,7 @@
     $mail_previous['type']          = $row['type'];
     $mail_previous['room_id']       = $row['room_id'];
     $mail_previous['repeat_id']     = $row['repeat_id'];
-    $mail_previous['updated']       = getMailTimeDateString(MDB_Date::mdbstamp2Unix($row['timestamp']));
+    $mail_previous['updated']       = getMailTimeDateString($row[8]);
     $mail_previous['area_admin_email'] = $row['area_admin_email'];
     $mail_previous['room_admin_email'] = $row['room_admin_email'];
     // If we use periods
@@ -679,7 +659,7 @@
             // need to make DST correct in opposite direction to entry creation
             // so that user see what he expects to see
             $mail_previous['duration'] = $row['tbl_r_duration'] -
-                cross_dst($row['tbl_r_start_time'], $row['tbl_r_start_time']);
+                cross_dst($row['tbl_r_start_time'], $row['tbl_r_end_time']);
 	    
 	    $mail_previous['rep_opt'] = "";
 	    switch($row['rep_type'])
@@ -694,7 +674,7 @@
 			$rep_day[5] = $row['rep_opt'][5] != "0";
 			$rep_day[6] = $row['rep_opt'][6] != "0";
 
-			if ($row[14] == 6)
+			if ($row['rep_type'] == 6)
 			{
 				$mail_previous['rep_num_weeks'] = $row['rep_num_weeks'];
 			}
@@ -763,7 +743,7 @@
 			$rep_day[5] = $row['rep_opt'][5] != "0";
 			$rep_day[6] = $row['rep_opt'][6] != "0";
 
-			if ($row[14] == 6)
+			if ($row['rep_type'] == 6)
 			{
 				$mail_previous['rep_num_weeks'] = $row['rep_num_weeks'];
 			}
@@ -881,6 +861,11 @@
     // Call to the PEAR::Mail class
     $mail_object =& Mail::factory($backend, $params);
     $result = $mail_object->send($recipients, $headers, $body);
+
+    if (is_object($result))
+    {
+      error_log("Error sending email: ".$result->getMessage());
+    }
     return $result;
 }
 
Index: web/admin.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/admin.php,v
retrieving revision 1.18
diff -u -r1.18 admin.php
--- web/admin.php	29 Mar 2005 14:10:24 -0000	1.18
+++ web/admin.php	2 Aug 2008 12:36:04 -0000
@@ -1,11 +1,10 @@
 <?php
 
-# $Id: admin.php,v 1.18 2005/03/29 14:10:24 jberanek Exp $
+# $Id: admin.php,v 1.16.2.1 2005/03/29 13:26:15 jberanek Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 
@@ -33,20 +32,19 @@
 // If area is set but area name is not known, get the name.
 if (isset($area))
 {
-    if (empty($area_name))
-    {
-        $area_name = $mdb->queryOne("SELECT area_name 
-                                     FROM   $tbl_area 
-                                     WHERE  id=$area", 'text');
-        if (MDB::isError($area_name))
-        {
-            fatal_error(0, $area_name->getMessage() . "<br>" . $area_name->getUserInfo());
-        }
-    }
-    else
-    {
-        $area_name = unslashes($area_name);
-    }
+	if (empty($area_name))
+	{
+		$res = sql_query("select area_name from $tbl_area where id=$area");
+    	if (! $res) fatal_error(0, sql_error());
+		if (sql_count($res) == 1)
+		{
+			$row = sql_row($res, 0);
+			$area_name = $row[0];
+		}
+		sql_free($res);
+	} else {
+		$area_name = unslashes($area_name);
+	}
 }
 ?>
 
@@ -63,69 +61,40 @@
 <td>
 <?php 
 # This cell has the areas
-$types = array('integer', 'text');
-$res = $mdb->query("SELECT  id, area_name 
-                    FROM    $tbl_area 
-                    ORDER   by area_name", $types);
-if (MDB::isError($res))
-{
-    fatal_error(0, $res->getMessage() . "<br>" . $res->getUserInfo());
-}
-$row = $mdb->fetchInto($res);
-if (!$row)
-{
-    echo get_vocab("noareas");
-}
-else
-{
-    echo "<ul>";
-    do
-    {
-        $area_name_q = urlencode($row[1]);
-        echo "<li><a href=\"admin.php?area=$row[0]&area_name=$area_name_q\">"
+$res = sql_query("select id, area_name from $tbl_area order by area_name");
+if (! $res) fatal_error(0, sql_error());
+
+if (sql_count($res) == 0) {
+	echo get_vocab("noareas");
+} else {
+	echo "<ul>";
+	for ($i = 0; ($row = sql_row($res, $i)); $i++) {
+		$area_name_q = urlencode($row[1]);
+		echo "<li><a href=\"admin.php?area=$row[0]&area_name=$area_name_q\">"
 			. htmlspecialchars($row[1]) . "</a> (<a href=\"edit_area_room.php?area=$row[0]\">" . get_vocab("edit") . "</a>) (<a href=\"del.php?type=area&area=$row[0]\">" .  get_vocab("delete") . "</a>)\n";
 	}
-    while ($row = $mdb->fetchInto($res));
 	echo "</ul>";
 }
-$mdb->freeResult($res);
 ?>
 </td>
 <td>
 <?php
 # This one has the rooms
-if (isset($area))
-{
-    $types = array('integer', 'text', 'text', 'integer');
-    $res = $mdb->query("SELECT  id, room_name, description, capacity
-                        FROM    $tbl_room 
-                        WHERE   area_id=$area 
-                        ORDER   by room_name", $types);
-    if (MDB::isError($res))
-    {
-        fatal_error(0, $res->getMessage() . "<br>" . $res->getUserInfo());
-    }
-    $row = $mdb->fetchInto($res);
-    if (!$row)
-    {
-        echo get_vocab("norooms");
-    }
-    else
-    {
-        echo "<ul>";
-        do
-        {
-            echo "<li>" . htmlspecialchars($row[1]) . "(" . htmlspecialchars($row[2])
+if(isset($area)) {
+	$res = sql_query("select id, room_name, description, capacity from $tbl_room where area_id=$area order by room_name");
+	if (! $res) fatal_error(0, sql_error());
+	if (sql_count($res) == 0) {
+		echo get_vocab("norooms");
+	} else {
+		echo "<ul>";
+		for ($i = 0; ($row = sql_row($res, $i)); $i++) {
+			echo "<li>" . htmlspecialchars($row[1]) . "(" . htmlspecialchars($row[2])
 			. ", $row[3]) (<a href=\"edit_area_room.php?room=$row[0]\">" . get_vocab("edit") . "</a>) (<a href=\"del.php?type=room&room=$row[0]\">" . get_vocab("delete") . "</a>)\n";
 		}
-		while ($row = $mdb->fetchInto($res));
-        echo "</ul>";
+		echo "</ul>";
 	}
-    $mdb->freeResult($res);
-}
-else
-{
-    echo get_vocab("noarea");
+} else {
+	echo get_vocab("noarea");
 }
 
 ?>
Index: web/auth_nw.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_nw.inc,v
retrieving revision 1.6
diff -u -r1.6 auth_nw.inc
--- web/auth_nw.inc	29 Mar 2005 14:10:24 -0000	1.6
+++ web/auth_nw.inc	2 Aug 2008 12:36:05 -0000
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: auth_nw.inc,v 1.6 2005/03/29 14:10:24 jberanek Exp $
+// $Id: auth_nw.inc,v 1.4.2.2 2005/03/29 13:26:15 jberanek Exp $
 
 /* ~~JFL 2003/11/12 By default, use the http session mechanism */
 if (!isset($auth['session'])) $auth['session']='http';
Index: web/search.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/search.php,v
retrieving revision 1.13
diff -u -r1.13 search.php
--- web/search.php	17 Dec 2004 11:24:37 -0000	1.13
+++ web/search.php	2 Aug 2008 12:36:07 -0000
@@ -1,10 +1,9 @@
 <?php
-# $Id: search.php,v 1.13 2004/12/17 11:24:37 jberanek Exp $
+# $Id: search.php,v 1.12 2004/04/14 22:00:03 gwalker Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
 include "$dbsys.inc";
 
 #If we dont know the right date then make it up 
@@ -62,22 +61,13 @@
 		. " OR " . sql_syntax_caseless_contains("E.description", $search_text)
 		. ") AND E.end_time > $now";
 
-if ($debug_flag)
-{
-    echo "<p>DEBUG: SQL: <tt> SELECT count(*) FROM $tbl_entry E WHERE $sql_pred </tt><BR>";
-}
-
 # The first time the search is called, we get the total
 # number of matches.  This is passed along to subsequent
 # searches so that we don't have to run it for each page.
 if(!isset($total))
-{
-    $total = $mdb->queryOne("SELECT count(*) 
-                             FROM $tbl_entry E 
-                             WHERE $sql_pred", 'integer');
-}
+	$total = sql_query1("SELECT count(*) FROM $tbl_entry E WHERE $sql_pred");
 
-if (MDB::isError($total) or (0 == $total))
+if($total <= 0)
 {
 	echo "<B>" . get_vocab("nothing_found") . "</B>\n";
 	include "trailer.inc";
@@ -94,20 +84,13 @@
         FROM $tbl_entry E, $tbl_room R
         WHERE $sql_pred
         AND E.room_id = R.id
-        ORDER BY E.start_time asc";
+        ORDER BY E.start_time asc "
+    . sql_syntax_limit($search["count"], $search_pos);
 
-if ($debug_flag)
-{
-    echo "<p>DEBUG: SQL: <tt> $sql </tt><BR>";
-}
-
-$types = array('integer', 'text', 'text', 'text', 'integer', 'integer');
-$result = $mdb->limitQuery($sql, $types, $search_pos, $search["count"]);
-if (MDB::isError($mdb))
-{
-    fatal_error(0, $result->getMessage() . "\n" . $result->getUserInfo() . "\n");
-}
-$num_records = $mdb->numRows($result);
+# this is a flag to tell us not to display a "Next" link
+$result = sql_query($sql);
+if (! $result) fatal_error(0, sql_error());
+$num_records = sql_count($result);
 
 $has_prev = $search_pos > 0;
 $has_next = $search_pos < ($total-$search["count"]);
@@ -156,7 +139,7 @@
     <TH><?php echo get_vocab("start_date") ?></TH>
    </TR>
 <?php
-while ($row = $mdb->fetchInto($result))
+for ($i = 0; ($row = sql_row($result, $i)); $i++)
 {
 	echo "<TR>";
 	echo "<TD><A HREF=\"view_entry.php?id=$row[0]\">".get_vocab("view")."</A></TD>\n";
@@ -175,7 +158,6 @@
         echo "$link_str</A></TD>";
 	echo "</TR>\n";
 }
-$mdb->freeResult($result);
 
 echo "</TABLE>\n";
 include "trailer.inc";
Index: web/del_entry.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/del_entry.php,v
retrieving revision 1.7
diff -u -r1.7 del_entry.php
--- web/del_entry.php	29 Mar 2005 14:10:24 -0000	1.7
+++ web/del_entry.php	2 Aug 2008 12:36:05 -0000
@@ -1,11 +1,9 @@
 <?php
-# $Id: del_entry.php,v 1.7 2005/03/29 14:10:24 jberanek Exp $
+# $Id: del_entry.php,v 1.5.2.1 2005/03/29 13:26:16 jberanek Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
-MDB::loadFile("Date");
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 include "mrbs_sql.inc";
@@ -23,9 +21,9 @@
         // Gather all fields values for use in emails.
         $mail_previous = getPreviousEntryData($id, $series);
     }
-
+    sql_begin();
 	$result = mrbsDelEntry(getUserName(), $id, $series, 1);
-    $mdb->commit();
+	sql_commit();
 	if ($result)
 	{
         // Send a mail to the Administrator
@@ -37,4 +35,4 @@
 
 // If you got this far then we got an access denied.
 showAccessDenied($day, $month, $year, $area);
-?>
+?>
\ No newline at end of file
Index: web/week.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/week.php,v
retrieving revision 1.39
diff -u -r1.39 week.php
--- web/week.php	17 Dec 2004 11:24:37 -0000	1.39
+++ web/week.php	2 Aug 2008 12:36:07 -0000
@@ -1,12 +1,11 @@
 <?php
-# $Id: week.php,v 1.39 2004/12/17 11:24:37 jberanek Exp $
+# $Id: week.php,v 1.37.2.2 2007/02/13 12:53:36 jberanek Exp $
 
 # mrbs/week.php - Week-at-a-time view
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 include "mincals.inc";
@@ -23,7 +22,7 @@
 	$year  = date("Y");
 } else {
 # Make the date valid if day is more then number of days in month:
-	while (!checkdate($month, $day, $year))
+	while (!checkdate(intval($month), intval($day), intval($year)))
 		$day--;
 }
 
@@ -87,42 +86,24 @@
   # show either a select box or the normal html list
   if ($area_list_format == "select") {
 	echo make_area_select_html('week.php', $area, $year, $month, $day); # from functions.inc
-    $this_area_name = $mdb->queryOne("SELECT    area_name 
-                                      FROM      $tbl_area
-                                      WHERE     id=$area", 'text');
-    $this_room_name = $mdb->queryOne("SELECT    room_name 
-                                      FROM      $tbl_room
-                                      WHERE     id=$room", 'text');
+	$this_area_name = sql_query1("select area_name from $tbl_area where id=$area");
+	$this_room_name = sql_query1("select room_name from $tbl_room where id=$room");
   } else {
-    $sql = "SELECT      id, area_name 
-            FROM        $tbl_area 
-            ORDER BY    area_name";
-    $types = array('integer', 'text');
-    $res = $mdb->query($sql, $types);
-    if (!MDB::isError($res))
-    {
-        while ($row = $mdb->fetchInto($res))
-        {
-            if ( $pview != 1 )
-            {
-                echo "<a href=\"week.php?year=$year&month=$month&day=$day&area=$row[0]\">";
-            }
-            if ($row[0] == $area)
-            {
-                $this_area_name = htmlspecialchars($row[1]);
-                if ( $pview != 1 )
-                {
-                    echo "<font color=\"red\">$this_area_name</font></a><br>\n";
-                }
-            }
-            else if ( $pview != 1 )
-            {
-                echo htmlspecialchars($row[1]) . "</a><br>\n";
-            }
-        }
-    }
-} // end area display if
-
+	$sql = "select id, area_name from $tbl_area order by area_name";
+	$res = sql_query($sql);
+	if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
+	{
+		if ( $pview != 1 )
+			echo "<a href=\"week.php?year=$year&month=$month&day=$day&area=$row[0]\">";
+		if ($row[0] == $area)
+		{
+			$this_area_name = htmlspecialchars($row[1]);
+			if ( $pview != 1 )
+				echo "<font color=\"red\">$this_area_name</font></a><br>\n";
+		}
+		else if ( $pview != 1 ) echo htmlspecialchars($row[1]) . "</a><br>\n";
+	}
+  } # end area display if
 if ( $pview != 1) {
 	echo "</td>\n";
 
@@ -134,33 +115,19 @@
   if ($area_list_format == "select") {
 	echo make_room_select_html('week.php', $area, $room, $year, $month, $day); # from functions.inc
   } else {
-    $sql = "SELECT      id, room_name, description
-            FROM        $tbl_room 
-            WHERE       area_id=$area 
-            ORDER BY    room_name";
-    $types = array('integer', 'text');
-    $res = $mdb->query($sql, $types);
-    if (!MDB::isError($res))
-    {
-        while ($row = $mdb->fetchInto($res))
-        {
-            if ( $pview != 1 )
-            {
-                echo "<a href=\"week.php?year=$year&month=$month&day=$day&area=$area&room=$row[0]\" title=\"$row[2]\">";
-            }
-            if ($row[0] == $room)
-            {
-                $this_room_name = htmlspecialchars($row[1]);
-                if ( $pview != 1 )
-                {
-                    echo "<font color=\"red\">$this_room_name</font></a><br>\n";
-                }
-            }
-            else if ( $pview != 1 )
-            {
-                echo htmlspecialchars($row[1]) . "</a><br>\n";
-            }
-        }
+	$sql = "select id, room_name, description from $tbl_room where area_id=$area order by room_name";
+	$res = sql_query($sql);
+	if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
+	{
+		if ( $pview != 1 )
+			echo "<a href=\"week.php?year=$year&month=$month&day=$day&area=$area&room=$row[0]\" title=\"$row[2]\">";
+		if ($row[0] == $room)
+		{
+			$this_room_name = htmlspecialchars($row[1]);
+			if ( $pview != 1 )
+				echo "<font color=\"red\">$this_room_name</font></a><br>\n";
+		}
+		else if ( $pview != 1 ) echo htmlspecialchars($row[1]) . "</a><br>\n";
 	}
 } # end select if
 
@@ -216,11 +183,10 @@
 # This data will be retrieved day-by-day
 for ($j = 0; $j<=($num_of_days-1) ; $j++) {
 
-$sql = "SELECT  start_time, end_time, type, name, id, description
-        FROM    $tbl_entry
-        WHERE   room_id=$room
-        AND     start_time <= $pm7[$j] 
-        AND     end_time > $am7[$j]";
+	$sql = "SELECT start_time, end_time, type, name, id, description
+	        FROM $tbl_entry
+	        WHERE room_id = $room
+	        AND start_time <= $pm7[$j] AND end_time > $am7[$j]";
 
 	# Each row returned from the query is a meeting. Build an array of the
 	# form:  d[weekday][slot][x], where x = id, color, data, long_desc.
@@ -231,62 +197,54 @@
 	# Note: weekday here is relative to the $weekstarts configuration variable.
 	# If 0, then weekday=0 means Sunday. If 1, weekday=0 means Monday.
 
-
 	if ($debug_flag) echo "<br>DEBUG: query=$sql\n";
-	$types = array('integer', 'integer', 'text', 'text', 'integer');
-	$res = $mdb->query($sql, $types);
-	if (MDB::isError($res))
+	$res = sql_query($sql);
+	if (! $res) echo sql_error();
+	else for ($i = 0; ($row = sql_row($res, $i)); $i++)
 	{
-    	echo $res->getMessage() . "<br>" . $res->getUserInfo() . "<br>";
-	}
-	else
-	{
-    	while ($row = $mdb->fetchInto($res))
-    	{
-			if ($debug_flag)
-				echo "<br>DEBUG: result $i, id $row[4], starts $row[0], ends $row[1]\n";
-
-			# $d is a map of the screen that will be displayed
- 			# It looks like:
- 			#     $d[Day][Time][id]
- 			#                  [color]
- 			#                  [data]
- 			# where Day is in the range 0 to $num_of_days. 
+		if ($debug_flag)
+			echo "<br>DEBUG: result $i, id $row[4], starts $row[0], ends $row[1]\n";
+
+	 	# $d is a map of the screen that will be displayed
+ 		# It looks like:
+ 		#     $d[Day][Time][id]
+ 		#                  [color]
+ 		#                  [data]
+ 		# where Day is in the range 0 to $num_of_days. 
  	
-	 		# Fill in the map for this meeting. Start at the meeting start time,
- 			# or the day start time, whichever is later. End one slot before the
- 			# meeting end time (since the next slot is for meetings which start then),
- 			# or at the last slot in the day, whichever is earlier.
- 			# Note: int casts on database rows for max may be needed for PHP3.
- 			# Adjust the starting and ending times so that bookings which don't
-	 		# start or end at a recognized time still appear.
+ 		# Fill in the map for this meeting. Start at the meeting start time,
+ 		# or the day start time, whichever is later. End one slot before the
+ 		# meeting end time (since the next slot is for meetings which start then),
+ 		# or at the last slot in the day, whichever is earlier.
+ 		# Note: int casts on database rows for max may be needed for PHP3.
+ 		# Adjust the starting and ending times so that bookings which don't
+ 		# start or end at a recognized time still appear.
  
-			$start_t = max(round_t_down($row[0], $resolution, $am7[$j]), $am7[$j]);
- 			$end_t = min(round_t_up($row[1], $resolution, $am7[$j]) - $resolution, $pm7[$j]);
+		$start_t = max(round_t_down($row[0], $resolution, $am7[$j]), $am7[$j]);
+ 		$end_t = min(round_t_up($row[1], $resolution, $am7[$j]) - $resolution, $pm7[$j]);
 
-	 		for ($t = $start_t; $t <= $end_t; $t += $resolution)
- 			{
-				$d[$j][date($format,$t)]["id"]    = $row[4];
- 				$d[$j][date($format,$t)]["color"] = $row[2];
- 				$d[$j][date($format,$t)]["data"]  = "";
- 				$d[$j][date($format,$t)]["long_descr"]  = "";
- 			}
+ 		for ($t = $start_t; $t <= $end_t; $t += $resolution)
+ 		{
+			$d[$j][date($format,$t)]["id"]    = $row[4];
+ 			$d[$j][date($format,$t)]["color"] = $row[2];
+ 			$d[$j][date($format,$t)]["data"]  = "";
+ 			$d[$j][date($format,$t)]["long_descr"]  = "";
+ 		}
  
- 			# Show the name of the booker in the first segment that the booking
- 			# happens in, or at the start of the day if it started before today.
- 			if ($row[1] < $am7[$j])
-			{
- 				$d[$j][date($format,$am7[$j])]["data"] = $row[3];
- 				$d[$j][date($format,$am7[$j])]["long_descr"] = $row[5];
-			}
- 			else
-			{
- 				$d[$j][date($format,$start_t)]["data"] = $row[3];
- 				$d[$j][date($format,$start_t)]["long_descr"] = $row[5];
-			}
+ 		# Show the name of the booker in the first segment that the booking
+ 		# happens in, or at the start of the day if it started before today.
+ 		if ($row[1] < $am7[$j])
+		{
+ 			$d[$j][date($format,$am7[$j])]["data"] = $row[3];
+ 			$d[$j][date($format,$am7[$j])]["long_descr"] = $row[5];
+		}
+ 		else
+		{
+ 			$d[$j][date($format,$start_t)]["data"] = $row[3];
+ 			$d[$j][date($format,$start_t)]["long_descr"] = $row[5];
 		}
 	}
-}
+} 
 
 if ($debug_flag) 
 {
@@ -317,12 +275,11 @@
             {
 	    echo "<SCRIPT language=\"JavaScript\" type=\"text/javascript\" src=\"xbLib.js\"></SCRIPT>\n";
             echo "<SCRIPT language=\"JavaScript\">InitActiveCell("
-               . ($show_plus_link ? "true" : "false") . ", "			// Show (+)
-               . "true, "							// Highlight left title column
-               . ((FALSE != $times_right_side) ? "true" : "false") . ", "	// Highlight right title column
-               . "\"$highlight_method\", "					// "bgcolor", "class", or "hybrid"
-               . "\"" . get_vocab("click_to_reserve") . "\", "			// Status bar message
-	       . "2"								// Drag effect: 0=None; 1=Rectangle; 2=Columns; 3=Rows
+               . ($show_plus_link ? "true" : "false") . ", "
+               . "true, "
+               . ((FALSE != $times_right_side) ? "true" : "false") . ", "
+               . "\"$highlight_method\", "
+               . "\"" . get_vocab("click_to_reserve") . "\""
                . ");</SCRIPT>\n";
             }
 
@@ -385,7 +342,7 @@
 	} else {
 		echo "<a href=\"$hilite_url=$time_t\" title=\""
         . get_vocab("highlight_line") . "\">"
-        . utf8_date(hour_min_format(),$t) . "</a></td>";
+        . utf8_strftime(hour_min_format(),$t) . "</a></td>";
 	}
 
 	# Color to use for empty cells: white, unless highlighting this row:
@@ -493,7 +450,7 @@
             tdcell("red");
             echo "<a href=\"$hilite_url=$time_t\" title=\""
             . get_vocab("highlight_line") . "\">"
-            . utf8_date(hour_min_format(),$t) . "</a></td>";
+            . utf8_strftime(hour_min_format(),$t) . "</a></td>";
         }
     }
 
Index: web/session_nt.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/session_nt.inc,v
retrieving revision 1.3
diff -u -r1.3 session_nt.inc
--- web/session_nt.inc	29 Mar 2005 14:10:24 -0000	1.3
+++ web/session_nt.inc	2 Aug 2008 12:36:07 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: session_nt.inc,v 1.3 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: session_nt.inc,v 1.1.4.1 2005/03/29 13:26:27 jberanek Exp $
  *
  * Session management scheme that uses Windows NT domain users and Internet 
  * Information Server as the source for user authentication.
Index: web/session_host.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/session_host.inc,v
retrieving revision 1.3
diff -u -r1.3 session_host.inc
--- web/session_host.inc	29 Mar 2005 14:10:24 -0000	1.3
+++ web/session_host.inc	2 Aug 2008 12:36:07 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: session_host.inc,v 1.3 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: session_host.inc,v 1.1.4.1 2005/03/29 13:26:27 jberanek Exp $
  *
  * This is a slight variant of session_ip. 
  * Session management scheme that uses the DNS name of the computer
Index: web/lang.en
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.en,v
retrieving revision 1.27
diff -u -r1.27 lang.en
--- web/lang.en	17 May 2005 14:45:13 -0000	1.27
+++ web/lang.en	2 Aug 2008 12:36:05 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.en,v 1.27 2005/05/17 14:45:13 jberanek Exp $
+# $Id: lang.en,v 1.26.2.2 2006/10/09 15:53:59 jberanek Exp $
 
 # This file contains PHP code that specifies language specific strings
 # The default strings come from lang.en, and anything in a locale
@@ -107,6 +107,8 @@
 $vocab["too_may_entrys"]     = "The selected options will create too many entries.<BR>Please use different options!";
 $vocab["returncal"]          = "Return to calendar view";
 $vocab["failed_to_acquire"]  = "Failed to acquire exclusive database access";
+$vocab["invalid_booking"]    = "Invalid booking";
+$vocab["must_set_description"] = "You must set a brief description for the booking. Please go back and enter one.";
 $vocab["mail_subject_entry"] = $mail["subject"];
 $vocab["mail_body_new_entry"] = $mail["new_entry"];
 $vocab["mail_body_del_entry"] = $mail["deleted_entry"];
Index: web/auth_db_ext.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_db_ext.inc,v
retrieving revision 1.3
diff -u -r1.3 auth_db_ext.inc
--- web/auth_db_ext.inc	20 Aug 2005 19:03:31 -0000	1.3
+++ web/auth_db_ext.inc	2 Aug 2008 12:36:04 -0000
@@ -1,20 +1,23 @@
 <?php
 /*****************************************************************************\
-*                                                                             *
-*   File name       auth_db_ext.inc                                           *
-*                                                                             *
-*   Description     Authenticate users from a table in another database.      *
-*                                                                             *
-*   Notes           To use this authentication scheme, set in config.inc.php: *
-*                       $auth["type"]  = "db_ext";                            *
-*                                                                             *
-*   History                                                                   *
-*    2005/05/11 JPB Created this file                                         *
-*    Remaining history in ChangeLog and CVS logs                              *
-*                                                                             *
+*									      *
+*   File name       auth_db_ext.inc					      *
+*									      *
+*   Description	    Authenticate users from a table in another database.      *
+*									      *
+*   Notes	    To use this authentication scheme, set in config.inc.php: *
+*			$auth["type"]  = "db_ext";			      *
+*                   Assumes passwords are stored in the other table in        *
+*                   plaintext, authValidateUser() will need to be changed if  *
+*                   the password is stored differently.                       *
+*									      *
+*   History								      *
+*    2005/05/11 JPB Created this file					      *
+*									      *
 \*****************************************************************************/
 
-// $Id: auth_db_ext.inc,v 1.3 2005/08/20 19:03:31 jberanek Exp $
+// $Id: auth_db_ext.inc,v 1.1.2.2 2005/08/20 09:46:44 jberanek Exp $
+
 
 /* authValidateUser($user, $pass)
  * 
@@ -30,80 +33,72 @@
 
 function authValidateUser($user, $pass)
 {
-    global $auth, $oci8_home;
+   global $auth;
+
+   $retval = 0;
+
+   $user=strtolower($user);
+
+   $conn = mysql_connect($auth['db_ext']['db_host'],
+                         $auth['db_ext']['db_username'],
+                         $auth['db_ext']['db_password']);
+
+   mysql_select_db($auth['db_ext']['db_name'], $conn);
+
+   $user = addslashes($user);
 
-    $retval = 0;
+   if ($auth['db_ext']['use_md5_passwords'] == 1)
+   {
+     $pass = md5($pass);
+   }
+
+   $query = "SELECT " . $auth['db_ext']['column_name_password'] .
+            " FROM " . $auth['db_ext']['db_table'] .
+            " WHERE ". $auth['db_ext']['column_name_username'] . "='$user'";
 
-    $user=strtolower($user);
+   $r = mysql_query($query, $conn);
 
-    require_once("MDB.php");
+   if ($r && (mysql_num_rows($r) == 1)) // force a unique match
+   {
+     $row = mysql_fetch_row($r);
+
+     switch ($auth['db_ext']['password_format'])
+     {
+       case 'md5':
+         if (md5($pass) == $row[0])
+         {
+           $retval = 1;
+         }
+         break;
+
+       case 'sha1':
+         if (sha1($pass) == $row[0])
+         {
+           $retval = 1;
+         }
+         break;
+
+       case 'crypt':
+         $recrypt = crypt($pass,$row[0]);
+         if ($row[0] == $recrypt)
+         {
+           $retval = 1;
+         }
+         break;
+
+       default:
+         // Otherwise assume plaintext
+         if ($pass == $row[0])
+         {
+           $retval = 1;
+         }
+         break;
+     }
+   }
 
-    $my_mdb=&MDB::connect(array(
-                              "phptype"  => $auth['db_ext']['db_sys'],
-                              "hostspec" => $auth['db_ext']['db_host'],
-                              "port"     => $auth['db_ext']['db_port'],
-                              "protocol" => $auth['db_ext']['db_protocol'],
-                              "username" => $auth['db_ext']['db_username'],
-                              "password" => $auth['db_ext']['db_password'],
-                              "database" => $auth['db_ext']['db_name']
-                              ),
-                          array(
-                              'optimize'   => 'portability',
-                              'HOME'       => $oci8_home 
-                              )
-        );
-
-  if (!MDB::isError($my_mdb)) {
-
-      $r = $my_mdb->queryOne("SELECT " . $auth['db_ext']['column_name_password'] .
-                             " FROM " . $auth['db_ext']['db_table'] .
-                             " WHERE " . $auth['db_ext']['column_name_username'] .
-                             "=" . $my_mdb->getTextValue($user),
-                             'integer');
-
-      if (MDB::isError($r)) {
-          echo $r->getMessage() . "<br>" . $r->getUserInfo();
-          exit;
-      } else {
-
-          switch ($auth['db_ext']['password_format'])
-          {
-              case 'md5':
-                  if (md5($pass) == $r)
-                  {
-                      $retval = 1;
-                  }
-                  break;
-
-              case 'sha1':
-                  if (sha1($pass) == $r)
-                  {
-                      $retval = 1;
-                  }
-                  break;
-
-              case 'crypt':
-                  $recrypt = crypt($pass,$r);
-                  if ($r == $recrypt)
-                  {
-                      $retval = 1;
-                  }
-                  break;
-
-              default:
-                  // Otherwise assume plaintext
-                  if ($pass == $r)
-                  {
-                      $retval = 1;
-                  }
-                  break;
-          }
-      }
-      
-      $my_mdb->disconnect();
+   mysql_close($conn);
 
-  }
-  return $retval;
+   return $retval;
 }
 
 /* authGetUserLevel($user)
Index: web/pgsql.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/pgsql.inc,v
retrieving revision 1.7
diff -u -r1.7 pgsql.inc
--- web/pgsql.inc	17 Dec 2004 11:24:37 -0000	1.7
+++ web/pgsql.inc	2 Aug 2008 12:36:07 -0000
@@ -1,13 +1,142 @@
 <?php
-// $Id: pgsql.inc,v 1.7 2004/12/17 11:24:37 jberanek Exp $
+// $Id: pgsql.inc,v 1.6 2004/04/25 18:10:58 jflarvoire Exp $
 
-/* pgsql.inc - Simple PHP database support for PostgreSQL.
-   Include this file after database.inc.php.
-   This file contains specific DBMS features/commands not handled by MDB
-   database wrapper.
- */
+// pgsql.inc - Simple PHP database support for PostgreSQL.
+// Include this file after defining the following variables:
+//   $db_host = The hostname of the database server
+//   $db_login = The username to use when connecting to the database
+//   $db_password = The database account password
+//   $db_database = The database name.
+// Including this file connects you to the database, or exits on error.
+// This code hides an implementation difference in error reporting by the PHP
+// PostgreSQL and MySQL extensions. PostgreSQL reports an E_WARNING error
+// for some queries which MySQL does not; both properly set their own
+// error code and the PHP error raised by PostgreSQL is not needed.
+// The code here turns that off with error_reporting() calls around each
+// pg_exec call, so as not to make you change the display_errors
+// setting in your php.ini configuration file.
 
 
+// Free a results handle. You need not call this if you call sql_row or
+// sql_row_keyed until the row returns 0, since sql_row frees the results
+// handle when you finish reading the rows.
+function sql_free ($r)
+{
+	pg_free_result($r);
+}
+
+// Execute a non-SELECT SQL command (insert/update/delete).
+// Returns the number of tuples affected if OK (a number >= 0).
+// Returns -1 on error; use sql_error to get the error message.
+function sql_command ($sql)
+{
+	global $db_c;
+	$e = error_reporting(E_ALL & ~(E_WARNING|E_NOTICE));
+	$r = pg_query($db_c, $sql);
+	error_reporting($e);
+	if (! $r) return -1;
+	$n = pg_affected_rows($r);
+	pg_free_result($r);
+	return $n;
+}
+
+// Execute an SQL query which should return a single non-negative number value.
+// This is a lightweight alternative to sql_query, good for use with count(*)
+// and similar queries. It returns -1 on error or if the query did not return
+// exactly one value, so error checking is somewhat limited.
+// It also returns -1 if the query returns a single NULL value, such as from
+// a MIN or MAX aggregate function applied over no rows.
+function sql_query1 ($sql)
+{
+	global $db_c;
+	$e = error_reporting(E_ALL & ~(E_WARNING|E_NOTICE));
+	$r = pg_query($db_c, $sql);
+	error_reporting($e);
+	if (! $r) return -1;
+	if (pg_num_rows($r) != 1 || pg_num_fields($r) != 1
+		|| ($result = pg_fetch_result($r, 0, 0)) == "") $result = -1;
+	pg_free_result($r);
+	return $result;
+}
+
+// Execute an SQL query. Returns a database-dependent result handle,
+// which should be passed back to sql_row or sql_row_keyed to get the results.
+// Returns 0 on error; use sql_error to get the error message.
+function sql_query ($sql)
+{
+	global $db_c;
+	$e = error_reporting(E_ALL & ~(E_WARNING|E_NOTICE));
+	$r = pg_query($db_c, $sql);
+	error_reporting($e);
+	return $r;
+}
+
+// Return a row from a result. The first row is 0.
+// The row is returned as an array with index 0=first column, etc.
+// When called with i >= number of rows in the result, cleans up from
+// the query and returns 0.
+// Typical usage: $i = 0; while ((a = sql_row($r, $i++))) { ... }
+function sql_row ($r, $i)
+{
+	if ($i >= pg_num_rows($r))
+	{
+		pg_free_result($r);
+		return 0;
+	}
+	return pg_fetch_row($r, $i);
+}
+
+// Return a row from a result as an associative array keyed by field name.
+// The first row is 0.
+// This is actually upward compatible with sql_row since the underlying
+// routing also stores the data under number indexes.
+// When called with i >= number of rows in the result, cleans up from
+// the query and returns 0.
+function sql_row_keyed ($r, $i)
+{
+	if ($i >= pg_num_rows($r))
+	{
+		pg_free_result($r);
+		return 0;
+	}
+	return pg_fetch_array($r, $i);
+}
+
+// Return the number of rows returned by a result handle from sql_query.
+function sql_count ($r)
+{
+	return pg_num_rows($r);
+}
+
+// Return the value of an autoincrement field from the last insert.
+// For PostgreSQL, this must be a SERIAL type field.
+function sql_insert_id($table, $field)
+{
+	$seq_name = $table . "_" . $field . "_seq";
+	return sql_query1("select last_value from $seq_name");
+}
+
+// Return the text of the last error message.
+function sql_error()
+{
+	global $db_c;
+	return pg_last_error($db_c);
+}
+
+// Begin a transaction, if the database supports it. This is used to
+// improve PostgreSQL performance for multiple insert/delete/updates.
+// There is no rollback support, since MySQL doesn't support it.
+function sql_begin()
+{
+	sql_command("BEGIN");
+}
+
+// Commit (end) a transaction. See sql_begin().
+function sql_commit()
+{
+	sql_command("COMMIT");
+}
+
 // Acquire a mutual-exclusion lock on the named table. For portability:
 // This will not lock out SELECTs.
 // It may lock out DELETE/UPDATE/INSERT or not, depending on the implementation.
@@ -22,50 +151,107 @@
 // It does not timeout, but waits forever for the lock.
 function sql_mutex_lock($name)
 {
-    global $sql_mutex_shutdown_registered, $sql_mutex_unlock_name, $mdb;
-    if (MDB::isError($mdb->autoCommit(FALSE))
-        || MDB::isError($mdb->query("LOCK TABLE $name IN EXCLUSIVE MODE")))
-    {
-        return 0;
-    }
-
-    $sql_mutex_unlock_name = $name;
-    if (empty($sql_mutex_shutdown_registered))
-    {
-        register_shutdown_function("sql_mutex_cleanup");
-        $sql_mutex_shutdown_registered = 1;
-    }
-    return 1;
+	global $sql_mutex_shutdown_registered, $sql_mutex_unlock_name;
+	if (sql_command("BEGIN") < 0
+		|| sql_command("LOCK TABLE $name IN EXCLUSIVE MODE") < 0) return 0;
+	$sql_mutex_unlock_name = $name;
+	if (empty($sql_mutex_shutdown_registered))
+	{
+		register_shutdown_function("sql_mutex_cleanup");
+		$sql_mutex_shutdown_registered = 1;
+	}
+	return 1;
+}
+
+// Release a mutual-exclusion lock on the named table. See sql_mutex_lock.
+// In PostgreSQL, all locks are released by closing the transaction; there
+// is no other way.
+function sql_mutex_unlock($name)
+{
+	global $sql_mutex_unlock_name;
+	sql_command("COMMIT");
+	$sql_mutex_unlock_name = "";
 }
 
+// Shutdown function to clean up a forgotten lock. For internal use only.
+function sql_mutex_cleanup()
+{
+	global $sql_mutex_shutdown_registered, $sql_mutex_unlock_name;
+	if (!empty($sql_mutex_unlock_name))
+	{
+		sql_command("ABORT");
+		$sql_mutex_unlock_name = "";
+	}
+}
 
 // Return a string identifying the database version:
 function sql_version()
 {
-    global $mdb;
-    $v = $mdb->queryOne("select version()");
-    return $v;
+	$r = sql_query("select version()");
+	$v = sql_row($r, 0);
+	sql_free($r);
+	return $v[0];
 }
 
+// Generate non-standard SQL for LIMIT clauses:
+function sql_syntax_limit($count, $offset)
+{
+	return " LIMIT $count OFFSET $offset ";
+}
+
+// Generate non-standard SQL to output a TIMESTAMP as a Unix-time:
+function sql_syntax_timestamp_to_unix($fieldname)
+{
+	return " DATE_PART('epoch', $fieldname) ";
+}
 
-/**
- * sql_syntax_caseless_contains().
- *
- * Generate non-standard SQL to match a string anywhere in a field's value
- * in a case insensitive manner.
- * In PostgreSQL, we can do case insensitive regexp with ~*, but not case
- * insensitive LIKE matching.
- * Quotemeta escapes everything we need except for single quotes.
- *
- * @param    string    $fieldname    field to apply regexp
- * @param    string    $s            un-escaped/un-slashed string to search for
- * @return   string    fieldname and escaped/slashed string
- */
+// Generate non-standard SQL to match a string anywhere in a field's value
+// in a case insensitive manner. $s is the un-escaped/un-slashed string.
+// In PostgreSQL, we can do case insensitive regexp with ~*, but not case
+// insensitive LIKE matching.
+// Quotemeta escapes everything we need except for single quotes.
 function sql_syntax_caseless_contains($fieldname, $s)
 {
-    $s = quotemeta($s);
-    $s = str_replace("'", "''", $s);
-    return " $fieldname ~* " . $mdb->getTextValue("$s") . " ";
+	$s = quotemeta($s);
+	$s = str_replace("'", "''", $s);
+	return " $fieldname ~* '$s' ";
+}
+
+// Returns the name of a field.
+function sql_field_name($result, $index)
+{
+	return pg_field_name($result, $index);
+}
+
+// Returns the type of a field. (one of "int", "real", "string", "blob", etc...)
+function sql_field_type($result, $index)
+{
+	return pg_field_type($result, $index);
+}
+
+// Returns the number of fields in a result.
+function sql_num_fields($result)
+{
+	return pg_num_fields($result);
+}
+
+// Establish a database connection.
+// On connection error, the message will be output without a proper HTML
+// header. There is no way I can see around this; if track_errors isn't on
+// there seems to be no way to supress the automatic error message output and
+// still be able to access the error text.
+$conninfo = (empty($db_host) ? "" : "host=$db_host ")
+	. "dbname=$db_database user=$db_login password=$db_password";
+if (empty($db_nopersist))
+	$db_c = pg_pconnect($conninfo);
+else
+	$db_c = pg_connect($conninfo);
+unset($conninfo);
+
+if (!$db_c)
+{
+	echo "\n<p>\n" . get_vocab("failed_connect_db") . "\n";
+	exit;
 }
 
 ?>
Index: web/site_faq.html
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/site_faq.html,v
retrieving revision 1.3
diff -u -r1.3 site_faq.html
--- web/site_faq.html	17 Dec 2004 11:24:37 -0000	1.3
+++ web/site_faq.html	2 Aug 2008 12:36:07 -0000
@@ -1,4 +1,4 @@
-<!-- $Id: site_faq.html,v 1.3 2004/12/17 11:24:37 jberanek Exp $ -->
+<!-- $Id: site_faq.html,v 1.2 2001/02/25 01:34:20 lbayuk Exp $ -->
 <p>
 
 <b><a name=top>Authentication</a></b>
Index: web/session_omni.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/session_omni.inc,v
retrieving revision 1.3
diff -u -r1.3 session_omni.inc
--- web/session_omni.inc	29 Mar 2005 14:10:24 -0000	1.3
+++ web/session_omni.inc	2 Aug 2008 12:36:07 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: session_omni.inc,v 1.3 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: session_omni.inc,v 1.1.4.1 2005/03/29 13:26:27 jberanek Exp $
  *
  * Session management scheme that relies on OmniHttpd security for user 
  * authentication. THIS is suitable for few users because we have to create all
Index: web/session_php.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/session_php.inc,v
retrieving revision 1.11
diff -u -r1.11 session_php.inc
--- web/session_php.inc	20 Aug 2005 19:03:31 -0000	1.11
+++ web/session_php.inc	2 Aug 2008 12:36:07 -0000
@@ -9,18 +9,26 @@
 *                   config.inc.php:                                           *
 *                       $auth["session"]  = "php";                            *
 *                                                                             *
+*                                                                             *
 *   History                                                                   *
 *    2003/11/09 JFL Created this file                                         *
 *    Remaining history in ChangeLog and CVS logs                              *
 *                                                                             *
 \*****************************************************************************/
 
-// $Id: session_php.inc,v 1.11 2005/08/20 19:03:31 jberanek Exp $
+// $Id: session_php.inc,v 1.8.2.5 2007/02/13 12:53:35 jberanek Exp $
 
 global $PHP_SELF;
 
-$cookie_path = $PHP_SELF;
-$cookie_path = ereg_replace('[^/]*$', '', $cookie_path);
+if (isset($cookie_path_override))
+{
+    $cookie_path = $cookie_path_override;
+}
+else
+{
+    $cookie_path = $PHP_SELF;
+    $cookie_path = ereg_replace('[^/]*$', '', $cookie_path);
+}
 session_set_cookie_params(0, $cookie_path);
 session_start();
 
@@ -42,9 +50,9 @@
         }
     } else {
         $NewUserName = unslashes($NewUserName);
-        $NewPassword = unslashes($NewPassword);
+        $NewUserPassword = unslashes($NewUserPassword);
         if (!authValidateUser($NewUserName, $NewUserPassword)) {
-            print_header(0, 0, 0, 0, "ActivateName");
+            print_header(0, 0, 0, 0);
             echo "<P>".get_vocab('unknown_user')."</P>\n";
             printLoginForm($TargetURL);
             exit();
@@ -78,16 +86,6 @@
 {
     global $PHP_SELF;
 ?>
-<script language="JavaScript">
-<!-- Begin
-function ActivateName() { // Activate the name field in the form.
-  if (document.getElementById) {
-    nameField = document.getElementById("NameField");
-    if (nameField) nameField.focus();
-  }
-}
-// End -->
-</script>
 <p>
   <?php echo get_vocab("please_login") ?>
 </p>
@@ -95,16 +93,16 @@
   <table>
     <tr>
       <td align="right"><?php echo get_vocab("user_name") ?></td>
-      <td><input type="text" id="NameField" name="NewUserName" tabindex="1" /></td>
+      <td><input type="text" name="NewUserName" /></td>
     </tr>
     <tr>
       <td align="right"><?php echo get_vocab("user_password") ?></td>
-      <td><input type="password" name="NewUserPassword" tabindex="2" /></td>
+      <td><input type="password" name="NewUserPassword" /></td>
     </tr>
   </table>
   <input type="hidden" name="TargetURL" value="<?php echo $TargetURL ?>" /> <br />
   <input type="hidden" name="Action" value="SetName" /> <br />
-  <input type="submit" value=" <?php echo get_vocab('login') ?> " tabindex="3" /> <br />
+  <input type="submit" value=" <?php echo get_vocab('login') ?> " /> <br />
 </form>
 </body>
 </html>
@@ -117,7 +115,7 @@
 */
 if (isset($Action) && ($Action == "QueryName"))
 {
-    print_header(0, 0, 0, 0, "ActivateName");
+    print_header(0, 0, 0, 0);
     printLoginForm($TargetURL);
     exit();
 }
@@ -132,7 +130,7 @@
 {
     global $PHP_SELF, $QUERY_STRING;
 
-    print_header(0, 0, 0, 0, "ActivateName");
+    print_header(0, 0, 0, 0);
 
     echo "<p>".get_vocab("norights")."</p>\n";
 
@@ -177,37 +175,39 @@
           "roommatch=&namematch=&descrmatch=&summarize=1&sortby=r&display=d&".
           "sumby=d&creatormatch=$user"; ?>
 
-    <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
-      <A name="logonBox" href="<?php echo "$search_string\" title=\""
+              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+                <A name="logonBox" href="<?php echo "$search_string\" title=\""
          . get_vocab('show_my_entries') . "\">" . get_vocab('you_are')." "
          .$user ?></A><br>
-          <FORM METHOD=POST ACTION="admin.php">
-	    <input type="hidden" name="TargetURL" value="<?php echo $TargetURL ?>" />
-	    <input type="hidden" name="Action" value="SetName" />
-	    <input type="hidden" name="NewUserName" value="" />
-	    <input type="hidden" name="NewUserPassword" value="" />
-	    <input type="submit" value=" <?php echo get_vocab('logoff') ?> " />
-	  </FORM>
-<?php if (isset($user_list_link)) print "	  <br>\n	  " .
-	    "<A href='$user_list_link'>" . get_vocab('user_list') . "</A><br>\n" ;
+                <FORM METHOD=POST ACTION="admin.php">
+	          <input type="hidden" name="TargetURL" value="<?php echo $TargetURL ?>" />
+	          <input type="hidden" name="Action" value="SetName" />
+	          <input type="hidden" name="NewUserName" value="" />
+	          <input type="hidden" name="NewUserPassword" value="" />
+	          <input type="submit" value=" <?php echo get_vocab('logoff') ?> " />
+                </FORM>
+<?php if (isset($user_list_link)) print "
+                <br>
+                <A href=\"$user_list_link\">" . get_vocab('user_list') . "</A><br>\n";
 ?>
-	</TD>
+              </TD>
 <?php
     }
 else
     {
 ?>
-	<TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
-	  <A name="logonBox" href=""><?php echo get_vocab('unknown_user'); ?></A><br>
-          <FORM METHOD=POST ACTION="admin.php">
-	    <input type="hidden" name="TargetURL" value="<?php echo $TargetURL ?>" />
-	    <input type="hidden" name="Action" value="QueryName" />
-	    <input type="submit" value=" <?php echo get_vocab('login') ?> " />
-	  </FORM>
-<?php if (isset($user_list_link)) print "	  <br>\n	  " .
-	    "<A href=\"$user_list_link\">" . get_vocab('user_list') . "</A><br>\n" ;
+              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+                <A name="logonBox" href=""><?php echo get_vocab('unknown_user'); ?></A><br>
+                <FORM METHOD=POST ACTION="admin.php">
+                  <input type="hidden" name="TargetURL" value="<?php echo $TargetURL ?>" />
+                  <input type="hidden" name="Action" value="QueryName" />
+                  <input type="submit" value=" <?php echo get_vocab('login') ?> " />
+                </FORM>
+<?php if (isset($user_list_link)) print "
+	        <br>
+                <A href=\"$user_list_link\">" . get_vocab('user_list') . "</A><br>\n";
 ?>
-	</TD>
+              </TD>
 <?php
     }
 }
Index: web/language.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/language.inc,v
retrieving revision 1.15
diff -u -r1.15 language.inc
--- web/language.inc	26 Apr 2006 08:41:41 -0000	1.15
+++ web/language.inc	2 Aug 2008 12:36:07 -0000
@@ -1,6 +1,6 @@
 <?php
 
-# $Id: language.inc,v 1.15 2006/04/26 08:41:41 jberanek Exp $
+# $Id: language.inc,v 1.13.2.4 2007/02/13 12:53:32 jberanek Exp $
 
 # A map is needed to convert from the HTTP language specifier to a
 # locale specifier for Windows
@@ -113,6 +113,7 @@
 # language specifier to a locale specifier without a map
 $lang_map_unix = array
 (
+  'cs_CS' => 'cs_CZ',
   'da_DA' => 'da_DK',
   'el_EL' => 'el_GR',
   'en_EN' => 'en_GB',
@@ -122,6 +123,166 @@
   'zh_ZH' => 'zh_CN',
 );
 
+# IBM AIX locale to code set table
+# See http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf2/setlocale.htm
+$aixlocale_codepage_map = array
+(
+  'Ar_AA' => 'IBM-1046',
+  'ar_AA' => 'ISO8859-6',
+  'bg_BG' => 'ISO8856-5',
+  'cs_CZ' => 'ISO8859-2',
+  'Da_DK' => 'IBM-850',
+  'da_DK' => 'ISO8859-1',
+  'De_CH' => 'IBM-850',
+  'de_CH' => 'ISO8859-1',
+  'De_DE' => 'IBM-850',
+  'de_DE' => 'ISO8859-1',
+  'el_GR' => 'ISO8859-7',
+  'En_GB' => 'IBM-850',
+  'en_GB' => 'ISO8859-1',
+  'En_US' => 'IBM-850',
+  'en_US' => 'ISO8859-1',
+  'Es_ES' => 'IBM-850',
+  'es_ES' => 'ISO8859-1',
+  'Fi_FI' => 'IBM-850',
+  'fi_FI' => 'ISO8859-1',
+  'Fr_BE' => 'IBM-850',
+  'fr_BE' => 'ISO8859-1',
+  'Fr_CA' => 'IBM-850',
+  'fr_CA' => 'ISO8859-1',
+  'Fr_FR' => 'IBM-850',
+  'fr_FR' => 'ISO8859-1 ',
+  'Fr_CH' => 'IBM-850',
+  'fr_CH' => 'ISO8859-1',
+  'hr_HR' => 'ISO8859-2',
+  'hu_HU' => 'ISO8859-2',
+  'Is_IS' => 'IBM-850',
+  'is_IS' => 'ISO8859-1',
+  'It_IT' => 'IBM-850',
+  'it_IT' => 'ISO8859-1',
+  'Iw_IL' => 'IBM-856',
+  'iw_IL' => 'ISO8859-8',
+  'Ja_JP' => 'IBM-943',
+  'ko_KR' => 'IBM-eucKR',
+  'mk_MK' => 'ISO8859-5',
+  'Nl_BE' => 'IBM-850',
+  'nl_BE' => 'ISO8859-1',
+  'Nl_NL' => 'IBM-850',
+  'nl_NL' => 'ISO8859-1',
+  'No_NO' => 'IBM-850',
+  'no_NO' => 'ISO8859-1',
+  'pl_PL' => 'ISO8859-2',
+  'Pt_PT' => 'IBM-850',
+  'pt_PT' => 'ISO8859-1',
+  'ro_RO' => 'ISO8859-2',
+  'ru_RU' => 'ISO8859-5',
+  'sh_SP' => 'ISO8859-2',
+  'sl_SI' => 'ISO8859-2',
+  'sk_SK' => 'ISO8859-2',
+  'sr_SP' => 'ISO8859-5',
+  'Zh_CN' => 'GBK',
+  'Sv_SE' => 'IBM-850',
+  'sv_SE' => 'ISO8859-1',
+  'tr_TR' => 'ISO8859-9',
+  'zh_TW' => 'IBM-eucTW'
+);
+
+# GNU iconv code set to IBM AIX libiconv code set table
+# Keys of this table should be in lowercase, and searches should be performed using lowercase!
+$gnu_iconv_to_aix_iconv_codepage_map = array
+(
+  // "iso-8859-[1-9]" --> "ISO8859-[1-9]" according to http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf2/setlocale.htm
+  'iso-8859-1' => 'ISO8859-1',
+  'iso-8859-2' => 'ISO8859-2',
+  'iso-8859-3' => 'ISO8859-3',
+  'iso-8859-4' => 'ISO8859-4',
+  'iso-8859-5' => 'ISO8859-5',
+  'iso-8859-6' => 'ISO8859-6',
+  'iso-8859-7' => 'ISO8859-7',
+  'iso-8859-8' => 'ISO8859-8',
+  'iso-8859-9' => 'ISO8859-9',
+
+  // "big5" --> "IBM-eucTW" according to http://kadesh.cepba.upc.es/mancpp/classref/ref/ITranscoder_DSC.htm
+  'big5' => 'IBM-eucTW',
+
+  // "big-5" --> "IBM-eucTW" (see above)
+  'big-5' => 'IBM-eucTW'
+);
+
+# IBM AIX libiconv UTF-8 converters
+# See http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/genprogc/convert_prg.htm#HDRDNNRI49HOWA
+$aix_utf8_converters = array
+(
+  'ISO8859-1',
+  'ISO8859-2',
+  'ISO8859-3',
+  'ISO8859-4',
+  'ISO8859-5',
+  'ISO8859-6',
+  'ISO8859-7',
+  'ISO8859-8',
+  'ISO8859-9',
+  'JISX0201.1976-0',
+  'JISX0208.1983-0',
+  'CNS11643.1986-1',
+  'CNS11643.1986-2',
+  'KSC5601.1987-0',
+  'IBM-eucCN',
+  'IBM-eucJP',
+  'IBM-eucKR',
+  'IBM-eucTW',
+  'IBM-udcJP',
+  'IBM-udcTW',
+  'IBM-sbdTW',
+  'UCS-2',
+  'IBM-437',
+  'IBM-850',
+  'IBM-852',
+  'IBM-857',
+  'IBM-860',
+  'IBM-861',
+  'IBM-863',
+  'IBM-865',
+  'IBM-869',
+  'IBM-921',
+  'IBM-922',
+  'IBM-932',
+  'IBM-943',
+  'IBM-934',
+  'IBM-935',
+  'IBM-936',
+  'IBM-938',
+  'IBM-942',
+  'IBM-944',
+  'IBM-946',
+  'IBM-948',
+  'IBM-1124',
+  'IBM-1129',
+  'TIS-620',
+  'IBM-037',
+  'IBM-273',
+  'IBM-277',
+  'IBM-278',
+  'IBM-280',
+  'IBM-284',
+  'IBM-285',
+  'IBM-297',
+  'IBM-500',
+  'IBM-875',
+  'IBM-930',
+  'IBM-933',
+  'IBM-937',
+  'IBM-939',
+  'IBM-1026',
+  'IBM-1112',
+  'IBM-1122',
+  'IBM-1124',
+  'IBM-1129',
+  'IBM-1381',
+  'GBK',
+  'TIS-620'
+);
+
 
 ##############################################################################
 # Language token handling
@@ -139,8 +300,6 @@
 # Get a default set of language tokens, you can change this if you like
 include "lang." . $default_language_tokens;
 
-$locale = "en";
-
 # Define the default locale here. For a list of supported
 # locales on your system do "locale -a"
 setlocale(LC_ALL,'C');
@@ -222,36 +381,22 @@
 {
   exit('
 <P>
-  <B>Error:</B> The iconv module, which provides PHP support for Unicode,
-  is not installed on your system.
-</P>
-<P>
-  Unicode gives MRBS the ability to easily support languages other than
-  English. Without Unicode, support for non-English-speaking users will be
-  crippled.
-</P>
+  <B>Error:</B> The iconv module, which provides PHP support for Unicode, is not
+installed on your system.</P>
+<P>Unicode gives MRBS the ability to easily support languages other than
+English. Without Unicode, support for non-English-speaking users will be crippled.</P>
 <P>To fix this error, do one of the following:</P>
 <UL>
-  <LI>
-    <P>
-      Install and enable the iconv module.<BR>
-      On a Windows server, enable php_iconv.dll in %windir%\php.ini, and make
-      sure both %phpdir%\dlls\iconv.dll and %phpdir%\extensions\php_iconv.dll
-      are in the path. One way to do this is to copy these two files to
-      %windir%.<BR>
-      On a Unix server, recompile your PHP module with the appropriate
-      option for enabling the iconv extension, or alternatively install the
-      PHP iconv package if one exists for your system. Consult your PHP server
-      documentation for more information about enabling iconv support.
-    </P>
-  </LI>
-  <LI>
-    <P>
-      Disable Unicode support by modifying config.inc.php and setting the
-      variable $unicode_encoding to 0. If your MRBS installation is on a
-      shared host, then this may be your only option.
-    </P>
-  </LI>
+<LI><P>Install and enable the iconv module.<BR>
+On a Windows server, enable php_iconv.dll in %windir%\php.ini, and make sure both
+%phpdir%\dlls\iconv.dll and %phpdir%\extensions\php_iconv.dll are in the
+path. One way to do this is to copy these two files to %windir%.<BR>
+On a Unix server, recompile your PHP module with the appropriate
+option for enabling the iconv extension. Consult your PHP server
+documentation for more information about enabling iconv support.</P></LI>
+<LI><P>Disable Unicode support by modifying config.inc.php and setting the
+variable $unicode_encoding to 0. If your MRBS installation is on a shared
+host, then this may be your only option.</P></LI>
 </UL>
 ');
 }
@@ -290,19 +435,18 @@
   else if (($server_os == "linux") ||
            ($server_os == "sunos") ||
            ($server_os == "bsd") ||
+           ($server_os == "aix") ||
            ($server_os == "macosx"))
   {
     if (strlen($locale) == 2)
     {
-      # Convert locale=xx to xx_XX; this is not correct for some locales,
-      # but this is handled by the $lang_map_unix test below
+      # Convert locale=xx to xx_XX; this is not correct for some locales???
       $locale = strtolower($locale)."_".strtoupper($locale);
     }
     else
     {
-      # Convert locale=xx-xX or xx_Xx or xx_XxXx (etc.) to xx_XX[XX]; this
-      # is highly dependent on the machine's installed locales
-
+      # Convert locale=xx-xX or xx_Xx or xx_XxXx (etc.) to xx_XX[XX]; this is highly
+      # dependent on the machine's installed locales
       $locale = strtolower(substr($locale,0,2))."_".strtoupper(substr($locale,3));
     }
     if (isset($lang_map_unix[$locale]) && ($lang_map_unix[$locale]))
@@ -317,7 +461,12 @@
       }
       else
       {
-        $locale .= ".utf-8";
+        // On IBM AIX, do not add ".utf-8" as this yields an invalid
+        // locale name
+        if ($server_os != "aix")
+        {
+          $locale .= ".utf-8";
+        }
       }
     }
     if (setlocale(LC_ALL, $locale) == FALSE)
@@ -350,37 +499,157 @@
   {
     return "sunos";
   }
+  else if (stristr(PHP_OS, "AIX"))
+  {
+    return "aix";
+  }
   else
   {
     return "unsupported";
   }
 }
 
+// Translates a GNU libiconv character encoding name to its corresponding IBM AIX libiconv character
+// encoding name. Returns FALSE if character encoding name is unknown.
+function get_aix_character_encoding($character_encoding)
+{
+  global $gnu_iconv_to_aix_iconv_codepage_map;
+
+  // Check arguments
+  if ($character_encoding == NULL ||
+      !is_string($character_encoding) ||
+      empty($character_encoding))
+  {
+    return FALSE;
+  }
+
+  // Convert character encoding name to lowercase
+  $character_encoding = strtolower($character_encoding);
+
+  // Check that we know of an IBM AIX libiconv character encoding name equivalent for this character encoding name
+  if (!array_key_exists($character_encoding, $gnu_iconv_to_aix_iconv_codepage_map))
+  {
+    return FALSE;
+  }
+
+  return $gnu_iconv_to_aix_iconv_codepage_map[$character_encoding];
+}
+
+function get_vocab_utf8_aix($tag)
+{
+  global $aix_utf8_converters, $vocab;
+
+  // Attempt to translate character encoding name
+  $aix_character_set = get_aix_character_encoding($vocab['charset']);
+
+  // Check if character encoding name translation was successful
+  if ($aix_character_set === FALSE)
+  {
+    // Unsuccessful; just use the original character encoding name
+    $aix_character_set = $vocab['charset'];
+
+  }
+  else
+  {
+    // Successful; check that a corresponding UTF-8 converter exists
+    if (!in_array($aix_character_set, $aix_utf8_converters, TRUE))
+    {
+      // Corresponding UTF-8 converter does not exist; just use the original character encoding name
+      $aix_character_set = $vocab['charset'];
+
+    }
+    else
+    {
+      // Success; the translated character encoding name is ready to use
+    }
+  }
+
+  return iconv($aix_character_set, 'UTF-8', $vocab[$tag]);
+}
+
+
 # Get a vocab item, in UTF-8 or a local encoding, depending on
 # the setting of $unicode_encoding
 function get_vocab($tag)
 {
   global $vocab, $unicode_encoding;
 
-  if ($unicode_encoding && (strcasecmp($vocab["charset"],"utf-8") != 0))
+  if ($unicode_encoding && (strcasecmp($vocab["charset"], "utf-8") != 0))
   {
-    return iconv($vocab["charset"],"utf-8",$vocab[$tag]);
+    if ((get_server_os() == 'aix') &&
+        (strcasecmp(ICONV_IMPL, 'unknown') == 0) &&
+        (strcasecmp(ICONV_VERSION, 'unknown') == 0))
+    {
+      $translated = get_vocab_utf8_aix($tag);
+    }
+    else
+    {
+      $translated = iconv($vocab["charset"],"utf-8",$vocab[$tag]);
+    }
   }
   else
   {
-    return $vocab[$tag];
+    $translated = $vocab[$tag];
   }
+  return $translated;
 }
 
-function utf8_convert($string)
+// AIX version of utf8_convert(); needed as locales won't give us UTF-8
+// NOTE: Should ONLY be called with input encoded in the default code set of the current locale!
+// NOTE: Uses the LC_TIME category for determining the current locale setting, so should preferrably be used on date/time input only!
+function utf8_convert_aix($string)
+{
+  global $aixlocale_codepage_map, $aix_utf8_converters, $unicode_encoding;
+
+  // Retrieve current locale setting
+  $aix_locale = setlocale(LC_TIME, '0');
+
+  if ($aix_locale === FALSE)
+  {
+    // Locale setting could not be retrieved; return string unchanged
+    return $string;
+  }
+
+  if (!array_key_exists($aix_locale, $aixlocale_codepage_map))
+  {
+    // Default code page of locale could not be found; return string unchanged
+    return $string;
+  }
+
+  $aix_codepage = $aixlocale_codepage_map[$aix_locale];
+
+  if (!in_array($aix_codepage, $aix_utf8_converters, TRUE))
+  {
+    // No suitable UTF-8 converter was found for this code page; return string unchanged
+    return $string;
+  }
+
+  // Convert string to UTF-8
+  $aix_string = iconv($aix_codepage, 'UTF-8', $string);
+
+  // Default to original string if conversion failed
+  $string = ($aix_string === FALSE) ? $string : $aix_string;
+
+  return $string;
+}
+
+function utf8_convert_from_locale($string)
 {
   global $windows_locale, $unicode_encoding, $winlocale_codepage_map;
 
-  if ($unicode_encoding && (get_server_os() == "windows"))
+  if ($unicode_encoding)
   {
-    if ($winlocale_codepage_map[$windows_locale])
+    if (get_server_os() == "windows")
+    {
+      if ($winlocale_codepage_map[$windows_locale])
+      {
+        $string = iconv($winlocale_codepage_map[$windows_locale],"utf-8",
+                        $string);
+      }
+    }
+    else if (get_server_os() == "aix")
     {
-      $string = iconv($winlocale_codepage_map[$windows_locale],"utf-8",$string);
+      $string = utf8_convert_aix($string);
     }
   }
   return $string;
@@ -388,14 +657,20 @@
   
 function utf8_strftime($format, $time)
 {
-  $result = strftime($format,$time);
-  return utf8_convert($result);
-}
+  # %p doesn't actually work in some locales, we have to patch it up ourselves
+  if (preg_match('/%p/', $format))
+  {
+    $ampm = strftime('%p', $time);
+    if ($ampm == '')
+    {
+      $ampm = date('a',$time);
+    }
 
-function utf8_date($format, $time)
-{
-  $result = date($format,$time);
-  return utf8_convert($result);
+    $format = preg_replace('/%p/', $ampm, $format);
+  }
+
+  $result = strftime($format,$time);
+  return utf8_convert_from_locale($result);
 }
 
 ?>
Index: web/config.inc.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/config.inc.php,v
retrieving revision 1.45
diff -u -r1.45 config.inc.php
--- web/config.inc.php	26 Apr 2006 10:34:35 -0000	1.45
+++ web/config.inc.php	2 Aug 2008 12:36:05 -0000
@@ -1,6 +1,6 @@
 <?php
 
-# $Id: config.inc.php,v 1.45 2006/04/26 10:34:35 jberanek Exp $
+# $Id: config.inc.php,v 1.39.2.12 2007/02/13 12:53:23 jberanek Exp $
 
 ###########################################################################
 #   MRBS Configuration File
@@ -11,14 +11,12 @@
 ###################
 # Database settings
 ###################
-# Choose database system: see INSTALL for the list of supported databases
-# ("mysql"=MySQL,...) and valid strings.
+# Which database system: "pgsql"=PostgreSQL, "mysql"=MySQL,
+# "mysqli"=MySQL via the mysqli PHP extension
 $dbsys = "mysql";
 # Hostname of database server. For pgsql, can use "" instead of localhost
 # to use Unix Domain Sockets instead of TCP/IP.
 $db_host = "localhost";
-# Port used by database server (leave empty if using the default one)
-$db_port = "";
 # Database name:
 $db_database = "mrbs";
 # Database login user name:
@@ -28,23 +26,10 @@
 # Prefix for table names.  This will allow multiple installations where only
 # one database is available
 $db_tbl_prefix = "mrbs_";
-# Set this to TRUE to NOT use PHP persistent (pooled) database connections:
-$db_nopersist = FALSE;
-# Communication protocol tu use. For pgsql, you can use 'unix' instead of
-# 'tcp' to use Unix Domain Sockets instead of TCP/IP.
-$db_protocol = "tcp";
+# Uncomment this to NOT use PHP persistent (pooled) database connections:
+# $db_nopersist = 1;
 
 ################################
-# DBMS specific options
-################################
-
-# ****ORACLE*****
-
-# Home directory path when Oracle is installed if it is running in the local machine.
-# Default value: value of the environment variable ORACLE_HOME
-$oci8_home = "";
-
-#################################
 # Site identification information
 #################################
 $mrbs_admin = "Your Administrator";
@@ -184,11 +169,16 @@
 ###############################################
 $auth["session"] = "php"; # How to get and keep the user ID. One of
 			  # "http" "php" "cookie" "ip" "host" "nt" "omni"
-			  # "remote_user".
+			  # "remote_user"
 $auth["type"] = "config"; # How to validate the user/password. One of "none"
                           # "config" "db" "db_ext" "pop3" "imap" "ldap" "nis"
                           # "nw" "ext".
 
+# Cookie path override. If this value is set it will be used by the
+# 'php' and 'cookie' session schemes to override the default behaviour
+# of automatically determining the cookie path to use
+$cookie_path_override = '';
+
 # The list of administrators (can modify other peoples settings)
 $auth["admin"][] = "127.0.0.1";	# localhost IP address. Useful with IP sessions.
 $auth["admin"][] = "administrator";	# A user name from the user list. Useful 
@@ -214,15 +204,7 @@
 $auth["params"] = "";
 
 # 'auth_db_ext' configuration settings
-# Choose database system: see INSTALL for the list of supported databases
-# ("mysql"=MySQL,...) and valid strings.
-$auth['db_ext']['db_sys'] = 'mysql';
 $auth['db_ext']['db_host'] = 'localhost';
-# Port used by database server (leave empty if using the default one)
-$auth['db_ext']['db_port'] = '';
-# Communication protocol to use. For pgsql, you can use 'unix' instead of
-# 'tcp' to use Unix Domain Sockets instead of TCP/IP.
-$auth['db_ext']['db_protocol'] = 'tcp';
 $auth['db_ext']['db_username'] = 'authuser';
 $auth['db_ext']['db_password'] = 'authpass';
 $auth['db_ext']['db_name'] = 'authdb';
@@ -237,6 +219,10 @@
 #$ldap_host = "localhost";
 # If you have a non-standard LDAP port, you can define it here
 #$ldap_port = 389;
+# If you want to use LDAP v3, change the following to true
+$ldap_v3 = false;
+# If you want to use TLS, change following to true
+$ldap_tls = false;
 # LDAP base distinguish name
 # See AUTHENTICATION for details of how check against multiple base dn's
 #$ldap_base_dn = "ou=organizationalunit,dc=my-domain,dc=com";
@@ -250,7 +236,7 @@
 #   (&($ldap_user_attrib=username)($ldap_filter))
 # After binding to check the password, this check is used to see that
 # they are a valid user of mrbs.
-#$ldap_user_filter = "mrbsuser=y";
+#$ldap_filter = "mrbsuser=y";
 
 # 'auth_imap' configuration settings
 # See AUTHENTICATION for details of how check against multiple servers
@@ -444,9 +430,6 @@
 $typel["I"] = get_vocab("internal");
 # $typel["J"] = "J";
 
-# define the number of types per row in the color-key
-#$color_key_types_per_row = 5;
-
 ##########################################
 # PHP System Configuration - internal use, do not change
 ##########################################
@@ -456,9 +439,6 @@
 # Make sure notice errors are not reported, they can break mrbs code:
 error_reporting (E_ALL ^ E_NOTICE);
 
-# Debug flag : leave it to FALSE for production site.
-$debug_flag = FALSE;
-
 # These variables specify the names of the tables in the database
 # These should not need to be changed.  Please change $db_tbl_prefix
 # in the database section above.
@@ -468,7 +448,4 @@
 $tbl_room   = $db_tbl_prefix . "room";
 $tbl_users  = $db_tbl_prefix . "users";
 
-# MRBS developers, make sure to update this string before each release:
-$mrbs_version = "MRBS 1.3-dev";
-
 ?>
Index: web/auth_ldap.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_ldap.inc,v
retrieving revision 1.10
diff -u -r1.10 auth_ldap.inc
--- web/auth_ldap.inc	2 Sep 2005 22:20:58 -0000	1.10
+++ web/auth_ldap.inc	2 Aug 2008 12:36:04 -0000
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: auth_ldap.inc,v 1.10 2005/09/02 22:20:58 jberanek Exp $
+// $Id: auth_ldap.inc,v 1.7.2.4 2007/02/13 12:53:23 jberanek Exp $
 
 /* ~~JFL 2003/11/12 By default, use the http session mechanism */
 if (!isset($auth['session'])) $auth['session']='http';
@@ -21,6 +21,8 @@
 	global $auth;
 	global $ldap_host;
 	global $ldap_port;
+	global $ldap_v3;
+	global $ldap_tls;
 	global $ldap_base_dn;
 	global $ldap_user_attrib;
 	global $ldap_filter;
@@ -73,7 +75,6 @@
 
 	// establish ldap connection
 	// the '@' suppresses errors
-
 	if (isset($ldap_port))
 	{
 		$ldap = @ldap_connect($ldap_host, $ldap_port);
@@ -86,6 +87,15 @@
 	// Check that connection was established
 	if($ldap)
 	{
+		if ($ldap_v3)
+		{
+			ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
+		}
+		if ($ldap_tls)
+		{
+			ldap_start_tls($ldap);
+		}
+
 		// now process all base dn's until authentication is achieved
 		// or fail
 		foreach( $all_ldap_base_dn as $idx => $base_dn)
Index: web/xbLib.js
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/xbLib.js,v
retrieving revision 1.5
diff -u -r1.5 xbLib.js
--- web/xbLib.js	6 Oct 2004 22:01:46 -0000	1.5
+++ web/xbLib.js	2 Aug 2008 12:36:07 -0000
@@ -3,11 +3,13 @@
  *
  * Inspired by the excellent xbDOM.js (and using it for debugging)
  *
- * $Id: xbLib.js,v 1.5 2004/10/06 22:01:46 jflarvoire Exp $
+ * $Id: xbLib.js,v 1.4 2004/08/24 16:58:55 jflarvoire Exp $
  */
 
-if (!window.doAlert) var doAlert = false;
-if (!window.xbDump) var xbDump = function(string, tag) {return;} // If indeed not defined, define as a dummy routine.
+var doAlert = false;
+var xbDump = function(string, tag) {return;} // If indeed not defined, define as a dummy routine.
+
+// var xbDump = function(string, tag) {alert(string);} // If indeed not defined, define as a dummy routine.
 
 if (doAlert) alert("Started xbLib.js v4");
 xbDump("Started xbLib.js v4");
@@ -20,12 +22,12 @@
 function xblGetNodeBgColor(node)
     {
     if (!node) return null;
-//    xbDump("node.bgColor = " + (node.bgColor ? node.bgColor : "<undefined>"));
+    xbDump("node.bgColor = " + (node.bgColor ? node.bgColor : "<undefined>"));
     if (node.style)
 	{
-//        xbDump("node.style.getPropertyValue(\"background-color\") = " + (node.style.getPropertyValue ? ("\""+node.style.getPropertyValue("background-color")+"\"") : "<undefined>"));
-//        xbDump("node.style.getAttribute(\"backgroundColor\") = " + (node.style.getAttribute ? ("\""+node.style.getAttribute("backgroundColor")+"\"") : "<undefined>"));
-//        xbDump("node.style.backgroundColor = " + (node.style.backgroundColor ? node.style.backgroundColor : "<undefined>"));
+        xbDump("node.style.getPropertyValue(\"background-color\") = " + (node.style.getPropertyValue ? ("\""+node.style.getPropertyValue("background-color")+"\"") : "<undefined>"));
+        xbDump("node.style.getAttribute(\"backgroundColor\") = " + (node.style.getAttribute ? ("\""+node.style.getAttribute("backgroundColor")+"\"") : "<undefined>"));
+        xbDump("node.style.backgroundColor = " + (node.style.backgroundColor ? node.style.backgroundColor : "<undefined>"));
 	if (node.style.getPropertyValue)	// If DOM level 2 supported, the NS 6 way
             {
             return node.style.getPropertyValue("background-color");
@@ -153,8 +155,13 @@
   {
   if (!obj) return null;
   
-  var children = xblChildNodes(obj);
-  if (!children) return null;
+  var children = null;
+  if (obj.childNodes)           // DOM-compliant browsers
+    children = obj.childNodes;
+  else if (obj.children)        // Pre-DOM browsers like Opera 6
+    children = obj.children;
+  else
+    return null;
     
   var nChildren = children.length;
   for (var i=0; i<nChildren; i++) 
@@ -207,56 +214,6 @@
   return result;
   }
 
-//----------------------------------------------------//
-
-function GetNodeType(node)
-  {
-  if (!node) return "null";
-  if (node.tagName) return node.tagName;	// DOM-compliant tag name.
-  if (node.nodeName) return node.nodeName;	// Implicit nodes, such as #text.
-  if (window.xbDebugPersistToString) return xbDebugPersistToString(node);
-  return "Unknown";
-  }
-
-// Debug routine for getting a canonic DOM pathname to a node.
-function GetNodePathname(node)
-  {
-  var name = null;
-  for (lastnode = null; node && (node != lastnode); lastnode = node, node = node.parentNode)
-    {
-    var nodename = GetNodeType(node);
-    var siblings = xblChildNodes(node.parentNode);
-    if (siblings)
-      {
-      var nSiblings = siblings.length;
-      var nAkin = 0;
-      var iAkin = -1;
-      for (var i=0; i<nSiblings ; i++) 
-        {
-        var siblingname = GetNodeType(siblings[i]);
-        if (siblingname && (siblingname == nodename))
-          {
-          if (siblings[i] == node) iAkin = nAkin;
-          nAkin += 1;
-          }
-        }
-      if ((nAkin > 1) && (iAkin >= 0)) nodename = nodename + "[" + iAkin + "]";
-      }
-    if (name)
-      name = nodename + "." + name;
-    else
-      name = nodename;
-    }
-  return name;
-  }
-
-function GetAncestor(node, type)
-  {
-  for (node=node.parentNode; node; node=node.parentNode)
-    { if (node.tagName == type) return node; }
-  return null;
-  }
-
 /*****************************************************************************\
 *            Part 2: MRBS-specific Active Cell Management routines            *
 \*****************************************************************************/
@@ -269,7 +226,6 @@
 var highlight_right_column = false;
 var highlightColor = "#999999"; // Default highlight color, if we don't find the one in the CSS.
 var statusBarMsg = "Click on the cell to make a reservation."; // Message to write on the status bar when activating a cell.
-var areaType = 0;	// The effect of clicking and dragging. 0=None; 1=Rectangle; 2=Columns; 3=Rows.
 
 // Duplicate at JavaScript level the relevant PHP configuration variables.
 var show_plus_link = true;
@@ -340,7 +296,6 @@
 |                   Boolean right	Whether to highlight the right column.|
 |                   String method	One of "bgcolor", "class", "hybrid".  |
 |                   String message      The message to put on the status bar. |
-|		    Integer area        0=None; 1=Rectangle; 2=Columns; 3=Rows.
 |									      |
 |   Returns:        Nothing.						      |
 |									      |
@@ -372,16 +327,13 @@
 *									      *
 \*---------------------------------------------------------------------------*/
 
-function InitActiveCell(show, left, right, method, message, area)
+function InitActiveCell(show, left, right, method, message)
     {
     show_plus_link = show;
     highlight_method = method;
     highlight_left_column = left;
     highlight_right_column = right;
     statusBarMsg = message;
-    areaType = area;
-
-    // document.write("<table id=\"test_table\" onClick=\"document.write(msg);\" border=1><h1>xbDump</h1></table>\n");
 
     xbDump("show_plus_link = " + show_plus_link);
     xbDump("highlight_method = " + highlight_method);
@@ -408,18 +360,9 @@
     var useCssClass = ((highlight_method=="class") && test_table && test_table.style
                        && (test_table.style.setProperty || test_table.style.setAttribute) && true);
     if (useCssClass)			// DOM-compliant browsers
-        GetNodeColorClass = function(node) 
-	    {
-            // xbDump("GetNodeColorClass<css>() returns " + (node.className ? node.className : "<undefined>"));
-	    return node.className;
-	    }
+        GetNodeColorClass = function(node) { return node.className; }
     else					// Pre-DOM browsers like Opera 6
-        GetNodeColorClass = function(node)
-	    {
-	    color = xblGetNodeBgColor(node);
-            // xbDump("GetNodeColorClass<dhtml>() returns " + (color ? color : "<undefined>"));
-	    return color;
-	    } // Can't get class, so get color.
+        GetNodeColorClass = function(node) { return xblGetNodeBgColor(node); } // Can't get class, so get color.
 
     xbDump("JavaScript feature detection: Table class setting supported = " + useCssClass);
 
@@ -445,13 +388,13 @@
     if (useCssClass)			 // DOM-compliant browsers
         SetNodeColorClass = function(node, colorClass) 
             { 
-            // xbDump("SetNodeColorClass<css>(" + colorClass + ")");
+            xbDump("SetNodeColorClass(" + colorClass + ")");
             node.className = colorClass;  // Use the TD.highlight color from mrbs.css.
             }
     else				 // Pre-DOM browsers like Opera 6
         SetNodeColorClass = function(node, colorClass) 
             {
-            // xbDump("SetNodeColorClass<dhtml>(" + colorClass + ")");
+            xbDump("SetNodeColorClass(" + colorClass + ")");
             if (colorClass == "highlight") colorClass = highlightColor; // Cannot use the CSS color class. Use the color computed above.
             xblSetNodeBgColor(node, colorClass);
             }
@@ -459,34 +402,27 @@
 
 //----------------------------------------------------//
 
-var rootCell = null;	// The first link cell clicked.
-var firstCell = null;	// The top-left corner.
-var lastCell = null;	// The bottom-right corner.
-
-// Cell coloration
-function HighlightNode(node)	// Change one TD cell color class -> highlight color.
-    {
-    if (!node.oldColorClassSet)
+// Cell activation
+function HighlightNode(node)	// Change one TD cell color class
     {
-	node.oldColorClassSet = true;
-	node.oldColorClass = GetNodeColorClass(node); // Remember the initial color. (may be null)
-	}
+    node.oldColorClass = GetNodeColorClass(node);
     SetNodeColorClass(node, "highlight");
     }
-function LightOffNode(node)	// Change one TD cell color class -> initial color.
-    {
-    if (node.oldColorClassSet) SetNodeColorClass(node, node.oldColorClass);
-    }
-
-// Active side columns coloration
-function SetSidesLight(tdCell, lightProc)	// Change TD cell + both side columns cells.
+function ActivateCell(cell)	// Activate the TD cell under the mouse, and optionally the corresponding hour cells on both sides of the table.
     {
+    if (cell.isActive) return;	// Prevent problems with reentrancy. (It happens on slow systems)
+    cell.isActive = true;
+    if (statusBarMsg) window.status = statusBarMsg; // Write into the status bar.
+    // First find the enclosing table data cell.
+    for (var tdCell=cell.parentNode; tdCell; tdCell=tdCell.parentNode)
+	{ if (tdCell.tagName == "TD") break; }
     if (!tdCell) return;
+    HighlightNode(tdCell);
     if (highlight_left_column)
         {
         // Locate the head node for the current row.
         var leftMostCell = xblFirstSibling(tdCell);
-        if (leftMostCell) lightProc(leftMostCell);
+        if (leftMostCell) HighlightNode(leftMostCell);
         }
     if (highlight_right_column)
         {
@@ -494,265 +430,34 @@
         var rightMostCell = xblLastSibling(tdCell);
         // Now work around a Netscape peculiarity: The #text object is a sibling and not a child of the TD!
         while (rightMostCell && (rightMostCell.tagName != "TD")) rightMostCell = rightMostCell.previousSibling;
-        if (rightMostCell) lightProc(rightMostCell);
+        if (rightMostCell) HighlightNode(rightMostCell);
         }
     }
-
-// Active cell + side columns coloration
-function SetNodesLight(tdCell, lightProc)	// Change TD cell + both side columns cells.
+// Cell unactivation
+function UnactivateCell(cell)
     {
+    if (!cell.isActive) return; // Prevent problems with reentrancy.
+    cell.isActive = null;
+    window.status = "";		// Clear the status bar.
+    // First find the enclosing table data cell.
+    for (var tdCell=cell.parentNode; tdCell; tdCell=tdCell.parentNode)
+	{ if (tdCell.tagName == "TD") break; }
     if (!tdCell) return;
-    lightProc(tdCell);
-    SetSidesLight(tdCell, lightProc);
-    }
-
-// Cross-link all cells together in all 4 directions.
-function PrepareTable(cell)
-        {
-    var row = GetAncestor(cell, "TR");
-    var table = GetAncestor(row, "TABLE");
-    var rows = xblChildNodes(row.parentNode);
-// xbDump("Preparing Table. There are "+rows.length+" rows.");
-    var iRow=0
-    var previousRow = null;
-    for (var i=0; i<rows.length; i++)
-        {
-        row = rows[i];
-// xbDump("Preparing row["+i+"] = " + GetNodePathname(row));
-        if (GetNodeType(row) != "TR") continue;
-        var cells = xblChildNodes(row);
-        var iCol=0;
-        var previousCell = null;
-        var aboveCell = null;
-        if (previousRow) 
-            {
-            aboveCell = previousRow.firstCell;
-            previousRow.rowBelow = row;
-            row.rowAbove = previousRow;
-            }
-        for (var j=0; j<cells.length; j++)
-            {
-            cell = cells[j];
-// xbDump("Preparing cell["+i+","+j+"] = " + GetNodePathname(cell));
-            if (GetNodeType(cell) != "TD") continue;
-            if (!table.firstTdRow) table.firstTdRow = row;
-            if (iCol == 0) row.firstCell = cell;
-            if (aboveCell)
-                {
-                aboveCell.cellBelow = cell;
-                cell.cellAbove = aboveCell;
-                aboveCell = aboveCell.cellRight;
-                }
-            if (previousCell)
-                {
-                cell.cellLeft = previousCell;
-                previousCell.cellRight = cell;
-                }
-            cell.iRow = iRow;
-            cell.iCol = iCol;
-            cell.prepared = true;
-            previousCell = cell;
-            iCol += 1;
-            }
-        previousRow = row;
-        iRow += 1;
-        }
-    // Now MRBS-specific extensions.
-    // First build a linear chain of entries, by row.
-    var lastCell = null;
-    var n = 0;
-    for (row = table.firstTdRow; row; row = row.rowBelow)
-        for (cell = row.firstCell; cell; cell = cell.cellRight)
-            {
-            if (highlight_left_column && (cell.iCol == 0)) continue; // The left time column is not part of the link.
-            if (highlight_right_column && !cell.cellRight) continue; // The right time column, if present, isn't either.
-            if (lastCell) lastCell.cellNextH = cell;
-            cell.cellPrevH = lastCell;
-            cell.ixH = n++;
-            lastCell = cell;
-            }
-    xbDump("Found "+n+" cells in horizontal chain");
-    // Then build a linear chain of entries, by column.
-    var lastCell = null;
-    var n = 0;
-    for (var head = table.firstTdRow.firstCell; head; head = head.cellRight)
-        {
-        if (highlight_left_column && (head.iCol == 0)) continue; // The left time column is not part of the link.
-        if (highlight_right_column && !head.cellRight) continue; // The right time column, if present, isn't either.
-        for (cell = head; cell; cell = cell.cellBelow)
-            {
-            if (lastCell) lastCell.cellNextV = cell;
-            cell.cellPrevV = lastCell;
-            cell.ixV = n++;
-            lastCell = cell;
-            }
-        }
-    xbDump("Found "+n+" cells in vertical chain");
-    }
-
-function GrowRect(fromCell, proc1, proc2, n1, n2, sides)
-    {
-    // xbDump("GrowRect(" + GetNodePathname(fromCell) + ", " + proc1 + ", " + proc2 + ", " + n1 + ", " + n2 + ", " + sides + ")");
-    for (c1 = eval("fromCell.cell"+proc1); n1; --n1 && (c1 = eval("c1.cell"+proc1)))
-        for (c2 = c1, n = n2; n; --n && (c2 = eval("c2.cell"+proc2)))
-            if (sides)
-                SetNodesLight(c2, HighlightNode);
-            else
-                HighlightNode(c2);
-    return c1;
-        }
-
-function ShrinkRect(fromCell, proc1, proc2, n1, n2, sides)
-        {
-    // xbDump("ShrinkRect(" + GetNodePathname(fromCell) + ", " + proc1 + ", " + proc2 + ", " + n1 + ", " + n2 + ", " + sides + ")");
-    for (c1 = fromCell; n1; --n1 && (c1 = eval("c1.cell"+proc1)))
-        for (c2 = c1, n = n2; n; --n && (c2 = eval("c2.cell"+proc2)))
-            if (sides)
-                SetNodesLight(c2, LightOffNode);
-            else
-                LightOffNode(c2);
-    return eval("c1.cell"+proc1);
-    }
-
-function GrowChain(from, to, proc)
-    {
-    // xbDump("GrowChain(" + GetNodePathname(from) + ", " + GetNodePathname(to) + ", " + proc + ")");
-    if (from.iRow != to.iRow)
-	{
-	SetSidesLight(from, LightOffNode);
-	SetSidesLight(to, HighlightNode);
-	}
-    while (from != to)
-	{
-	from = eval("from.cell"+proc);
-        HighlightNode(from);
-	}
-    return to;
-    }
-
-function ShrinkChain(from, to, proc)
-    {
-    // xbDump("ShrinkChain(" + GetNodePathname(from) + ", " + GetNodePathname(to) + ", " + proc + ")");
-    if (from.iRow != to.iRow)
-	{
-	SetSidesLight(from, LightOffNode);
-	SetSidesLight(to, HighlightNode);
-	}
-    while (from != to)
-	{
-        LightOffNode(from);
-	from = eval("from.cell"+proc);
-	}
-    return to;
-    }
-
-// Cell activation
-function ActivateCell(cell)	// Activate the TD cell under the mouse, and optionally the corresponding hour cells on both sides of the table.
-    {
-    xbDump("ActivateCell(" + GetNodePathname(cell) + ")");
-    // Find the enclosing table data cell, since we fired on the hidden inner table.
-    td = GetAncestor(cell, "TD");
-    if (!td.prepared) PrepareTable(td);
-    if (td.isActive) return;	// Prevent problems with reentrancy. (It happens on slow systems)
-    td.isActive = true;
-    if (statusBarMsg) window.status = statusBarMsg; // Write into the status bar.
-    // Highlight the cells and exit, unless we're in a click-drag operation.
-    if (!rootCell) { SetNodesLight(td, HighlightNode); return; }
-    // Else we're in a click-drag operation. Update the area.
-    switch (areaType)
-	{
-	case 1:	// Rectangle.
-    if (td.iRow < firstCell.iRow)					// Top side grew?
-	firstCell = GrowRect(firstCell, "Above", "Right", firstCell.iRow-td.iRow, lastCell.iCol+1-firstCell.iCol, 1);
-    else if (td.iRow > lastCell.iRow)					// Bottom side grew?
-	lastCell = GrowRect(lastCell, "Below", "Left",td.iRow-lastCell.iRow, lastCell.iCol+1-firstCell.iCol, 1);
-    else if ((firstCell.iRow < td.iRow) && (td.iRow <= rootCell.iRow))	// Top side shrank?
-	firstCell = ShrinkRect(firstCell, "Below", "Right", td.iRow-firstCell.iRow, lastCell.iCol+1-firstCell.iCol, 1);
-    else if ((rootCell.iRow <= td.iRow) && (td.iRow < lastCell.iRow))	// Bottom side shrank?
-	lastCell = ShrinkRect(lastCell, "Above", "Left", lastCell.iRow-td.iRow, lastCell.iCol+1-firstCell.iCol, 1);
-
-    if (td.iCol < firstCell.iCol)					// Left side grew?
-	firstCell = GrowRect(firstCell, "Left", "Below", firstCell.iCol-td.iCol, lastCell.iRow+1-firstCell.iRow, 0);
-    else if (td.iCol > lastCell.iCol)					// Right side grew?
-	lastCell = GrowRect(lastCell, "Right", "Above", td.iCol-lastCell.iCol, lastCell.iRow+1-firstCell.iRow, 0);
-    else if ((firstCell.iCol < td.iCol) && (td.iCol <= rootCell.iCol))	// Left side shrank?
-	firstCell = ShrinkRect(firstCell, "Right", "Below", td.iCol-firstCell.iCol, lastCell.iRow+1-firstCell.iRow, 0);
-    else if ((rootCell.iCol <= td.iCol) && (td.iCol < lastCell.iCol))	// Right side shrank?
-	lastCell = ShrinkRect(lastCell, "Left", "Above", lastCell.iCol-td.iCol, lastCell.iRow+1-firstCell.iRow, 0);
-	    break;
-
-	case 2:	// Columns.
-    if ((lastCell == rootCell) && (td != firstCell))			// Beginning moved?
-        {
-        if (td.ixV < firstCell.ixV)					    // Beginning grew?
-            firstCell = GrowChain(firstCell, td, "PrevV");
-	else if (td.ixV < rootCell.ixV)					    // Shrank towards the center?
-	    firstCell = ShrinkChain(firstCell, td, "NextV");
-	else								    // Else moved right past the center.
-	    {
-	    firstCell = ShrinkChain(firstCell, rootCell, "NextV");
-	    lastCell = GrowChain(rootCell, td, "NextV");
-	    }
-        }
-    else if ((firstCell == rootCell) && (td != lastCell))		// End Moved?
+    SetNodeColorClass(tdCell, tdCell.oldColorClass);
+    if (highlight_left_column)
         {
-        if (td.ixV > lastCell.ixV)					    // End grew?
-            lastCell = GrowChain(lastCell, td, "NextV");
-	if (td.ixV > rootCell.ixV)					    // Shrank towards the center?
-	    lastCell = ShrinkChain(lastCell, td, "PrevV");
-	else								    // Else moved left past the center.
-	    {
-	    lastCell = ShrinkChain(lastCell, rootCell, "PrevV");
-	    firstCell = GrowChain(rootCell, td, "PrevV");
+        // Locate the head node for the current row.
+        var leftMostCell= xblFirstSibling(tdCell);
+        if (leftMostCell) SetNodeColorClass(leftMostCell, leftMostCell.oldColorClass);
         }
-    }
-    else xbDump("No column move needed");
-	    break;
-
-	case 3:	// Rows.
-    if ((lastCell == rootCell) && (td != firstCell))			// Beginning moved?
+    if (highlight_right_column)
         {
-        if (td.ixH < firstCell.ixH)					    // Beginning grew?
-            firstCell = GrowChain(firstCell, td, "PrevH");
-	else if (td.ixH < rootCell.ixH)					    // Shrank towards the center?
-	    firstCell = ShrinkChain(firstCell, td, "NextH");
-	else								    // Else moved right past the center.
-	    {
-	    firstCell = ShrinkChain(firstCell, rootCell, "NextH");
-	    lastCell = GrowChain(rootCell, td, "NextH");
-	    }
+        // Locate the last node for the current row. (Only when configured to display times at right too.)
+        var rightMostCell = xblLastSibling(tdCell);
+        // Now work around a NetScape peculiarity: The #text object is a sibling and not a child of the TD!
+        while (rightMostCell && (rightMostCell.tagName != "TD")) rightMostCell = rightMostCell.previousSibling;
+        if (rightMostCell) SetNodeColorClass(rightMostCell, rightMostCell.oldColorClass);
         }
-    else if ((firstCell == rootCell) && (td != lastCell))		// End Moved?
-        {
-        if (td.ixH > lastCell.ixH)					    // End grew?
-            lastCell = GrowChain(lastCell, td, "NextH");
-	if (td.ixH > rootCell.ixH)					    // Shrank towards the center?
-	    lastCell = ShrinkChain(lastCell, td, "PrevH");
-	else								    // Else moved left past the center.
-	    {
-	    lastCell = ShrinkChain(lastCell, rootCell, "PrevH");
-	    firstCell = GrowChain(rootCell, td, "PrevH");
-	    }
-	}
-    else xbDump("No row move needed");
-	    break;
-
-	default:
-	    break;
-	}
-    }
-
-// Cell unactivation
-function UnactivateCell(cell)
-    {
-    xbDump("UnactivateCell(" + GetNodePathname(cell) + ")");
-    // Find the enclosing table data cell, since we fired on the hidden inner table.
-    td = GetAncestor(cell, "TD");
-    if (!td.isActive) return; // Prevent problems with reentrancy.
-    td.isActive = null;
-    window.status = "";		// Clear the status bar.
-    // Remove the highlight colors, unless we're in a click-drag operation.
-    if (!rootCell) SetNodesLight(td, LightOffNode);
     }
 
 xbDump("Cell activation routines defined.");
@@ -762,111 +467,47 @@
 // Cell click handling
 
 // Callback used to find the A link inside the cell clicked.
-function GetLinkCB(node, ref)
-    {
+function GotoLinkCB(node, ref)
+{
     var tag = null;
     if (node.tagName) tag = node.tagName;		// DOM-compliant tag name.
     else if (node.nodeName) tag = node.nodeName;	// Implicit nodes, such as #text.
     if (tag && (tag.toUpperCase() == "A")) return node;
     return null;
-    }
-
-function GetLink(node)
-    {
-    link = ForEachDescendant(node, GetLinkCB, null);
-    if (!link) return null;
-    return link.href;
-    }
+}
 
 // Handler for going to the period reservation edition page.
 function GotoLink(node)
-    {
-    xbDump("GotoLink(" + GetNodePathname(node) + ")");
-    // Sometimes, we miss the mouseUp event. (IE6 sometimes, and Opera 6 always)
-    // Allow clicking in the active area to validate the selected area.
-    if (rootCell) MarkLastCell(node);
-    // Normal case: Follow the link.
-    link = GetLink(node);
-    if (link) window.location = link;
-    }
+{
+    xbDump("GotoLink()");
+    link = ForEachDescendant(node, GotoLinkCB, null);
+    if (link) window.location = link.href;
+}
 
 xbDump("Cell click handlers defined.");
 
 //----------------------------------------------------//
 
-function MarkFirstCell(cell) // Invoked onMouseDown events.
-    {
-    xbDump("MarkFirstCell(" + GetNodePathname(cell) + ")");
-    if (!rootCell) // Avoid doing it twice (Fix for Opera 6 where a mouseDown event occurs before every click event).
-	{
-        // Find the enclosing table data cell, since we fired on the hidden inner table.
-        cell = GetAncestor(cell, "TD");
-        rootCell = firstCell = lastCell = cell;
-	}
-    return false; // Prevent browser default drag action.
-    }
-
-function MarkLastCell(cell) // Invoked onMouseUp events.
-    {
-    xbDump("MarkLastCell(" + GetNodePathname(cell) + ")");
-    var link = null;
-    if (rootCell) // Don't do anything if MouseDown occured out of the active zone.
-	{
-        // Find the enclosing table data cell, since we fired on the hidden inner table.
-        var tdCell = GetAncestor(cell, "TD");
-        if ((rootCell == firstCell) && (rootCell == lastCell) && (rootCell != tdCell))
-            { // Some browsers (IE5, O6) don't generate mouse move events while the button is down.
-            ActivateCell(cell);       // So in this case, record the movement done.
-            }
-        // Build the link to the reservation edit page.
-        link = GetLink(firstCell);
-        link += "&nperiods=" + (lastCell.iRow + 1 - firstCell.iRow);
-        link += "&nrooms=" + (lastCell.iCol + 1 - firstCell.iCol);
-        link += "&shape=" + areaType;
-        // Erase the highlighted zone. This allows reusing the page later on.
-        switch (areaType)
-            {
-            case 1: // Rectangle.
-                ShrinkRect(firstCell, "Right", "Below", lastCell.iCol+1-firstCell.iCol, lastCell.iRow+1-firstCell.iRow, 1);
-                break;
-            case 2: // Vertical chain.
-                ShrinkChain(firstCell, lastCell, "NextV");
-                break;
-            case 3: // Horizontal chain.
-                ShrinkChain(firstCell, lastCell, "NextH");
-                break;
-            default:
-                break;
-            }
-        }
-    // Cleanup state variables.
-    rootCell = firstCell = lastCell = null;
-    // And finally jump to the reservation edit page.
-    if (link) window.location = link;
-    }
-
-//----------------------------------------------------//
-
 // Cell content generation
 
 function BeginActiveCell()
-    {
+{
     if (useJS)
         {
-        document.write("<table class=\"naked\" width=\"100%\" cellSpacing=\"0\" onMouseOver=\"ActivateCell(this)\" onMouseOut=\"UnactivateCell(this)\" onMouseDown=\"MarkFirstCell(this)\" onMouseUp=\"MarkLastCell(this)\" onClick=\"GotoLink(this)\">\n<td class=\"naked\">\n");
+        document.write("<table class=\"naked\" width=\"100%\" cellSpacing=\"0\" onMouseOver=\"ActivateCell(this)\" onMouseOut=\"UnactivateCell(this)\" onClick=\"GotoLink(this)\">\n<td class=\"naked\">\n");
 	// Note: The &nbsp; below is necessary to fill-up the cell. Empty cells behave badly in some browsers.
         if (!show_plus_link) document.write("&nbsp;<div style=\"display:none\">\n"); // This will hide the (+) link.
         }
-    }
+}
 
 function EndActiveCell()
-    {
+{
     if (useJS)
         {
         if (!show_plus_link) document.write("</div>");
         document.write("</td></table>\n");
         }
-    }
+}
 
 xbDump("Cell content generation routines defined.");
 
Index: web/grab_globals.inc.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/grab_globals.inc.php,v
retrieving revision 1.3
diff -u -r1.3 grab_globals.inc.php
--- web/grab_globals.inc.php	17 Dec 2004 11:24:37 -0000	1.3
+++ web/grab_globals.inc.php	2 Aug 2008 12:36:05 -0000
@@ -15,10 +15,10 @@
 // +---------------------------------------------------------------------------+
 // | @author    Original Authors : PhpMyAdmin project.
 // | @author    thierry_bo.
-// | @version   $Revision: 1.3 $.
+// | @version   $Revision: 1.2 $.
 // +---------------------------------------------------------------------------+
 //
-// $Id: grab_globals.inc.php,v 1.3 2004/12/17 11:24:37 jberanek Exp $
+// $Id: grab_globals.inc.php,v 1.2 2003/11/14 21:47:20 jflarvoire Exp $
 
 // -- GET --
 if (!empty($_GET))
@@ -130,4 +130,14 @@
     $HTTP_HOST = $HTTP_SERVER_VARS['HTTP_HOST'];
 }
 
+// +---------------------------------------------------------------------------+
+/* Changes to this file :
+ * $Log: grab_globals.inc.php,v $
+ * Revision 1.2  2003/11/14 21:47:20  jflarvoire
+ * Added the setting of $HTTP_HOST.
+ *
+ * Revision 1.1  2003/03/05 05:12:31  thierry_bo
+ * + Make MRBS compliant to the 'register_globals = off' directive
+ *
+ */
 ?>
Index: web/edit_users.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/edit_users.php,v
retrieving revision 1.13
diff -u -r1.13 edit_users.php
--- web/edit_users.php	17 May 2005 14:45:13 -0000	1.13
+++ web/edit_users.php	2 Aug 2008 12:36:05 -0000
@@ -20,12 +20,11 @@
 *									      *
 \*****************************************************************************/
 
-// $Id: edit_users.php,v 1.13 2005/05/17 14:45:13 jberanek Exp $
+// $Id: edit_users.php,v 1.9.2.3 2005/09/02 10:42:34 jberanek Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 
@@ -33,85 +32,49 @@
 |                     Create the users database if needed                     |
 \*---------------------------------------------------------------------------*/
 
-//   If the table does not exist, then create it
+$nusers = sql_query1("select count(*) from $tbl_users");
 
-$nusers = $mdb->listTables();
-if (MDB::isError($nusers))
-{
-    fatal_error(1, $nusers->getMessage() . "<br>" . $nusers->getUserInfo());
-}
-if (!in_array("$tbl_users", $nusers))
-{   /*
-       The first three fields are required (id, name, password). Don't remove
-       or reorder.
-       The following fields are application-specific. However only int and
-       varchar are editable.
-    */
-    $fields = array(
-   		'id'		=> array(
-			'type'		=> 'integer',
-           	'notnull' 	=> 1,
-            'default' 	=> 0
-   	        ),
-       	'name'		=> array(
-       		'type'		=> 'text',
-            'length' 	=> 30
-   	        ),
-       	'password'	=> array(
-       		'type'		=> 'text',
-            'length'	=> 40
-            ),
-   	    'email'		=> array(
-       		'type'		=> 'text',
-           	'length'	=> 75
-            )
-   	);
-    $r = $mdb->createTable($tbl_users, $fields);
-    /* No need to localize the following error messages: Only the admin
-       running this for the first time would see it.
-    */
-    if (MDB::isError($r))
-    {
-        fatal_error(1, "<p>Error creating the $tbl_users table.<br>\n"
-        	. $r->getMessage() . "<br>" . $r->getUserInfo());
-    }
-    $properties = array(
-        'FIELDS' => array(
-        	'id'	=> array()
-            ),
-        'unique' => 1
-    );
-    $r = $mdb->createIndex($tbl_users, "${tbl_users}_pkey", $properties);
-    if (MDB::isError($r))
-    {
-        fatal_error(1, "<p>Error creating the $tbl_users table indexes.<br>\n"
-        	. $r->getMessage() . "<br>" . $r->getUserInfo());
-    }
-    $r = $mdb->createSequence("${tbl_users}_id");
-    if (MDB::isError($r))
-    {
-        fatal_error(1, "<p>Error creating the $tbl_users sequence.<br>\n"
-        	. $r->getMessage() . "<br>" . $r->getUserInfo());
-    }
+if ($nusers == -1)	/* If the table does not exist */
+    {			/* Then create it */
+    $cmd = "
+CREATE TABLE $tbl_users
+(
+  /* The first four fields are required. Don't remove or reorder. */
+  id        int NOT NULL auto_increment,
+  name      varchar(30),
+  password  varchar(40),
+  email     varchar(75),
+
+  /* The following fields are application-specific. However only int and varchar are editable. */
+
+
+  PRIMARY KEY (id)
+);";
+    $r = sql_command($cmd);
+    if ($r == -1)
+        { // No need to localize this: Only the admin running this for the first time would see it.
+        print "Error creating the $tbl_users table.<br>\n";
+        print sql_error() . "<br>\n";
+        exit();
+        }
     $nusers = 0;
-}
+    }
 
 /* Get the list of fields actually in the table. (Allows the addition of new fields later on) */
-$field_name = $mdb->listTableFields($tbl_users);
-if (MDB::isError($field_name))
-{
-    fatal_error(1, $field_name->getMessage() . "<br>" . $field_name->getUserInfo());
-}
-$nfields = sizeof($field_name);
-for ($i=0; $i<$nfields; $i++)
-{
-    $types = $mdb->getTableFieldDefinition($tbl_users, $field_name[$i]);
-    if (MDB::isError($types))
-    {
-        fatal_error(1, $types->getMessage() . "<br>" . $types->getUserInfo());
+$result = sql_query("select * from $tbl_users limit 1");
+$nfields = sql_num_fields($result);
+for ($i=0; $i<$nfields ;$i++)
+    {
+    $field_name[$i] = sql_field_name($result, $i);
+// print "<p>field_name[$i] = $field_name[$i]</p>\n";
+    $field_type[$i] = sql_field_type($result, $i);
+// print "<p>field_type[$i] = $field_type[$i]</p>\n";
+    $field_istext[$i] = ((stristr($field_type[$i], "char")) || (stristr($field_type[$i], "string"))) ? true : false;
+// print "<p>field_istext[$i] = $field_istext[$i]</p>\n";
+    $field_isnum[$i] = ((stristr($field_type[$i], "int")) || (stristr($field_type[$i], "real"))) ? true : false;
+// print "<p>field_isnum[$i] = $field_isnum[$i]</p>\n";
     }
-    $field_type[$i] = $types[0][0]['type'];
-}
+sql_free($result);
 
 /* Get localized field name */
 function get_loc_field_name($i)
@@ -131,24 +94,17 @@
 
 $initial_user_creation = 0;
 
-$r = $mdb->queryOne("SELECT count(*)
-                     FROM $tbl_users", 'integer');
-if (MDB::isError($r))
-{
-    echo $r->getMessage() . "<br>" . $r->getUserInfo();
-    exit;
-}
-else if ($r > 0)
+if ($nusers > 0)
 {
     $user = getUserName();
     $level = authGetUserLevel($user, $auth["admin"]);
     // Do not allow unidentified people to browse the list.
     if(!getAuthorised(1))
-        {
+    {
         showAccessDenied($day, $month, $year, $area);
         exit;
-        }
     }
+}
 else /* We've just created the table. Assume the person doing this IS the administrator. */
 {
     $initial_user_creation = 1;
@@ -163,14 +119,11 @@
 if (isset($Action) && ( ($Action == "Edit") or ($Action == "Add") ))
     {
     if ($Id >= 0) /* -1 for new users, or >=0 for existing ones */
-    {
-        $data = $mdb->queryRow(
-        	"SELECT * FROM $tbl_users WHERE id=$Id", $field_type);
-        if (MDB::isError($data))
         {
-    		fatal_error(1, $data->getMessage() . "<br>" . $data->getUserInfo());
-    	}
-    }
+        $result = sql_query("select * from $tbl_users where id=$Id");
+        $data = sql_row($result, 0);
+        sql_free($result);
+        }
     if (($Id == -1) || (!$data)) /* Set blank data for undefined entries */
     	{
     	for ($i=0; $i<$nfields; $i++) $data[$i] = "";
@@ -291,75 +244,40 @@
     }
     //
     if ($Id >= 0)
-    {
-        // This is a REPLACE
-        $replaced_fields = array();
-        for ($i=0; $i<$nfields; $i++)
-        {
-            if ($field_name[$i]=="id") $Field[$i] = $Id;
-            if ($field_name[$i]=="name") $Field[$i] = strtolower($Field[$i]);
-            if (($field_name[$i]=="password") && ($password0!="")) $Field[$i]=md5($password0);
-            if ((stristr($field_type[$i], "integer")) && ($Field[$i] == "")) $Field[$i] = "0";
-
-        	$replaced_fields[$field_name[$i]] = array(
-            	'Value' => $Field[$i],
-                'Type'  => $field_type[$i]
-                	);
-            if ($field_name[$i]=="id")
-            {
-                $replaced_fields[$field_name[$i]]['Key'] = 1;
-			}
+    	{
+        $operation = "replace into $tbl_users values (";
         }
-        $r = $mdb->replace($tbl_users, $replaced_fields);
-        if (MDB::isError($r))
-		{
-    		fatal_error(1, $r->getMessage() . "<br>" . $r->getUserInfo());
-		}
-    }
     else
-    {
-        $operation = "INSERT INTO $tbl_users VALUES (";
-        $Id = $mdb->nextId("${tbl_users}_id");
-        if (MDB::isError($Id))
-        {
-            fatal_error(1, $Id->getMessage() . "<br>" . $Id->getUserInfo());
-        }
-    	for ($i=0; $i<$nfields; $i++)
-        {
-        	if ($field_name[$i]=="id") $Field[$i] = $Id;
-        	if ($field_name[$i]=="name") $Field[$i] = strtolower($Field[$i]);
-        	if (($field_name[$i]=="password") && ($password0!="")) $Field[$i]=md5($password0);
-        	/* print "$field_name[$i] = $Field[$i]<br>"; */
-        	if ($i > 0) $operation = $operation . ", ";
-        	//if (stristr($field_type[$i], "char")) $operation .= "'";
-        	if ((stristr($field_type[$i], "integer")) && ($Field[$i] == "")) $Field[$i] = "0";
-        	//$operation = $operation . $Field[$i];
-        	if (stristr($field_type[$i], "text"))
-            {
-            	$operation .= $mdb->getTextValue($Field[$i]);
-            }
-            else
-            {
-            	$operation .= $Field[$i];
-            }
-    	}
-    	$operation = $operation . ");";
-        $r = $mdb->query($operation);
-        if (MDB::isError($r))
         {
-            fatal_error(1, $r->getMessage() . "<br>" . $r->getUserInfo());
+        $operation = "insert into $tbl_users values (";
+        $Id = sql_query1("select max(id) from $tbl_users;") + 1; /* Use the last index + 1 */
+        /* Note: If the table is empty, sql_query1 returns -1. So use index 0. */
         }
-    }
+
+    for ($i=0; $i<$nfields; $i++)
+        {
+        if ($field_name[$i]=="id") $Field[$i] = $Id;
+        if ($field_name[$i]=="name") $Field[$i] = strtolower($Field[$i]);
+        if (($field_name[$i]=="password") && ($password0!="")) $Field[$i]=md5($password0);
+        /* print "$field_name[$i] = $Field[$i]<br>"; */
+        if ($i > 0) $operation = $operation . ", ";
+        if ($field_istext[$i]) $operation .= "'";
+        if ($field_isnum[$i] && ($Field[$i] == "")) $Field[$i] = "0";
+        $operation = $operation . $Field[$i];
+        if ($field_istext[$i]) $operation .= "'";
+        }
+    $operation = $operation . ");";
 
     /* print $operation . "<br>\n"; */
-    if (MDB::isError($r))
+    $r = sql_command($operation);
+    if ($r == -1)
     {
-        print_header(0, 0, 0, "");
-
-        // This is unlikely to happen in normal  operation. Do not translate.
-        print "Error updating the mrbs_users table.<br>\n";
-        print $r->getMessage() . "<br>" . $r->getUserInfo() . "<br>\n";
+	print_header(0, 0, 0, "");
 
+	// This is unlikely to happen in normal  operation. Do not translate.
+        print "Error updating the $tbl_users table.<br>\n";
+        print sql_error() . "<br>\n";
+        
         print "<form method=post action=\"" . basename($PHP_SELF) . "\">\n";
         print "  <input type=submit value=\" " . get_vocab("ok") . " \" /> <br />\n";
         print "</form>\n</body>\n</html>\n";
@@ -383,15 +301,15 @@
         exit();
         }
 
-    $r = $mdb->query("DELETE FROM $tbl_users WHERE id=$Id;");
-    if (MDB::isError($r))
+    $r = sql_command("delete from $tbl_users where id=$Id;");
+    if ($r == -1)
         {
 	print_header(0, 0, 0, "");
 
 	// This is unlikely to happen in normal  operation. Do not translate.
         print "Error deleting entry $Id from the $tbl_users table.<br>\n";
-        print $r->getMessage() . "<br>" . $r->getUserInfo() . "<br>\n";
-
+        print sql_error() . "<br>\n";
+        
         print "<form method=post action=\"" . basename($PHP_SELF) . "\">\n";
         print "  <input type=submit value=\" " . get_vocab("ok") . " \" /> <br />\n";
         print "</form>\n</body>\n</html>\n";
@@ -419,19 +337,15 @@
 }
 
 if ($level == 2) /* Administrators get the right to add new users */
-{
+    {
     print "<p><form method=post action=\"" . basename($PHP_SELF) . "\">\n";
     print "\t<input type=hidden name=Action value=Add />\n";
     print "\t<input type=hidden name=Id value=\"-1\" />\n";
     print "\t<input style=\"margin:0\" type=submit value=\"" . get_vocab("add_new_user") . "\" />\n";
     print "</form></p>\n";
-}
+    }
 
-$list = $mdb->query("SELECT * FROM $tbl_users ORDER BY name", $field_type);
-if (MDB::isError($list))
-{
-    fatal_error(0, $list->getMessage() . "<br>" . $list->getUserInfo());
-}
+$list = sql_query("select * from $tbl_users order by name");
 print "<table border=1>\n";
 print "<tr>";
 // The first 2 columns are the user rights and uaser name.
@@ -441,7 +355,7 @@
 print "<th>" . get_vocab("action") . "</th>";
 print "</tr>\n";
 $i = 0; 
-while ($line = $mdb->fetchInto($list))
+while ($line = sql_row($list, $i++))
     {
     print "\t<tr>\n";
     $j = -1;
@@ -491,8 +405,7 @@
     print "\t\t</td>\n";
     print "\t</tr>\n";
     }
-    $mdb->freeResult($list);
 print "</table>\n";
 
 include "trailer.inc";
-?>
+?>
\ No newline at end of file
Index: web/auth_ext.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_ext.inc,v
retrieving revision 1.9
diff -u -r1.9 auth_ext.inc
--- web/auth_ext.inc	29 Mar 2005 14:10:24 -0000	1.9
+++ web/auth_ext.inc	2 Aug 2008 12:36:04 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: auth_ext.inc,v 1.9 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: auth_ext.inc,v 1.6.2.2 2005/03/29 13:26:15 jberanek Exp $
  *
  * Authentication scheme that uses an external script as the source
  * for user authentication.
@@ -59,28 +59,28 @@
  */
 function authValidateUser($user, $pass)
 {
-    global $auth;
-    
-    // Check if we do not have a username/password
-    if (!isset($user) || !isset($pass))
-    {
-        return 0;
-    }
-    
-    // Generate the command line
-    $cmd = $auth["prog"] . ' ' . $auth["params"];
-    $cmd = preg_replace('/#USERNAME#/',escapeshellarg($user),$cmd);
-    $cmd = preg_replace('/#PASSWORD#/',escapeshellarg($pass),$cmd);
-    
-    // Run the program
-    exec($cmd, $output, $ret);
-    
-    // If it succeeded, return success
-    if ($ret == 0)
-        return 1;
-    
-    // return failure
-    return 0;
+        global $auth;
+	
+	// Check if we do not have a username/password
+	if(!isset($user) || !isset($pass))
+	{
+		return 0;
+	}
+	
+	// Generate the command line
+	$cmd = $auth["prog"] . ' ' . $auth["params"];
+	$cmd = preg_replace('/#USERNAME#/',escapeshellarg($user),$cmd);
+	$cmd = preg_replace('/#PASSWORD#/',escapeshellarg($pass),$cmd);
+	
+	// Run the program
+	exec($cmd, $output, $ret);
+	
+	// If it succeeded, return success
+	if($ret == 0)
+		return 1;
+	
+	// return failure
+	return 0;
 }
 
 /* authGetUserLevel($user)
@@ -109,4 +109,4 @@
 	return 1;
 }
 
-?>
+?>
\ No newline at end of file
Index: web/day.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/day.php,v
retrieving revision 1.41
diff -u -r1.41 day.php
--- web/day.php	26 Apr 2006 10:34:35 -0000	1.41
+++ web/day.php	2 Aug 2008 12:36:05 -0000
@@ -1,13 +1,12 @@
 <?php
-# $Id: day.php,v 1.41 2006/04/26 10:34:35 jberanek Exp $
+# $Id: day.php,v 1.38.2.3 2007/02/13 12:53:24 jberanek Exp $
 
-require_once("grab_globals.inc.php");
-require "config.inc.php";
-require "functions.inc";
-require_once("database.inc.php");
-require "$dbsys.inc";
+require_once "grab_globals.inc.php";
+include "config.inc.php";
+include "functions.inc";
+include "$dbsys.inc";
 include "mrbs_auth.inc";
-require "mincals.inc";
+include "mincals.inc";
 
 if (empty($debug_flag)) $debug_flag = 0;
 
@@ -19,7 +18,7 @@
 	$year  = date("Y");
 } else {
 # Make the date valid if day is more then number of days in month
-	while (!checkdate($month, $day, $year))
+	while (!checkdate(intval($month), intval($day), intval($year)))
 		$day--;
 }
 if (empty($area))
@@ -65,23 +64,16 @@
 	echo make_area_select_html('day.php', $area, $year, $month, $day); # from functions.inc
    } else {
 	# show the standard html list
-     $sql = "SELECT      id, area_name 
-             FROM        $tbl_area 
-             ORDER BY    area_name";
-     $types = array('integer', 'text');
-     $res = $mdb->query($sql, $types);
-     if (!MDB::isError($res))
-     {
-         while ($row = $mdb->fetchInto($res))
-         {
-             echo "<a href=\"day.php?year=$year&month=$month&day=$day&area=$row[0]\">";
-             if ($row[0] == $area)
-                 echo "<font color=\"red\">" . htmlspecialchars($row[1]) . "</font></a><br>\n";
-			 else echo htmlspecialchars($row[1]) . "</a><br>\n";
-		 }
-		 $mdb->freeResult($res);
-     }
-    }
+	$sql = "select id, area_name from $tbl_area order by area_name";
+   	$res = sql_query($sql);
+   	if ($res) for ($i = 0; ($row = sql_row($res, $i)); $i++)
+   	{
+		echo "<a href=\"day.php?year=$year&month=$month&day=$day&area=$row[0]\">";
+		if ($row[0] == $area)
+			echo "<font color=\"red\">" . htmlspecialchars($row[1]) . "</font></a><br>\n";
+		else echo htmlspecialchars($row[1]) . "</a><br>\n";
+   	}
+   }
    echo "</td>\n";
 
    #Draw the three month calendars
@@ -109,56 +101,45 @@
 #Note: The predicate clause 'start_time <= ...' is an equivalent but simpler
 #form of the original which had 3 BETWEEN parts. It selects all entries which
 #occur on or cross the current day.
-
-#id aliases only needed for Oracle, otherwise ony one id column is returned 
-
-$sql = "SELECT  $tbl_room.id AS ID, start_time, end_time, name,
-				$tbl_entry.id AS ID2, type, $tbl_entry.description
-        FROM    $tbl_entry, $tbl_room
-        WHERE   $tbl_entry.room_id = $tbl_room.id
-        AND     area_id = $area
-        AND     start_time <= $pm7 
-        AND     end_time > $am7";
-
-$types = array('integer', 'integer', 'integer', 'text', 'integer', 'text', 'text');
-$res = $mdb->query($sql, $types);
-if (MDB::isError($res))
-{
-    fatal_error(0, $res->getMessage() . "<br>" . $res->getUserInfo());
-}
-while ($row = $mdb->fetchInto($res))
-{
-    /*
-       Each row weve got here is an appointment.
-       row[0] = Room ID
-       row[1] = start time
-       row[2] = end time
-       row[3] = short description
-       row[4] = id of this booking
-       row[5] = type (internal/external)
-       row[6] = description
-
-       $today is a map of the screen that will be displayed
-       It looks like:
-           $today[Room ID][Time][id]
-                                [color]
-                                [data]
-                                [long_descr]
-
-       Fill in the map for this meeting. Start at the meeting start time,
-       or the day start time, whichever is later. End one slot before the
-       meeting end time (since the next slot is for meetings which start then),
-       or at the last slot in the day, whichever is earlier.
-       Time is of the format HHMM without leading zeros.
-
-       Note: int casts on database rows for max may be needed for PHP3.
-       Adjust the starting and ending times so that bookings which don't
-       start or end at a recognized time still appear.
-    */
-    $start_t = max(round_t_down($row[1], $resolution, $am7), $am7);
-    $end_t = min(round_t_up($row[2], $resolution, $am7) - $resolution, $pm7);
-    for ($t = $start_t; $t <= $end_t; $t += $resolution)
-    {
+$sql = "SELECT $tbl_room.id, start_time, end_time, name, $tbl_entry.id, type,
+        $tbl_entry.description
+   FROM $tbl_entry, $tbl_room
+   WHERE $tbl_entry.room_id = $tbl_room.id
+   AND area_id = $area
+   AND start_time <= $pm7 AND end_time > $am7";
+
+$res = sql_query($sql);
+if (! $res) fatal_error(0, sql_error());
+for ($i = 0; ($row = sql_row($res, $i)); $i++) {
+	# Each row weve got here is an appointment.
+	#Row[0] = Room ID
+	#row[1] = start time
+	#row[2] = end time
+	#row[3] = short description
+	#row[4] = id of this booking
+	#row[5] = type (internal/external)
+	#row[6] = description
+
+	# $today is a map of the screen that will be displayed
+	# It looks like:
+	#     $today[Room ID][Time][id]
+	#                          [color]
+	#                          [data]
+	#                          [long_descr]
+
+	# Fill in the map for this meeting. Start at the meeting start time,
+	# or the day start time, whichever is later. End one slot before the
+	# meeting end time (since the next slot is for meetings which start then),
+	# or at the last slot in the day, whichever is earlier.
+	# Time is of the format HHMM without leading zeros.
+	#
+	# Note: int casts on database rows for max may be needed for PHP3.
+	# Adjust the starting and ending times so that bookings which don't
+	# start or end at a recognized time still appear.
+	$start_t = max(round_t_down($row[1], $resolution, $am7), $am7);
+	$end_t = min(round_t_up($row[2], $resolution, $am7) - $resolution, $pm7);
+	for ($t = $start_t; $t <= $end_t; $t += $resolution)
+	{
 		$today[$row[0]][date($format,$t)]["id"]    = $row[4];
 		$today[$row[0]][date($format,$t)]["color"] = $row[5];
 		$today[$row[0]][date($format,$t)]["data"]  = "";
@@ -178,7 +159,6 @@
 		$today[$row[0]][date($format,$start_t)]["long_descr"] = $row[6];
 	}
 }
-$mdb->freeResult($res);
 
 if ($debug_flag) 
 {
@@ -199,24 +179,18 @@
 # pull the data from the db and store it. Convienently we can print the room
 # headings and capacities at the same time
 
-$sql = "SELECT      room_name, capacity, id, description
-        FROM        $tbl_room 
-        WHERE       area_id=$area 
-        ORDER BY    1";
-$types = array('text', 'integer', 'integer', 'text');
-$res = $mdb->query($sql, $types);
+$sql = "select room_name, capacity, id, description from $tbl_room where area_id=$area order by 1";
+
+$res = sql_query($sql);
 
 # It might be that there are no rooms defined for this area.
 # If there are none then show an error and dont bother doing anything
 # else
-if (MDB::isError($res))
-{
-    fatal_error(0, $res->getMessage() . "<br>" . $res->getUserInfo());
-}
-$counte = $mdb->numRows($res);
-if (0 == $counte)
+if (! $res) fatal_error(0, sql_error());
+if (sql_count($res) == 0)
 {
-    echo "<h1>".get_vocab("no_rooms_for_area")."</h1>";
+	echo "<h1>".get_vocab("no_rooms_for_area")."</h1>";
+	sql_free($res);
 }
 else
 {
@@ -237,12 +211,11 @@
             {
 	    echo "<SCRIPT language=\"JavaScript\" type=\"text/javascript\" src=\"xbLib.js\"></SCRIPT>\n";
             echo "<SCRIPT language=\"JavaScript\">InitActiveCell("
-               . ($show_plus_link ? "true" : "false") . ", "			// Show (+)
-               . "true, "							// Highlight left title column
-               . ((FALSE != $times_right_side) ? "true" : "false") . ", "	// Highlight right title column
-               . "\"$highlight_method\", "					// "bgcolor", "class", or "hybrid"
-               . "\"" . get_vocab("click_to_reserve") . "\", "			// Status bar message
-	       . "1"								// Drag effect: 0=None; 1=Rectangle; 2=Columns; 3=Rows
+               . ($show_plus_link ? "true" : "false") . ", "
+               . "true, "
+               . ((FALSE != $times_right_side) ? "true" : "false") . ", "
+               . "\"$highlight_method\", "
+               . "\"" . get_vocab("click_to_reserve") . "\""
                . ");</SCRIPT>\n";
             }
 
@@ -250,12 +223,12 @@
 	echo "<table cellspacing=0 border=1 width=\"100%\">";
 	echo "<tr><th width=\"1%\">".($enable_periods ? get_vocab("period") : get_vocab("time"))."</th>";
 
-    $room_column_width = (int)(95 / $counte);
-    while ($row = $mdb->fetchInto($res))
-    {
+	$room_column_width = (int)(95 / sql_count($res));
+	for ($i = 0; ($row = sql_row($res, $i)); $i++)
+	{
         echo "<th width=\"$room_column_width%\">
             <a href=\"week.php?year=$year&month=$month&day=$day&area=$area&room=$row[2]\"
-            title=\"" . get_vocab("viewweek") . " \n\n$row[3]\">"
+            title=\"" . get_vocab("viewweek") . " &#10;&#10;$row[3]\">"
             . htmlspecialchars($row[0]) . ($row[1] > 0 ? "($row[1])" : "") . "</a></th>";
 		$rooms[] = $row[2];
 	}
@@ -267,7 +240,7 @@
         ."</th>";
     }
     echo "</tr>\n";
-
+  
 	# URL for highlighting a time. Don't use REQUEST_URI or you will get
 	# the timetohighlight parameter duplicated each time you click.
 	$hilite_url="day.php?year=$year&month=$month&day=$day&area=$area&timetohighlight";
@@ -301,7 +274,7 @@
 		} else {
 			echo "<a href=\"$hilite_url=$time_t\" title=\""
             . get_vocab("highlight_line") . "\">"
-            . utf8_date(hour_min_format(),$t) . "</a></td>\n";
+            . utf8_strftime(hour_min_format(),$t) . "</a></td>\n";
 		}
 
 		# Loop through the list of rooms we have for this area
@@ -383,7 +356,7 @@
                 tdcell("red");
 		        echo "<a href=\"$hilite_url=$time_t\" title=\""
                 . get_vocab("highlight_line") . "\">"
-                . utf8_date(hour_min_format(),$t) . "</a></td>\n";
+                . utf8_strftime(hour_min_format(),$t) . "</a></td>\n";
             }
         }
 
@@ -394,7 +367,6 @@
     (isset($output)) ? print $output : '';
 	show_colour_key();
 }
-$mdb->freeResult($res);
 
 include "trailer.inc";
 ?>
Index: web/style.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/style.inc,v
retrieving revision 1.11
diff -u -r1.11 style.inc
--- web/style.inc	17 Dec 2004 11:24:37 -0000	1.11
+++ web/style.inc	2 Aug 2008 12:36:07 -0000
@@ -1,13 +1,13 @@
 <?php
 
-# $Id: style.inc,v 1.11 2004/12/17 11:24:37 jberanek Exp $
+# $Id: style.inc,v 1.10.2.2 2006/10/09 15:54:00 jberanek Exp $
 
 global $unicode_encoding;
 global $vocab; # outside of scope; needs to be denote as global
 
 ?>
-  <LINK REL="stylesheet" href="mrbs.css" type="text/css">
-  <META HTTP-EQUIV="Content-Type" content="text/html; charset=<?php
+    <LINK REL="stylesheet" href="mrbs.css" type="text/css">
+    <META HTTP-EQUIV="Content-Type" content="text/html; charset=<?php
    if ($unicode_encoding)
    {
      echo "utf-8";
@@ -20,12 +20,15 @@
      echo $vocab["charset"];
    }
 ?>">
+    <META NAME="Robots" content="noindex">
 <?php
 
 global $refresh_rate;
+global $PHP_SELF;
 
-if ($refresh_rate != 0)
+if (($refresh_rate != 0) &&
+    preg_match("/(day|week|month)\.php/",$PHP_SELF))
 {
-  echo "  <META HTTP-EQUIV=\"Refresh\" CONTENT=\"$refresh_rate\">\n";
+  echo "    <META HTTP-EQUIV=\"Refresh\" CONTENT=\"$refresh_rate\">\n";
 }
-?>
\ No newline at end of file
+?>
Index: web/del.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/del.php,v
retrieving revision 1.13
diff -u -r1.13 del.php
--- web/del.php	29 Mar 2005 14:10:24 -0000	1.13
+++ web/del.php	2 Aug 2008 12:36:05 -0000
@@ -1,10 +1,9 @@
 <?php
-# $Id: del.php,v 1.13 2005/03/29 14:10:24 jberanek Exp $
+# $Id: del.php,v 1.11.2.1 2005/03/29 13:26:15 jberanek Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php"); 
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 
@@ -30,21 +29,17 @@
 if($type == "room")
 {
 	# We are supposed to delete a room
-    if (isset($confirm))
-    {
-        # They have confirmed it already, so go blast!
-        $mdb->autoCommit(FALSE);
-        # First take out all appointments for this room
-        $mdb->query("DELETE 
-                     FROM   $tbl_entry 
-                     WHERE  room_id=$room");
-        
-        # Now take out the room itself
-        $mdb->query("DELETE 
-                     FROM   $tbl_room 
-                     WHERE  id=$room");
-        $mdb->commit();
-
+	if(isset($confirm))
+	{
+		# They have confirmed it already, so go blast!
+		sql_begin();
+		# First take out all appointments for this room
+		sql_command("delete from $tbl_entry where room_id=$room");
+		
+		# Now take out the room itself
+		sql_command("delete from $tbl_room where id=$room");
+		sql_commit();
+		
 		# Go back to the admin page
 		Header("Location: admin.php");
 	}
@@ -54,37 +49,29 @@
 		
 		# We tell them how bad what theyre about to do is
 		# Find out how many appointments would be deleted
-
-        $sql = "SELECT  name, start_time, end_time
-                FROM    $tbl_entry
-                WHERE   room_id=$room";
-        $types = array('text', 'integer', 'integer');
-        $res = $mdb->query($sql, $types);
-        if (MDB::isError($res))
-        {
-            echo($res->getMessage() . "<BR>" . $res->getUserInfo() . "<BR>");
-        }
-        elseif ($row = $mdb->fetchInto($res))
-        {
-            echo get_vocab("deletefollowing") . ":<ul>";
-
-            do
-            {
-                echo "<li>$row[0] (";
-                echo time_date_string($row[1]) . " -> ";
-                echo time_date_string($row[2]) . ")";
-            }
-            while ($row = $mdb->fetchInto($res));
-
-            echo "</ul>";
-        }
-
-        echo "<center>";
+		
+		$sql = "select name, start_time, end_time from $tbl_entry where room_id=$room";
+		$res = sql_query($sql);
+		if (! $res) echo sql_error();
+		elseif (sql_count($res) > 0)
+		{
+			echo get_vocab("deletefollowing") . ":<ul>";
+			
+			for ($i = 0; ($row = sql_row($res, $i)); $i++)
+			{
+				echo "<li>$row[0] (";
+				echo time_date_string($row[1]) . " -> ";
+				echo time_date_string($row[2]) . ")";
+			}
+			
+			echo "</ul>";
+		}
+		
+		echo "<center>";
 		echo "<H1>" .  get_vocab("sure") . "</h1>";
 		echo "<H1><a href=\"del.php?type=room&room=$room&confirm=Y\">" . get_vocab("YES") . "!</a> &nbsp;&nbsp;&nbsp; <a href=admin.php>" . get_vocab("NO") . "!</a></h1>";
 		echo "</center>";
 		include "trailer.inc";
-        $mdb->freeResult($res);
 	}
 }
 
@@ -92,16 +79,12 @@
 {
 	# We are only going to let them delete an area if there are
 	# no rooms. its easier
-    $n = $mdb->queryOne("SELECT count(*) 
-                         FROM   $tbl_room 
-                         WHERE  area_id=$area", 'integer');
-    if (0 == $n)
-    {
-        # OK, nothing there, lets blast it away
-        $mdb->query("DELETE 
-                     FROM   $tbl_area 
-                     WHERE  id=$area");
-
+    $n = sql_query1("select count(*) from $tbl_room where area_id=$area");
+	if ($n == 0)
+	{
+		# OK, nothing there, lets blast it away
+		sql_command("delete from $tbl_area where id=$area");
+		
 		# Redirect back to the admin page
 		header("Location: admin.php");
 	}
Index: web/auth_db.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_db.inc,v
retrieving revision 1.10
diff -u -r1.10 auth_db.inc
--- web/auth_db.inc	20 Aug 2005 19:03:31 -0000	1.10
+++ web/auth_db.inc	2 Aug 2008 12:36:04 -0000
@@ -1,20 +1,19 @@
 <?php
 /*****************************************************************************\
-*                                                                             *
-*   File name       auth_db.inc                                               *
-*                                                                             *
-*   Description     Authenticate users from a table in the MRBS database.     *
-*                                                                             *
-*   Notes           To use this authentication scheme, set in config.inc.php: *
-*                       $auth["type"]  = "db";                                *
-*                                                                             *
-*   History                                                                   *
-*    2004/01/11 JFL Created this file                                         *
-*    Remaining history in ChangeLog and CVS logs                              *
-*                                                                             *
+*									      *
+*   File name       auth_db.inc						      *
+*									      *
+*   Description	    Authenticate users from a table in the MRBS database.     *
+*									      *
+*   Notes	    To use this authentication scheme, set in config.inc.php: *
+*			$auth["type"]  = "db";				      *
+*									      *
+*   History								      *
+*    2004/01/11 JFL Created this file					      *
+*									      *
 \*****************************************************************************/
 
-// $Id: auth_db.inc,v 1.10 2005/08/20 19:03:31 jberanek Exp $
+// $Id: auth_db.inc,v 1.6.2.3 2005/08/20 09:46:44 jberanek Exp $
 
 /* session_php.inc and session_cookie.inc will add a link to the user list
     in the logon box, if the value $user_list_link is set. */
@@ -35,15 +34,11 @@
 function authValidateUser($user, $pass)
 {
    global $tbl_users;
-   global $mdb;
 
+   $user=slashes($user);
    $user=strtolower($user);
    $pass = md5($pass);
-
-   return $mdb->queryOne("SELECT count(*)
-   						  FROM   $tbl_users
-                          WHERE  name=" . $mdb->getTextValue("$user") . "
-                          AND    password=" . $mdb->getTextValue("$pass"), 'integer');
+   return sql_query1("select count(*) from $tbl_users where name='$user' and password='$pass';");
 }
 
 /* authGetUserLevel($user)
@@ -72,4 +67,4 @@
    return 1;
 }
 
-?>
+?>
\ No newline at end of file
Index: web/mrbs.css
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/mrbs.css,v
retrieving revision 1.11
diff -u -r1.11 mrbs.css
--- web/mrbs.css	24 Aug 2004 16:58:55 -0000	1.11
+++ web/mrbs.css	2 Aug 2008 12:36:07 -0000
@@ -19,7 +19,7 @@
 TD.TR { vertical-align: top; text-align: right}
 TD.TL { vertical-align: top; text-align: left}
 
-td form { margin:0; } // Prevent IE from displaying margins around forms in tables.
+td form { margin:0; } /* Prevent IE from displaying margins around forms in tables. */
 
 TD.unallocated {color:gray}
 TD.allocated {color:black}
Index: web/auth_config.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_config.inc,v
retrieving revision 1.5
diff -u -r1.5 auth_config.inc
--- web/auth_config.inc	29 Mar 2005 14:10:24 -0000	1.5
+++ web/auth_config.inc	2 Aug 2008 12:36:04 -0000
@@ -16,7 +16,7 @@
 *									      *
 \*****************************************************************************/
 
-// $Id: auth_config.inc,v 1.5 2005/03/29 14:10:24 jberanek Exp $
+// $Id: auth_config.inc,v 1.2.4.2 2005/03/29 13:26:15 jberanek Exp $
 
 /* authValidateUser($user, $pass)
  * 
Index: web/auth_none.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/auth_none.inc,v
retrieving revision 1.4
diff -u -r1.4 auth_none.inc
--- web/auth_none.inc	29 Mar 2005 14:10:24 -0000	1.4
+++ web/auth_none.inc	2 Aug 2008 12:36:05 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: auth_none.inc,v 1.4 2005/03/29 14:10:24 jberanek Exp $
+/* $Id: auth_none.inc,v 1.1.4.2 2005/03/29 13:26:15 jberanek Exp $
  *
  * Dummy authentication scheme, that accepts any user.
  * Useful for using mrbs without authentication,
Index: web/edit_area_room.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/edit_area_room.php,v
retrieving revision 1.16
diff -u -r1.16 edit_area_room.php
--- web/edit_area_room.php	29 Mar 2005 14:10:24 -0000	1.16
+++ web/edit_area_room.php	2 Aug 2008 12:36:05 -0000
@@ -1,10 +1,9 @@
 <?php
-// $Id: edit_area_room.php,v 1.16 2005/03/29 14:10:24 jberanek Exp $
+// $Id: edit_area_room.php,v 1.14.2.1 2005/03/29 13:26:22 jberanek Exp $
 
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "functions.inc";
-require_once("database.inc.php");
 include "$dbsys.inc";
 include "mrbs_auth.inc";
 
@@ -27,10 +26,8 @@
 {
 	if (!empty($room)) // Get the area the room is in
 	{
-        $area = $mdb->queryOne("SELECT  area_id 
-                                FROM    $tbl_room 
-                                WHERE   id=$room", 'integer');
-    }
+		$area = sql_query1("SELECT area_id from $tbl_room where id=$room");
+	}
 	Header("Location: admin.php?day=$day&month=$month&year=$year&area=$area");
 	exit();
 }
@@ -63,31 +60,19 @@
     //
 	if ( isset($change_room) && (FALSE != $valid_email) )
 	{
-        $room_name  = unslashes($room_name);
-        $description = unslashes($description);
-
         if (empty($capacity)) $capacity = 0;
-        $sql = "UPDATE  $tbl_room 
-                SET     room_name=" . $mdb->getTextValue($room_name). ", 
-                        description=" . $mdb->getTextValue($description). ", 
-                        capacity=$capacity,
-                        room_admin_email=" . $mdb->getTextValue($room_admin_email) . "
-                WHERE   id=$room";
-        if (MDB::isError($error = $mdb->query($sql)))
-        {
-            fatal_error(0, get_vocab("update_room_failed") . $error->getUserInfo());
-        }
-    }
+		$sql = "UPDATE $tbl_room SET room_name='" . slashes($room_name)
+			. "', description='" . slashes($description)
+			. "', capacity=$capacity, room_admin_email='"
+            . slashes($room_admin_email) . "' WHERE id=$room";
+		if (sql_command($sql) < 0)
+			fatal_error(0, get_vocab("update_room_failed") . sql_error());
+	}
 
-    $types = array('integer', 'text', 'text', 'integer', 'text');
-    $res = $mdb->query("SELECT  id, room_name, description, capacity, room_admin_email
-                        FROM    $tbl_room 
-                        WHERE   id=$room", $types);
-    if (MDB::isError($res))
-    {
-        fatal_error(0, get_vocab("error_room") . $room . get_vocab("not_found"));
-    }
-    $row = $mdb->fetchRow($res, MDB_FETCHMODE_ASSOC);
+	$res = sql_query("SELECT * FROM $tbl_room WHERE id=$room");
+	if (! $res) fatal_error(0, get_vocab("error_room") . $room . get_vocab("not_found"));
+	$row = sql_row_keyed($res, 0);
+	sql_free($res);
 ?>
 <h3 ALIGN=CENTER><?php echo get_vocab("editroom") ?></h3>
 <form action="edit_area_room.php" method="post">
@@ -134,27 +119,17 @@
     //
     if ( isset($change_area) && (FALSE != $valid_email) )
 	{
-        $area_name = unslashes($area_name);
-        $sql = "UPDATE  $tbl_area 
-                SET     area_name=" . $mdb->getTextValue($area_name) . ",
-                        area_admin_email=" .
-                            $mdb->getTextValue($area_admin_email) . "
-                WHERE   id=$area";
-        if (MDB::isError($error = $mdb->query($sql)))
-        {
-            fatal_error(0, get_vocab("update_area_failed") . $error->getUserInfo());
-        }
+		$sql = "UPDATE $tbl_area SET area_name='" . slashes($area_name)
+			. "', area_admin_email='" . slashes($area_admin_email)
+            . "' WHERE id=$area";
+		if (sql_command($sql) < 0)
+			fatal_error(0, get_vocab("update_area_failed") . sql_error());
 	}
 
-    $types = array('integer', 'text', 'text');
-    $res = $mdb->query("SELECT  id, area_name, area_admin_email 
-                        FROM    $tbl_area 
-                        WHERE   id=$area", $types);
-    if (MDB::isError($res))
-    {
-        fatal_error(0, get_vocab("error_area") . $area . get_vocab("not_found"));
-    }
-    $row = $mdb->fetchRow($res, MDB_FETCHMODE_ASSOC);
+	$res = sql_query("SELECT * FROM $tbl_area WHERE id=$area");
+	if (! $res) fatal_error(0, get_vocab("error_area") . $area . get_vocab("not_found"));
+	$row = sql_row_keyed($res, 0);
+	sql_free($res);
 ?>
 <h3 ALIGN=CENTER><?php echo get_vocab("editarea") ?></h3>
 <form action="edit_area_room.php" method="post">
@@ -176,4 +151,4 @@
 </form>
 <?php } ?>
 </TABLE>
-<?php include "trailer.inc" ?>
+<?php include "trailer.inc" ?>
\ No newline at end of file
Index: web/index.php
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/index.php,v
retrieving revision 1.9
diff -u -r1.9 index.php
--- web/index.php	17 Dec 2004 11:24:37 -0000	1.9
+++ web/index.php	2 Aug 2008 12:36:05 -0000
@@ -1,6 +1,6 @@
 <?php
 
-# $Id: index.php,v 1.9 2004/12/17 11:24:37 jberanek Exp $
+# $Id: index.php,v 1.8 2004/04/14 22:00:03 gwalker Exp $
 
 # Index is just a stub to redirect to the appropriate view
 # as defined in config.inc.php using the variable $default_view
@@ -9,8 +9,7 @@
 
 require_once "grab_globals.inc.php";
 include("config.inc.php");
-require_once("database.inc.php");
-require "$dbsys.inc";
+include("$dbsys.inc");
 
 $day   = date("d");
 $month = date("m");
@@ -25,19 +24,24 @@
 		$redirect_str = "week.php?year=$year&month=$month&day=$day";
 		break;
 	default:
-        $redirect_str = "day.php?day=$day&month=$month&year=$year";
+		$redirect_str = "day.php?day=$day&month=$month&year=$year";
 }
 
 if( ! empty($default_room) )
 {
 
-    $sql = "SELECT area_id FROM $tbl_room WHERE id=$default_room";
-    $area = $mdb->queryOne($sql, 'integer');
-    if (!MDB::isError($area))
-    {
-        $room = $default_room;
-        $redirect_str .= "&area=$area&room=$room";
-    }
+	$sql = "select area_id from $tbl_room where id=$default_room";
+	$res = sql_query($sql);
+	if( $res )
+	{
+		if( sql_count($res) == 1 )
+		{
+			$row = sql_row($res, 0);
+			$area = $row[0];
+			$room = $default_room;
+			$redirect_str .= "&area=$area&room=$room";
+		}
+	}
 }
 
 header("Location: $redirect_str");
Index: web/mysql.inc
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/mysql.inc,v
retrieving revision 1.6
diff -u -r1.6 mysql.inc
--- web/mysql.inc	17 Dec 2004 11:24:37 -0000	1.6
+++ web/mysql.inc	2 Aug 2008 12:36:07 -0000
@@ -1,13 +1,121 @@
 <?php
-// $Id: mysql.inc,v 1.6 2004/12/17 11:24:37 jberanek Exp $
+// $Id: mysql.inc,v 1.5 2004/04/25 18:10:57 jflarvoire Exp $
 
-/* mysql.inc - Simple PHP database support for MySQL.
-   Include this file after database.inc.php.
-   This file contains specific DBMS features/commands not handled by MDB
-   database wrapper.
- */
+// mysql.inc - Simple PHP database support for MySQL.
+// Include this file after defining the following variables:
+//   $db_host = The hostname of the database server
+//   $db_login = The username to use when connecting to the database
+//   $db_password = The database account password
+//   $db_database = The database name.
+// Including this file connects you to the database, or exits on error.
 
 
+// Free a results handle. You need not call this if you call sql_row or
+// sql_row_keyed until the row returns 0, since sql_row frees the results
+// handle when you finish reading the rows.
+function sql_free ($r)
+{
+	mysql_free_result($r);
+}
+
+// Execute a non-SELECT SQL command (insert/update/delete).
+// Returns the number of tuples affected if OK (a number >= 0).
+// Returns -1 on error; use sql_error to get the error message.
+function sql_command ($sql)
+{
+	if (mysql_query($sql)) return mysql_affected_rows();
+	return -1;
+}
+
+// Execute an SQL query which should return a single non-negative number value.
+// This is a lightweight alternative to sql_query, good for use with count(*)
+// and similar queries. It returns -1 on error or if the query did not return
+// exactly one value, so error checking is somewhat limited.
+// It also returns -1 if the query returns a single NULL value, such as from
+// a MIN or MAX aggregate function applied over no rows.
+function sql_query1 ($sql)
+{
+	$r = mysql_query($sql);
+	if (! $r) return -1;
+	if (mysql_num_rows($r) != 1 || mysql_num_fields($r) != 1
+		|| ($result = mysql_result($r, 0, 0)) == "") $result = -1;
+	mysql_free_result($r);
+	return $result;
+}
+
+// Execute an SQL query. Returns a database-dependent result handle,
+// which should be passed back to sql_row or sql_row_keyed to get the results.
+// Returns 0 on error; use sql_error to get the error message.
+function sql_query ($sql)
+{
+	$r = mysql_query($sql);
+	return $r;
+}
+
+// Return a row from a result. The first row is 0.
+// The row is returned as an array with index 0=first column, etc.
+// When called with i >= number of rows in the result, cleans up from
+// the query and returns 0.
+// Typical usage: $i = 0; while ((a = sql_row($r, $i++))) { ... }
+function sql_row ($r, $i)
+{
+	if ($i >= mysql_num_rows($r))
+	{
+		mysql_free_result($r);
+		return 0;
+	}
+	mysql_data_seek($r, $i);
+	return mysql_fetch_row($r);
+}
+
+// Return a row from a result as an associative array keyed by field name.
+// The first row is 0.
+// This is actually upward compatible with sql_row since the underlying
+// routing also stores the data under number indexes.
+// When called with i >= number of rows in the result, cleans up from
+// the query and returns 0.
+function sql_row_keyed ($r, $i)
+{
+	if ($i >= mysql_num_rows($r))
+	{
+		mysql_free_result($r);
+		return 0;
+	}
+	mysql_data_seek($r, $i);
+	return mysql_fetch_array($r);
+}
+
+// Return the number of rows returned by a result handle from sql_query.
+function sql_count ($r)
+{
+	return mysql_num_rows($r);
+}
+
+// Return the value of an autoincrement field from the last insert.
+// Must be called right after an insert on that table!
+function sql_insert_id($table, $field)
+{
+	return mysql_insert_id();
+}
+
+// Return the text of the last error message.
+function sql_error()
+{
+	return mysql_error();
+}
+
+// Begin a transaction, if the database supports it. This is used to
+// improve PostgreSQL performance for multiple insert/delete/updates.
+// There is no rollback support, since MySQL doesn't support it.
+function sql_begin()
+{
+}
+
+// Commit (end) a transaction. See sql_begin().
+function sql_commit()
+{
+}
+
 // Acquire a mutual-exclusion lock on the named table. For portability:
 // This will not lock out SELECTs.
 // It may lock out DELETE/UPDATE/INSERT or not, depending on the implementation.
@@ -21,53 +129,106 @@
 // In MySQL, we avoid table locks, and use low-level locks instead.
 function sql_mutex_lock($name)
 {
-    global $sql_mutex_shutdown_registered, $sql_mutex_unlock_name, $mdb;
-    $res = $mdb->queryOne("SELECT GET_LOCK(" . $mdb->getTextValue($name) . ", 20)");
-    if (MDB::isError($res) or (FALSE == $res))
-    {
-        return 0;
-    }
-    $sql_mutex_unlock_name = $name;
-    if (empty($sql_mutex_shutdown_registered))
-    {
-        register_shutdown_function("sql_mutex_cleanup");
-        $sql_mutex_shutdown_registered = 1;
-    }
-    return 1;
+	global $sql_mutex_shutdown_registered, $sql_mutex_unlock_name;
+	if (!sql_query1("SELECT GET_LOCK('$name', 20)")) return 0;
+	$sql_mutex_unlock_name = $name;
+	if (empty($sql_mutex_shutdown_registered))
+	{
+		register_shutdown_function("sql_mutex_cleanup");
+		$sql_mutex_shutdown_registered = 1;
+	}
+	return 1;
+}
+
+// Release a mutual-exclusion lock on the named table. See sql_mutex_unlock.
+function sql_mutex_unlock($name)
+{
+	global $sql_mutex_unlock_name;
+	sql_query1("SELECT RELEASE_LOCK('$name')");
+	$sql_mutex_unlock_name = "";
+}
+
+// Shutdown function to clean up a forgotten lock. For internal use only.
+function sql_mutex_cleanup()
+{
+	global $sql_mutex_shutdown_registered, $sql_mutex_unlock_name;
+	if (!empty($sql_mutex_unlock_name))
+	{
+		sql_mutex_unlock($sql_mutex_unlock_name);
+		$sql_mutex_unlock_name = "";
+	}
 }
 
 
 // Return a string identifying the database version:
 function sql_version()
 {
-    global $mdb;
-    $v = $mdb->queryOne("select version()");
-    return "Mysql $v";
-}
-
-/**
- * sql_syntax_caseless_contains().
- *
- * Generate non-standard SQL to match a string anywhere in a field's value
- * in a case insensitive manner.
- * In MySQL, REGEXP seems to be case sensitive, so use LIKE instead. But this
- * requires quoting of % and _ in addition to the usual.
- *
- * @param   string  $fieldname  field to apply regexp
- * @param   string  $s          un-escaped/un-slashed string to search for
- * @return  string  fieldname and escaped/slashed string
- * @todo    As of MySQL Version 3.23.4, REGEXP is case-insensitive for normal
- *          (not binary) strings, so we could use regexp instead
- */
+	$r = sql_query("select version()");
+	$v = sql_row($r, 0);
+	sql_free($r);
+	return "MySQL $v[0]";
+}
+
+
+// Generate non-standard SQL for LIMIT clauses:
+function sql_syntax_limit($count, $offset)
+{
+	return " LIMIT $offset,$count ";
+}
+
+// Generate non-standard SQL to output a TIMESTAMP as a Unix-time:
+function sql_syntax_timestamp_to_unix($fieldname)
+{
+	return " UNIX_TIMESTAMP($fieldname) ";
+}
+
+// Generate non-standard SQL to match a string anywhere in a field's value
+// in a case insensitive manner. $s is the un-escaped/un-slashed string.
+// In MySQL, REGEXP seems to be case sensitive, so use LIKE instead. But this
+// requires quoting of % and _ in addition to the usual.
 function sql_syntax_caseless_contains($fieldname, $s)
 {
-	global $mdb;
-	
-    $s = str_replace("\\", "\\\\", $s);
-    $s = str_replace("%", "\\%", $s);
-    $s = str_replace("_", "\\_", $s);
-    $s = str_replace("'", "''", $s);
-    return " $fieldname LIKE " . $mdb->getTextValue("%$s%") . " ";
+	$s = str_replace("\\", "\\\\", $s);
+	$s = str_replace("%", "\\%", $s);
+	$s = str_replace("_", "\\_", $s);
+	$s = str_replace("'", "''", $s);
+	return " $fieldname LIKE '%$s%' ";
+}
+
+// Returns the name of a field.
+function sql_field_name($result, $index)
+{
+	return mysql_field_name($result, $index);
+}
+
+// Returns the type of a field. (one of "int", "real", "string", "blob", etc...)
+function sql_field_type($result, $index)
+{
+	return mysql_field_type($result, $index);
+}
+
+// Returns the number of fields in a result.
+function sql_num_fields($result)
+{
+	return mysql_num_fields($result);
+}
+
+
+
+// Establish a database connection.
+// On connection error, the message will be output without a proper HTML
+// header. There is no way I can see around this; if track_errors isn't on
+// there seems to be no way to supress the automatic error message output and
+// still be able to access the error text.
+if (empty($db_nopersist))
+	$db_c = mysql_pconnect($db_host, $db_login, $db_password);
+else
+	$db_c = mysql_connect($db_host, $db_login, $db_password);
+
+if (!$db_c || !mysql_select_db ($db_database))
+{
+	echo "\n<p>\n" . get_vocab("failed_connect_db") . "\n";
+	exit;
 }
 
 ?>
Index: web/site_faq_de.html
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/site_faq_de.html,v
retrieving revision 1.3
diff -u -r1.3 site_faq_de.html
--- web/site_faq_de.html	26 Jan 2006 13:54:04 -0000	1.3
+++ web/site_faq_de.html	2 Aug 2008 12:36:07 -0000
@@ -2,7 +2,7 @@
 <html>
 <head>
 
-<!-- $Id: site_faq_de.html,v 1.3 2006/01/26 13:54:04 jberanek Exp $ -->
+<!-- $Id: site_faq_de.html,v 1.1.2.2 2006/01/26 11:34:02 jberanek Exp $ -->
   <title>site_faq_de</title>
 </head>
 
Index: web/lang.zh-tw
===================================================================
RCS file: /cvsroot/mrbs/mrbs/web/lang.zh-tw,v
retrieving revision 1.17
diff -u -r1.17 lang.zh-tw
--- web/lang.zh-tw	26 Apr 2006 08:41:41 -0000	1.17
+++ web/lang.zh-tw	2 Aug 2008 12:36:06 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.zh-tw,v 1.17 2006/04/26 08:41:41 jberanek Exp $
+# $Id: lang.zh-tw,v 1.15.2.2 2006/04/26 10:01:43 jberanek Exp $
 
 # This file contains PHP code that specifies language specific strings
 # The default strings come from lang.en, and anything in a locale
Index: web/version.inc
===================================================================
RCS file: web/version.inc
diff -N web/version.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ web/version.inc	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,14 @@
+<?php
+
+# This should probably be a class, but you can only have protected
+# class members in PHP 5, so we won't bother
+
+function get_mrbs_version()
+{
+  # MRBS developers, make sure to update this string before each release
+  $mrbs_version = "MRBS 1.2.5";
+
+  return $mrbs_version;
+}
+
+?>
Index: web/robots.txt
===================================================================
RCS file: web/robots.txt
diff -N web/robots.txt
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ web/robots.txt	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /
Index: .project
===================================================================
RCS file: .project
diff -N .project
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .project	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>mrbs_head</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
Index: web/mysqli.inc
===================================================================
RCS file: web/mysqli.inc
diff -N web/mysqli.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ web/mysqli.inc	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,248 @@
+<?php
+// $Id: mysqli.inc,v 1.1.2.2 2006/10/09 15:53:59 jberanek Exp $
+
+// mysqli.inc - Simple PHP database support for MySQL, using mysqli extension.
+// Include this file after defining the following variables:
+//   $db_host = The hostname of the database server
+//   $db_login = The username to use when connecting to the database
+//   $db_password = The database account password
+//   $db_database = The database name.
+// Including this file connects you to the database, or exits on error.
+
+
+// Free a results handle. You need not call this if you call sql_row or
+// sql_row_keyed until the row returns 0, since sql_row frees the results
+// handle when you finish reading the rows.
+function sql_free ($r)
+{
+  $r->close();
+}
+
+// Execute a non-SELECT SQL command (insert/update/delete).
+// Returns the number of tuples affected if OK (a number >= 0).
+// Returns -1 on error; use sql_error to get the error message.
+function sql_command ($sql)
+{
+  global $mysqli;
+  
+  $ret = -1;
+
+  if ($mysqli->query($sql)) {
+    $ret = $mysqli->affected_rows;
+  }
+  return $ret;
+}
+
+// Execute an SQL query which should return a single non-negative number value.
+// This is a lightweight alternative to sql_query, good for use with count(*)
+// and similar queries. It returns -1 on error or if the query did not return
+// exactly one value, so error checking is somewhat limited.
+// It also returns -1 if the query returns a single NULL value, such as from
+// a MIN or MAX aggregate function applied over no rows.
+function sql_query1 ($sql)
+{
+    global $mysqli;
+    
+    $r = $mysqli->query($sql);
+    if (! $r) return -1;
+    if (($r->num_rows != 1) || ($r->field_count != 1) ||
+        (($row = $r->fetch_row()) == NULL)) {
+        $result = -1;
+    }
+    $r->close();
+    return $row[0];
+}
+
+// Execute an SQL query. Returns a database-dependent result handle,
+// which should be passed back to sql_row or sql_row_keyed to get the results.
+// Returns 0 on error; use sql_error to get the error message.
+function sql_query ($sql)
+{
+    global $mysqli;
+
+    $r = $mysqli->query($sql);
+    return $r;
+}
+
+// Return a row from a result. The first row is 0.
+// The row is returned as an array with index 0=first column, etc.
+// When called with i >= number of rows in the result, cleans up from
+// the query and returns 0.
+// Typical usage: $i = 0; while ((a = sql_row($r, $i++))) { ... }
+function sql_row ($r, $i)
+{
+    if ($i >= $r->num_rows) {
+      $r->close();
+      return 0;
+    }
+    $r->data_seek($i);
+    return $r->fetch_row();
+}
+
+// Return a row from a result as an associative array keyed by field name.
+// The first row is 0.
+// This is actually upward compatible with sql_row since the underlying
+// routing also stores the data under number indexes.
+// When called with i >= number of rows in the result, cleans up from
+// the query and returns 0.
+function sql_row_keyed ($r, $i)
+{
+    if ($i >= $r->num_rows) {
+        $r->close();
+        return 0;
+    }
+    $r->data_seek($i);
+    return $r->fetch_array();
+}
+
+// Return the number of rows returned by a result handle from sql_query.
+function sql_count ($r)
+{
+    return $r->num_rows;
+}
+
+// Return the value of an autoincrement field from the last insert.
+// Must be called right after an insert on that table!
+function sql_insert_id($table, $field)
+{
+    global $mysqli;
+
+    return $mysqli->insert_id;
+}
+
+// Return the text of the last error message.
+function sql_error()
+{
+    global $mysqli;
+
+    return $mysqli->error;
+}
+
+// Begin a transaction, if the database supports it. This is used to
+// improve PostgreSQL performance for multiple insert/delete/updates.
+// There is no rollback support, since MySQL doesn't support it.
+function sql_begin()
+{
+}
+
+// Commit (end) a transaction. See sql_begin().
+function sql_commit()
+{
+}
+
+// Acquire a mutual-exclusion lock on the named table. For portability:
+// This will not lock out SELECTs.
+// It may lock out DELETE/UPDATE/INSERT or not, depending on the implementation.
+// It will lock out other callers of this routine with the same name argument.
+// It may timeout in 20 seconds and return 0, or may wait forever.
+// It returns 1 when the lock has been acquired.
+// Caller must release the lock with sql_mutex_unlock().
+// Caller must not have more than one mutex at any time.
+// Do not mix this with sql_begin()/sql_end() calls.
+//
+// In MySQL, we avoid table locks, and use low-level locks instead.
+function sql_mutex_lock($name)
+{
+    global $sql_mutex_shutdown_registered, $sql_mutex_unlock_name;
+    if (!sql_query1("SELECT GET_LOCK('$name', 20)")) {
+        return 0;
+    }
+    $sql_mutex_unlock_name = $name;
+    if (empty($sql_mutex_shutdown_registered)) {
+        register_shutdown_function("sql_mutex_cleanup");
+        $sql_mutex_shutdown_registered = 1;
+    }
+    return 1;
+}
+
+// Release a mutual-exclusion lock on the named table. See sql_mutex_unlock.
+function sql_mutex_unlock($name)
+{
+    global $sql_mutex_unlock_name;
+    sql_query1("SELECT RELEASE_LOCK('$name')");
+    $sql_mutex_unlock_name = "";
+}
+
+// Shutdown function to clean up a forgotten lock. For internal use only.
+function sql_mutex_cleanup()
+{
+    global $sql_mutex_shutdown_registered, $sql_mutex_unlock_name;
+    if (!empty($sql_mutex_unlock_name)) {
+        sql_mutex_unlock($sql_mutex_unlock_name);
+        $sql_mutex_unlock_name = "";
+    }
+}
+
+
+// Return a string identifying the database version:
+function sql_version()
+{
+    $r = sql_query("select version()");
+    $v = sql_row($r, 0);
+    sql_free($r);
+    return "MySQL $v[0]";
+}
+
+
+// Generate non-standard SQL for LIMIT clauses:
+function sql_syntax_limit($count, $offset)
+{
+    return " LIMIT $offset,$count ";
+}
+
+// Generate non-standard SQL to output a TIMESTAMP as a Unix-time:
+function sql_syntax_timestamp_to_unix($fieldname)
+{
+    return " UNIX_TIMESTAMP($fieldname) ";
+}
+
+// Generate non-standard SQL to match a string anywhere in a field's value
+// in a case insensitive manner. $s is the un-escaped/un-slashed string.
+// In MySQL, REGEXP seems to be case sensitive, so use LIKE instead. But this
+// requires quoting of % and _ in addition to the usual.
+function sql_syntax_caseless_contains($fieldname, $s)
+{
+    $s = str_replace("\\", "\\\\", $s);
+    $s = str_replace("%", "\\%", $s);
+    $s = str_replace("_", "\\_", $s);
+    $s = str_replace("'", "''", $s);
+    return " $fieldname LIKE '%$s%' ";
+}
+
+// Returns the name of a field.
+function sql_field_name($result, $index)
+{
+    $finfo = $result->fetch_field_direct($index);
+    return $finfo->name;
+}
+
+// Returns the type of a field. (one of "int", "real", "string", "blob", etc...)
+function sql_field_type($result, $index)
+{
+    $finfo = $result->fetch_field_direct($index);
+    return $finfo->type;
+}
+
+// Returns the number of fields in a result.
+function sql_num_fields($result)
+{
+    return $result->field_count;
+}
+
+
+
+// Establish a database connection.
+// On connection error, the message will be output without a proper HTML
+// header. There is no way I can see around this; if track_errors isn't on
+// there seems to be no way to supress the automatic error message output and
+// still be able to access the error text.
+
+$mysqli = new mysqli($db_host, $db_login, $db_password, $db_database);
+
+/* check connection */
+if (mysqli_connect_errno()) {
+    echo "\n<p>\n" . get_vocab("failed_connect_db") . " : " . mysqli_connect_error();
+    exit;
+}
+
+?>
Index: web/lang.cs
===================================================================
RCS file: web/lang.cs
diff -N web/lang.cs
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ web/lang.cs	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,251 @@
+<?php
+# $Id: lang.cs,v 1.1.2.1 2004/09/21 13:11:13 jberanek Exp $
+
+# This file contains PHP code that specifies language specific strings
+# The default strings come from lang.en, and anything in a locale
+# specific file will overwrite the default. This is a Czech file.
+#
+# Translations provided by: "SmEjDiL" <malyl@col.cz>, 
+#   "David Krotil" <David.Krotil@mu-sokolov.cz>
+#
+# This file is PHP code. Treat it as such.
+
+# The charset to use in "Content-type" header
+$vocab["charset"]            = "iso-8859-2";
+
+# Used in style.inc
+$vocab["mrbs"]               = "MRBS - Rezerva�n� syst�m";
+
+# Used in functions.inc
+$vocab["report"]             = "V�pis";
+$vocab["admin"]              = "Administr�tor";
+$vocab["help"]               = "Pomoc";
+$vocab["search"]             = "Hledat:";
+$vocab["not_php3"]             = "<H1>UPOZORN�N�: Toto z�ejm� nen� funk�n� s PHP3</H1>";
+
+# Used in day.php
+$vocab["bookingsfor"]        = "Objedn�no pro";
+$vocab["bookingsforpost"]    = ""; # Goes after the date
+$vocab["areas"]              = "Oblasti";
+$vocab["daybefore"]          = "Den vzad";
+$vocab["dayafter"]           = "Den vp�ed";
+$vocab["gototoday"]          = "Dnes";
+$vocab["goto"]               = "P�ej�t na";
+$vocab["highlight_line"]     = "Ozna�te tuto ��dku";
+$vocab["click_to_reserve"]   = "Klepn�te na bu�ku, aby jste provedli rezervaci.";
+
+# Used in trailer.inc
+$vocab["viewday"]            = "Dny";
+$vocab["viewweek"]           = "T�dny";
+$vocab["viewmonth"]          = "M�s�ce ";
+$vocab["ppreview"]           = "Pro tisk";
+
+# Used in edit_entry.php
+$vocab["addentry"]           = "P�idat z�znam";
+$vocab["editentry"]          = "Editovat z�znam";
+$vocab["editseries"]         = "Editovat s�rii";
+$vocab["namebooker"]         = "Popis instrukce:";
+$vocab["fulldescription"]    = "Celkov� popis:<br>&nbsp;&nbsp;(Po�et cestuj�c�ch,<br>&nbsp;&nbsp;Obsazeno/Voln� m�sta atd)";
+$vocab["date"]               = "Datum:";
+$vocab["start_date"]         = "Za��tek:";
+$vocab["end_date"]           = "Konec:";
+$vocab["time"]               = "�as:";
+$vocab["period"]             = "Perioda:";
+$vocab["duration"]           = "Doba trv�n�:";
+$vocab["seconds"]            = "sekundy";
+$vocab["minutes"]            = "minuty";
+$vocab["hours"]              = "hodiny";
+$vocab["days"]               = "dny";
+$vocab["weeks"]              = "v�kendy";
+$vocab["years"]              = "roky";
+$vocab["periods"]            = "period";
+$vocab["all_day"]            = "V�echny dny";
+$vocab["type"]               = "Typ:";
+$vocab["internal"]           = "Voln� m�sta";
+$vocab["external"]           = "Obsazeno";
+$vocab["save"]               = "Ulo�it";
+$vocab["rep_type"]           = "Typ opakov�n�:";
+$vocab["rep_type_0"]         = "Nikdy";
+$vocab["rep_type_1"]         = "Denn�";
+$vocab["rep_type_2"]         = "T�dn�";
+$vocab["rep_type_3"]         = "M�s��n�";
+$vocab["rep_type_4"]         = "Ro�n�";
+$vocab["rep_type_5"]         = "M�s��n�, jednou za m�s�c";
+$vocab["rep_type_6"]         = "n-t�dn�";
+$vocab["rep_end_date"]       = "Konec opakov�n�:";
+$vocab["rep_rep_day"]        = "Opakovat v den:";
+$vocab["rep_for_weekly"]     = "(pro (n-)t�dn�)";
+$vocab["rep_freq"]           = "Frekvence:";
+$vocab["rep_num_weeks"]      = "�islo t�dne";
+$vocab["rep_for_nweekly"]    = "(pro n-t�dn�)";
+$vocab["ctrl_click"]         = "U��t CTRL pro v�b�r v�ce m�stnost�";
+$vocab["entryid"]            = "Vstupn� ID ";
+$vocab["repeat_id"]          = "ID pro opakov�n�"; 
+$vocab["you_have_not_entered"] = "Nevlo�il jste";
+$vocab["you_have_not_selected"] = "Nevybral jste";
+$vocab["valid_room"]         = "prost�edek.";
+$vocab["valid_time_of_day"]  = "platn� �asov� �sek dne.";
+$vocab["brief_description"]  = "Kr�tk� popis.";
+$vocab["useful_n-weekly_value"] = "pou�iteln� x-t�denn� hodnota.";
+
+# Used in view_entry.php
+$vocab["description"]        = "Popis:";
+$vocab["room"]               = "M�stnost:";
+$vocab["createdby"]          = "Vytvo�il u�ivatel:";
+$vocab["lastupdate"]         = "Posledn� zm�na:";
+$vocab["deleteentry"]        = "Smazat z�znam";
+$vocab["deleteseries"]       = "Smazat s�rii";
+$vocab["confirmdel"]         = "Jste si jist�\\nsmaz�n�m tohoto z�znamu?\\n\\n";
+$vocab["returnprev"]         = "N�vrat na p�edchoz� str�nku";
+$vocab["invalid_entry_id"]   = "�patn� ID z�znamu.";
+$vocab["invalid_series_id"]  = "�patn� ID skupiny.";
+
+# Used in edit_entry_handler.php
+$vocab["error"]              = "Chyba";
+$vocab["sched_conflict"]     = "Konflikt p�i pl�nov�n�";
+$vocab["conflict"]           = "Nov� rezervace je v konfliktu s jin�m z�znamem:";
+$vocab["too_may_entrys"]     = "Vybran� volba byla vytvo�ena pro jin� z�znamy.<BR>Pros�m vyberte jinou volbu!";
+$vocab["returncal"]          = "N�vrat do kalend��e";
+$vocab["failed_to_acquire"]  = "Chyba v�hradn�ho p��stupu do datab�ze"; 
+$vocab["mail_subject_entry"] = $mail["subject"];
+$vocab["mail_body_new_entry"] = $mail["new_entry"];
+$vocab["mail_body_del_entry"] = $mail["deleted_entry"];
+$vocab["mail_body_changed_entry"] = $mail["changed_entry"];
+$vocab["mail_subject_delete"] = $mail["subject_delete"];
+
+# Authentication stuff
+$vocab["accessdenied"]       = "P��stup zam�tnut";
+$vocab["norights"]           = "Nem�te p��stupov� pr�vo pro zm�nu t�to polo�ky.";
+$vocab["please_login"]       = "Pros�m, p�ihla�te se";
+$vocab["user_name"]          = "Jm�no";
+$vocab["user_password"]      = "Heslo";
+$vocab["unknown_user"]       = "Nezn�m� u�ivatel";
+$vocab["you_are"]            = "Jste";
+$vocab["login"]              = "P�ihl�sit se";
+$vocab["logoff"]             = "Odhl�sit se";
+
+# Authentication database
+$vocab["user_list"]          = "Seznam u�ivatel�";
+$vocab["edit_user"]          = "Editovat u�ivatele";
+$vocab["delete_user"]        = "Smazat tohoto u�ivatele";
+#$vocab["user_name"]         = Use the same as above, for consistency.
+#$vocab["user_password"]     = Use the same as above, for consistency.
+$vocab["user_email"]         = "Emailov� adresa";
+$vocab["password_twice"]     = "Pokud chcete zm�nit heslo, pros�m napi�te ho dvakr�t";
+$vocab["passwords_not_eq"]   = "Chyba: Vlo�en� hesla se neshoduj�.";
+$vocab["add_new_user"]       = "P�idat nov�ho u�ivatele";
+$vocab["rights"]             = "Pr�va";
+$vocab["action"]             = "Akce";
+$vocab["user"]               = "U�ivatel";
+$vocab["administrator"]      = "Administr�tor";
+$vocab["unknown"]            = "Nezn�m�";
+$vocab["ok"]                 = "Ano";
+$vocab["show_my_entries"]    = "Klepnout pro zobraz�n� v�ech nadch�zej�c�ch z�znam�";
+
+# Used in search.php
+$vocab["invalid_search"]     = "Pr�zdn� nebo neplatn� hledan� �et�zec.";
+$vocab["search_results"]     = "V�sledek hled�n� pro:";
+$vocab["nothing_found"]      = "Nic nenalezeno";
+$vocab["records"]            = "Z�znam";
+$vocab["through"]            = " skrze ";
+$vocab["of"]                 = " o ";
+$vocab["previous"]           = "P�edchozi";
+$vocab["next"]               = "Dal��";
+$vocab["entry"]              = "Z�znam";
+$vocab["view"]               = "N�hled";
+$vocab["advanced_search"]    = "Roz���en� hled�n�";
+$vocab["search_button"]      = "Hledat";
+$vocab["search_for"]         = "Hledat co";
+$vocab["from"]               = "Od";
+
+# Used in report.php
+$vocab["report_on"]          = "V�pis setk�n�:";
+$vocab["report_start"]       = "V�pis za��tk�:";
+$vocab["report_end"]         = "V�pis konc�:";
+$vocab["match_area"]         = "Hledan� oblast:";
+$vocab["match_room"]         = "Hledan� m�stnost:";
+$vocab["match_type"]         = "Hledan� typ:";
+$vocab["ctrl_click_type"]    = "U��t CTRL pro v�b�r v�ce typ�";
+$vocab["match_entry"]        = "Hledat v popisu:";
+$vocab["match_descr"]        = "Hledat v cel�m popisu:";
+$vocab["include"]            = "Zahrnovat:";
+$vocab["report_only"]        = "Jen v�pis";
+$vocab["summary_only"]       = "Jen p�ehled";
+$vocab["report_and_summary"] = "V�pis a p�ehled";
+$vocab["summarize_by"]       = "P�ehled od:";
+$vocab["sum_by_descrip"]     = "Popis instrukce";
+$vocab["sum_by_creator"]     = "Tv�rce";
+$vocab["entry_found"]        = "nalezeno";
+$vocab["entries_found"]      = "nalezeno";
+$vocab["summary_header"]     = "P�ehled  (z�znamu) hodiny";
+$vocab["summary_header_per"] = "P�ehled  (z�znamu) periody";
+$vocab["total"]              = "Celkem";
+$vocab["submitquery"]        = "Vytvo�it sestavu";
+$vocab["sort_rep"]           = "Se�adit v�pis podle:";
+$vocab["sort_rep_time"]      = "V�choz� den/�as";
+$vocab["rep_dsp"]            = "Zobrazit ve v�pisu:";
+$vocab["rep_dsp_dur"]        = "Trv�n�";
+$vocab["rep_dsp_end"]        = "�as ukon�en�";
+
+# Used in week.php
+$vocab["weekbefore"]         = "T�den dozadu";
+$vocab["weekafter"]          = "T�den dop�edu";
+$vocab["gotothisweek"]       = "Tento t�den";
+
+# Used in month.php
+$vocab["monthbefore"]        = "M�s�c dozadu";
+$vocab["monthafter"]         = "M�sic dop�edu";
+$vocab["gotothismonth"]      = "Tento m�s�c";
+
+# Used in {day week month}.php
+$vocab["no_rooms_for_area"]  = "Pro tuto m�stnost nen� definov�na �adn� oblast!";
+
+# Used in admin.php
+$vocab["edit"]               = "Editovat";
+$vocab["delete"]             = "Smazat";
+$vocab["rooms"]              = "M�stnosti";
+$vocab["in"]                 = "v";
+$vocab["noareas"]            = "��dn� oblasti";
+$vocab["addarea"]            = "P�idat oblast";
+$vocab["name"]               = "Jm�no";
+$vocab["noarea"]             = "Nen� vybr�na ��dn� oblast";
+$vocab["browserlang"]        = "Prohl�ec je nastaven k pou�it�";
+$vocab["postbrowserlang"]    = "jazyku.";
+$vocab["addroom"]            = "P�idat m�stnost";
+$vocab["capacity"]           = "Kapacita";
+$vocab["norooms"]            = "��dn� m�stnost.";
+$vocab["administration"]     = "Administrace";
+
+# Used in edit_area_room.php
+$vocab["editarea"]           = "Editovat oblast";
+$vocab["change"]             = "Zm�na";
+$vocab["backadmin"]          = "N�vrat do administrace";
+$vocab["editroomarea"]       = "Editovat popis oblasti nebo m�stnosti";
+$vocab["editroom"]           = "Editovat m�stnosti";
+$vocab["update_room_failed"] = "Chyba editace m�stnosti: ";
+$vocab["error_room"]         = "Chyba: m�stnost ";
+$vocab["not_found"]          = " nenalezen";
+$vocab["update_area_failed"] = "Chyba editace oblasti: ";
+$vocab["error_area"]         = "Chyba: oblast ";
+$vocab["room_admin_email"]   = "Email administr�tora m�stnosti:";
+$vocab["area_admin_email"]   = "Email administr�tora oblasti";
+$vocab["invalid_email"]      = "�patn� email!";
+
+# Used in del.php
+$vocab["deletefollowing"]    = "Bylo smaz�no rezervov�n�";
+$vocab["sure"]               = "Jste si jist�?";
+$vocab["YES"]                = "ANO";
+$vocab["NO"]                 = "NE";
+$vocab["delarea"]            = "Mus�te smazat v�echny m�stnosti v t�to oblasti p�edt�m ne� ji m�ete smazat<p>";
+
+# Used in help.php
+$vocab["about_mrbs"]         = "O MRBS";
+$vocab["database"]           = "Datab�ze: ";
+$vocab["system"]             = "Syst�m: ";
+$vocab["please_contact"]     = "Pros�m kontaktujte ";
+$vocab["for_any_questions"]  = "pokud m�te n�jak� dal�� ot�zky.";
+
+# Used in mysql.inc AND pgsql.inc
+$vocab["failed_connect_db"]  = "Fataln� chyba: Nepoda�ilo se p�ipojit do datab�ze";
+
+?>
Index: web/ChangeLog
===================================================================
RCS file: web/ChangeLog
diff -N web/ChangeLog
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ web/ChangeLog	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,2537 @@
+2007-02-23  John Beranek <jberanek@users.sourceforge.net>
+
+	* month.php, version.inc (mrbs-1_2-branch.[4,2]) (utags:
+	  mrbs-1_2_5): * Fixed a few bugs in month view, including double
+	  escaping of the  < and > characters used in booking slot
+	  descriptions (SF tracker  #1663905) and also the times were being
+	  shown incorrectly, as  date() was being used instead of the now
+	  standard (for anything  displayed to the user) utf8_strftime().
+
+	  * Upped version to 1.2.5 in preparation for release.
+
+2007-02-13  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.sv (tags: mrbs-1_2_5) (mrbs-1_2-branch.3): * Got rid of
+	  nasty DOS line endings in lang.sv.
+
+2007-02-13  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_ldap.inc (tags: mrbs-1_2_5), config.inc.php (tags:
+	  mrbs-1_2_5), day.php (tags: mrbs-1_2_5), edit_entry.php (tags:
+	  mrbs-1_2_5), edit_entry_handler.php (tags: mrbs-1_2_5),
+	  functions.inc (tags: mrbs-1_2_5), lang.es (tags: mrbs-1_2_5),
+	  lang.sv, language.inc (tags: mrbs-1_2_5), month.php, mrbs.css
+	  (tags: mrbs-1_2_5), report.php (tags: mrbs-1_2_5),
+	  session_cookie.inc (tags: mrbs-1_2_5), session_php.inc (tags:
+	  mrbs-1_2_5), week.php (tags: mrbs-1_2_5)
+	  (mrbs-1_2-branch.[4,12,3,4,5,5,2,2,4,3,1,3,4,5,2]):
+	  * LDAP auth scheme now has the ability to use LDAP v3 protocol,
+	  and to use TLS, if configured to do so in config.inc.php.
+	  Implements SF tracker #1644311.
+
+	  * Fixed documentation of auth schemes in AUTHENTICATION to  not
+	  mention the getUserPassword() function that is no  longer used.
+
+	  * A few fixes to checklang.php.
+
+	  * Added the ability to configure the cookie path that the  'php'
+	  and 'cookie' session schemes use, to override  the
+	  auto-determination these schemes use. Also made  the 'cookie'
+	  session scheme actually use an expiring  cookie. Fixes SF tracker
+	  #1515118.
+
+	  * Removed all use of the utf8_date() function,  utf8_strftime()
+	  is used instead. utf8_strftime() now	works around a bug in
+	  strftime() in the handling of  %p, using date() if your locale
+	  happens to return  empty strings for the %p substitution.
+
+	  * Replaced a short php start tag in edit_entry_handler.php  with
+	  the correct long form one. Fixes SF tracker #1652396.   Also
+	  corrected a short start tag in lang.es.
+
+	  * Added code into edit_entry_handler.php to support locales  that
+	  use ',' as the decimal point. This will translate  "1,5" hours
+	  into "1.5" so it is understood. Fixes SF tracker  #1647430.
+
+	  * Added updated Swedish translation tokens, as provided  by
+	  bwiberg.
+
+	  * Added AIX support into language.inc. You can now run  MRBS on
+	  an AIX server, in Unicode mode too. AIX support  provided (and
+	  tested) by bwiberg.
+
+	  * Backported the improved language preference code from  the
+	  trunk MRBS development. The preference order of  languages
+	  specified by a user is now acted upon.
+
+	  * Corrected some bracketing in month.php, as reported  by a
+	  number of people, including 't-matsuu' in SF tracker	#1644042
+	  who provided a fix.
+
+	  * Corrected CSS commenting in mrbs.css, as reported  in SF
+	  tracker #1644042.
+
+2007-01-24  John Beranek <jberanek@users.sourceforge.net>
+
+	* config.inc.php, help.php (tags: mrbs-1_2_5), version.inc
+	  (mrbs-1_2-branch.[11,1,1]) (utags: mrbs-1_2_4): * Moved version
+	  number out of config.inc.php and into a version.inc,	which
+	  provides a function to retrieve the version number. Upped
+	  version to 1.2.4.
+
+2006-10-09  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_imap.inc (tags: mrbs-1_2_5, mrbs-1_2_4), config.inc.php,
+	  day.php (tags: mrbs-1_2_4), edit_entry_handler.php (tags:
+	  mrbs-1_2_4), functions.inc (tags: mrbs-1_2_4), lang.en (tags:
+	  mrbs-1_2_5, mrbs-1_2_4), lang.fi (tags: mrbs-1_2_5, mrbs-1_2_4),
+	  month.php (tags: mrbs-1_2_4), mysqli.inc (tags: mrbs-1_2_5,
+	  mrbs-1_2_4), robots.txt (tags: mrbs-1_2_5, mrbs-1_2_4),
+	  session_php.inc (tags: mrbs-1_2_4), style.inc (tags: mrbs-1_2_5,
+	  mrbs-1_2_4), trailer.inc (tags: mrbs-1_2_5, mrbs-1_2_4), week.php
+	  (tags: mrbs-1_2_4)
+	  (mrbs-1_2-branch.[3,10,2,4,4,2,2,2,2,1,4,2,1,1]):
+	  * Added robots.txt and "Robots" META tag, to stop robots trawling
+	   MRBS installations. Fixes SF bug tracker #1557192.
+
+	  * Improved documentation in AUTHENTICATION on LDAP auth method
+	  to make it clear that the 'ldap' PHP extension is required.
+	  Fixes SF bug tracker #1554351.
+
+	  * Fixes in auth_imap.inc to ensure that internet sockets to  the
+	  IMAP server are closed, in an attempt to fix a report  in SF
+	  tracker #1558451, though the reporter has since  told me my fixes
+	  didn't help his problem...
+
+	  * Fixed example setting of $ldap_filter in config.inc.php,  it
+	  showed $ldap_user_filter instead of $ldap_filter.   Fixes SF bug
+	  tracker #1550827.
+
+	  * Added a little code to turn $month, $week and $day into
+	  integers explicitly, before calling checkdate(), this  was
+	  reported under SF tracker #1557192 as a place  where MRBS will
+	  output warnings (when being trawled  by GoogleBot).
+
+	  * Added a check in edit_entry_handler.php to ensure  that the
+	  "Brief Description" is not empty. This will  only happen if the
+	  user doesn't have JavaScript turned  on, as usually there is
+	  JavaScript validation that you  enter a description. Translators
+	  note that I had to  add two more vocab tokens.
+
+	  * Tidied HTML formatting - just the header section (for now).
+
+	  * Added updated Finnish translation as provided by Tom  Ingberg
+	  in SF tracker #1450459. The translation encoding  has changed to
+	  UTF-8, so anyone with a Finnish installation	that sets
+	  $unicode_encoding to 1 will need to run  convert_db_to_utf8.php
+	  to convert the text in  their database from iso-8859-1 to UTF-8.
+
+	  * A few fixes to mysqli.inc that I'd not spotted in my  earlier
+	  testing.
+
+	  * A fix in session_php.inc to ensure that the user's password
+	  gets unslashed(). Fixed SF bug tracker #1563470.
+
+	  * A few changes in trailer.inc so that the current day/week/month
+	   in the trailer links are highlighted somewhat. Implements  SF
+	  feature request tracker # 875744.
+
+2006-07-07  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.es (tags: mrbs-1_2_4) (mrbs-1_2-branch.1): * Updated Spanish
+	  translation, as provided by SoTMaR.
+
+2006-07-07  John Beranek <jberanek@users.sourceforge.net>
+
+	* config.inc.php, mysqli.inc (mrbs-1_2-branch.[9,1]): * Added
+	  'mysqli' database abstraction, to allow PHP 5 installations  to
+	  use the newer/better 'mysqli' extension instead of 'mysql'.
+	  Reasonably tested on a Linux Apache 2.2.0/MySQL 5.0.18/PHP 5.1.2
+	  installation. Updated the documentation to mention the new
+	  database   abstraction method, hopefully in all the necessary
+	  places.
+
+2006-04-26  John Beranek <jberanek@users.sourceforge.net>
+
+	* config.inc.php (mrbs-1_2-branch.8): * Fixed typo in comment in
+	  config.inc.php.
+
+2006-04-26  John Beranek <jberanek@users.sourceforge.net>
+
+	* config.inc.php, day.php, functions_mail.inc (tags: mrbs-1_2_5,
+	  mrbs-1_2_4), lang.zh-tw (tags: mrbs-1_2_5, mrbs-1_2_4),
+	  language.inc (tags: mrbs-1_2_4), month.php, report.php (tags:
+	  mrbs-1_2_4), session_remote_user.inc (tags: mrbs-1_2_5,
+	  mrbs-1_2_4) (mrbs-1_2-branch.[7,1,6,2,3,1,2,1]): * Upped version
+	  number to 1.2.3+cvs (rather belatedly)
+
+	  * Fixed some HTML escaping issues in the grids.
+
+	  * Fixed a problem whereby non-repeating entries wouldn't  be
+	  emailed to area/room admins. Fixes SF tracker #1474386,  fix
+	  provided by 'karcher'.
+
+	  * Added a little error logging into email functionality.   You
+	  should get an diagnostic error in your error log if	an email
+	  fails to be sent.
+
+	  * Fixed zh-tw translation to correctly specify its encoding as
+	  utf-8.
+
+	  * Improved get_vocab() so that it doesn't do an iconv if the
+	  language  encoding is utf-8.
+
+	  * Fixed bug in report.php that meant the meeting end date was
+	  shown  when the start date should have been. This fix was
+	  provided to me  somehow, but I can't find who provided it...
+
+	  * Added "remote_user" session scheme, as provided by 'bwiberg' on
+	   SF tracker #1432748. Allows MRBS to be configured to use a
+	  server authentication scheme that sets the REMOTE_USER
+	  environment  variable.
+
+2006-01-26  John Beranek <jberanek@users.sourceforge.net>
+
+	* functions_mail.inc, mrbs_sql.inc (tags: mrbs-1_2_5, mrbs-1_2_4),
+	  site_faq_de.html (tags: mrbs-1_2_5, mrbs-1_2_4)
+	  (mrbs-1_2-branch.[5,3,2]): * Removed errant CRs from a few files.
+
+2006-01-26  John Beranek <jberanek@users.sourceforge.net>
+
+	* edit_entry.php (tags: mrbs-1_2_4), functions.inc,
+	  functions_mail.inc, lang.sv (tags: mrbs-1_2_4), language.inc,
+	  mrbs_sql.inc, report.php (mrbs-1_2-branch.[3,3,4,1,2,2,1]): *
+	  Allow more entry types, now A-Z instead of A-J.
+
+	  * Fix in notifyAdminOnBooking, to fix SF tracker #1315854,  as
+	  supplied by Neville Gilbert. The fix ensures that the  area
+	  administrator is sent an email when a booking is  created.
+
+	  * Improve server OS detection in language.inc. SunOS is now
+	  handled, including utf-8 locale support.
+
+	  * Improved n-weekly repeat code, you can now do an n-weekly
+	  repeating  meeting that happens on a sunday. Calculation of which
+	  days to  create bookings on is now done more carefully. SF
+	  tracker #1300974
+
+	  * Updated Swedish translation, as provided by Bjorn Wiberg in SF
+	  tracker #1397719.
+
+	  * Fixed problem in report.php that would create an error if MRBS
+	  was  configured to use HTTP session handling and you clicked the
+	  "You are ..." link. Provided by Bjorn Wiberg in SF tracker
+	  #1396685.
+
+2005-09-02  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_ldap.inc (tags: mrbs-1_2_4), config.inc.php, lang.fi
+	  (mrbs-1_2-branch.[3,6,1]): * Added ability to change the port of
+	  the LDAP server when	the 'ldap' auth scheme is used. Set
+	  $ldap_port in config.inc.php	to change from the default port.  *
+	  Added documentation for ldap port configuration into
+	  AUTHENTICATION, along with some brief details on the 'nis'  auth
+	  scheme.  * Tidied up some of the text in INSTALL describing
+	  MRBS's i18n  and l10n support.  * Made checklang.php work with
+	  register_globals off, and made the  output prettier.	* Fixed a
+	  typo in a comment in config.inc.php * Added a missing $ in a
+	  Finnish vocab entry.
+
+2005-09-02  John Beranek <jberanek@users.sourceforge.net>
+
+	* edit_users.php (tags: mrbs-1_2_5, mrbs-1_2_4)
+	  (mrbs-1_2-branch.3): * Bug fix for the SQL statement that
+	  generates the mrbs_users table.   Autoincrement columns don't
+	  need a DEFAULT, and if specified with   one on MySQL >= 4.1 the
+	  SQL statement fails. The DEFAULT clause has	been removed from
+	  the SQL.
+
+2005-08-31  John Beranek <jberanek@users.sourceforge.net>
+
+	* site_faq_de.html (mrbs-1_2-branch.1): * Added German translation
+	  of site FAQ, courtesy of Bertold Altaner.
+
+2005-08-20  John Beranek <jberanek@users.sourceforge.net>
+
+	* session_http.inc (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3)
+	  (mrbs-1_2-branch.2): * Minor tidying.
+
+2005-08-20  John Beranek <jberanek@users.sourceforge.net>
+
+	* session_cookie.inc (tags: mrbs-1_2_4, mrbs-1_2_3),
+	  session_http.inc, session_php.inc (tags: mrbs-1_2_3)
+	  (mrbs-1_2-branch.[3,1,3]): * Improved/fixed HTTP session scheme.
+	  It now also shows whether the login  box in the to banner, and
+	  shows who you're logged in as. Tested it on  my Linux box.
+
+	  * Minor tidying in a few files.
+
+2005-08-20  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_db.inc (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3),
+	  auth_db_ext.inc (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3),
+	  config.inc.php (tags: mrbs-1_2_3), session_cookie.inc,
+	  session_php.inc, site_faq_es.html (tags: mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3) (mrbs-1_2-branch.[3,2,5,2,2,1]):
+	  * Improved db_ext auth scheme - moved the configuration into
+	  config.inc.php,  where it belongs. Additionally added support for
+	  the password in the  external database being in different
+	  formats, namely one of:    - MD5    - SHA1	- crypt    -
+	  plaintext   Also documented the scheme in AUTHENTICATION, and
+	  added example config	in config.inc.php.
+
+	  * Fixes for cookie and php session schemes, username and password
+	  as  obtained from the web form are now 'unslashed' before being
+	  stored  and/or passed to the auth scheme.  auth_db.inc updated to
+	  escape the  username being putting it in the database query.
+
+	  * Added site_faq_es.html, contributed by Carlos Insunza.
+
+2005-07-13  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.ko (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3)
+	  (mrbs-1_2-branch.1): * Added Korean translation, as contributed
+	  by YoungJoon Kim.
+
+2005-06-10  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.no (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3)
+	  (mrbs-1_2-branch.1): * Updated norwegian translation supplied by
+	  Emil Stoa.
+
+2005-05-17  John Beranek <jberanek@users.sourceforge.net>
+
+	* edit_users.php, lang.en (mrbs-1_2-branch.[2,1]) (utags:
+	  mrbs-1_2_3): * A few improvements to db authentication system:
+	  - mrbs_users table is now created with a 40 character wide
+	  password     column. Used to be 32 which was only just enough.
+	  This matches the     column width I made the trunk development
+	  MRBS use.    - A message is now shown at the top of the edit
+	  users page when      the mrbs_users table is empty that describes
+	  the situation and what      to do.	- After a user entry is
+	  updated we now redirect the web browser back	    to the edit
+	  users page, to discard the form arguments.
+
+2005-05-11  John Beranek <jberanek@users.sourceforge.net>
+
+	* config.inc.php (mrbs-1_2-branch.4): * Update version number to
+	  1.2.2+cvs
+
+2005-05-11  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_db_ext.inc (mrbs-1_2-branch.1): * Added new authentication
+	  scheme, a result of support request 1199314.	 It queries a table
+	  in an external database for username/password   information. It's
+	  mysql only, and assumes the password is stored in   plaintext.
+	  Config values must be changed at the top of the file too.
+
+2005-04-28  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* edit_entry_handler.php (tags: mrbs-1_2_3) (mrbs-1_2-branch.3):
+	  fixed incorrect comment
+
+2005-04-22  John Beranek <jberanek@users.sourceforge.net>
+
+	* config.inc.php (tags: mrbs-1_2_2) (mrbs-1_2-branch.3): * Updated
+	  version number to 1.2.2.
+
+2005-04-11  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.zh-tw (tags: mrbs-1_2_3, mrbs-1_2_2) (mrbs-1_2-branch.1): *
+	  Updated Taiwanese translation. Now stored in UTF-8 encoding.
+	  Taiwanese  users who have set $unicode_encoding to 0 will need to
+	  convert their  databases to UTF-8.
+
+2005-04-11  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.ja (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2)
+	  (mrbs-1_2-branch.1): * Updated Japanese translation. Now stored
+	  in UTF-8 encoding. Japanese  users who have set $unicode_encoding
+	  to 0 will need to convert their  databases to UTF-8.
+
+2005-03-29  John Beranek <jberanek@users.sourceforge.net>
+
+	* add.php (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3), admin.php
+	  (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3), auth_config.inc
+	  (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3), auth_db.inc,
+	  auth_ext.inc (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3),
+	  auth_imap.inc (tags: mrbs-1_2_3), auth_ldap.inc (tags:
+	  mrbs-1_2_3), auth_nis.inc (tags: mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3), auth_none.inc (tags: mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3), auth_nw.inc (tags: mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3), auth_pop3.inc (tags: mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3), del.php (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3),
+	  del_entry.php (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3),
+	  edit_area_room.php (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3),
+	  edit_entry.php (tags: mrbs-1_2_3), edit_entry_handler.php,
+	  edit_users.php, mrbs_auth.inc (tags: mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3), session_cookie.inc, session_host.inc (tags:
+	  mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3), session_ip.inc (tags:
+	  mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3), session_nt.inc (tags:
+	  mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3), session_omni.inc (tags:
+	  mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3), session_php.inc
+	  (mrbs-1_2-branch.[1,1,2,2,2,2,2,2,2,2,2,1,1,1,2,2,1,1,1,1,1,1,1,1])
+	  (utags: mrbs-1_2-branch_lastmerge, mrbs-1_2_2): * Made username
+	  matching case insensitive throughout. Auth schemes  may still
+	  have case sensitive usernames though.
+
+	  * auth_config username matching made case insensitive.
+
+	  * Improved auth system, the session code doesn't need to return
+	  the user password any more, and getAuthorised() now only requires
+	   one parameter.
+
+	  * session_cookie.inc now deletes the cookie when the user logs
+	  out.	 User password isn't stored in a cookie any more, which is
+	  much more   secure.
+
+	  * session_php.inc now creates a session for the directory MRBS is
+	   run from, instead of assuming '/'. Additionally, session data is
+	   deleted on log out, and the user's password isn't stored in the
+	  session data any more.
+
+2005-02-13  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_config.inc, auth_db.inc, auth_ext.inc, auth_imap.inc,
+	  auth_ldap.inc, auth_nis.inc, auth_none.inc, auth_nw.inc,
+	  auth_pop3.inc (mrbs-1_2-branch.[1,1,1,1,1,1,1,1,1]): * Fix for
+	  Sourceforge bug ID 1112161. Removed case insensitivity  from auth
+	  schemes.
+
+2004-11-21  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions_mail.inc (tags: mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-1_2_1) (mrbs-1_2-branch.3): Bug
+	  1027328 - fixed sendMail function so that it provides the correct
+	  parameters and headers for each type of backend (mail, sendmail
+	  or smtp).  Thanks to Thekk.
+
+2004-11-20  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions_mail.inc (mrbs-1_2-branch.2): RFE 1000967 - enhance
+	  email notifications.	Also reference Neil Hawes' emails to the
+	  list:
+	  http://sourceforge.net/mailarchive/message.php?msg_id=9550429
+
+	  Updated functions_mail.inc so that email notifications include
+	  repeat information for new/change/delete and the output for start
+	  and end times are the same as that shown when viewing an entry.
+
+	  Thanks to Neil Hawes and Stuart Chalmers.
+
+2004-11-19  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* config.inc.php (tags: mrbs-1_2-branch_lastmerge, mrbs-1_2_1)
+	  (mrbs-1_2-branch.2): Bug 1068522 - changed "" around $db_password
+	  value to '' so that special characters are not interpeted. Thanks
+	  to Matt Schuler
+
+2004-11-19  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* mrbs_sql.inc (tags: mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-1_2_1) (mrbs-1_2-branch.1): Bug
+	  1035790 - unable to book series with pgsql.  Fixed INSERT command
+	  in mrbsCreateRepeatEntry as per suggestion of Thekk.
+
+2004-11-09  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* edit_entry_handler.php (tags: mrbs-1_2_1), functions_mail.inc
+	  (mrbs-1_2-branch.[1,1]): Bug 994056 - fixed emailing so that
+	  emails are sent to mrbs_admin, area and room admins under all
+	  conditions if configured to do so.
+
+2004-10-28  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* edit_entry.php (tags: mrbs-1_2_1) (mrbs-1_2-branch.1): Bug
+	  1040185 - changed mktime so that am and pm generation is not
+	  affected by timezone and the fact that "Negative timestamps are
+	  not supported under any known version of Windows" (from php
+	  manual).
+
+2004-09-21  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.cs (tags: mrbs-1_2_5, mrbs-1_2_4), language.inc
+	  (mrbs-1_2-branch.[1,1]) (utags: mrbs-1_2-branch_lastmerge,
+	  mrbs-1_2_1, mrbs-1_2_2, mrbs-1_2_3):
+	  * Fixed lang/locale selection for Czech language. Czech country
+	  code is "cs", not "cz".
+
+2004-09-17  John Beranek <jberanek@users.sourceforge.net>
+
+	* functions.inc, style.inc (mrbs-1_2-branch.[2,1]) (utags:
+	  mrbs-1_2-branch_lastmerge, mrbs-1_2_1, mrbs-1_2_2, mrbs-1_2_3): *
+	  Merged a functions.inc change from the trunk, namely a fix for
+	  the  ChangeOptionDays JavaScript function.
+
+	  * Fix for page refresh functionality. If a refresh time is
+	  configured,  only do it for day.php, week.php and month.php
+
+2004-09-14  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.nl (tags: mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-1_2_1) (mrbs-1_2-branch.1): *
+	  Updated lang.nl from Marc ter Horst
+
+2004-09-13  John Beranek <jberanek@users.sourceforge.net>
+
+	* functions.inc (mrbs-1_2-branch.1):
+	  * Merged a "post-1.2 release" fix from the trunk onto the 1.2
+	  branch.
+
+2004-09-13  John Beranek <jberanek@users.sourceforge.net>
+
+	* config.inc.php (mrbs-1_2-branch.1):
+	  * Created branch (mrbs-1_2-branch) for MRBS 1.2 fixes/minor
+	  updates. Changed version number to 1.2.1
+
+2004-08-24  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* mrbs.css (1.11, mrbs-post-MDB-merge, mrbs-pre-MDB-merge),
+	  xbLib.js (1.4, mrbs-1_2_5) (utags: mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1_2-branch_lastmerge, mrbs-1_2_1, mrbs-1_2_2, mrbs-1_2_3,
+	  mrbs-1_2_4): Minor bug fix: The hidden active cell was sized
+	  differently from the main table cell.  This generated extra mouse
+	  events, causing flicker on the status line.
+
+2004-08-05  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions_mail.inc (1.14, mrbs-1_2, mrbs-1_2-branch_bp): Removed
+	  sql_free() statements as they are not required when using
+	  sql_row.  Fixed bug 994056
+
+2004-07-30  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions_mail.inc (1.13): Added missing ampersand for URL in
+	  emails when a series is involved.
+
+2004-07-28  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.cz (1.10, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp): *
+	  Updated lang.cz from David Krotil. Only required one token  to be
+	  translated.
+
+2004-07-28  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.cz (1.9), lang.da (1.5, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp),
+	  lang.de (1.18, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp),
+	  lang.el (1.4, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp),
+	  lang.en (1.26, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp), lang.es (1.18, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp),
+	  lang.fi (1.9, mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp), lang.fr (1.23, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp), lang.it (1.11, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp), lang.ja (1.15, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp), lang.nl (1.16, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2, mrbs-1_2-branch_bp), lang.no (1.13,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp),
+	  lang.pt (1.5, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp),
+	  lang.sv (1.17, mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp), lang.zh-tw (1.15, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp), language.inc (1.13, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2, mrbs-1_2-branch_bp): * Language
+	  tokens synchronised. All files now have the same number  of
+	  lines, and the same number of tokens. Some languages are now
+	  missing quite a few translations.
+
+	  * Integrated fix for Windows locale selection contained in  bug
+	  #992390 (Huey). Browser language "en-ie" is now translated to
+	  the correct Windows locale.
+
+2004-06-29  John Beranek <jberanek@users.sourceforge.net>
+
+	* functions.inc (1.34, mrbs-1_2, mrbs-1_2-branch_bp), language.inc
+	  (1.12): * locale setting fixes. Added ability to print warning at
+	  the top of the  screen if MRBS fails to set a locale. Added
+	  mapping into Windows	locale map of 'sv-se' to 'sve', this
+	  handles browsers set to send	'sv-se'. Added mapping into Unix
+	  locale map of 'en_EN' to 'en_GB' to  fix incorrect locale of
+	  'en_EN' (I could have used en_US instead).   Added support for OS
+	  X into locale setting code. OS X is treated	as "unix".
+
+2004-06-23  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions_mail.inc (1.12), lang.en (1.25), view_entry.php (1.16,
+	  mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-pre-MDB-merge, mrbs-1_2_1,
+	  mrbs-1_2, mrbs-1_2-branch_bp): Changed view_entry.php so that it
+	  could handle the situation where an id for a series is passed to
+	  it.  A series is identified by series=1 in the url.
+
+	  Changed functions_mail.inc to generate urls with series=1 in the
+	  email messages where the message relates to a series.
+
+	  Changed lang.en to have an error message for when an invalid
+	  series id is passed to view_entry.php.
+
+	  Fixes bug 972194
+
+	  Fixed bug
+
+2004-06-23  John Beranek <jberanek@users.sourceforge.net>
+
+	* functions.inc (1.33): * Fixes SF request 934394, namely
+	  JavaScript errors on changing  Start/End dates in the form. Form
+	  prefix wasn't being passed  from PHP function genDateSelector()
+	  to JavaScript function  ChangeOptionDays().
+
+2004-06-15  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions_mail.inc (1.11): Fixed bug 972293 so that periods are
+	  handled correctly in email notifications Removed duplicate
+	  $mail_vocab["start_date"] when deleting a "time" entry.
+
+2004-06-15  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* month.php (1.31, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp): Changed so that '+' sign and javascript are
+	  not included in month "print preview"
+
+2004-06-15  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* month.php (1.30): Changed main table formatting to match day and
+	  week view tables.
+
+2004-06-15  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* mrbs.css (1.10): Changed background-color and border-color for TH
+	  elements so that in day and week view the links in the header
+	  cells of the tables are more readable.
+
+2004-06-15  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* mrbs.css (1.9): Changed default colour for odd row (TD.odd_row)
+	  so that it is not the same as the default colour for TD.J
+
+2004-06-14  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* session_cookie.inc (1.9, mrbs-post-MDB-merge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp): Fixes problem
+	  identifed by Dane where an invalid user will appear to be logged
+	  in.  This was caused by the cookie being set and no validation of
+	  the user being done because the wrong variables were being used.
+	  This is not a security issue.
+
+2004-06-14  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* config.inc.php (1.39, mrbs-1_2, mrbs-1_2-branch_bp): Changed
+	  comment about $url_base to recommend setting this if email
+	  notifications are to be used.
+
+	  Fixed Bug 972186
+
+2004-06-13  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions_mail.inc (1.10): - $endtime is declared as a global in
+	  notifyAdminOnBooking but it is   modified by being used as a
+	  "local" variable - renamed the "local" variable   Fixes bug
+	  #968682
+
+	  - use rep_type as more accurate indication of series or not, so
+	  that	 $myendtime can be set the most appropriate value.
+
+2004-06-12  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* day.php (1.38, mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp): Changing ordering of
+	  rooms in day view back to "by room name" as "by capacity" was
+	  specific to Jean-Fran�ois' implementation.
+
+2004-06-12  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* auth_ldap.inc (1.7, mrbs-post-MDB-merge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp), config.inc.php (1.38):
+	  Update auth_ldap.inc and config.inc.php.  - LDAP servers may not
+	  allow anon. bind so this broke the previous version of
+	  auth_ldap.inc.  I have removed the attempt at an anon. bind and
+	  have given the admin more control over the dn that an auth. bind
+	  is attempted with.
+
+	  - the user attribute can be defined individually for each base dn
+	  if reequired.
+
+	  - $ldap_base_dn and $ldap_usesr_attrib are handled in a similar
+	  way to imap and pop3, server and port, definitions, and
+	  config.inic.php has been updated to reflect this.
+
+2004-05-27  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.cz (1.8): Updated Czech lang file ("David Krotil"
+	  David.Krotil@mu-sokolov.cz)
+
+2004-05-26  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.de (1.17): Updating lang.de (thanks Andreas Moroder)
+
+2004-05-20  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.37): Updating mrbs version to next 1.2.
+
+2004-05-19  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions_mail.inc (1.9): - Bug fix: emails are not RFC2045
+	  compliant. Mail body can contain non us-ascii characters, then
+	  header should have MIME-Version and Content-Type headers.
+
+2004-05-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.36, mrbs-1-2-pre3): + If MAIL_DOMAIN is used
+	  and username returned by mrbs contains extra strings appended
+	  like domain name ('username.domain'), need to provide this extra
+	  string so that it will be removed from the username.
+
+2004-05-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry_handler.php (1.22, mrbs-1_2, mrbs-1_2-branch_bp),
+	  functions_mail.inc (1.8) (utags: mrbs-1-2-pre3): + If MAIL_DOMAIN
+	  is used and username returned by mrbs contains extra strings
+	  appended like domain name ('username.domain'), need to provide
+	  this extra string so that it will be removed from the username.
+	  - Fixed bug: if MAIL_BOOKER is enabled, previous booker was empty
+	  if MAIL_DETAILS was not set.
+
+2004-05-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions_mail.inc (1.7): - (sendMail()): forgot to add the 'To'
+	  header to mails. Some smtp servers and sendmail may display
+	  'undisclosed-recipients: <undisclosed-recipients:>' instead of
+	  recipients list.
+
+2004-05-11  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions_mail.inc (1.6): -(getPreviousEntryData): removed repeat
+	  table in FROM statement if this is not a serie (can cause sql
+	  error on some systems)
+
+2004-05-11  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* language.inc (1.11, mrbs-1-2-pre3): Removed notice in case
+	  $lang_map_unix[$locale] is not set
+
+2004-05-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* day.php (1.37, mrbs-1-2-pre3): duplicated the 'previous day -
+	  current day - next day' navigation bar to the calendar bottom.
+
+2004-05-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.sv (1.16, mrbs-1-2-pre3): updated lang.sv (thanks MissterX).
+
+2004-05-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry_handler.php (1.21): - Fixed bug #748925 (All day
+	  booking misbehaves if a day extends beyond midnight).
+
+2004-05-08  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry.php (1.30, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3): Replaced submit button hiding by 'disabled'.
+
+2004-05-08  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.35), edit_entry_handler.php (1.20),
+	  functions_mail.inc (1.5), language.inc (1.10): + Enhancements to
+	  email support: added the option to send a copy of entries details
+	  to the 'booker'. Will retrieve users emails from the used auth
+	  scheme : email field for auth_db, username + provided domain for
+	  all other schemes.
+
+2004-05-06  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* config.inc.php (1.34), day.php (1.36), week.php (1.37,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-1_2_1,
+	  mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3): Added
+	  $morningstarts_minutes to allow for a day to start at say 8:30
+	  am.  Default value is 0.
+
+2004-05-06  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* day.php (1.35): Modified so that capacity is not displayed in
+	  brackets next to room name if capacity is 0.	This helps where
+	  the "room" is a piece of equipment or a person.  Thanks to
+	  Michael Hellwig.
+
+2004-05-06  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* day.php (1.34), week.php (1.36): Modified week and day to be
+	  consistent in the way that they are displayed normally and in
+	  print preview if no area/room is defined.
+
+2004-05-06  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.de (1.16, mrbs-1-2-pre3): lang fix (Michael Glaessel)
+
+2004-05-06  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions_mail.inc (1.4): - Fixed bug #948246 :SQL syntax error
+	  when sending emails for deleted entries.
+
+2004-05-06  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_users.php (1.9, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3): + added email address
+	  validation
+
+2004-05-06  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_area_room.php (1.14, mrbs-pre-MDB-merge, mrbs-1_2_1,
+	  mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3):  enhanced email
+	  validation
+
+2004-05-05  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_area_room.php (1.13), functions_mail.inc (1.3): * removed
+	  duplicated email validation function from function_mail.php.	Use
+	  one in RFC822.php instead.
+
+2004-05-03  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions_mail.inc (1.2): Typos fix
+
+2004-05-03  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.33), del_entry.php (1.5, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3),
+	  edit_area_room.php (1.12), edit_entry.php (1.29),
+	  edit_entry_handler.php (1.19), functions.inc (1.32,
+	  mrbs-1-2-pre3), functions_mail.inc (1.1), lang.en (1.24,
+	  mrbs-1-2-pre3), lang.fr (1.22, mrbs-1-2-pre3), language.inc
+	  (1.9), mrbs_sql.inc (1.18, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3), Net/Socket.php (1.2, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3): + Added/changed features to
+	  email support:  - Room and/or area administrators. An email field
+	  has been added to room    and area administration page. Each
+	  room/area can have multiple emails.	- Configurable options to
+	  send emails to these administrators.	   Emails can be send to
+	  MRBS admin and/or area admins and/or room admins.   -
+	  Configurable options to set what is emailed (either a link to
+	  the view page as before or full details)   - Configurable option
+	  to decide the lang used in emails and the text of	subject and
+	  body.   - Configurable options to decide which events cause an
+	  email to be sent     (whether only new entries, new and edited
+	  entries, or deleted entries)	 - Full diffing informations
+	  between the new state of an edited entry     and its previous
+	  settings (only if we choose to show details in emails)   -
+	  Optionale recipients can receives mails in carbon copy   -
+	  Configurable option to send mails using three mail backends:
+	  either the php mail function, an external smtp server (with or
+	  without     authentication) or unix sendmail program.   -
+	  upgraded Net::Socket from 1.0.1 to 1.0.2
+
+2004-04-29  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.fi (1.8, mrbs-1-2-pre3): Updated lang.fi (thanks Tom Ingberg
+	  (tom.ingberg@edu.vantaa.fi))
+
+2004-04-27  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* edit_entry.php (1.28): Need to escape double-quotes in room names
+	  Thanks to Klavs Bryld
+
+2004-04-27  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions.inc (1.31): added double-quotes around minutes as: "You
+	  should always use quotes around a string literal array index" -
+	  quote from PHP manual.  Thanks Thierry
+
+2004-04-25  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* edit_users.php (1.8), mysql.inc (1.5, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3), pgsql.inc (1.6, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3): Modified the way edit_users.php gets the user
+	  table fields names and types.  It now uses the three new routines
+	  sql_field_name, sql_field_type, sql_num_fields, defined in
+	  mysql.inc and pgsql.inc, which in turn call their corresponding
+	  database-specific eponym.  Still not tested with PostgreSQL, but
+	  much more likely to work.
+
+2004-04-25  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* day.php (1.33), lang.en (1.23), lang.fr (1.21), month.php (1.29,
+	  mrbs-1-2-pre3), week.php (1.35), xbLib.js (1.3, mrbs-1-2-pre3):
+	  Localize the message displayed on the status bar when a cell is
+	  activated under the cursor.  The string is defined as
+	  $vocab["click_to_reserve"] in lang.xx.  It is passed from PHP to
+	  JavaScript as an additional argument to routine InitActiveCell().
+
+2004-04-18  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* day.php (1.32), month.php (1.28), mrbs.css (1.8, mrbs-1-2-pre3),
+	  week.php (1.34), xbLib.js (1.2): Added active highlighting of the
+	  month view cells.  This required an additional parameter in
+	  InitActiveCell(), hence the minor changes in the day and week
+	  views.  Side effect of this change: The (+) sign in the month
+	  view is moved after the list of reservations, instead of before.
+	  This was necessary, else the list itself was moved to the bottom
+	  of the cell, which did not look good.
+
+2004-04-18  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* month.php (1.27), week.php (1.33): Include mrbs_auth.inc to allow
+	  the display of the logon box in the MRBS top banner.
+
+2004-04-17  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* report.php (1.22, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-pre-MDB-merge, mrbs-1_2_1,
+	  mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3): - fixed bug
+	  $typematch, variable undefined
+
+2004-04-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.el (1.3, mrbs-1-2-pre3): Doc fix (it is a greek file, not
+	  english)
+
+2004-04-16  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* day.php (1.31), week.php (1.32): I have changed the day and week
+	  view so that the colour key is shown in both the "web page" view
+	  and "print preview".	I believe that it makes sense to include
+	  the key in the "print preview" version so that you can understand
+	  the colours on a hardcopy.
+
+2004-04-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.32): Doc fixes
+
+2004-04-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* Mail/mail.php (1.2, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3): - Removed PEAR_MAIL constants (never had).
+
+2004-04-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* Mail.php (1.1, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3), PEAR.php (1.2, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3), config.inc.php (1.31),
+	  edit_entry_handler.php (1.18), functions.inc (1.30), lang.en
+	  (1.22), mrbs_sql.inc (1.17), view_entry.php (1.15,
+	  mrbs-1-2-pre3), Mail/RFC822.php (1.1, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3), Mail/mail.php (1.1),
+	  Mail/null.php (1.1, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3), Mail/sendmail.php (1.1, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3), Mail/smtp.php (1.1,
+	  mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3), Net/SMTP.php (1.1, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-post-MDB-merge, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3), Net/Socket.php (1.1): + Added
+	  email support to MRBS (using PEAR::Mail class for that).  MRBS
+	  developers, use function sendMail(), with at least the minimal
+	  parameters ($recipients, $subject and $body) to send mail from
+	  MRBS.  + Added the option to notify the administrator (or someone
+	  else) with an email on each new entry or new and changed entries)
+
+2004-04-15  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* auth_db.inc (1.6, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3): - (authValidateUser): add
+	  global $tbl_users;
+
+2004-04-14  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* add.php (1.5, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3), admin.php (1.16,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3), auth_db.inc (1.5), day.php (1.30), del.php (1.11,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3), edit_area_room.php (1.11), edit_entry.php (1.27),
+	  edit_entry_handler.php (1.17), edit_users.php (1.7),
+	  functions.inc (1.29), index.php (1.8, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3), month.php (1.26), mrbs_sql.inc (1.16), report.php
+	  (1.21), search.php (1.12, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3),
+	  view_entry.php (1.14), week.php (1.31): Changed the fixed table
+	  names to variables.  The variables are defined in config.inc.php.
+
+2004-04-14  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* config.inc.php (1.30): Added variables to allow the 'mrbs_'
+	  prefix on table names to be changed.	This will allow the user to
+	  do a second installation when only one database is available or
+	  resolve table name conflicts.
+
+2004-04-14  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* day.php (1.29): - Correct the \\n new line character in tooltips
+	  to &#10; . Currently it changes nothing but the HTML spec says
+	  \\n in titles should be converted to spaces. So, the current
+	  thoughts of the Mozilla developers is that &#10; would insert a
+	  line break in a title, and a literal \\n would not, but they've
+	  not implemented it yet though.  However, IE _does_ currently work
+	  with &#10; and that method seems to fit the specs much more
+	  closely. (John Beranek)
+
+2004-04-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* config.inc.php (1.29): Corrected the errors pointed out by
+	  Thierry.  (Missing change from his last commit, and
+	  authentication default changed by mistake)
+
+2004-04-14  John Beranek <jberanek@users.sourceforge.net>
+
+	* functions.inc (1.28):
+	  * Slight Unicode fix. Move page title specifier to _after_  page
+	  encoding specifier. That way the browser knows what  encoding the
+	  title is in before it gets to it.
+
+2004-04-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* config.inc.php (1.28), day.php (1.28), mrbs.css (1.7), week.php
+	  (1.30), xbLib.js (1.1): Added an optional active cell
+	  highlighting, and the ability to make a reservation by clicking
+	  anywhere in a cell.  The control is done in config.inc.php.
+	  Default is highlighting enabled; + signs left in.  The highligth
+	  color is defined in mrbs.css.
+
+	  Changed the background stripe generation method. Now defined be
+	  classes in mrbs.css.
+
+2004-04-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* language.inc (1.8): Fixed error when the server does not define
+	  $HTTP_ACCEPT_LANGUAGE.
+
+2004-04-13  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.27): + Doc fix.
+
+2004-04-13  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.26), month.php (1.25): + Added the option to
+	  show both time slots and brief description.
+
+2004-04-13  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* report.php (1.20): + Added the 'creator' search criteria.
+
+2004-04-12  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* day.php (1.27): added '' to minicals function call for room
+	  parameter as room is not relevant in day context
+
+2004-04-12  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* month.php (1.24), week.php (1.29): added $room to minicals
+	  function call
+
+2004-04-12  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* mrbs.css (1.6): added class for highlighting current
+	  month/week/day in calendars, used in mincals.inc
+
+2004-04-12  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* mincals.inc (1.11, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3): mincal changes: - correct week highlight code to
+	  correctly highlight where a week crosses   into a new month.	The
+	  problem was when crossing the year boundary, and   where only the
+	  last day of the week was in the new month and the number   of
+	  days in the current month was < 31.  - week and month now include
+	  room in the link thus maintaining the same   room when using the
+	  calendars for navigation - highlights whole month in month view -
+	  highlight colour moved to mrbs.css
+
+2004-04-11  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* auth_db.inc (1.4), session_cookie.inc (1.8, mrbs-1-2-pre3),
+	  session_php.inc (1.8, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3): + Add link to user entries for all auth schemes,
+	  not only db (thanks Gavin!).
+
+2004-04-11  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* month.php (1.23): Added 'plus sign' next to date in month view.
+
+	  This will take the user to an add entry page for that day of the
+	  month.
+
+2004-04-11  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* auth_db.inc (1.3), lang.en (1.21), lang.fr (1.20), report.php
+	  (1.19), session_cookie.inc (1.7), session_php.inc (1.7): + If
+	  auth_db is used with session_cookie or session_php, the message
+	  "you are XXXX" becomes a link to all upcoming entries belonging
+	  to XXXX (report page). If auth_db is not used, the previous empty
+	  HREF link "you are XXXX" is useless and is now a simple text
+	  message.
+
+2004-04-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_users.php (1.6): - Changed the title displayed when adding
+	  new user from 'Edit user' to 'Add a new user'.
+
+2004-04-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* auth_db.inc (1.2), edit_users.php (1.5): + Hashes passwords in
+	  dababase (auth_db). Update 'password' field for this purpose.
+
+2004-04-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.cz (1.7, mrbs-1-2-pre3), lang.da (1.4, mrbs-1-2-pre3),
+	  lang.de (1.15), lang.el (1.2), lang.en (1.20), lang.es (1.17,
+	  mrbs-1-2-pre3), lang.fi (1.7), lang.fr (1.19), lang.it (1.10,
+	  mrbs-1-2-pre3), lang.ja (1.14, mrbs-1-2-pre3), lang.nl (1.15,
+	  mrbs-1-2-pre3), lang.no (1.12, mrbs-1-2-pre3), lang.pt (1.4,
+	  mrbs-1-2-pre3), lang.sv (1.15), lang.zh-tw (1.14, mrbs-1-2-pre3),
+	  month.php (1.22), report.php (1.18), view_entry.php (1.13),
+	  week.php (1.28): Removed punctuation from $vocab["room"]  string
+	  so that this vocab can be used more often and lessen the number
+	  of vocabs (replace $vocab["sort_rep_room"]). This could be done
+	  in all vocabs too, as a general rule we should not use
+	  punctuation and other things not related to translation in these
+	  strings.
+
+2004-04-09  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* auth_imap.inc (1.6, mrbs-post-MDB-merge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3),
+	  auth_pop3.inc (1.6, mrbs-post-MDB-merge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3),
+	  config.inc.php (1.25): This change allows multiple pop3 or imap
+	  server to be used for authentication.
+
+	  AUTHENTICATION has been updated to explain this and users are
+	  referred to AUTHENTICATION from config.inc.php if they wish to
+	  use multiple servers.
+
+2004-04-08  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions.inc (1.27), lang.en (1.19), report.php (1.17): This
+	  includes an update to reporting to allow reports to be sorted by
+	  Area/Room then Start Date/Time or Start Date/Time then Area/Room.
+
+	  There is also now the option to display Start and End date/time
+	  instead of start date/time and duration.
+
+	  A modification has been made to period_date_string in
+	  functions.inc to make the display start/end dates and periods
+	  clearer.
+
+2004-04-07  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.24): Doc fixes (added DB doc)
+
+2004-04-07  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.23): Updating mrbs version number before next
+	  release :-)
+
+2004-04-07  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* month.php (1.21), week.php (1.27): ChangeLog update Doc fixes.
+
+2004-04-05  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.el (1.1), style.inc (1.10, mrbs-pre-MDB-merge, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3):
+	  * Added Greek translation, lang.el
+
+	  * Fixed global variable problem in style.inc, $vocab wasn't
+	  being declared as a global.
+
+	  [Translation and fix provided by Stavros Papadakis]
+
+2004-03-15  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* month.php (1.20), functions.inc (1.26), week.php (1.26): This
+	  change means that the default room in an area, if none is
+	  specified or when changing areas will be the first listed rather
+	  than the room with the lowest id.
+
+	  This also affects the choice of area if no room or area is
+	  specified then the first listed area will be chosen rather than
+	  the one with the lowest id.
+
+2004-03-15  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* index.php (1.7), config.inc.php (1.22): Added configuration
+	  option to allow index.php to redirect to a specific room.
+
+2004-03-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* day.php (1.26), week.php (1.25): Added specific Room Description
+	  showing with a pop up/hover title for each room  on the week view
+	  link in day.php and room link in week.php. (Valeria
+	  Montesi/Gareth T).
+
+2004-03-08  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* edit_users.php (1.4): The last change, to restrict access to the
+	  page to identified users, broke the ability to initially enter
+	  the first user! Fixed this by avoiding to do this test if the
+	  user list is empty. Actually moved the code to a branch that
+	  already ran only if the user list was not empty.
+
+2004-02-27  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mrbs_sql.inc (1.15): (mrbsCheckFree): - corrected 'undefined
+	  variable' bug (typo on variable name line 54, $enable_period
+	  instead of $enable_periods)
+
+2004-02-11  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* index.php (1.6): - included grab_globals.inc.php at the top of
+	  the file otherwise  $HTTP_ACCEPT_LANGUAGE is undefined
+
+2004-02-04  John Beranek <jberanek@users.sourceforge.net>
+
+	* mrbs_sql.inc (1.14), report.php (1.16):
+	  * Removed 3 uses of %T format specifier in strftime() calls,	as
+	  it seems Windows strftime() doesn't support %T. Tested  on a
+	  Windows MRBS (Apache + MySQL) installation. Problem  reported by
+	  Reinhold Petrich on the mailing list, and fix  also confirmed.
+
+2004-02-04  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* mincals.inc (1.10): Use basename($PHP_SELF) to avoid false hits,
+	  if the substrings "day" or "week" or "month" appear in the full
+	  URL.
+
+2004-02-02  John Beranek <jberanek@users.sourceforge.net>
+
+	* functions.inc (1.25):
+	  * Fixed JavaScript in functions.inc (for area and room  drop-down
+	  menus in day/week/month view) to use relative  URLs, and better
+	  "onChange" handling.
+
+2004-01-31  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* language.inc (1.7): Updated the iconv error message, based on the
+	  suggestion by David Watts.
+
+2004-01-31  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* edit_users.php (1.3): Make sure the user is authenticated before
+	  giving him access to the list.
+
+2004-01-28  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* index.php (1.5), config.inc.php (1.21): Added $default_view as
+	  suggested by Warren Turkal This can be used to determine the
+	  default starting view, i.e. month, week or day, as used by
+	  index.php.
+
+2004-01-27  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* report.php (1.15): BUG 885333 - fixed - added check to ensure
+	  that $typematch_default is an array.
+
+2004-01-26  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* edit_entry.php (1.26): When the user clicks on the "All day"
+	  checkbox, use JavaScript to immediately change the time to 00:00
+	  and the duration to 1 day.  (Designed for support of periods too,
+	  but not tested)
+
+2004-01-22  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* edit_users.php (1.2): Removed the paragliding-specific weight
+	  field :-)
+
+2004-01-22  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* config.inc.php (1.20), day.php (1.25): Added the ability to
+	  display horizontal bands of color in the background of the day
+	  view, to make the table more readable.  This is enabled by
+	  changing the new setting $stripe_color in config.inc.php. This
+	  value sets the color class for the bands.  "white"= no bands
+	  (default) For example changing it to "J" display light gray
+	  bands.
+
+2004-01-22  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.19), day.php (1.24), lang.cz (1.6), lang.da
+	  (1.3), lang.de (1.14), lang.en (1.18), lang.es (1.16), lang.fi
+	  (1.6), lang.fr (1.18), lang.it (1.9), lang.ja (1.13), lang.nl
+	  (1.14), lang.no (1.11), lang.pt (1.3), lang.sv (1.14), lang.zh-tw
+	  (1.13), week.php (1.24): + Option to display times on right side
+	  in day and week view.  + pop-up messages
+
+2004-01-21  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* lang.en (1.17), report.php (1.14): Allows reports to be limited
+	  to certain reservation types (eg just 'external').  This is
+	  multiple select box.	If all are selected or none are selected
+	  then all reservation types are included in the report.
+
+2004-01-21  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* config.inc.php (1.18), day.php (1.23), edit_entry.php (1.25),
+	  edit_entry_handler.php (1.16), functions.inc (1.24), lang.en
+	  (1.16), month.php (1.19), mrbs_sql.inc (1.13), report.php (1.13),
+	  search.php (1.11), view_entry.php (1.12), week.php (1.23): This
+	  update contains all of the code and documentation to support
+	  "periods" within mrbs.
+
+2004-01-20  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* day.php (1.22): + Added link to rooms heading to display the
+	  weekly view for that room.
+
+2004-01-19  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* auth_db.inc (1.1), config.inc.php (1.17), edit_users.php (1.1),
+	  lang.en (1.15), lang.fr (1.17), mrbs.css (1.5),
+	  session_cookie.inc (1.6), session_php.inc (1.6): Added a new
+	  authentication module auth_db.inc.  This is a web-based
+	  authentication, based on a new table of users in the mrbs
+	  database. Implements RFE #665239 "Multiuser, Web based auth".
+	  Added module edit_users.php to manage the contents of this table.
+	  New English and French strings added in lang.en and lang.fr
+	  respectively.  Added in session_php.inc and session_cookie.inc
+	  logon box an optional link to the user list management page.
+	  Finally minor changes to config.inc.php (comment) and mrbs.css
+	  (style for buttons inside tables).
+
+2004-01-15  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* language.inc (1.6): Updated the error message displayed in the
+	  case where the iconv extension is missing.
+
+2004-01-15  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* config.inc.php (1.16), session_cookie.inc (1.5), session_php.inc
+	  (1.5), trailer.inc (1.10, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3): Changed absolute paths in anchor hrefs and
+	  redirection headers from absolute to relative.  This should fix
+	  the link failures seen by some users, in environments where a
+	  proxy makes the user-visible root different from the
+	  web-server-visible root.  In the unlikely case where some users
+	  have a very old browser not supporting relative HTTP relocation
+	  headers, then they can use the $url_base in config.inc.php as a
+	  workaround: In this case, put in this variable the full URL of
+	  the MRBS root, as seen by the users through the proxy.
+
+2004-01-15  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* month.php (1.18): - Fixed bug [ 875782 ]: Month View, Extra
+	  carriage return.  Text formating problem if
+	  $monthly_view_brief_description set to TRUE.
+
+2004-01-11  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* mrbs.css (1.4): Added a directive to avoid having a blank line
+	  below buttons inside tables. This makes the logon cell in the top
+	  banner, and the forthcoming user properties editor page, look
+	  much better.
+
+2004-01-09  John Beranek <jberanek@users.sourceforge.net>
+
+	* config.inc.php (1.15):
+	  * The MRBS version number hadn't been updated to 1.2-pre2.   It
+	  has now.
+
+2003-12-22  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* edit_entry.php (1.24), lang.en (1.14): Added support for changing
+	  area/room in Add/Edit entry form.  Added check to ensure that at
+	  least one room is selected as edit_entry_handler.php does not
+	  catch this.  Added wording to lang.en to cover the above check.
+
+	  The first fix requires that javascript is enabled.  If it is not
+	  then you get the same form as you get currently.  If it is
+	  enabled and you have more than one area then you get an area
+	  select box which controls the rooms displayed in the room select
+	  box.
+
+2003-12-22  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* day.php (1.21): Minor formatting fix for day view when viewed
+	  with Konqueror.
+
+2003-12-21  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions.inc (1.23): Doc fix: - Updated other doc areas about
+	  default administrator since JFL change.  - Removed warning in
+	  function.inc since it works now with Gavin changes
+
+2003-12-21  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* config.inc.php (1.14): Changed the default administrator list, to
+	  be coherent with the explanations in AUTHENTICATION, and also to
+	  work out-of-the-box.
+
+2003-12-17  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* functions.inc (1.22): Modified Javascript to work with Mozilla
+	  1.5 (Linux) and NS4 (Linux), also tested with Konqueror 3.1.4 and
+	  IE 6.0
+
+	  Days now work for all changes of Month and Year.
+
+	  Added JavaScript to fix days once date selector is displayed so
+	  that if a month has < 31 days then the day selector is shortened
+	  appropriately.
+
+2003-12-17  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* auth_ldap.inc (1.6, mrbs-1-2-pre3): (authValidateUser): - Tried
+	  to fix LDAP servers login processes waiting for 'uid' and not for
+	  'cn'.  Does an anonymous bind first, tries to find  the dn for
+	  the user and then binds to it with $pass.  (Bernd Oeggl ,
+	  Philippe Schwarz).
+
+2003-12-17  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.13): - Fix URL problems when using a proxy in
+	  the environment.
+
+2003-12-14  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions.inc (1.21): (print_header): Added JavaScript to insure
+	  the integrity of the date entered in three field drop-down menus.
+
+	       Tested with Windows IE 6.0
+	       Tested with Linux Opera 7.21, Mozilla 1.3, Konqueror 3.1.0
+
+	       WARNING: little bug in Mozilla 1.3. If a month with less
+	  than 31 days is
+	       selected, the max days number is updated correctly, but if
+	  you select
+	       a 31 days month again, then max days number is not updated
+	  (ie. stays at
+	       30 or 28). Goto a 31 days month to have the 31 days back.
+	  Since Mozilla
+	       1.3 is rather not up to date (1.6b current at 2003-11-15),
+	  this may be
+	       corrected in newer releases.
+
+2003-12-07  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.12, mrbs-1-2-pre2): Doc fixes
+
+2003-12-07  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry.php (1.23), edit_entry_handler.php (1.15) (utags:
+	  mrbs-1-2-pre2): - Fixed bug [ 853410 ]: when changing a non
+	  n-weekly entry, field "Number of weeks (for n-weekly)" appear...
+
+2003-12-04  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* admin.php (1.15, mrbs-1-2-pre2): - Fixed bug #846337: We can
+	  create rooms with no area
+
+2003-12-03  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* day.php (1.20, mrbs-1-2-pre2), edit_entry.php (1.22),
+	  edit_entry_handler.php (1.14), functions.inc (1.20,
+	  mrbs-1-2-pre2), month.php (1.17, mrbs-1-2-pre2), mrbs_sql.inc
+	  (1.12, mrbs-1-2-pre2), view_entry.php (1.11, mrbs-1-2-pre2),
+	  week.php (1.22, mrbs-1-2-pre2): Daylight Saving Time fixes.
+
+	  This has involved modifying month.php, week.php and day.php,
+	  view_entry.php, edit_entry.php, edit_entry_handler.php,
+	  mbs_sql.inc and functions.inc
+
+	  For month.php and week.php, I have changed them to handle each
+	  week/month on a day by day basis.  They and day.php make DST
+	  corrections for the start and end of each day.  The intervals of
+	  time are handled by using the format HHMM with no leading zeros.
+	  Events are read in to an array using this format of time as the
+	  one of the indices.  A day which does not include a DST change is
+	  used to loop through all valid hours for that day.
+
+	  The view_entry.php has been altered to modify times that cross
+	  DST back to what the user would expect 9pm to 3am is 6 hours but
+	  it is stored as either 5 or 7 hours.
+
+	  The edit_entry.php, edit_entry_handler.php and mrbs_sql.inc have
+	  been changed to correctly calculate the difference between two
+	  timestamps and correct the end time for checking the following:
+	  free time, all day events and repeating events.
+
+	  functions.inc includes two new functions: one to check for DST
+	  and one to correct for DST.  These are used in the fixes above.
+
+	  Where possible, calculations that used to use midnight have been
+	  changed to use midday to avoid DST problems.
+
+	  You may still see some "strange" but correct behaviour when
+	  scheduling meetings which start and/or end between midnight and 3
+	  am on a day of DST.  These may look wrong but should actually be
+	  correct if you consider how DST works on that day, i.e in the UK
+	  the hour from 1am to 2pm does not exist when entering DST.
+
+	  Backward compatibility: There may be a one hour error for events
+	  that start or end between midnight and 3am on the day that DST
+	  changes but these can be fixed by editting the entry/series and
+	  saving it.
+
+2003-12-03  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* pgsql.inc (1.5, mrbs-1-2-pre2): Updated the postgreSql driver
+	  (pgsql.inc) to remove deprecated functions. People which still
+	  use a php version less than 4.2 will have to replace the existing
+	  pgsql.inc file with pgsql.before_php42.inc file and rename it to
+	  pgsql.inc
+
+2003-11-24  Gavin Walker <gwalker@users.sourceforge.net>
+
+	* edit_entry.php (1.21): Displays "Edit Series" or "Edit Entry" at
+	  top of page when editing a series or entry respectively.
+
+2003-11-21  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.11), help.php (1.12, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-pre-MDB-merge, mrbs-1_2_1,
+	  mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2):
+	  Since we always forgot for each release to update mrbs version in
+	  help.php (this is not a file we open often), I moved the variable
+	  to config.inc.php.
+
+2003-11-21  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* session_cookie.inc (1.4, mrbs-1-2-pre2): - fixed not working with
+	  error level all.
+
+2003-11-19  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* auth_none.inc (1.1, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2), config.inc.php
+	  (1.10), session_host.inc (1.1, mrbs-pre-MDB-merge, mrbs-1_2_1,
+	  mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2),
+	  session_ip.inc (1.1, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2), session_nt.inc
+	  (1.1, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2),
+	  session_omni.inc (1.1, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2): Created an
+	  auth_none.inc authentication, which validates any user.  Moved
+	  session management code from the old auth_ip, auth_name, auth_nt,
+	  auth_omni to the new session_ip, session_host, session_nt,
+	  session_omni respectively.  Updated config.inc.php comments to
+	  reflect the possible choices for session name and authentication
+	  types.
+
+2003-11-18  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* language.inc (1.5, mrbs-1-2-pre2): Updated the administrator
+	  warning message about the iconv package requirement, to fire only
+	  if $unicode_encoding is true.
+
+2003-11-18  John Beranek <jberanek@users.sourceforge.net>
+
+	* style.inc (1.9, mrbs-1-2-pre2):
+	  * Added utility to convert text in the database to UTF8, to  use
+	  MRBS with $unicode_encoding set to 1. The administrator  should
+	  copy it into the web directory, run it (choosing  the encoding to
+	  convert from) ONCE, and then move it back out of  the web
+	  directory.
+
+	  * Added comment to my usage of $vocab["charset"] in style.inc, as
+	   ist doesn't match the general usage of get_vocab().
+
+2003-11-17  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.9): Removed unnecessary comment.
+
+2003-11-17  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* admin.php (1.14): - make admin.php working with error level E_ALL
+	  with no area/room defined (previous fix causes an error in case
+	  http authentication fail).
+
+2003-11-17  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.fr (1.16, mrbs-1-2-pre2): Changing $vocab language string.
+
+2003-11-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* session_cookie.inc (1.3), session_php.inc (1.4, mrbs-1-2-pre2): -
+	  Removed remainings plain text strings by get_vocab() function.
+
+2003-11-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* month.php (1.16): - fixed remainings non unicode compliant php
+	  functions.
+
+2003-11-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mrbs_sql.inc (1.11): - (mrbsCheckFree): fixed remainings non
+	  unicode php functions.
+
+2003-11-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* admin.php (1.13): - make admin.php working with error level E_ALL
+	  with no area/room defined.
+
+2003-11-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.8), month.php (1.15): Changed my stupid
+	  $_MRBS_monthly_view_brief_description variable name to
+	  $monthly_view_brief_description
+
+2003-11-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* day.php (1.19): Moved inclusion of mrbs_auth.inc after that of
+	  function.inc and $dbsys.inc, as mrbs_auth.inc now uses
+	  definitions of the first one, and will use those of the second
+	  one eventually.
+
+2003-11-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* auth_config.inc (1.2, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2): Function
+	  authValidateUser() must not call authGet() anymore. In case of
+	  failure it just returns 0 as specified in its header comment.
+
+2003-11-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* auth_ext.inc (1.6, mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3), auth_imap.inc (1.5),
+	  auth_ldap.inc (1.5), auth_nis.inc (1.5, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3),
+	  auth_nw.inc (1.4, mrbs-post-MDB-merge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3),
+	  auth_pop3.inc (1.5) (utags: mrbs-1-2-pre2): Set
+	  $auth['session']='http' if it is not specified. This allows to
+	  get the same behaviour as before without changing config.inc.php.
+	  Moved routines authGet(), getUserName() and getUserPassword() to
+	  the new session_http.inc module.  Function authValidateUser()
+	  must not call authGet() anymore. In case of failure it just
+	  returns 0 as specified in its header comment.
+
+2003-11-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* mrbs_auth.inc (1.8, mrbs-post-MDB-merge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3,
+	  mrbs-1-2-pre2): Moved routines getAuthUserName() and
+	  getAuthUserPassword() to the new session_http.inc module.
+	  Function getAuthorized() must not call authGet() anymore. In case
+	  of failure it just returns 0 as specified in its header comment.
+
+2003-11-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* session_cookie.inc (1.2), session_php.inc (1.3): Moved $HTTP_HOST
+	  setting to grab_globals.inc.	Added missing globals declarations.
+	  Removed the argument to authGet().  Action "SetName" now
+	  validates the user/password pair. This avoids loging on
+	  unauthorized users, which would rejected later on.
+
+2003-11-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* session_http.inc (1.1, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3, mrbs-1-2-pre2): Get the user/password using the
+	  HTTP basic authentication.
+
+2003-11-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* grab_globals.inc.php (1.2, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3,
+	  mrbs-1-2-pre2): Added the setting of $HTTP_HOST.
+
+2003-11-14  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* session_php.inc (1.2): - (printLoginForm): make session_php.inc
+	  working with error level E_ALL.
+
+2003-11-11  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* lang.cz (1.5, mrbs-1-2-pre2), lang.da (1.2, mrbs-1-2-pre2),
+	  lang.de (1.13, mrbs-1-2-pre2), lang.es (1.15, mrbs-1-2-pre2),
+	  lang.fi (1.5, mrbs-1-2-pre2), lang.fr (1.15), lang.it (1.8,
+	  mrbs-1-2-pre2), lang.ja (1.12, mrbs-1-2-pre2), lang.nl (1.13,
+	  mrbs-1-2-pre2), lang.no (1.10, mrbs-1-2-pre2), lang.pt (1.2,
+	  mrbs-1-2-pre2), lang.sv (1.13, mrbs-1-2-pre2), lang.zh-tw (1.12,
+	  mrbs-1-2-pre2): Added messages for session handling.
+
+2003-11-09  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* auth_config.inc (1.1), config.inc.php (1.7), day.php (1.18),
+	  functions.inc (1.19), lang.en (1.13, mrbs-1-2-pre2),
+	  mrbs_auth.inc (1.7), session_cookie.inc (1.1), session_php.inc
+	  (1.1): Added support for session handling.
+
+2003-11-09  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
+
+	* language.inc (1.4): Display an error message when the iconv
+	  function is not defined.  This message explains what to do to fix
+	  the problem on the PHP server.  It will help administrators who
+	  are likely to encounter the problem the first time they install
+	  mrbs.
+
+2003-11-01  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* day.php (1.17), month.php (1.14), week.php (1.21): + Time slots
+	  with an entry now display bubbles when mouse over, showing
+	  complete description in day view and week view, and either the
+	  short name or start-stop time in month view in accordance with
+	  $_MRBS_monthly_view_brief_description value in config.inc.php.
+
+2003-11-01  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* week.php (1.20): Fixing typos
+
+2003-10-31  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.6): Added warning to avoid specify calendar
+	  settings that displays blocks overlaping the next day, since it
+	  is not properly handled.
+
+2003-10-31  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* language.inc (1.3): - Fixing a bug if we override local in
+	  config.inc.php. Variable name was called $override_locale in
+	  config file and $locale_override in language.inc.
+
+2003-10-31  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* week.php (1.19): - Fixing The Daylight Savings Time bug (thanks
+	  to Tony Fugere (tonyfugere at users.sourceforge.net)).
+
+2003-10-31  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* auth_pop3.inc (1.4): - getting auth_pop3 working even in
+	  error_reporting(ALL).
+
+2003-10-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* language.inc (1.2): - Changed getenv('HTTP_ACCEPT_LANGUAGE') to
+	  $HTTP_ACCEPT_LANGUAGE.  getenv() does not work in ISAPI mode, so
+	  getenv('HTTP_ACCEPT_LANGUAGE') is always NULL with ISAPI. Global
+	  variable seems more reliable.
+
+2003-10-10  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.5): + Allow to view weeks in the bottom
+	  (trailer.inc) as week numbers (ie. 42) instead of 'first day of
+	  the week' (13 Oct). Committing again since John previous commit
+	  erased my changes :-)
+
+2003-10-09  John Beranek <jberanek@users.sourceforge.net>
+
+	* admin.php (1.12), config.inc.php (1.4), day.php (1.16), del.php
+	  (1.10, mrbs-1-2-pre2), edit_area_room.php (1.10, mrbs-1-2-pre2),
+	  edit_entry.php (1.20), edit_entry_handler.php (1.13),
+	  functions.inc (1.18), help.php (1.11), language.inc (1.1),
+	  mincals.inc (1.9, mrbs-1-2-pre2), month.php (1.13), mrbs_auth.inc
+	  (1.6), mrbs_sql.inc (1.10), mysql.inc (1.4, mrbs-1-2-pre2),
+	  pgsql.inc (1.4), report.php (1.12, mrbs-1-2-pre2), search.php
+	  (1.10, mrbs-1-2-pre2), style.inc (1.8), trailer.inc (1.9,
+	  mrbs-1-2-pre2), view_entry.php (1.10), week.php (1.18):
+	  * Revamped localisation/internationalisation. MRBS can now be
+	  called  fulled Unicode, as long as the config variable
+	  $unicode_encoding is	set to 1. If this is set, then MRBS serves
+	  all of it's pages in UTF-8  and stores everything in the database
+	  in UTF-8. This means that  all languages work together. Other
+	  things fixed:
+
+	   - Automatic language determination made much better, works for
+	    Windows and Unix servers now, by using different code for each.
+
+	   - There are new configuration variables in config.inc.php now,
+	  to
+	    configure language/locale settings with much more flexibility.
+
+	    Tested on a Windows+Apache machine, and on a Linux+Apache
+	  machine
+
+	    NOTE FOR DEVELOPERS:
+
+	    Whenever you want to access the translations you MUST now use:
+	      get_vocab('token')
+	    instead of
+	      $vocab[token]
+
+	    Additionally, if you use a call to date() or strftime() that
+	  could
+	    return text, as opposed to just numbers, you MUST use
+	  utf8_date()
+	    and utf8_strftime() instead.
+
+	    Note: Not filled out ChangeLog, because I don't know how (or
+	  if)
+		  Thierry does it automatically, and I wasn't gonna do it
+		  by hand with all the files I changed :)
+
+2003-10-03  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* config.inc.php (1.3), trailer.inc (1.8): + Allow to view weeks in
+	  the bottom (trailer.inc) as week numbers (ie. 42) instead of
+	  'first day of the week' (13 Oct) (Per Wermelin - SKIOLD S�by A/S"
+	  <ela@skiold.dk>).
+
+2003-09-25  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_pop3.inc (1.3):
+	  Bug fix for POP3 authentication scheme provided by Jean-Baptiste
+	  Lehucher.
+
+2003-09-23  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* help.php (1.10, mrbs-1-2-pre1): Doc fixes.
+
+2003-09-23  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* add.php (1.4, mrbs-1-2-pre2, mrbs-1-2-pre1), admin.php (1.11,
+	  mrbs-1-2-pre1), auth_ext.inc (1.5, mrbs-1-2-pre1), auth_imap.inc
+	  (1.4, mrbs-1-2-pre1), auth_nis.inc (1.4, mrbs-1-2-pre1),
+	  auth_pop3.inc (1.2, mrbs-1-2-pre1), config.inc.php (1.2,
+	  mrbs-1-2-pre1), day.php (1.15, mrbs-1-2-pre1), del.php (1.9,
+	  mrbs-1-2-pre1), del_entry.php (1.4, mrbs-1-2-pre2,
+	  mrbs-1-2-pre1), edit_area_room.php (1.9, mrbs-1-2-pre1),
+	  edit_entry.php (1.19, mrbs-1-2-pre1), edit_entry_handler.php
+	  (1.12, mrbs-1-2-pre1), help.php (1.9), lang.fi (1.4,
+	  mrbs-1-2-pre1), month.php (1.12, mrbs-1-2-pre1), report.php
+	  (1.11, mrbs-1-2-pre1), search.php (1.9, mrbs-1-2-pre1),
+	  view_entry.php (1.9, mrbs-1-2-pre1), week.php (1.17,
+	  mrbs-1-2-pre1): Finally we changed config.inc to config.inc.php
+	  for "security" reasons.
+
+2003-09-11  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.fi (1.3, Root-of-mrbs_MDB): Updating finish lang file (Tom
+	  Ingberg (tom.ingberg@edu.vantaa.fi)).
+
+2003-08-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry.php (1.18, Root-of-mrbs_MDB): - Fixed bug #748934, do
+	  not allow booking descriptions with only spaces (cannot click the
+	  slot).
+
+2003-05-29  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry.php (1.17): - Fixed bug : Always displays "edit entry"
+	  instead of "Add Entry" even when adding an entry. (<Ian
+	  Duncan>i.duncan@uq.edu.au)
+
+2003-05-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mrbs_sql.inc (1.9, mrbs-1-2-pre1, Root-of-mrbs_MDB): - Changed
+	  mrbs_sql.inc so that when a 5th week "Monthly repeat, same day
+	  of the week" is selected, subsequent repeated meetings switch to
+	  the 5th week when possible after falling back to the 4th week.
+
+2003-05-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mrbs_sql.inc (1.8): - fixed bug : monthly repeat, corresponding
+	  day not properly booked
+
+2003-05-11  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mrbs_sql.inc (1.7): - Fixed bug : when selecting a "Monthly
+	  repeat, same day of the week" repeat type in the 5th week,
+	  repeated meetings are not properly scheduled.  Now if no 5th week
+	  exist, the 4th week is selected instead for all subsequen
+
+2003-05-08  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* report.php (1.10, Root-of-mrbs_MDB): - Fixed bug : when you press
+	  on print preview in report.php page, all but the submission form
+	  is visible but not the actual report
+	  (<sQuare>mrbs@synapse.plus.com).
+
+2003-04-25  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mincals.inc (1.8, mrbs-1-2-pre1, Root-of-mrbs_MDB): + in the
+	  minicalendar week view, the full week is highlighted instead of
+	  the first day of the week (<sQuare>mrbs@synapse.plus.com).
+
+2003-04-25  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mincals.inc (1.7): - converts all 'tabs' to 'space' (the file
+	  contains a mix of both)
+
+2003-04-18  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* week.php (1.16, Root-of-mrbs_MDB): - Corrected bug : in week
+	  view, allow non 'internet explorer' browsers to see links to the
+	  corresponding days in column titles
+	  (Johan.Schonning@uab.ericsson.se).
+
+2003-04-17  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* month.php (1.11, Root-of-mrbs_MDB): + Entries in monthly view can
+	  be shown as start/end slot or brief description
+
+2003-04-15  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* week.php (1.15): + replaced the column titles in the week view to
+	  be links to the corresponding days. This makes it easier for
+	  users to access the day view from the week view without having to
+	  scroll down to the bottom of the page.
+	  (<sQuare>mrbs@synapse.plus.com)
+
+2003-04-09  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry_handler.php (1.11, Root-of-mrbs_MDB): - Fixed bug : if
+	  AM/PM hour format is used, bookings between 12:00 AM and 12:59 AM
+	  are stored with a wrong start date.
+
+2003-03-31  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.it (1.7, mrbs-1-2-pre1, Root-of-mrbs_MDB): - bug fix :
+	  italian vocab with character not properly escaped prevents
+	  deleting entries and/or prevent javascript popup to works (Pietro
+	  donatini)
+
+2003-03-28  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_imap.inc (1.3), auth_ldap.inc (1.4, mrbs-1-2-pre1),
+	  auth_nis.inc (1.3), auth_nw.inc (1.3, mrbs-1-2-pre1),
+	  mrbs_auth.inc (1.5, mrbs-1-2-pre1) (utags: Root-of-mrbs_MDB):
+	  * Fixed bug in escaping of username and password for	all
+	  authentication schemes that use HTTP authentication.
+
+2003-03-28  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry_handler.php (1.10): - Fixed bug : if AM/PM hour format
+	  is used, bookings between 12:00 PM and 12:59 PM are stored with a
+	  wrong start date.
+
+2003-03-11  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* help.php (1.8), lang.da (1.1, mrbs-1-2-pre1) (utags:
+	  Root-of-mrbs_MDB): + Added translation:     Danish (Claes Bolvig
+	  Pedersen (cp@dhi.dk)) - Changed mrbs_version in help.php to "MRBS
+	  1.1"
+
+2003-03-05  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* add.php (1.3, Root-of-mrbs_MDB), admin.php (1.10,
+	  Root-of-mrbs_MDB), day.php (1.14, Root-of-mrbs_MDB), del.php
+	  (1.8, Root-of-mrbs_MDB), del_entry.php (1.3, Root-of-mrbs_MDB),
+	  edit_area_room.php (1.8, Root-of-mrbs_MDB), edit_entry.php
+	  (1.16), edit_entry_handler.php (1.9), help.php (1.7), month.php
+	  (1.10), grab_globals.inc.php (1.1, mrbs-1-2-pre1,
+	  Root-of-mrbs_MDB), report.php (1.9), search.php (1.8,
+	  Root-of-mrbs_MDB), view_entry.php (1.8, Root-of-mrbs_MDB),
+	  week.php (1.14): + Make MRBS compliant to the 'register_globals =
+	  off' directive
+
+2003-03-05  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.pt (1.1, mrbs-1-2-pre1, Root-of-mrbs_MDB): + added
+	  translation:	   Portuguese (Lopo Pizarro)
+
+2003-02-09  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry.php (1.15), edit_entry_handler.php (1.8): - minor bug
+	  fixes ("Undefined variable" notices...)
+
+2003-01-30  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.fi (1.2): - Parse error fix
+
+2003-01-30  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.fi (1.1): + add translation:	Finnish, Vesa Palmu
+
+2003-01-29  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.no (1.9, mrbs-1-2-pre1, Root-of-mrbs_MDB): - minor
+	  translation update
+
+2003-01-29  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions.inc (1.17, mrbs-1-2-pre1, Root-of-mrbs_MDB), lang.fr
+	  (1.14, mrbs-1-2-pre1, Root-of-mrbs_MDB), lang.no (1.8): - Minor
+	  translations updates in lang.fr, lang.no (Tobias), 1 vocab added
+	  in functions.inc
+
+2003-01-29  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions.inc (1.16): - Bug fix : if "select" is choosen in
+	  config.inc to show areas/rooms as a drop-down select box, an sql
+	  error occurs when the "change" button is clicked (mostly used for
+	  non javascript users).
+
+2003-01-15  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mrbs.css (1.3, mrbs-1-2-pre2, mrbs-1-2-pre1, Root-of-mrbs_MDB): -
+	  Changed the tiny size of numbers in calendar to a larger one.
+	  There is more room to do this since week day names are displayed
+	  with 3 characters now instead of one.
+
+2003-01-15  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* admin.php (1.9), lang.cz (1.4, mrbs-1-2-pre1, Root-of-mrbs_MDB),
+	  lang.de (1.12, mrbs-1-2-pre1, Root-of-mrbs_MDB), lang.en (1.12,
+	  mrbs-1-2-pre1, Root-of-mrbs_MDB), lang.es (1.14, mrbs-1-2-pre1,
+	  Root-of-mrbs_MDB), lang.fr (1.13), lang.it (1.6), lang.ja (1.11,
+	  mrbs-1-2-pre1, Root-of-mrbs_MDB), lang.nl (1.12, mrbs-1-2-pre1,
+	  Root-of-mrbs_MDB), lang.no (1.7), lang.sv (1.12, mrbs-1-2-pre1,
+	  Root-of-mrbs_MDB), lang.zh-tw (1.11, mrbs-1-2-pre1,
+	  Root-of-mrbs_MDB): - Fixed an error in all lang files,
+	  $vocab["backadmin"] was defined twice since a recent update.	-
+	  Added one (hopefully last) missing $vocab (administration).
+
+2003-01-14  John Beranek <jberanek@users.sourceforge.net>
+
+	* mincals.inc (1.6, mrbs-1-1):
+	  * Fixed small problem in Daniel's recent minicals change.
+
+2003-01-14  John Beranek <jberanek@users.sourceforge.net>
+
+	* day.php (1.13), del.php (1.7), edit_entry.php (1.14),
+	  edit_entry_handler.php (1.7), functions.inc (1.15), month.php
+	  (1.9), report.php (1.8), search.php (1.7), view_entry.php (1.7),
+	  week.php (1.13) (utags: mrbs-1-1):
+	  * Added configuration option ($twentyfourhour_format) to allow
+	  time	 formats to be changed to 12 hour format.
+
+	  * Modified ChangeLog in anticipation of 1.1 release.
+
+2003-01-14  Daniel <nambit@users.sourceforge.net>
+
+	* lang.cz (1.3), lang.de (1.11), lang.en (1.11), lang.es (1.13),
+	  lang.fr (1.12), lang.it (1.5), lang.ja (1.10), lang.nl (1.11),
+	  lang.no (1.6), lang.sv (1.11), lang.zh-tw (1.10) (utags:
+	  mrbs-1-1): make all language files consistant
+
+2003-01-13  Daniel <nambit@users.sourceforge.net>
+
+	* day.php (1.12), mincals.inc (1.5), month.php (1.8), week.php
+	  (1.12): Change minicals so they point to week when on week view
+	  and month when on month view
+
+2003-01-13  John Beranek <jberanek@users.sourceforge.net>
+
+	* edit_entry.php (1.13):
+	  - Changed occurences of "<?=" to "<?php echo" which means we
+	  still  use the long tag form everywhere.
+
+2003-01-13  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry.php (1.12): Added new $vocab in order to remove the
+	  last plain english strings in the code.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* functions.inc (1.14): Added new $vocab in order to remove the
+	  last plain english strings in the code.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* site_faq_fr.html (1.2, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3,
+	  mrbs-1-2-pre2, mrbs-1-2-pre1, Root-of-mrbs_MDB, mrbs-1-1): Minor
+	  translation corrections
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry.php (1.11): Changed :
+
+	  alert ( "<?php=    which  output a parse error "unneeded =" to
+	  alert ( "<?php    but the message is not displayed in the window
+
+	  so I come back to my original :
+
+	  alert ( "<?=	     which seems to work.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* view_entry.php (1.6): Added new $vocab in order to remove the
+	  last plain english strings in the code.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* mysql.inc (1.3), pgsql.inc (1.3) (utags: Root-of-mrbs_MDB,
+	  mrbs-1-1, mrbs-1-2-pre1): Added new $vocab in order to remove the
+	  last plain english strings in the code.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* site_faq_fr.html (1.1): Added site_faq_fr.html (french
+	  translation of site_faq.html)
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* help.php (1.6, mrbs-1-1): Added new $vocab in order to remove the
+	  last plain english strings in the code.  Changed Faq file include
+	  to use language selection (in config.inc)
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry_handler.php (1.6): Added new $vocab in order to remove
+	  the last plain english strings in the code.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_entry.php (1.10): Added new $vocab in order to remove the
+	  last plain english strings in the code.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* edit_area_room.php (1.7, mrbs-1-1): Added new $vocab in order to
+	  remove the last plain english strings in the code.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* del.php (1.6): Added new $vocab in order to remove the last plain
+	  english strings in the code.
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.fr (1.11): Added new $vocab in order to remove the last
+	  plain english strings in the code.  Minor language corrections
+
+2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
+
+	* lang.en (1.10): Added new $vocab in order to remove the last
+	  plain english strings in the code.
+
+2003-01-10  Daniel <nambit@users.sourceforge.net>
+
+	* search.php (1.6): Remove warnings about headers in search.php
+
+2003-01-09  Daniel <nambit@users.sourceforge.net>
+
+	* trailer.inc (1.7, mrbs-1-2-pre1, Root-of-mrbs_MDB, mrbs-1-1):
+	  Change trailer.inc to make print preview more likely to work on
+	  windows and non-apache servers
+
+2003-01-09  Daniel <nambit@users.sourceforge.net>
+
+	* lang.es (1.12): Updated spanish translation
+
+2003-01-09  Daniel <nambit@users.sourceforge.net>
+
+	* auth_pop3.inc (1.1, Root-of-mrbs_MDB, mrbs-1-1): New
+	  authentication provider which uses a POP3 mail server.
+
+	  Can authenticate using APOP or standard USER/PASS
+
+2002-11-28  John Beranek <jberanek@users.sourceforge.net>
+
+	* admin.php (1.8, mrbs-1-1), edit_entry.php (1.9): * Fix for edit
+	  entry page. We now determine the area id  of the room the meeting
+	  we're editting is in before  getting a list of the rooms in that
+	  area. This solves  a number of errors that occur when
+	  editting/creating  bookings. [Note: this is the bug that has been
+	  reported  by multiple people on the mailing list.]
+
+2002-10-14  John Beranek <jberanek@users.sourceforge.net>
+
+	* admin.php (1.7), del.php (1.5), edit_area_room.php (1.6),
+	  index.php (1.4, mrbs-1-2-pre2, mrbs-1-2-pre1, Root-of-mrbs_MDB,
+	  mrbs-1-1), style.inc (1.7, mrbs-1-2-pre1, Root-of-mrbs_MDB,
+	  mrbs-1-1):	Fixes submitted/suggested by Jean-Fran�ois
+	  Larvoire:
+
+	     - Added closing ?> to index.php
+	     - Added "global $refresh_rate;" to style.inc
+	     - Fixed all occurences (hopefully) of $vocab[] indices
+	       written without surrounding quotes.
+
+2002-10-08  John Beranek <jberanek@users.sourceforge.net>
+
+	* admin.php (1.6), auth_ext.inc (1.4, Root-of-mrbs_MDB, mrbs-1-1),
+	  edit_area_room.php (1.5), edit_entry.php (1.8),
+	  escapeshellarg.inc (1.1, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3,
+	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-pre-MDB-merge,
+	  mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp, mrbs-1-2-pre3,
+	  mrbs-1-2-pre2, mrbs-1-2-pre1, Root-of-mrbs_MDB, mrbs-1-1),
+	  functions.inc (1.13), help.php (1.5), index.php (1.3), lang.cz
+	  (1.2), lang.de (1.10), lang.en (1.9), lang.es (1.11), lang.fr
+	  (1.10), lang.it (1.4), lang.ja (1.9), lang.nl (1.10), lang.no
+	  (1.5), lang.sv (1.10), lang.zh-tw (1.9), mincals.inc (1.4),
+	  mrbs_auth.inc (1.4, mrbs-1-1), report.php (1.7), search.php
+	  (1.5), style.inc (1.6), view_entry.php (1.5):
+	     - Changed all uses of <? to <?php.
+
+	     - Merged change from John Beranek for an Advanced search
+	  function,
+	       requires 3 more translation tokens, which have been added to
+	       each language file, "search_button" should be OK, as I took
+	       the text from each language's "search" token.
+
+	     - Fixed 2 problems in edit_entry.php as submitted on the
+	  mailing list.
+
+	     - Added small enchancement to smb_auth.c, if you pass a
+	  username
+	       as group/user, it will change the NT group that is used for
+	       authentication.
+
+	     - Improved shell escaping in auth_ext.inc. It now uses
+	       escapeshellarg() instead of escapeshellcmd(). If your PHP
+	       version is less than 4.0.3, then it includes
+	  escapeshellarg.inc
+	       which is a local implementation of that function.
+
+	     - Added updated Frech translation, as provided by Thierry
+	  Wehr.
+
+	     - Tided all language files again, they all have the same
+	  format
+	       and number of lines now, and are all missing at least 2
+	  translations
+	       because of the new advanced search functionality.
+
+	     - Fixed a number of bugs to make the Taiwanese translation
+	  work.
+	       The code to include language files based on
+	  HTTP_ACCEPT_LANGUAGE
+	       has been improved, which ensures lang.zh-tw is included.
+	       Additionally, mincals.inc not longer does a substr() on the
+	       abbreviated weekday names, as this breaks terribly for any
+	       multibyte encoding, as it was only taking the first byte
+	       of a multibyte encoding. This has the impact that you now
+	       get Mon,Tue,Wed etc instead of M,T,W (using glibc's en_GB
+	       locale).
+
+	     - print_header() now outputs a DOCTYPE identifier as well as
+	       sending Pragma: no-cache and an Expires: header in the
+	       past. This should help ensure the calendar pages don't get
+	  cached.
+
+2002-05-30  Daniel <nambit@users.sourceforge.net>
+
+	* edit_entry.php (1.7): extra javascript validation around n-weekly
+	  bookings
+
+	  https://sourceforge.net/tracker/index.php?func=detail&aid=482145&group_id=5113&atid=105113
+
+2002-05-30  Daniel <nambit@users.sourceforge.net>
+
+	* day.php (1.11), week.php (1.11): add area param to some urls
+
+	  https://sourceforge.net/tracker/index.php?func=detail&aid=559655&group_id=5113&atid=105113
+
+2002-05-25  Daniel <nambit@users.sourceforge.net>
+
+	* lang.no (1.4): update lang.no translation (by Tobias Johan
+	  Karlsen)
+
+2002-05-23  Daniel <nambit@users.sourceforge.net>
+
+	* lang.cz (1.1): add Czech translation
+
+2002-05-18  Daniel <nambit@users.sourceforge.net>
+
+	* admin.php (1.5), report.php (1.6), trailer.inc (1.6): quote some
+	  array indexes to cut down on the number of warnings
+
+2002-05-18  Daniel <nambit@users.sourceforge.net>
+
+	* help.php (1.4): stop using posix_uname and use php_uname instead.
+	  should make the help screen work on windows
+
+2002-05-18  Daniel <nambit@users.sourceforge.net>
+
+	* day.php (1.10), functions.inc (1.12), week.php (1.10): Fixes a
+	  problem where $resolution is an odd amount. details here:
+
+	  http://sourceforge.net/tracker/index.php?func=detail&aid=493079&group_id=5113&atid=105113
+
+2002-05-18  Daniel <nambit@users.sourceforge.net>
+
+	* week.php (1.9): some int casts to fix a bug from sourceforge. see
+	  here for details:
+
+	  http://sourceforge.net/tracker/index.php?func=detail&aid=522990&group_id=5113&atid=105113
+
+2002-05-18  Daniel <nambit@users.sourceforge.net>
+
+	* functions.inc (1.11): add warning about PHP3
+
+2002-05-18  Daniel <nambit@users.sourceforge.net>
+
+	* auth_nis.inc (1.2, mrbs-1-1): correct typo
+
+2002-05-18  Daniel <nambit@users.sourceforge.net>
+
+	* lang.de (1.9), lang.es (1.10), lang.fr (1.9), lang.it (1.3),
+	  lang.ja (1.8), lang.nl (1.9), lang.no (1.3), lang.sv (1.9),
+	  lang.zh-tw (1.8): renormalize all of the language files
+
+2002-05-14  Daniel <nambit@users.sourceforge.net>
+
+	* month.php (1.7), week.php (1.8): fix bug introduced by drop-down
+	  area selection boxes on week and month views. the page header now
+	  shows the area and room name again
+
+2002-05-13  Daniel <nambit@users.sourceforge.net>
+
+	* day.php (1.9), functions.inc (1.10), month.php (1.6), week.php
+	  (1.7): add dropdown room selectors to week and month views
+
+2002-05-11  Daniel <nambit@users.sourceforge.net>
+
+	* day.php (1.8): add $area to variables passed to edit_entry.php
+
+2002-05-11  Daniel <nambit@users.sourceforge.net>
+
+	* edit_entry.php (1.6), edit_entry_handler.php (1.5), lang.en
+	  (1.8): allows multiple rooms to be booked at the same time
+
+2002-05-09  Daniel <nambit@users.sourceforge.net>
+
+	* admin.php (1.4), day.php (1.7), del.php (1.4), edit_area_room.php
+	  (1.4), edit_entry.php (1.5), edit_entry_handler.php (1.4),
+	  functions.inc (1.9), help.php (1.3), lang.de (1.8), lang.en
+	  (1.7), lang.es (1.9), lang.fr (1.8), lang.it (1.2), lang.ja
+	  (1.7), lang.nl (1.8), lang.no (1.2), lang.sv (1.8), lang.zh-tw
+	  (1.7), month.php (1.5), mrbs_auth.inc (1.3), mrbs_sql.inc (1.6,
+	  mrbs-1-1), report.php (1.5), search.php (1.4), style.inc (1.5),
+	  trailer.inc (1.5), view_entry.php (1.4), week.php (1.6):
+	  Change every $lang to $vocab to stop conflicts with other
+	  software
+	      that's used $lang (lots of people have seen "N" appear
+	  everywhere
+	      $lang variables should be)
+
+2002-05-08  Daniel <nambit@users.sourceforge.net>
+
+	* lang.fr (1.7): updated lang.fr
+
+2002-05-08  Daniel <nambit@users.sourceforge.net>
+
+	* day.php (1.6), functions.inc (1.8): allow areas to be shown as a
+	  drop-down select box as well as the default html display. option
+	  in config.inc to control this behaviour
+
+2002-03-07  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_ext.inc (1.3), auth_imap.inc (1.2, mrbs-1-1), auth_nis.inc
+	  (1.1):
+	  * Added comments to the top of all the authentication schemes
+	  (that I understand) that describes how to change config.inc to
+	  use  them.  This should help new installers.
+
+	  * Added auth_nis.inc, as provided by Jeff Hoover.  This is an
+	  authentication scheme that uses NIS.
+
+2002-02-07  John Beranek <jberanek@users.sourceforge.net>
+
+	* admin.php (1.3), auth_imap.inc (1.1), del.php (1.3),
+	  edit_area_room.php (1.3), functions.inc (1.7), lang.de (1.7),
+	  lang.en (1.6), lang.es (1.8), lang.fr (1.6), lang.it (1.1),
+	  lang.ja (1.6), lang.nl (1.7), lang.no (1.1), lang.sv (1.7),
+	  lang.zh-tw (1.6), report.php (1.4): * Added instructions into
+	  UPGRADE readme for upgrade2.[my|pg].ql scripts  that are required
+	  to upgrade from an older MRBS installation.
+
+	  * Added new language tokens, using patch supplied by Michael
+	  Redinger.
+
+	  * Added new or updated translations for:     Italy (Gianni)
+	  Netherlands  (Marc ter Horst)     Norway (Rune Johansen)
+	  Sweden (Hakan Nilsson)     German (Michael Redinger)
+
+	  * Added auth_imap.inc, an authentication scheme that uses IMAP,
+	  this includes a few more (commented out) lines in config.inc
+
+	  * Changed datatype of 'rep_num_weeks' in 'mrbs_repeat' table for
+	  PostgreSQL installs.	We now use smallint instead of tinyint,  as
+	  tinyint isn't available.
+
+	  * Changed config.inc to use getenv('HTTP_ACCEPT_LANGUAGE')
+	  instead  of $HTTP_ACCEPT_LANGUAGE...much tidier.
+
+2001-07-02  John Beranek <jberanek@users.sourceforge.net>
+
+	* mrbs_sql.inc (1.5, mrbs-1-0-final):
+	   * Removed a little debug code that I left in accidentally.
+
+2001-07-02  John Beranek <jberanek@users.sourceforge.net>
+
+	* style.inc (1.4, mrbs-1-0-final):
+	   * Missed a bit in previous checkin, because I have multiple MRBS
+	  trees,
+	      ahem.
+
+2001-07-02  John Beranek <jberanek@users.sourceforge.net>
+
+	* auth_ldap.inc (1.3, mrbs-1-1, mrbs-1-0-final), day.php (1.5,
+	  mrbs-1-0-final), edit_entry.php (1.4, mrbs-1-0-final),
+	  edit_entry_handler.php (1.3, mrbs-1-0-final), functions.inc (1.6,
+	  mrbs-1-0-final), lang.de (1.6, mrbs-1-0-final), lang.en (1.5,
+	  mrbs-1-0-final), lang.es (1.7, mrbs-1-0-final), lang.fr (1.5,
+	  mrbs-1-0-final), lang.ja (1.5, mrbs-1-0-final), lang.nl (1.6,
+	  mrbs-1-0-final), lang.sv (1.6, mrbs-1-0-final), lang.zh-tw (1.5,
+	  mrbs-1-0-final), mrbs_sql.inc (1.4), style.inc (1.3),
+	  view_entry.php (1.3, mrbs-1-0-final), week.php (1.5,
+	  mrbs-1-0-final):  * Incorporated diff from Scott Leonard that
+	  allows you to configure a refresh
+	      time for roombooker web pages.  Set config variable
+	  $refresh_rate to the
+	      number of seconds to refresh after, or set to 0 to disable.
+
+	   * Implemented "n-weekly" repeat type. Not sure I like the way
+	  it's phrased in
+	      the lang files, but the code works fine.	You can now a
+	  meeting that is
+	      repeated every 'n' weeks. e.g. every 5th Monday.	This
+	  required a database
+	      change, which I've made available in upgrade2.my.sql and
+	  upgrade2.pg.sql
+
+	   * Tidied lang files, and ensured every file has all the required
+	  tokens.
+	      'wc -l lang.*' now shows all the files as having the same
+	  line count.
+	      Quite a few languages now have English bits in them though.
+
+	   * Incorporated diffs from Tim Bell that allow you to configure a
+	  filter
+	      for LDAP authentication.
+
+	   * Incorporated diffs from Tim Bell that solve problems with
+	  bookings made
+	      for times that have smaller granularity that the configured
+	  booking
+	      resolution.
+
+2001-03-26  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.es (1.6), lang.sv (1.5):
+	   * Copied "rep_type_5" language token into Swedish and Spanish
+	  language
+	      files from English file.	Swedish and Spanish users were not
+	  able
+	      to use "monthly, corresponding day" repeats without the token
+	  being
+	      present.
+
+2001-03-18  Michael Redinger <mred@users.sourceforge.net>
+
+	* lang.de (1.5), lang.en (1.4), lang.es (1.5), lang.fr (1.4),
+	  lang.ja (1.4), lang.nl (1.5), lang.sv (1.4), lang.zh-tw (1.4),
+	  trailer.inc (1.4, mrbs-1-0-final):
+	  Added language string for print preview; added it to all lang
+	  files, but only german was translated - the rest still has the
+	  english string.
+
+2001-03-18  Michael Redinger <mred@users.sourceforge.net>
+
+	* day.php (1.4), functions.inc (1.5), month.php (1.4,
+	  mrbs-1-0-final), trailer.inc (1.3), week.php (1.4):
+	  red: Added print preview for day, week and month.
+
+2001-03-07  John Beranek <jberanek@users.sourceforge.net>
+
+	* lang.de (1.4), lang.es (1.4):
+	   * Checked in updates to lang.es (received from Pablo Gomez) and
+	  lang.de
+	      (received by Bernd Oeggl). 2nd attempt, actually the check
+	  the files
+	      in this time.
+
+2001-03-07  Daniel <nambit@users.sourceforge.net>
+
+	* lang.nl (1.4): Update lang.nl
+
+2001-02-26  John Beranek <jberanek@users.sourceforge.net>
+
+	* functions.inc (1.4), lang.de (1.3), lang.en (1.3), lang.es (1.3),
+	  lang.fr (1.3), lang.ja (1.3), lang.nl (1.3), lang.sv (1.3),
+	  lang.zh-tw (1.3) (utags: mrbs-1-0-pre1):
+	  * Internationalised functions.inc. "Help", "Admin" and "Search:"
+	  are now lang	  strings. Also, fixed an error in lang.fr,
+	  $lang["mrbs"] was defined twice.
+
+2001-02-26  John Beranek <jberanek@users.sourceforge.net>
+
+	* day.php (1.3, mrbs-1-0-pre1), edit_entry.php (1.3,
+	  mrbs-1-0-pre1), functions.inc (1.3), mincals.inc (1.3,
+	  mrbs-1-0-final, mrbs-1-0-pre1), month.php (1.3, mrbs-1-0-pre1),
+	  report.php (1.3, mrbs-1-0-final, mrbs-1-0-pre1), week.php (1.3,
+	  mrbs-1-0-pre1):
+	   * Added double quotes around all uses of color and class
+	  attributes, as HTML
+	      dictates.
+
+2001-02-26  L J Bayuk <lbayuk@users.sourceforge.net>
+
+	* mrbs_sql.inc (1.3, mrbs-1-0-pre1): On conflict, show start time
+	  and links to day/week/month views (based on patch from M.
+	  Redinger).
+
+2001-02-26  L J Bayuk <lbayuk@users.sourceforge.net>
+
+	* search.php (1.3, mrbs-1-0-final, mrbs-1-0-pre1): Link each search
+	  result start time to a day view of that entry (bernd, beranek).
+
+2001-02-25  L J Bayuk <lbayuk@users.sourceforge.net>
+
+	* .htaccess (1.2, mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs_MDB-latest, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2, mrbs-1-2-pre1,
+	  Root-of-mrbs_MDB, mrbs-1-1, mrbs-1-0-final, mrbs-1-0-pre1),
+	  add.php (1.2, mrbs-1-1, mrbs-1-0-final, mrbs-1-0-pre1), admin.php
+	  (1.2, mrbs-1-0-final, mrbs-1-0-pre1), auth_ext.inc (1.2,
+	  mrbs-1-0-final, mrbs-1-0-pre1), auth_ldap.inc (1.2,
+	  mrbs-1-0-pre1), auth_nw.inc (1.2, mrbs-1-1, mrbs-1-0-final,
+	  mrbs-1-0-pre1), day.php (1.2), del.php (1.2, mrbs-1-0-final,
+	  mrbs-1-0-pre1), del_entry.php (1.2, mrbs-1-1, mrbs-1-0-final,
+	  mrbs-1-0-pre1), edit_area_room.php (1.2, mrbs-1-0-final,
+	  mrbs-1-0-pre1), edit_entry.php (1.2), edit_entry_handler.php
+	  (1.2, mrbs-1-0-pre1), functions.inc (1.2), help.php (1.2,
+	  mrbs-1-0-final, mrbs-1-0-pre1), index.php (1.2, mrbs-1-0-final,
+	  mrbs-1-0-pre1), lang.de (1.2), lang.en (1.2), lang.es (1.2),
+	  lang.fr (1.2), lang.ja (1.2), lang.nl (1.2), lang.sv (1.2),
+	  lang.zh-tw (1.2), mincals.inc (1.2), month.php (1.2), mrbs.css
+	  (1.2, mrbs-1-1, mrbs-1-0-final, mrbs-1-0-pre1), mrbs_auth.inc
+	  (1.2, mrbs-1-0-final, mrbs-1-0-pre1), mrbs_sql.inc (1.2),
+	  mysql.inc (1.2, mrbs-1-0-final, mrbs-1-0-pre1), new.gif (1.2,
+	  mrbs-1_2_5, mrbs-1_2_4, mrbs-1_2_3, mrbs-1_2_2,
+	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  mrbs-pre-MDB-merge, mrbs_MDB-latest, mrbs-1_2_1, mrbs-1_2,
+	  mrbs-1_2-branch_bp, mrbs-1-2-pre3, mrbs-1-2-pre2, mrbs-1-2-pre1,
+	  Root-of-mrbs_MDB, mrbs-1-1, mrbs-1-0-final, mrbs-1-0-pre1),
+	  pgsql.inc (1.2, mrbs-1-0-final, mrbs-1-0-pre1), report.php (1.2),
+	  search.php (1.2), site_faq.html (1.2, mrbs-1_2_5, mrbs-1_2_4,
+	  mrbs-1_2_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  mrbs-pre-MDB-merge, mrbs-1_2_1, mrbs-1_2, mrbs-1_2-branch_bp,
+	  mrbs-1-2-pre3, mrbs-1-2-pre2, mrbs-1-2-pre1, Root-of-mrbs_MDB,
+	  mrbs-1-1, mrbs-1-0-final, mrbs-1-0-pre1), style.inc (1.2,
+	  mrbs-1-0-pre1), trailer.inc (1.2, mrbs-1-0-pre1), view_entry.php
+	  (1.2, mrbs-1-0-pre1), week.php (1.2) (utags: mrbs-1-0-pre2):
+	  Merge branch mrbs-0-9-1xp into trunk
+

