### Eclipse Workspace Patch 1.0
#P contrib
Index: plugins/blocks/mrbs/web/functions.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/functions.php,v
retrieving revision 1.4
diff -u -r1.4 functions.php
--- plugins/blocks/mrbs/web/functions.php	1 Aug 2008 04:02:11 -0000	1.4
+++ plugins/blocks/mrbs/web/functions.php	2 Aug 2008 04:19:52 -0000
@@ -1,6 +1,6 @@
 <?php
 
-# $Id: functions.php,v 1.4 2008/08/01 04:02:11 arborrow Exp $
+# $Id: functions.php,v 1.34.2.5 2007/02/13 12:53:28 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 # 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
@@ -44,12 +44,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.php";
 ?>
  <TITLE><?php echo get_string('mrbs','block_mrbs') ?></TITLE>
- <SCRIPT LANGUAGE="JavaScript">
+    <SCRIPT LANGUAGE="JavaScript">
 
 <!-- Begin
 
@@ -134,9 +134,9 @@
 }
 
   //  End -->
-  </SCRIPT>
- </HEAD>
- <BODY BGCOLOR="#ffffed" TEXT=black LINK="#5B69A6" VLINK="#5B69A6" ALINK=red>
+    </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 +146,59 @@
                echo "[Warning: ".$locale_warning."]";
    ?>
 
-   <TABLE WIDTH="100%">
-    <TR>
-      <TD BGCOLOR="#5B69A6">
-       <TABLE WIDTH="100%" BORDER=0>
-        <TR>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF">
+    <TABLE WIDTH="100%">
+      <TR>
+        <TD BGCOLOR="#5B69A6">
+          <TABLE WIDTH="100%" BORDER=0>
+            <TR>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF">
           <FONT SIZE=4><B><a href='<?php echo $mrbs_company_url ?>'><?php echo $mrbs_company ?></a></B><BR>
            <A HREF="index.php"><?php echo get_string('mrbs','block_mrbs') ?></A>
-          </FONT>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF">
-          <FORM ACTION="day.php" METHOD=GET name="Form1">
-           <FONT SIZE=2>
+                </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>
+	            <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_string('goto','block_mrbs') ?>">
-           </FONT>
-          </FORM>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+                  </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_string('help') ?></A>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+              </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_string('admin') ?></A>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+              </TD>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
           <A HREF="report.php"><?php echo get_string('report') ?></A>
-         </TD>
-         <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
-          <FORM METHOD=GET ACTION="search.php">
+              </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_string('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       ?>"        >
+                  <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 +206,10 @@
    	PrintLogonBox();
    	}
 ?>
-        </TR>
-       </TABLE>
-      </TD>
-     </TR>
+            </TR>
+          </TABLE>
+        </TD>
+      </TR>
     </TABLE>
 <?php } ?>
 <?php
@@ -298,31 +300,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 NAME=\"${prefix}month\" onchange=\"ChangeOptionDays(this.form,'$prefix')\">\n";
+	echo "
+                  </SELECT>
+
+                  <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
@@ -388,11 +398,11 @@
         global $twentyfourhour_format;
         if ($twentyfourhour_format)
 	{
-  	        return "H:i";
+  	        return "%H:%M";
 	}
 	else
 	{
-		return "h:ia";
+		return "%I:%M%p";
 	}
 }
 
@@ -423,16 +433,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);
 	}
 }
 
@@ -460,7 +468,7 @@
 	global $typel;
 	echo "<table border=0><tr>\n";
 	$nct = 0;
-	for ($ct = "A"; $ct <= "J"; $ct++)
+	for ($ct = "A"; $ct <= "Z"; $ct++)
 	{
 		if (!empty($typel[$ct]))
 		{
@@ -595,4 +603,4 @@
 
 	return $modification;
 }
-?>
\ No newline at end of file
+?>
Index: plugins/blocks/mrbs/web/lang.en.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/lang.en.php,v
retrieving revision 1.4
diff -u -r1.4 lang.en.php
--- plugins/blocks/mrbs/web/lang.en.php	1 Aug 2008 04:02:10 -0000	1.4
+++ plugins/blocks/mrbs/web/lang.en.php	2 Aug 2008 04:19:52 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.en.php,v 1.4 2008/08/01 04:02:10 arborrow Exp $
+# $Id: lang.en.php,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
@@ -11,7 +11,7 @@
 # This file is PHP code. Treat it as such.
 
 # The charset to use in "Content-type" header
-$vocab["charset"]            = "UTF-8";
+$vocab["charset"]            = "utf-8";
 
 # Used in style.php
 $vocab["mrbs"]               = "Meeting Room Booking System";
@@ -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"];
@@ -250,4 +252,4 @@
 # Used in mysql.php AND pgsql.php
 $vocab["failed_connect_db"]  = "Fatal Error: Failed to connect to database";
 
-?>
\ No newline at end of file
+?>
Index: plugins/blocks/mrbs/web/config.inc.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/config.inc.php,v
retrieving revision 1.6
diff -u -r1.6 config.inc.php
--- plugins/blocks/mrbs/web/config.inc.php	1 Aug 2008 04:02:11 -0000	1.6
+++ plugins/blocks/mrbs/web/config.inc.php	2 Aug 2008 04:19:52 -0000
@@ -1,6 +1,6 @@
 <?php
 
-# $Id: config.inc.php,v 1.6 2008/08/01 04:02:11 arborrow Exp $
+# $Id: config.inc.php,v 1.39.2.12 2007/02/13 12:53:23 jberanek Exp $
 
 ###########################################################################
 #   MRBS Configuration File
@@ -14,28 +14,23 @@
 ###################
 # Database settings
 ###################
-# Which database system: "pgsql"=PostgreSQL, "mysql"= $CFG->dbtype;
-$dbsys = $CFG->dbtype;
+# Which database system: "pgsql"=PostgreSQL, "mysql"=MySQL, "mysqli"=MySQL via the mysqli PHP extension
+$dbsys = $CFG->dbtype; //"mysql"
 # Hostname of database server. For pgsql, can use "" instead of localhost
 # to use Unix Domain Sockets instead of TCP/IP.
-$db_host = $CFG->dbhost;
-#"localhost";
+$db_host = $CFG->dbhost; //"localhost";
 # Database name:
-$db_database = $CFG->dbname;
-#"moodle18patch";
+$db_database = $CFG->dbname; //"mrbs";
 # Database login user name:
-$db_login = $CFG->dbuser;
-#"root";
+$db_login = $CFG->dbuser; // "mrbs";
 # Database login password:
-$db_password = $CFG->dbpass;
-
+$db_password = $CFG->dbpass; //'mrbs-password';
 # Prefix for table names.  This will allow multiple installations where only
 # one database is available
 $db_tbl_prefix = $CFG->prefix.'mrbs_';
 # Uncomment this to NOT use PHP persistent (pooled) database connections:
 # $db_nopersist = 1;
 
-
 ################################
 # Site identification information
 #################################
@@ -72,29 +67,29 @@
 $enable_periods = $cfg_mrbs->block_mrbs_enable_periods;
 
 if ($enable_periods == 0) { //if we are not using periods then set the following values, prevents error of unset variables
-    # Resolution - what blocks can be booked, in seconds.
-    # Default is half an hour: 1800 seconds.
+# Resolution - what blocks can be booked, in seconds.
+# Default is half an hour: 1800 seconds.
     $resolution = $cfg_mrbs->block_mrbs_resolution;
 
-    # Start and end of day, NOTE: These are integer hours only, 0-23, and
-    # morningstarts must be < eveningends. See also eveningends_minutes.
+# Start and end of day, NOTE: These are integer hours only, 0-23, and
+# morningstarts must be < eveningends. See also eveningends_minutes.
     $morningstarts = $cfg_mrbs->block_mrbs_morningstarts;
     $eveningends   =$cfg_mrbs->block_mrbs_eveningends;
 
-    # Minutes to add to $morningstarts to get to the real start of the day.
-    # Be sure to consider the value of $eveningends_minutes if you change
-    # this, so that you do not cause a day to finish before the start of
-    # the last period.  For example if resolution=3600 (1 hour)
-    # morningstarts = 8 and morningstarts_minutes = 30 then for the last
-    # period to start at say 4:30pm you would need to set eveningends = 16
-    # and eveningends_minutes = 30
+# Minutes to add to $morningstarts to get to the real start of the day.
+# Be sure to consider the value of $eveningends_minutes if you change
+# this, so that you do not cause a day to finish before the start of
+# the last period.  For example if resolution=3600 (1 hour)
+# morningstarts = 8 and morningstarts_minutes = 30 then for the last
+# period to start at say 4:30pm you would need to set eveningends = 16
+# and eveningends_minutes = 30
     $morningstarts_minutes = $cfg_mrbs->block_mrbs_morningstarts_min;
 
-    # Minutes to add to $eveningends hours to get the real end of the day.
-    # Examples: To get the last slot on the calendar to be 16:30-17:00, set
-    # eveningends=16 and eveningends_minutes=30. To get a full 24 hour display
-    # with 15-minute steps, set morningstarts=0; eveningends=23;
-    # eveningends_minutes=45; and resolution=900.
+# Minutes to add to $eveningends hours to get the real end of the day.
+# Examples: To get the last slot on the calendar to be 16:30-17:00, set
+# eveningends=16 and eveningends_minutes=30. To get a full 24 hour display
+# with 15-minute steps, set morningstarts=0; eveningends=23;
+# eveningends_minutes=45; and resolution=900.
     $eveningends_minutes = $cfg_mrbs->block_mrbs_eveningends_min;
 }
 
@@ -114,8 +109,8 @@
 // Moodle HACK
 
 if(!isset($cfg_mrbs->block_mrbs_periods) or empty($cfg_mrbs->block_mrbs_periods)) {
-    $periods[] = "Period&nbsp;1";
-    $periods[] = "Period&nbsp;2";
+$periods[] = "Period&nbsp;1";
+$periods[] = "Period&nbsp;2";
     $periods[] = "Period&nbsp;3";
     $periods[] = "Period&nbsp;4";
     $periods[] = "Period&nbsp;5";
@@ -200,17 +195,21 @@
 ###############################################
 $auth["session"] = "php"; # How to get and keep the user ID. One of
 			  # "http" "php" "cookie" "ip" "host" "nt" "omni".
-
+			  # "remote_user"
 $auth["type"] = "moodle";
 #$auth["type"] = "db_ext"; # 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"][] = "aborrow";	# A user name from the user list. Useful
                                     #with most other session schemes.
-
 #$auth["admin"][] = "10.0.0.1";
 #$auth["admin"][] = "10.0.0.2";
 #$auth["admin"][] = "10.0.0.3";
@@ -224,17 +223,20 @@
 # 'session_http' configuration settings
 $auth["realm"]  = "mrbs";
 
+# 'session_remote_user' configuration settings
+#$auth['remote_user']['logout_link'] = '/logout/link.html';
+
 # 'auth_ext' configuration settings
 $auth["prog"]   = "";
 $auth["params"] = "";
 
-
 # 'auth_db_ext' configuration settings
 $auth['db_ext']['db_host'] = 'localhost';
-$auth['db_ext']['db_username'] = '';
-$auth['db_ext']['db_name'] = '';
-$auth['db_ext']['db_table'] = 'mdl_user';
-$auth['db_ext']['column_name_username'] = 'username';
+$auth['db_ext']['db_username'] = ''; // 'authuser';
+$auth['db_ext']['db_password'] = ''; //'authpass';
+$auth['db_ext']['db_name'] = ''; //'authdb';
+$auth['db_ext']['db_table'] = $CFG->prefix.'user'; // 'users';
+$auth['db_ext']['column_name_username'] = 'username'; //'name';
 $auth['db_ext']['column_name_password'] = 'password';
 # Either 'md5', 'sha1', 'crypt' or 'plaintext'
 $auth['db_ext']['password_format'] = 'md5';
@@ -242,6 +244,12 @@
 # 'auth_ldap' configuration settings
 # Where is the LDAP server
 #$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";
@@ -255,7 +263,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
@@ -393,7 +401,7 @@
 ##########
 
 # Set this to 1 to use UTF-8 in all pages and in the database, otherwise
-# text gets enterered in the database in different encodings, dependent
+# text gets entered in the database in different encodings, dependent
 # on the users' language
 $unicode_encoding = 1; //this should not be an option in Moodle
 
@@ -468,7 +476,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.2.3";
-
 ?>
Index: plugins/blocks/mrbs/web/session_php.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/session_php.php,v
retrieving revision 1.3
diff -u -r1.3 session_php.php
--- plugins/blocks/mrbs/web/session_php.php	1 Aug 2008 04:02:10 -0000	1.3
+++ plugins/blocks/mrbs/web/session_php.php	2 Aug 2008 04:19:53 -0000
@@ -1,5 +1,4 @@
 <?php
-
 /*****************************************************************************\
 *                                                                             *
 *   File name       session_php.php                                           *
@@ -21,8 +20,15 @@
 require_once("../../../config.php"); //for Moodle integration
 global $PHP_SELF, $USER;
 
-$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();
 
@@ -44,7 +50,7 @@
         }
     } else {
         $NewUserName = unslashes($NewUserName);
-        $NewPassword = unslashes($NewPassword);
+        $NewUserPassword = unslashes($NewUserPassword);
         if (!authValidateUser($NewUserName, $NewUserPassword)) {
             print_header_mrbs(0, 0, 0, 0);
             echo "<P>".get_string('usernamenotfound')."</P>\n";
@@ -173,37 +179,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_string('show_my_entries','block_mrbs') . "\">" . get_string('you_are','block_mrbs')." "
          .$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="" />
+                <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_string('logout') ?> " />
-	  </FORM>
-<?php if (isset($user_list_link)) print "	  <br>\n	  " .
-	    "<A href='$user_list_link'>" . get_string('userlist') . "</A><br>\n" ;
+                </FORM>
+<?php if (isset($user_list_link)) print "
+                <br>
+                <A href=\"$user_list_link\">" . get_string('user_list') . "</A><br>\n";
 ?>
-	</TD>
+              </TD>
 <?php
     }
 else
     {
 ?>
-	<TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
+              <TD CLASS="banner" BGCOLOR="#C0E0FF" ALIGN=CENTER>
 	  <A name="logonBox" href=""><?php echo get_string('usernamenotfound'); ?></A><br>
-          <FORM METHOD=POST ACTION="admin.php">
-	    <input type="hidden" name="TargetURL" value="<?php echo $TargetURL ?>" />
-	    <input type="hidden" name="Action" value="QueryName" />
+                <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_string('login') ?> " />
-	  </FORM>
-<?php if (isset($user_list_link)) print "	  <br>\n	  " .
-	    "<A href=\"$user_list_link\">" . get_string('userlist') . "</A><br>\n" ;
+                </FORM>
+<?php if (isset($user_list_link)) print "
+	        <br>
+                <A href=\"$user_list_link\">" . get_string('user_list') . "</A><br>\n";
 ?>
-	</TD>
+              </TD>
 <?php
     }
 }
Index: plugins/blocks/mrbs/web/auth_imap.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/auth_imap.php,v
retrieving revision 1.1
diff -u -r1.1 auth_imap.php
--- plugins/blocks/mrbs/web/auth_imap.php	5 Apr 2007 22:25:24 -0000	1.1
+++ plugins/blocks/mrbs/web/auth_imap.php	2 Aug 2008 04:19:52 -0000
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: auth_imap.php,v 1.1 2007/04/05 22:25:24 arborrow Exp $
+/* $Id: auth_imap.php,v 1.6.2.3 2006/10/09 15:53:59 jberanek Exp $
  *
  * Authentication scheme that uses IMAP as the source for user
  * authentication.
@@ -103,17 +103,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: plugins/blocks/mrbs/web/month.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/month.php,v
retrieving revision 1.5
diff -u -r1.5 month.php
--- plugins/blocks/mrbs/web/month.php	1 Aug 2008 04:02:10 -0000	1.5
+++ plugins/blocks/mrbs/web/month.php	2 Aug 2008 04:19:53 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: month.php,v 1.5 2008/08/01 04:02:10 arborrow 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("../../../config.php"); //for Moodle integration
@@ -29,7 +29,7 @@
 
 # Default parameters:
 # if (empty($debug_flag)) $debug_flag = 0; //not needed with optional_param initialization
-if (($month==0) || ($year==0) || !checkdate($month, 1, $year))
+if (($month==0) || ($year==0) || !checkdate(intval($month), 1, intval($year)))
 {
     $month = date("m");
     $year  = date("Y");
@@ -229,28 +229,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;
               }
 	    }
@@ -268,22 +268,22 @@
                     $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;
               }
             }
@@ -372,8 +372,8 @@
                 {
                     echo "<a href=\"view_entry.php?id=" . $d[$cday]["id"][$i]
                         . "&day=$cday&month=$month&year=$year\" title=\""
-                        . $d[$cday]["data"][$i] . "\">"
-                        . substr($d[$cday]["shortdescrip"][$i], 0, 17)
+                        . htmlspecialchars($d[$cday]["data"][$i]) . "\">"
+                        . htmlspecialchars(substr($d[$cday]["shortdescrip"][$i], 0, 17))
                         . "</a>";
                     break;
                 }
@@ -381,16 +381,16 @@
                 {
                     echo "<a href=\"view_entry.php?id=" . $d[$cday]["id"][$i]
                         . "&day=$cday&month=$month&year=$year\" title=\""
-                        . substr($d[$cday]["shortdescrip"][$i], 0, 17) . "\">"
-                        . $d[$cday]["data"][$i] . "</a>";
+                        . htmlspecialchars(substr($d[$cday]["shortdescrip"][$i], 0, 17)) . "\">"
+                        . htmlspecialchars($d[$cday]["data"][$i]) . "</a>";
                     break;
                 }
                 case "both":
                 {
                     echo "<a href=\"view_entry.php?id=" . $d[$cday]["id"][$i]
                         . "&day=$cday&month=$month&year=$year\">"
-                        . $d[$cday]["data"][$i] . " "
-                        . substr($d[$cday]["shortdescrip"][$i], 0, 6) . "</a>";
+                        . htmlspecialchars($d[$cday]["data"][$i]) . " "
+                        . htmlspecialchars(substr($d[$cday]["shortdescrip"][$i], 0, 6)) . "</a>";
                     break;
                 }
                 default:
Index: plugins/blocks/mrbs/web/mrbs_sql.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/mrbs_sql.php,v
retrieving revision 1.4
diff -u -r1.4 mrbs_sql.php
--- plugins/blocks/mrbs/web/mrbs_sql.php	1 Aug 2008 04:02:10 -0000	1.4
+++ plugins/blocks/mrbs/web/mrbs_sql.php	2 Aug 2008 04:19:53 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: mrbs_sql.php,v 1.4 2008/08/01 04:02:10 arborrow Exp $
+// $Id: mrbs_sql.inc,v 1.18.2.3 2006/01/26 11:34:02 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 /** mrbsCheckFree()
  * 
@@ -188,46 +188,28 @@
 	$description = slashes($description);
 	$timestamp = time();
 	// Let's construct the sql statement:
-
 	$sql_coln = array(); $sql_val = array();
 
-
-
         // 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) . 'timestamp) '.
 	       'VALUES (' . implode(', ',$sql_val) . ',$timestamp)';
@@ -310,6 +292,9 @@
 
 	global $_initial_weeknumber;
 	$_initial_weeknumber = (int)(($day - 1) / 7) + 1;
+	$week_num = 0;
+	$start_day = date('w', mktime($hour, $min, $sec, $month, $day, $year));
+	$cur_day = $start_day;
 
 	$entrys = "";
 	for($i = 0; $i < $max_ittr; $i++)
@@ -354,14 +339,24 @@
 
 			// n Weekly repeat
 			case 6:
-				$j = $cur_day = date("w", $entrys[$i]);
-				// Skip over days of the week which are not enabled:
-				while (($j = ($j + 1) % (7*$rep_num_weeks)) != $cur_day && !$rep_opt[$j])
+
+				while (1)
 				{
-					$day += 1;
+					$day++;
+					$cur_day = ($cur_day + 1) % 7;
+
+					if (($cur_day % 7) == $start_day)
+					{
+						$week_num++;
+					}
+
+					if (($week_num % $rep_num_weeks == 0) &&
+					    ($rep_opt[$cur_day] == 1))
+					{
+						break;
+					}
 				}
 
-				$day += 1;
 				break;	
 				
 			// Unknown repeat option
@@ -476,4 +471,4 @@
 	return $id;
 }
 
-?>
+?>
\ No newline at end of file
Index: plugins/blocks/mrbs/web/auth_ldap.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/auth_ldap.php,v
retrieving revision 1.1
diff -u -r1.1 auth_ldap.php
--- plugins/blocks/mrbs/web/auth_ldap.php	5 Apr 2007 22:25:24 -0000	1.1
+++ plugins/blocks/mrbs/web/auth_ldap.php	2 Aug 2008 04:19:52 -0000
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: auth_ldap.php,v 1.1 2007/04/05 22:25:24 arborrow Exp $
+// $Id: auth_ldap.php,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';
@@ -23,6 +23,9 @@
 {
 	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;
@@ -75,11 +78,27 @@
 
 	// establish ldap connection
 	// the '@' suppresses errors
-	$ldap = @ldap_connect($ldap_host);
+	if (isset($ldap_port))
+	{
+		$ldap = @ldap_connect($ldap_host, $ldap_port);
+	}
+	else
+	{
+		$ldap = @ldap_connect($ldap_host);
+	}
 
 	// 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: plugins/blocks/mrbs/web/mrbs.css
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/mrbs.css,v
retrieving revision 1.1
diff -u -r1.1 mrbs.css
--- plugins/blocks/mrbs/web/mrbs.css	5 Apr 2007 22:25:32 -0000	1.1
+++ plugins/blocks/mrbs/web/mrbs.css	2 Aug 2008 04:19:53 -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: plugins/blocks/mrbs/web/lang.sv.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/lang.sv.php,v
retrieving revision 1.1
diff -u -r1.1 lang.sv.php
--- plugins/blocks/mrbs/web/lang.sv.php	5 Apr 2007 22:25:32 -0000	1.1
+++ plugins/blocks/mrbs/web/lang.sv.php	2 Aug 2008 04:19:52 -0000
@@ -1,11 +1,12 @@
 <?php
-# $Id: lang.sv.php,v 1.1 2007/04/05 22:25:32 arborrow 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
 # specific file will overwrite the default. This is the Swedish file.
 #
 # Translated provede by: Bo Kleve (bok@unit.liu.se), MissterX
+# Modified on 2006-01-04 by: Bj�rn Wiberg <Bjorn.Wiberg@its.uu.se>
 #
 #
 # This file is PHP code. Treat it as such.
@@ -14,51 +15,51 @@
 $vocab["charset"]            = "iso-8859-1";
 
 # Used in style.php
-$vocab["mrbs"]               = "MRBS - M�tesRums BokningsSystem";
+$vocab["mrbs"]               = "MRBS - M�tesRumsBokningsSystem";
 
 # Used in functions.php
 $vocab["report"]             = "Rapport";
 $vocab["admin"]              = "Admin";
-$vocab["help"]               = "Hj�lp";
-$vocab["search"]             = "S�k:";
-$vocab["not_php3"]             = "<H1>VARNING: Detta fungerar f�rmodligen inte med PHP3</H1>";
+$vocab["help"]               = "Hj�lp";
+$vocab["search"]             = "S�k:";
+$vocab["not_php3"]           = "<H1>VARNING: Detta fungerar f�rmodligen inte med PHP3</H1>";
 
 # Used in day.php
-$vocab["bookingsfor"]        = "Bokningar f�r";
+$vocab["bookingsfor"]        = "Bokningar f�r";
 $vocab["bookingsforpost"]    = "";
-$vocab["areas"]              = "Omr�den";
-$vocab["daybefore"]          = "G� till f�reg�ende dag";
-$vocab["dayafter"]           = "G� till n�sta dag";
-$vocab["gototoday"]          = "G� till idag";
-$vocab["goto"]               = "g� till";
-$vocab["highlight_line"]     = "Highlight this line";
-$vocab["click_to_reserve"]   = "Click on the cell to make a reservation.";
+$vocab["areas"]              = "Omr�den";
+$vocab["daybefore"]          = "G� till f�reg�ende dag";
+$vocab["dayafter"]           = "G� till n�sta dag";
+$vocab["gototoday"]          = "G� till idag";
+$vocab["goto"]               = "G� till";
+$vocab["highlight_line"]     = "Markera denna rad";
+$vocab["click_to_reserve"]   = "Klicka p� cellen f�r att g�ra en bokning.";
 
 # Used in trailer.php
 $vocab["viewday"]            = "Visa dag";
 $vocab["viewweek"]           = "Visa vecka";
-$vocab["viewmonth"]          = "Visa m�nad";
-$vocab["ppreview"]           = "F�rhandsgranska";
+$vocab["viewmonth"]          = "Visa m�nad";
+$vocab["ppreview"]           = "F�rhandsgranska";
 
 # Used in edit_entry.php
-$vocab["addentry"]           = "Boka !";
-$vocab["editentry"]          = "�ndra bokningen";
-$vocab["editseries"]         = "�ndra serie";
+$vocab["addentry"]           = "Ny bokning";
+$vocab["editentry"]          = "�ndra bokningen";
+$vocab["editseries"]         = "�ndra serie";
 $vocab["namebooker"]         = "Kort beskrivning:";
-$vocab["fulldescription"]    = "Full beskrivning:<br>&nbsp;&nbsp;(Antal personer,<br>&nbsp;&nbsp;Internt/Externt etc)";
+$vocab["fulldescription"]    = "Fullst�ndig beskrivning:";
 $vocab["date"]               = "Datum:";
 $vocab["start_date"]         = "Starttid:";
 $vocab["end_date"]           = "Sluttid:";
 $vocab["time"]               = "Tid:";
 $vocab["period"]             = "Period:";
-$vocab["duration"]           = "L�ngd:";
+$vocab["duration"]           = "L�ngd:";
 $vocab["seconds"]            = "sekunder";
 $vocab["minutes"]            = "minuter";
 $vocab["hours"]              = "timmar";
 $vocab["days"]               = "dagar";
 $vocab["weeks"]              = "veckor";
-$vocab["years"]              = "�r";
-$vocab["periods"]            = "periods";
+$vocab["years"]              = "�r";
+$vocab["periods"]            = "perioder";
 $vocab["all_day"]            = "hela dagen";
 $vocab["type"]               = "Typ:";
 $vocab["internal"]           = "Internt";
@@ -68,44 +69,47 @@
 $vocab["rep_type_0"]         = "ingen";
 $vocab["rep_type_1"]         = "dagligen";
 $vocab["rep_type_2"]         = "varje vecka";
-$vocab["rep_type_3"]         = "m�natligen";
-$vocab["rep_type_4"]         = "�rligen";
-$vocab["rep_type_5"]         = "M�nadsvis, samma dag";
-$vocab["rep_type_6"]         = "Vecko vis";
+$vocab["rep_type_3"]         = "m�natligen";
+$vocab["rep_type_4"]         = "�rligen";
+$vocab["rep_type_5"]         = "M�nadsvis, samma dag";
+$vocab["rep_type_6"]         = "Veckovis";
 $vocab["rep_end_date"]       = "Repetition slutdatum:";
 $vocab["rep_rep_day"]        = "Repetitionsdag:";
 $vocab["rep_for_weekly"]     = "(vid varje vecka)";
-$vocab["rep_freq"]           = "Frekvens:";
+$vocab["rep_freq"]           = "Intervall:";
 $vocab["rep_num_weeks"]      = "Antal veckor";
-$vocab["rep_for_nweekly"]    = "(F�r x-veckor)";
-$vocab["ctrl_click"]         = "Kontroll-Klicka f�r att markera mer �n ett rum";
-$vocab["entryid"]            = "Antecknings ID ";
-$vocab["repeat_id"]          = "Repetions ID "; 
-$vocab["you_have_not_entered"] = "Du har inte angivit ";
-$vocab["you_have_not_selected"] = "You have not selected a";
-$vocab["valid_room"]         = "room.";
-$vocab["valid_time_of_day"]  = "giltig tidpunkt p� dage.";
-$vocab["brief_description"]  = "Kort beskrivningBrief Description.";
-$vocab["useful_n-weekly_value"] = "anv�ndbar n-veckovist v�rde.";
+$vocab["rep_for_nweekly"]    = "(F�r x-veckor)";
+$vocab["ctrl_click"]         = "H�ll ner tangenten <I>Ctrl</I> och klicka f�r att v�lja mer �n ett rum";
+$vocab["entryid"]            = "Boknings-ID ";
+$vocab["repeat_id"]          = "Repetions-ID "; 
+$vocab["you_have_not_entered"] = "Du har inte angivit";
+$vocab["you_have_not_selected"] = "Du har inte valt";
+$vocab["valid_room"]         = "ett giltigt rum.";
+$vocab["valid_time_of_day"]  = "en giltig tidpunkt p� dagen.";
+$vocab["brief_description"]  = "en kort beskrivning.";
+$vocab["useful_n-weekly_value"] = "ett anv�ndbart n-veckovist v�rde.";
 
 # Used in view_entry.php
 $vocab["description"]        = "Beskrivning:";
-$vocab["room"]               = "Rum:";
+$vocab["room"]               = "Rum";
 $vocab["createdby"]          = "Skapad av:";
 $vocab["lastupdate"]         = "Senast uppdaterad:";
 $vocab["deleteentry"]        = "Radera bokningen";
 $vocab["deleteseries"]       = "Radera serie";
-$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 antecknings ID.";
+$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";
 $vocab["sched_conflict"]     = "Bokningskonflikt";
-$vocab["conflict"]           = "Den nya bokningen krockar med f�ljande bokning(ar):";
-$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� exclusiv databas �tkomst"; 
+$vocab["conflict"]           = "Den nya bokningen krockar med f�ljande bokning(ar):";
+$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"];
@@ -113,139 +117,141 @@
 $vocab["mail_subject_delete"] = $mail["subject_delete"];
 
 # Authentication stuff
-$vocab["accessdenied"]       = "�tkomst nekad";
-$vocab["norights"]           = "Du har inte r�ttighet att �ndra bokningen.";
-$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["accessdenied"]       = "�tkomst nekad";
+$vocab["norights"]           = "Du har inte r�ttighet att �ndra bokningen.";
+$vocab["please_login"]       = "V�nligen logga in";
+$vocab["user_name"]          = "Anv�ndarnamn";
+$vocab["user_password"]      = "L�senord";
+$vocab["unknown_user"]       = "Ok�nd anv�ndare";
+$vocab["you_are"]            = "Du �r";
+$vocab["login"]              = "Logga in";
+$vocab["logoff"]             = "Logga ut";
 
 # Authentication database
-$vocab["user_list"]          = "User list";
-$vocab["edit_user"]          = "Edit user";
-$vocab["delete_user"]        = "Delete this user";
+$vocab["user_list"]          = "Anv�ndarlista";
+$vocab["edit_user"]          = "Editera anv�ndare";
+$vocab["delete_user"]        = "Radera denna anv�ndare";
 #$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"]         = "E-postadress";
+$vocab["password_twice"]     = "Om du vill �ndra ditt l�senord, v�nligen mata in detta tv� g�nger";
+$vocab["passwords_not_eq"]   = "Fel: L�senorden st�mmer inte �verens.";
+$vocab["add_new_user"]       = "L�gg till anv�ndare";
+$vocab["rights"]             = "R�ttigheter";
+$vocab["action"]             = "Aktion";
+$vocab["user"]               = "Anv�ndare";
+$vocab["administrator"]      = "Administrat�r";
+$vocab["unknown"]            = "Ok�nd";
 $vocab["ok"]                 = "OK";
-$vocab["show_my_entries"]    = "Click to display all my upcoming entries";
+$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.";
-$vocab["search_results"]     = "S�kresultat f�r:";
-$vocab["nothing_found"]      = "Inga matchande tr�ffar hittade.";
+$vocab["invalid_search"]     = "Tom eller ogiltig s�kstr�ng.";
+$vocab["search_results"]     = "S�kresultat f�r:";
+$vocab["nothing_found"]      = "Inga s�ktr�ffar hittades.";
 $vocab["records"]            = "Bokning ";
 $vocab["through"]            = " t.o.m. ";
 $vocab["of"]                 = " av ";
-$vocab["previous"]           = "F�reg�ende";
-$vocab["next"]               = "N�sta";
-$vocab["entry"]              = "Post";
+$vocab["previous"]           = "F�reg�ende";
+$vocab["next"]               = "N�sta";
+$vocab["entry"]              = "Bokning";
 $vocab["view"]               = "Visa";
-$vocab["advanced_search"]    = "Avancerad s�kning";
-$vocab["search_button"]      = "S�k";
-$vocab["search_for"]         = "S�k f�r";
-$vocab["from"]               = "Fr�n";
+$vocab["advanced_search"]    = "Avancerad s�kning";
+$vocab["search_button"]      = "S�k";
+$vocab["search_for"]         = "S�k f�r";
+$vocab["from"]               = "Fr�n";
 
 # Used in report.php
-$vocab["report_on"]          = "Rapport �ver M�ten:";
-$vocab["report_start"]       = "Rapport start datum:";
-$vocab["report_end"]         = "Rapport slut datum:";
-$vocab["match_area"]         = "S�k p� plats:";
-$vocab["match_room"]         = "S�k p� rum:";
-$vocab["match_type"]         = "Match type:";
-$vocab["ctrl_click_type"]    = "Use Control-Click to select more than one type";
-$vocab["match_entry"]        = "S�k p� kort beskrivning:";
-$vocab["match_descr"]        = "S�k p�  full beskrivning:";
+$vocab["report_on"]          = "Rapport �ver m�ten:";
+$vocab["report_start"]       = "Startdatum f�r rapport:";
+$vocab["report_end"]         = "Slutdatum f�r rapport:";
+$vocab["match_area"]         = "S�k p� plats:";
+$vocab["match_room"]         = "S�k p� rum:";
+$vocab["match_type"]         = "S�k p� bokningstyp:";
+$vocab["ctrl_click_type"]    = "H�ll ner tangenten <I>Ctrl</I> och klicka f�r att v�lja fler �n en typ";
+$vocab["match_entry"]        = "S�k p� kort beskrivning:";
+$vocab["match_descr"]        = "S�k p� fullst�ndig beskrivning:";
 $vocab["include"]            = "Inkludera:";
-$vocab["report_only"]        = "Rapport  enbart";
-$vocab["summary_only"]       = "Sammanst�llning endast";
-$vocab["report_and_summary"] = "Rapport och Sammanst�llning";
-$vocab["summarize_by"]       = "Sammanst�ll p�:";
+$vocab["report_only"]        = "Endast rapport";
+$vocab["summary_only"]       = "Endast sammanst�llning";
+$vocab["report_and_summary"] = "Rapport och sammanst�llning";
+$vocab["summarize_by"]       = "Sammanst�ll p�:";
 $vocab["sum_by_descrip"]     = "Kort beskrivning";
 $vocab["sum_by_creator"]     = "Skapare";
-$vocab["entry_found"]        = "Post hittad";
-$vocab["entries_found"]      = "Poster hittade";
-$vocab["summary_header"]     = "Sammanst�llning �ver (Poster) Timmar";
-$vocab["summary_header_per"] = "Summary of (Entries) Periods";
-$vocab["total"]              = "Total";
-$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["entry_found"]        = "bokning hittad";
+$vocab["entries_found"]      = "bokningar hittade";
+$vocab["summary_header"]     = "Sammanst�llning �ver (bokningar) timmar";
+$vocab["summary_header_per"] = "Sammanst�llning �ver (bokningar) perioder";
+$vocab["total"]              = "Totalt";
+$vocab["submitquery"]        = "Skapa rapport";
+$vocab["sort_rep"]           = "Sortera rapport efter:";
+$vocab["sort_rep_time"]      = "Startdatum/starttid";
+$vocab["rep_dsp"]            = "Visa i rapport:";
+$vocab["rep_dsp_dur"]        = "L�ngd";
+$vocab["rep_dsp_end"]        = "Sluttid";
 
 # Used in week.php
-$vocab["weekbefore"]         = "F�reg�ende vecka";
-$vocab["weekafter"]          = "N�sta vecka";
+$vocab["weekbefore"]         = "F�reg�ende vecka";
+$vocab["weekafter"]          = "N�sta vecka";
 $vocab["gotothisweek"]       = "Denna vecka";
 
 # Used in month.php
-$vocab["monthbefore"]        = "F�reg�ende m�nad";
-$vocab["monthafter"]         = "N�sta m�nad";
-$vocab["gotothismonth"]      = "Denna m�nad";
+$vocab["monthbefore"]        = "F�reg�ende m�nad";
+$vocab["monthafter"]         = "N�sta m�nad";
+$vocab["gotothismonth"]      = "Denna m�nad";
 
 # Used in {day week month}.php
-$vocab["no_rooms_for_area"]  = "Rum saknas f�r denna plats";
+$vocab["no_rooms_for_area"]  = "Rum saknas f�r denna plats";
 
 # Used in admin.php
-$vocab["edit"]               = "�ndra";
+$vocab["edit"]               = "�ndra";
 $vocab["delete"]             = "Radera";
 $vocab["rooms"]              = "Rum";
 $vocab["in"]                 = "i";
-$vocab["noareas"]            = "Inget omr�de";
-$vocab["addarea"]            = "L�gg till omr�de";
+$vocab["noareas"]            = "Inget omr�de";
+$vocab["addarea"]            = "L�gg till omr�de";
 $vocab["name"]               = "Namn";
-$vocab["noarea"]             = "Inget omr�de valt";
-$vocab["browserlang"]        = "Din l�sare �r inst�ll att anv�nda";
-$vocab["postbrowserlang"]    = "spr�k.";
-$vocab["addroom"]            = "L�gg till rum";
+$vocab["noarea"]             = "Inget omr�de valt";
+$vocab["browserlang"]        = "Din webbl�sare �r inst�lld att anv�nda spr�k(en)";
+$vocab["postbrowserlang"]    = "";
+$vocab["addroom"]            = "L�gg till rum";
 $vocab["capacity"]           = "Kapacitet";
 $vocab["norooms"]            = "Inga rum.";
 $vocab["administration"]     = "Administration";
 
 # Used in edit_area_room.php
-$vocab["editarea"]           = "�ndra omr�de";
-$vocab["change"]             = "�ndra";
+$vocab["editarea"]           = "�ndra omr�de";
+$vocab["change"]             = "�ndra";
 $vocab["backadmin"]          = "Tillbaka till Administration";
-$vocab["editroomarea"]       = "�ndra omr�de eller rum beskrivning";
-$vocab["editroom"]           = "�ndra rum";
-$vocab["update_room_failed"] = "Uppdatering av misslyckades: ";
+$vocab["editroomarea"]       = "�ndra omr�de eller rum";
+$vocab["editroom"]           = "�ndra rum";
+$vocab["update_room_failed"] = "Uppdatering av rum misslyckades: ";
 $vocab["error_room"]         = "Fel: rum ";
-$vocab["not_found"]          = " ej hittat";
-$vocab["update_area_failed"] = "Uppdatering av omr�de misslyckades: ";
-$vocab["error_area"]         = "Fel: omr�de";
-$vocab["room_admin_email"]   = "Room admin email:";
-$vocab["area_admin_email"]   = "Area admin email:";
-$vocab["invalid_email"]      = "Invalid email!";
+$vocab["not_found"]          = " hittades ej";
+$vocab["update_area_failed"] = "Uppdatering av omr�de misslyckades: ";
+$vocab["error_area"]         = "Fel: omr�de";
+$vocab["room_admin_email"]   = "E-postadress till rumsansvarig:";
+$vocab["area_admin_email"]   = "E-postadress till omr�desansvarig";
+$vocab["invalid_email"]      = "Ogiltig e-postadress!";
 
 # Used in del.php
-$vocab["deletefollowing"]    = "Detta raderar f�ljande bokningar";
-$vocab["sure"]               = "�r du s�ker?";
+$vocab["deletefollowing"]    = "Detta raderar f�ljande bokningar";
+$vocab["sure"]               = "�r du s�ker?";
 $vocab["YES"]                = "JA";
 $vocab["NO"]                 = "NEJ";
-$vocab["delarea"]            = "Du m�ste ta bort alla rum i detta omr�de innan du kan ta bort det<p>";
-$vocab["backadmin"]          = "Tillbaka till Adminsidan";
+$vocab["delarea"]            = "Du m�ste ta bort alla rum i detta omr�de innan du kan ta bort omr�det!<p>";
+$vocab["backadmin"]          = "Tillbaka till Administration";
 
 # Used in help.php
 $vocab["about_mrbs"]         = "Om MRBS";
 $vocab["database"]           = "Databas: ";
 $vocab["system"]             = "System: ";
-$vocab["please_contact"]     = "Var v�nlig kontakta ";
-$vocab["for_any_questions"]  = "f�r eventuella fr�gor som ej �r besvarade h�r.";
+$vocab["please_contact"]     = "Var v�nlig kontakta ";
+$vocab["for_any_questions"]  = "f�r eventuella fr�gor som ej besvaras h�r.";
 
 # Used in mysql.php AND pgsql.php
-$vocab["failed_connect_db"]  = "Fatal Error: Kunde ej komma i kontakt med database.";
+$vocab["failed_connect_db"]  = "Fatalt fel: Kunde ej ansluta till databasen!";
 
 ?>
Index: plugins/blocks/mrbs/web/language.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/language.php,v
retrieving revision 1.4
diff -u -r1.4 language.php
--- plugins/blocks/mrbs/web/language.php	1 Aug 2008 04:02:11 -0000	1.4
+++ plugins/blocks/mrbs/web/language.php	2 Aug 2008 04:19:53 -0000
@@ -1,6 +1,6 @@
 <?php
 
-# $Id: language.php,v 1.4 2008/08/01 04:02:11 arborrow Exp $
+# $Id: language.inc,v 1.13.2.4 2007/02/13 12:53:32 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 # A map is needed to convert from the HTTP language specifier to a
 # locale specifier for Windows
@@ -123,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
@@ -145,37 +305,67 @@
 setlocale(LC_ALL,'C');
 
 # We attempt to make up a sensible locale from the HTTP_ACCEPT_LANGUAGE
-# environment variable. If this doesn't work for you, comment it out
-# and assign locale directly.
-# If HTTP_ACCEPT_LANGUAGE is a comma-separated list, take the first one.
+# environment variable.
+
+# First we enumerate the user's language preferences...
 if (isset($HTTP_ACCEPT_LANGUAGE)) // Attempt to use $HTTP_ACCEPT_LANGUAGE only when defined.
-   $locale = ereg_replace(",.*", "", $HTTP_ACCEPT_LANGUAGE);
+{
+  $lang_specifiers = explode(',',$HTTP_ACCEPT_LANGUAGE);
+  foreach ($lang_specifiers as $specifier)
+  {
+    if (preg_match('/([a-zA-Z\-]+);q=([0-9\.]+)/', $specifier, $matches))
+    {
+      $langs[$matches[1]] = $matches[2];
+    }
+    else if (preg_match("/([a-zA-Z\-]+)/", $specifier, $matches))
+    {
+      $langs[$matches[1]] = 1.0;
+    }
+  }
+  arsort($langs,SORT_NUMERIC);
+}
 else // Else use the value from config.inc.php.
-   $locale = $default_language_tokens;
+{
+  $langs[$default_language_tokens] = 1.0;
+}
 
 # The following attempts to import a language based on what the client
 # is using.
 
 if (!$disable_automatic_language_changing)
 {
-  $lang_file = "lang." . $locale.".php";
-  if (file_exists($lang_file))
-  { echo $lang_file;
-    include $lang_file;
-  }
-  else
+  $doneit = 0;
+
+  # First try for an exact match, so if the user specified en-gb, look
+  # for lang.en-gb
+
+  foreach ($langs as $lang => $qual)
   {
-    $lang_file = "lang." . preg_replace("/(\w+)_(\w+)/", "\\1-\\2", $locale.".php");
+    $lang_file = "lang." . strtolower(substr($lang,0,2)).".php";
+
     if (file_exists($lang_file))
-    { 
+    {
       include $lang_file;
+      $doneit = 1;
+      $locale = $lang;
+      break;
     }
-    else
+  }
+  if ($doneit == 0)
+  {
+    # None of the user's preferred languages was available, so try to
+    # find a lang file for one of the base languages, e.g. look for
+    # lang.en if "en-ca" was specified.
+
+    foreach ($langs as $lang)
     {
-      $lang_file = "lang.". strtolower(substr($locale,0,2)).".php";
+      $lang_file = "lang." . strtolower(substr($lang,0,2)).".php";
+
       if (file_exists($lang_file))
       {
         include $lang_file;
+        $locale = $lang;
+        break;
       }
     }
   }
@@ -183,7 +373,9 @@
 
 ##############################################################################
 # Locale handling
-
+if (empty($locale)) { //quick and ugly hack to avoid PHP notice
+    $locale='en';
+}
 $windows_locale = "eng";
 
 # 2003/11/09 JF Larvoire: Help new admins understand what to do in case the iconv error occurs...
@@ -241,7 +433,12 @@
  \"".$locale."\" to a Windows locale specifier";
     }
   }
-  else if ($server_os == "unix")
+  /* All of these Unix OSes work in mostly the same way... */
+  else if (($server_os == "linux") ||
+           ($server_os == "sunos") ||
+           ($server_os == "bsd") ||
+           ($server_os == "aix") ||
+           ($server_os == "macosx"))
   {
     if (strlen($locale) == 2)
     {
@@ -260,7 +457,19 @@
     }
     if ($unicode_encoding)
     {
-      $locale .= ".utf-8";
+      if ($server_os == "sunos")
+      {
+        $locale .= ".UTF-8";
+      }
+      else
+      {
+        // 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)
     {
@@ -274,15 +483,27 @@
 {
   if (stristr(PHP_OS,"Darwin"))
   {
-    return "unix";
+    return "macosx";
   }
   else if (stristr(PHP_OS, "WIN"))
   {
     return "windows";
   }
-  else if (stristr(PHP_OS, "ux") || stristr(PHP_OS, "BSD"))
+  else if (stristr(PHP_OS, "Linux"))
+  {
+    return "linux";
+  }
+  else if (stristr(PHP_OS, "BSD"))
+  {
+    return "bsd";
+  }
+  else if (stristr(PHP_OS, "SunOS"))
   {
-    return "unix";
+    return "sunos";
+  }
+  else if (stristr(PHP_OS, "AIX"))
+  {
+    return "aix";
   }
   else
   {
@@ -290,31 +511,147 @@
   }
 }
 
+// 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)
+  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;
+}
+
+// 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($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")
     {
-      $string = iconv($winlocale_codepage_map[$windows_locale],"utf-8",$string);
+      if ($winlocale_codepage_map[$windows_locale])
+      {
+        $string = iconv($winlocale_codepage_map[$windows_locale],"utf-8",
+                        $string);
+      }
+    }
+    else if (get_server_os() == "aix")
+    {
+      $string = utf8_convert_aix($string);
     }
   }
   return $string;
@@ -322,14 +659,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);
 }
 
-?>
\ No newline at end of file
+?>
Index: plugins/blocks/mrbs/web/help.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/help.php,v
retrieving revision 1.4
diff -u -r1.4 help.php
--- plugins/blocks/mrbs/web/help.php	1 Aug 2008 04:02:10 -0000	1.4
+++ plugins/blocks/mrbs/web/help.php	2 Aug 2008 04:19:52 -0000
@@ -1,11 +1,12 @@
 <?php
 
-# $Id: help.php,v 1.4 2008/08/01 04:02:10 arborrow Exp $
+# $Id: help.php,v 1.12.2.1 2007/01/24 10:40:16 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 require_once "grab_globals.inc.php";
 include "config.inc.php";
 include "$dbsys.php";
 include "functions.php";
+include "version.php";
 
 $day = optional_param('day', 0, PARAM_INT);
 $month = optional_param('month', 0, PARAM_INT);
@@ -25,7 +26,7 @@
 print_header_mrbs($day, $month, $year, $area);
 
 echo "<H3>" . get_string('about_mrbs','block_mrbs') . "</H3>\n";
-echo "<P><a href=\"http://mrbs.sourceforge.net\">".get_string('mrbs','block_mrbs')."</a> - $mrbs_version\n";
+echo "<P><a href=\"http://mrbs.sourceforge.net\">".get_string('mrbs','block_mrbs')."</a> - ".get_mrbs_version()."\n";
 echo "<BR>" . get_string('database','block_mrbs') . sql_version() . "\n";
 echo "<BR>" . get_string('system','block_mrbs') . php_uname() . "\n";
 echo "<BR>PHP: " . phpversion() . "\n";
@@ -38,4 +39,4 @@
 include "site_faq" . $faqfilelang . ".html";
 
 include "trailer.php";
-?>
\ No newline at end of file
+?>
Index: plugins/blocks/mrbs/web/functions_mail.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/functions_mail.php,v
retrieving revision 1.4
diff -u -r1.4 functions_mail.php
--- plugins/blocks/mrbs/web/functions_mail.php	1 Aug 2008 04:02:11 -0000	1.4
+++ plugins/blocks/mrbs/web/functions_mail.php	2 Aug 2008 04:19:52 -0000
@@ -11,10 +11,10 @@
 // |        are likely to be used.                                             |
 // +---------------------------------------------------------------------------+
 // | @author    thierry_bo.                                                    |
-// | @version   $Revision: 1.4 $.                                              |
+// | @version   $Revision: 1.14.2.6 $.                                              |
 // +---------------------------------------------------------------------------+
 //
-// $Id: functions_mail.php,v 1.4 2008/08/01 04:02:11 arborrow Exp $
+// $Id: functions_mail.inc,v 1.14.2.6 2006/04/26 10:01:42 jberanek Exp $
 
 require_once("../../../config.php"); //for Moodle integration
 // {{{ removeMailUnicode()
@@ -26,7 +26,6 @@
  * @param string    $string   string to convert
  * @return string   $string   string converted to $mail_vocab["charset"]
  */
-
 function removeMailUnicode($string)
 {
     global $unicode_encoding, $mail_vocab;
@@ -72,7 +71,6 @@
  *
  * @param   timestamp   $t         timestamp to format
  * @param   boolean     $inc_time  include time in return string
-
  * @return  string                 formated string
  */
 function getMailTimeDateString($t, $inc_time=TRUE)
@@ -82,35 +80,20 @@
     // strings doesn't work
     $ampm = date("a",$t);
     if ($inc_time)
-
     {
-
         if ($twentyfourhour_format)
-
         {
-
             return strftime("%H:%M:%S - %A %d %B %Y",$t);
-
         }
-
         else
-
         {
-
             return strftime("%I:%M:%S$ampm - %A %d %B %Y",$t);
-
         }
-
     }
-
     else
-
     {
-
         return strftime("%A %d %B %Y",$t);
-
     }
-
 }
 
 // }}}
@@ -134,7 +117,7 @@
     
     //
     $recipients = '';
-    $id_table = ($rep_type > 0 ? "rep" : "e");
+    $id_table = ($rep_type > 0) ? "rep" : "e";
     (MAIL_ADMIN_ON_BOOKINGS) ? $recipients = MAIL_RECIPIENTS : '';
     if (MAIL_AREA_ADMIN_ON_BOOKINGS)
     {
@@ -142,7 +125,13 @@
         if ($new_entry)
         {
             $sql = "SELECT a.area_admin_email ";
-            $sql .= "FROM $tbl_room r, $tbl_area a, $tbl_entry e, $tbl_repeat rep ";
+            $sql .= "FROM $tbl_room r, $tbl_area a, $tbl_entry e ";
+            // If this is a repeating entry...
+            if ($id_table == 'rep')
+            {
+                // ...use the repeat table
+                $sql .= ", $tbl_repeat rep ";
+            }
             $sql .= "WHERE ${id_table}.id=$new_id AND r.id=${id_table}.room_id AND a.id=r.area_id";
             $res = sql_query($sql);
             (! $res) ? fatal_error(0, sql_error()) : '';
@@ -176,7 +165,13 @@
         if ($new_entry)
         {
             $sql = "SELECT r.room_admin_email ";
-            $sql .= "FROM $tbl_room r, $tbl_entry e, $tbl_repeat rep ";
+            $sql .= "FROM $tbl_room r, $tbl_entry e ";
+            // If this is a repeating entry...
+            if ($id_table == 'rep')
+            {
+                // ...use the repeat table
+                $sql .= ", $tbl_repeat rep ";
+            }
             $sql .= "WHERE ${id_table}.id=$new_id AND r.id=${id_table}.room_id";
             $res = sql_query($sql);
             (! $res) ? fatal_error(0, sql_error()) : '';
@@ -380,81 +375,43 @@
         }
         
         // Details if a series
-
         if ($rep_type > 0)
-
         {
-
 	    $opt = "";
-
 	    if (($rep_type == 2) || ($rep_type == 6))
-
 	    {
-
 		# Display day names according to language and preferred weekday start.
-
 		for ($i = 0; $i < 7; $i++)
-
 		{
-
 			$daynum = ($i + $weekstarts) % 7;
-
 			if ($rep_opt[$daynum]) $opt .= day_name($daynum) . " ";
-
 		}
-
 	    }
-
 	    if ($rep_type == 6)
-
 	    {
-
 		$body .= "\n" . $mail_vocab["rep_num_weeks"];
-
 		$body .=  ": " . compareEntries($rep_num_weeks, $mail_previous["rep_num_weeks"], $new_entry);
-
 	    }
-
 	
-
 	    if($opt || $mail_previous["rep_opt"])
-
 	    {
-
 		$body .= "\n" . $mail_vocab["rep_rep_day"];
-
 		$body .=  " " . compareEntries($opt, $mail_previous["rep_opt"], $new_entry);
-
 	    }
 
-
-
             $body .= "\n" . $mail_vocab["rep_end_date"];
-
             if ($new_entry)
-
             {
-
                 $body .= " " . utf8_strftime('%A %d %B %Y',$rep_enddate);
-
             }
-
             else
-
             {
-
                 $temp = utf8_strftime('%A %d %B %Y',$rep_enddate);
-
                 $body .=  " " . 
-
                     compareEntries($temp, $mail_previous['rep_end_date'], $new_entry) . "\n";
-
             }
-
         }
-
 	$body .= "\n";
-
     }
     $result = sendMail($recipients, $subject, $body, $mail_vocab['charset'] ,MAIL_CC);
     return $result;
@@ -582,40 +539,23 @@
     $temp = $mail_previous['rep_type'];
     $body .=  " " . $mail_vocab["rep_type_$temp"];
     if ($mail_previous['rep_type'] > 0)
-
     {
-
         if ($mail_previous['rep_type'] == 6)
-
         {
-
            $body .= "\n" . $mail_vocab["rep_num_weeks"];
-
            $body .=  ": " . $mail_previous["rep_num_weeks"];
-
         }
-
    
-
         if($mail_previous["rep_opt"])
-
         {
-
            $body .= "\n" . $mail_vocab["rep_rep_day"];
-
            $body .=  " " . $mail_previous["rep_opt"];
-
         }
 
-
-
         $body .= "\n" . $mail_vocab["rep_end_date"];
-
         $body .=  " " . $mail_previous['rep_end_date'] . "\n";
-
     }
     $body .= "\n";
-
     // End of mail details
     $result = sendMail($recipients, $subject, $body, $mail_vocab['charset'], MAIL_CC);
     return $result;
@@ -715,89 +655,49 @@
             list( $mail_previous['end_period'] , $mail_previous['end_date']) =
                 getMailPeriodDateString($row['tbl_r_end_time'], 0);
             // use getMailTimeDateString as all I want is the date
-
 	    $mail_previous['rep_end_date'] =
-
                 getMailTimeDateString($row['tbl_r_end_date'], FALSE);
-
             // 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_end_time']);
 	    
-
 	    $mail_previous['rep_opt'] = "";
-
 	    switch($row['rep_type'])
-
 	    {
-
 		case 2:
-
 		case 6:
-
 			$rep_day[0] = $row['rep_opt'][0] != "0";
-
 			$rep_day[1] = $row['rep_opt'][1] != "0";
-
 			$rep_day[2] = $row['rep_opt'][2] != "0";
-
 			$rep_day[3] = $row['rep_opt'][3] != "0";
-
 			$rep_day[4] = $row['rep_opt'][4] != "0";
-
 			$rep_day[5] = $row['rep_opt'][5] != "0";
-
 			$rep_day[6] = $row['rep_opt'][6] != "0";
 
-
-
 			if ($row['rep_type'] == 6)
-
 			{
-
 				$mail_previous['rep_num_weeks'] = $row['rep_num_weeks'];
-
 			}
-
 			else
-
 			{
-
 				$mail_previous['rep_num_weeks'] = "";
-
 			}
-
 			
-
 			break;
-
 		
-
 		default:
-
 			$rep_day = array(0, 0, 0, 0, 0, 0, 0);
-
 	    }
-
 	    for ($i = 0; $i < 7; $i++)
-
 	    {
-
 		$wday = ($i + $weekstarts) % 7;
-
 		if ($rep_day[$wday])
-
 		    $mail_previous['rep_opt'] .= day_name($wday) . " ";
-
 	    }
-
 	    
-
 	    $mail_previous['rep_num_weeks'] = $row['rep_num_weeks'];
-
         }
-
         toPeriodString($mail_previous['start_period'],
             $mail_previous['duration'], $mail_previous['dur_units']);
     }
@@ -824,87 +724,48 @@
             $mail_previous['end_date'] =
                 getMailTimeDateString($row['tbl_r_end_time']);
             // use getMailTimeDateString as all I want is the date
-
 	    $mail_previous['rep_end_date'] =
-
                 getMailTimeDateString($row['tbl_r_end_date'], FALSE);
-
             // 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_end_time']);
             
-
 	    $mail_previous['rep_opt'] = "";
-
 	    switch($row['rep_type'])
-
 	    {
-
 		case 2:
-
 		case 6:
-
 			$rep_day[0] = $row['rep_opt'][0] != "0";
-
 			$rep_day[1] = $row['rep_opt'][1] != "0";
-
 			$rep_day[2] = $row['rep_opt'][2] != "0";
-
 			$rep_day[3] = $row['rep_opt'][3] != "0";
-
 			$rep_day[4] = $row['rep_opt'][4] != "0";
-
 			$rep_day[5] = $row['rep_opt'][5] != "0";
-
 			$rep_day[6] = $row['rep_opt'][6] != "0";
 
-
-
 			if ($row['rep_type'] == 6)
-
 			{
-
 				$mail_previous['rep_num_weeks'] = $row['rep_num_weeks'];
-
 			}
-
 			else
-
 			{
-
 				$mail_previous['rep_num_weeks'] = "";
-
 			}
-
 			
-
 			break;
-
 		
-
 		default:
-
 			$rep_day = array(0, 0, 0, 0, 0, 0, 0);
-
 	    }
-
 	    for ($i = 0; $i < 7; $i++)
-
 	    {
-
 		$wday = ($i + $weekstarts) % 7;
-
 		if ($rep_day[$wday])
-
 		    $mail_previous['rep_opt'] .= day_name($wday) . " ";
-
 	    }
-
 	    
-
 	    $mail_previous['rep_num_weeks'] = $row['rep_num_weeks'];
-
         }
         toTimeString($mail_previous['duration'], $mail_previous['dur_units']);
     }
@@ -974,13 +835,10 @@
 {
     require_once "Mail.php";
 
-
     // Headers part
     $headers['From']         = $from;
     if( $backend != 'mail' ) {
-
         $headers['To']           = $recipients;
-
     }
     (NULL != $cc) ? $headers['Cc'] = $cc : '';
     (NULL != $bcc) ? $headers['Bcc'] = $bcc : '';
@@ -988,15 +846,11 @@
     $headers['MIME-Version'] = '1.0';
     $headers['Content-Type'] = 'text/plain; charset=' . $charset;
 
-
     // Parameters part
     if( $backend == 'sendmail' ) {
-
         $params['sendmail_path'] = $sendmail_path;
         $params['sendmail_args'] = $sendmail_args;
-
     }
-
     if( $backend == "smtp" ) {
         $params['host']          = $host;
         $params['port']          = $port;
@@ -1005,11 +859,14 @@
         $params['password']      = $password;
     }
 
-
-
     // 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;
 }
 
@@ -1033,4 +890,4 @@
 }
 
 // }}}
-?>
\ No newline at end of file
+?>
Index: plugins/blocks/mrbs/web/lang.zh-tw.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/lang.zh-tw.php,v
retrieving revision 1.1
diff -u -r1.1 lang.zh-tw.php
--- plugins/blocks/mrbs/web/lang.zh-tw.php	5 Apr 2007 22:25:32 -0000	1.1
+++ plugins/blocks/mrbs/web/lang.zh-tw.php	2 Aug 2008 04:19:52 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: lang.zh-tw.php,v 1.1 2007/04/05 22:25:32 arborrow 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
@@ -11,7 +11,7 @@
 # This file is PHP code. Treat it as such.
 
 # The charset to use in "Content-type" header
-$vocab["charset"]            = "Big5";
+$vocab["charset"]            = "utf-8";
 
 # Used in style.php
 $vocab["mrbs"]               = "會議室預約系統";
Index: plugins/blocks/mrbs/web/lang.fi.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/lang.fi.php,v
retrieving revision 1.2
diff -u -r1.2 lang.fi.php
--- plugins/blocks/mrbs/web/lang.fi.php	27 Apr 2007 10:48:28 -0000	1.2
+++ plugins/blocks/mrbs/web/lang.fi.php	2 Aug 2008 04:19:52 -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.php
-$vocab["mrbs"]               = "Huonetilojen varausj�rjestelm�";
+# Used in style.inc
+$vocab["mrbs"]               = "Huonetilojen varausjärjestelmä";
 
-# Used in functions.php
+# 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.php
-$vocab["viewday"]            = "N�yt� p�iv�";
-$vocab["viewweek"]           = "N�yt� viikko";
-$vocab["viewmonth"]          = "N�yt� kuukausi";
+# Used in trailer.inc
+$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.php AND pgsql.php
-$vocab["failed_connect_db"]  = "J�rjestelm�virhe: Tietokantayhteyden avaaminen ei onnistu.";
+# Used in mysql.inc AND pgsql.inc
+$vocab["failed_connect_db"]  = "Järjestelmävirhe: Tietokantayhteyden avaaminen ei onnistu.";
 
 ?>
Index: plugins/blocks/mrbs/web/mysqli.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/mysqli.php,v
retrieving revision 1.3
diff -u -r1.3 mysqli.php
--- plugins/blocks/mrbs/web/mysqli.php	1 Aug 2008 04:02:10 -0000	1.3
+++ plugins/blocks/mrbs/web/mysqli.php	2 Aug 2008 04:19:53 -0000
@@ -1,7 +1,7 @@
 <?php
-// $Id: mysqli.php,v 1.3 2008/08/01 04:02:10 arborrow Exp $
+// $Id: mysqli.inc,v 1.1.2.2 2006/10/09 15:53:59 jberanek Exp $
 
-// mysql.php - Simple PHP database support for MySQL.
+// mysqli.php - 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
@@ -10,12 +10,13 @@
 // Including this file connects you to the database, or exits on error.
 require_once("../../../config.php"); //for Moodle integration
 
+
 // 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);
+  $r->close();
 }
 
 // Execute a non-SELECT SQL command (insert/update/delete).
@@ -23,8 +24,14 @@
 // 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;
+  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.
@@ -35,12 +42,16 @@
 // 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;
+    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,
@@ -48,8 +59,10 @@
 // Returns 0 on error; use sql_error to get the error message.
 function sql_query ($sql)
 {
-	$r = mysql_query($sql);
-	return $r;
+    global $mysqli;
+
+    $r = $mysqli->query($sql);
+    return $r;
 }
 
 // Return a row from a result. The first row is 0.
@@ -59,13 +72,12 @@
 // 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);
+    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.
@@ -76,32 +88,35 @@
 // 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);
+    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 mysql_num_rows($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)
 {
-	return mysql_insert_id();
+    global $mysqli;
+
+    return $mysqli->insert_id;
 }
 
 // Return the text of the last error message.
 function sql_error()
 {
-	return mysql_error();
+    global $mysqli;
+
+    return $mysqli->error;
 }
 
 // Begin a transaction, if the database supports it. This is used to
@@ -129,57 +144,57 @@
 // 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;
+    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 = "";
+    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 = "";
-	}
+    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]";
+    $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 ";
+    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) ";
+    return " UNIX_TIMESTAMP($fieldname) ";
 }
 
 // Generate non-standard SQL to match a string anywhere in a field's value
@@ -188,29 +203,31 @@
 // 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%' ";
+    $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);
+    $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)
 {
-	return mysql_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 mysql_num_fields($result);
+    return $result->field_count;
 }
 
 
@@ -220,15 +237,13 @@
 // 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_string('failed_connect_db','block_mrbs') . "\n";
-	exit;
+$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;
 }
 
-?>
\ No newline at end of file
+?>
Index: plugins/blocks/mrbs/web/report.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/report.php,v
retrieving revision 1.5
diff -u -r1.5 report.php
--- plugins/blocks/mrbs/web/report.php	1 Aug 2008 04:02:11 -0000	1.5
+++ plugins/blocks/mrbs/web/report.php	2 Aug 2008 04:19:53 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: report.php,v 1.5 2008/08/01 04:02:11 arborrow Exp $
+# $Id: report.php,v 1.22.2.3 2007/02/13 12:53:33 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 require_once "grab_globals.inc.php";
 include "config.inc.php";
@@ -43,32 +43,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_string('all_day','block_mrbs');
@@ -93,32 +94,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;
 }
 
@@ -141,7 +120,7 @@
         global $enable_periods;
 	# Display Area/Room, but only when it changes:
 	$area_room = htmlspecialchars($row[8]) . " - " . htmlspecialchars($row[9]);
-	$date = utf8_strftime("%d-%b-%Y", $row[2]);
+	$date = utf8_strftime("%d-%b-%Y", $row[1]);
 	# entries to be sorted on area/room
 	if( $sortby == "r" )
 	{
@@ -207,7 +186,7 @@
 	# Created by and last update timestamp:
 	echo "<tr><td class=\"BL\" colspan=2><small><b>".get_string('createdby','block_mrbs')."</b> " .
 		htmlspecialchars($row[6]) . ", <b>".get_string('lastmodified')."</b> " .
-		date_time_string($row[7]) . "</small></td></tr>\n";
+		time_date_string($row[7]) . "</small></td></tr>\n";
 
 	echo "</table>\n";
 }
@@ -479,8 +458,8 @@
 	$descrmatch = unslashes($descrmatch);
 
 	# Start and end times are also used to clip the times for summary info.
-	$report_start = mktime(0, 0, 0, $From_month, $From_day, $From_year);
-	$report_end = mktime(0, 0, 0, $To_month, $To_day+1, $To_year);
+	$report_start = mktime(0, 0, 0, $From_month+0, $From_day+0, $From_year+0);
+	$report_end = mktime(0, 0, 0, $To_month+0, $To_day+1, $To_year+0);
 
 #   SQL result will contain the following columns:
 # Col Index  Description:
@@ -496,9 +475,7 @@
 #  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, "
-		.  sql_syntax_timestamp_to_unix("e.timestamp")
-		. ", a.area_name, r.room_name"
+		. "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";
Index: plugins/blocks/mrbs/web/week.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/week.php,v
retrieving revision 1.5
diff -u -r1.5 week.php
--- plugins/blocks/mrbs/web/week.php	1 Aug 2008 04:02:11 -0000	1.5
+++ plugins/blocks/mrbs/web/week.php	2 Aug 2008 04:19:53 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: week.php,v 1.5 2008/08/01 04:02:11 arborrow 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("../../../config.php"); //for Moodle integration
@@ -32,7 +32,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--;
 }
 
@@ -352,7 +352,7 @@
 	} else {
 		echo "<a href=\"$hilite_url=$time_t\" title=\""
         . get_string('highlight_line','block_mrbs') . "\">"
-        . 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:
@@ -460,7 +460,7 @@
             tdcell("red");
             echo "<a href=\"$hilite_url=$time_t\" title=\""
             . get_string('highlight_line','block_mrbs') . "\">"
-            . utf8_date(hour_min_format(),$t) . "</a></td>";
+            . utf8_strftime(hour_min_format(),$t) . "</a></td>";
         }
     }
 
@@ -471,4 +471,4 @@
 show_colour_key();
 
 include "trailer.php"; 
-?>
\ No newline at end of file
+?>
Index: plugins/blocks/mrbs/web/style.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/style.php,v
retrieving revision 1.4
diff -u -r1.4 style.php
--- plugins/blocks/mrbs/web/style.php	1 Aug 2008 04:02:11 -0000	1.4
+++ plugins/blocks/mrbs/web/style.php	2 Aug 2008 04:19:53 -0000
@@ -1,13 +1,12 @@
 <?php
 
-# $Id: style.php,v 1.4 2008/08/01 04:02:11 arborrow Exp $
+# $Id: style.inc,v 1.10.2.2 2006/10/09 15:54:00 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 global $unicode_encoding;
 
-
 ?>
-  <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";
@@ -17,6 +16,7 @@
      echo get_string('charset','block_mrbs');
    }
 ?>">
+    <META NAME="Robots" content="noindex">
 <?php
 
 global $refresh_rate;
@@ -25,6 +25,6 @@
 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: plugins/blocks/mrbs/web/day.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/day.php,v
retrieving revision 1.6
diff -u -r1.6 day.php
--- plugins/blocks/mrbs/web/day.php	1 Aug 2008 04:02:11 -0000	1.6
+++ plugins/blocks/mrbs/web/day.php	2 Aug 2008 04:19:52 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: day.php,v 1.6 2008/08/01 04:02:11 arborrow Exp $
+# $Id: day.php,v 1.38.2.3 2007/02/13 12:53:24 jberanek Exp $
 require_once("../../../config.php");
 require_once "grab_globals.inc.php";
 include "config.inc.php";
@@ -39,7 +39,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 (($area>0))
@@ -294,7 +294,7 @@
 		} else {
 			echo "<a href=\"$hilite_url=$time_t\" title=\""
             . get_string('highlight_line','block_mrbs') . "\">"
-            . 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
@@ -305,7 +305,7 @@
 				$id    = $today[$room][$time_t]["id"];
 				$color = $today[$room][$time_t]["color"];
 				$descr = htmlspecialchars($today[$room][$time_t]["data"]);
-				$long_descr = $today[$room][$time_t]["long_descr"];
+				$long_descr = htmlspecialchars($today[$room][$time_t]["long_descr"]);
 			}
 			else
 				unset($id);
@@ -376,7 +376,7 @@
                 tdcell("red");
 		        echo "<a href=\"$hilite_url=$time_t\" title=\""
                 . get_string('highlight_line','block_mrbs') . "\">"
-                . utf8_date(hour_min_format(),$t) . "</a></td>\n";
+                . utf8_strftime(hour_min_format(),$t) . "</a></td>\n";
             }
         }
 
Index: plugins/blocks/mrbs/web/session_cookie.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/session_cookie.php,v
retrieving revision 1.3
diff -u -r1.3 session_cookie.php
--- plugins/blocks/mrbs/web/session_cookie.php	1 Aug 2008 04:02:11 -0000	1.3
+++ plugins/blocks/mrbs/web/session_cookie.php	2 Aug 2008 04:19:53 -0000
@@ -18,8 +18,18 @@
 *									      *
 \*****************************************************************************/
 
-// $Id: session_cookie.php,v 1.3 2008/08/01 04:02:11 arborrow Exp $
+// $Id: session_cookie.inc,v 1.9.2.4 2007/02/13 12:53:34 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
+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".
   Will eventually return to URL argument "TargetURL=whatever".
@@ -35,7 +45,7 @@
     if ($NewUserName == "") {
         // Delete cookie
 
-        setcookie("UserName", '', time()-42000);
+        setcookie("UserName", '', time()-42000, $cookie_path);
     } else {
         $NewUserName = unslashes($NewUserName);
         $NewPassword = unslashes($NewPassword);
@@ -53,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,
@@ -131,7 +141,7 @@
 }
 
 function getUserName()
-{   return 'cookie';
+{   return 'cookie'; //I forget why this was added, apparently to avoid the rest of the function from working -arb
     if (!empty($_COOKIE) && isset($_COOKIE["UserName"]))
     {
 	return $_COOKIE["UserName"];
Index: plugins/blocks/mrbs/web/ChangeLog
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/ChangeLog,v
retrieving revision 1.2
diff -u -r1.2 ChangeLog
--- plugins/blocks/mrbs/web/ChangeLog	13 Jan 2008 01:27:35 -0000	1.2
+++ plugins/blocks/mrbs/web/ChangeLog	2 Aug 2008 04:19:52 -0000
@@ -2,26 +2,280 @@
  * added optional_param and required_param checks to incoming variable in response to 
  SQL injection attack vulnerability. More information available in CONTRIB-237.
 
+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_3) (mrbs-1_2-branch.2): * Minor
-	  tidying.
+	* 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_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.
+	* 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_3), auth_db_ext.inc (tags:
-	  mrbs-1_2_3), config.inc.php (tags: mrbs-1_2_3),
-	  session_cookie.inc, session_php.inc, site_faq_es.html (tags:
+	* 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
@@ -39,13 +293,15 @@
 
 2005-07-13  John Beranek <jberanek@users.sourceforge.net>
 
-	* lang.ko (tags: mrbs-1_2_3) (mrbs-1_2-branch.1): * Added Korean
-	  translation, as contributed by YoungJoon Kim.
+	* 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_3) (mrbs-1_2-branch.1): * Updated
-	  norwegian translation supplied by Emil Stoa.
+	* 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>
 
@@ -92,26 +348,32 @@
 
 2005-04-11  John Beranek <jberanek@users.sourceforge.net>
 
-	* lang.ja (tags: 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.
+	* 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_3), admin.php (tags: mrbs-1_2_3),
-	  auth_config.inc (tags: mrbs-1_2_3), auth_db.inc, auth_ext.inc
-	  (tags: 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_3), auth_none.inc (tags: mrbs-1_2_3), auth_nw.inc (tags:
-	  mrbs-1_2_3), auth_pop3.inc (tags: mrbs-1_2_3), del.php (tags:
-	  mrbs-1_2_3), del_entry.php (tags: mrbs-1_2_3), edit_area_room.php
-	  (tags: mrbs-1_2_3), edit_entry.php (tags: mrbs-1_2_3),
-	  edit_entry_handler.php, edit_users.php, mrbs_auth.inc (tags:
+	* 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_3), session_ip.inc (tags: mrbs-1_2_3), session_nt.inc
-	  (tags: mrbs-1_2_3), session_omni.inc (tags: mrbs-1_2_3),
-	  session_php.inc
+	  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
@@ -192,8 +454,9 @@
 
 2004-09-21  John Beranek <jberanek@users.sourceforge.net>
 
-	* lang.cs, 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):
+	* 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".
 
@@ -209,9 +472,9 @@
 
 2004-09-14  John Beranek <jberanek@users.sourceforge.net>
 
-	* lang.nl (tags: 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
+	* 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>
 
@@ -228,11 +491,11 @@
 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) (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):
-	  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.
+	  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>
 
@@ -247,19 +510,21 @@
 
 2004-07-28  John Beranek <jberanek@users.sourceforge.net>
 
-	* lang.cz (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): * Updated lang.cz from David Krotil. Only
-	  required one token  to be translated.
+	* 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_3, mrbs-1_2_2,
+	* 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.de (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.el (1.4, mrbs-1_2_3, mrbs-1_2_2,
+	  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,
@@ -269,10 +534,11 @@
 	  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_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_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  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,
@@ -280,18 +546,18 @@
 	  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_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,
+	  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.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.
+	  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
@@ -311,11 +577,11 @@
 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_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.
+	  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.
@@ -557,27 +823,28 @@
 	  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_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
+	  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>
 
@@ -597,9 +864,10 @@
 
 2004-04-25  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
 
-	* edit_users.php (1.8), mysql.inc (1.5, 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,
+	* 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
@@ -660,42 +928,45 @@
 
 2004-04-16  Thierry Bothorel <thierry_bo@users.sourceforge.net>
 
-	* Mail/mail.php (1.2, mrbs-1_2_3, mrbs-1_2_2,
-	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	* 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_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_3,
-	  mrbs-1_2_2, mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	* 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), 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_3, mrbs-1_2_2, mrbs-1_2-branch_lastmerge,
+	  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_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_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_3, mrbs-1_2_2,
-	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	  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), Net/SMTP.php (1.1, mrbs-1_2_3, mrbs-1_2_2,
+	  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/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)
+	  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>
 
@@ -712,15 +983,15 @@
 	  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_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,
+	  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), view_entry.php (1.14), week.php (1.31): Changed
-	  the fixed table names to variables.  The variables are defined in
-	  config.inc.php.
+	  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>
 
@@ -800,8 +1071,8 @@
 
 2004-04-12  Gavin Walker <gwalker@users.sourceforge.net>
 
-	* mincals.inc (1.11, mrbs-1_2_3, mrbs-1_2_2,
-	  mrbs-1_2-branch_lastmerge, mrbs-post-MDB-merge,
+	* 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
@@ -1161,7 +1432,7 @@
 
 2003-12-14  Thierry Bothorel <thierry_bo@users.sourceforge.net>
 
-	* functions.inc (1.21): (print_header_mrbs): Added JavaScript to insure
+	* 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
@@ -1400,10 +1671,10 @@
 
 2003-11-14  Jean-Francois LARVOIRE <jflarvoire@users.sourceforge.net>
 
-	* grab_globals.inc.php (1.2, 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.
+	* 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>
 
@@ -1788,11 +2059,11 @@
 
 2003-01-12  Thierry Bothorel <thierry_bo@users.sourceforge.net>
 
-	* site_faq_fr.html (1.2, 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
+	* 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>
 
@@ -1904,16 +2175,16 @@
 
 	* 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_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):
+	  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
@@ -1957,7 +2228,7 @@
 	       get Mon,Tue,Wed etc instead of M,T,W (using glibc's en_GB
 	       locale).
 
-	     - print_header_mrbs() now outputs a DOCTYPE identifier as well as
+	     - 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.
@@ -2232,7 +2503,7 @@
 
 2001-02-25  L J Bayuk <lbayuk@users.sourceforge.net>
 
-	* .htaccess (1.2, mrbs-1_2_3, mrbs-1_2_2,
+	* .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,
@@ -2253,13 +2524,14 @@
 	  (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-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_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,
Index: plugins/blocks/mrbs/web/edit_entry.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/edit_entry.php,v
retrieving revision 1.5
diff -u -r1.5 edit_entry.php
--- plugins/blocks/mrbs/web/edit_entry.php	1 Aug 2008 04:02:10 -0000	1.5
+++ plugins/blocks/mrbs/web/edit_entry.php	2 Aug 2008 04:19:52 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: edit_entry.php,v 1.5 2008/08/01 04:02:10 arborrow Exp $
+# $Id: edit_entry.php,v 1.30.2.4 2007/02/13 12:53:24 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 require_once('grab_globals.inc.php');
 include "config.inc.php";
@@ -310,9 +310,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>
@@ -459,7 +459,7 @@
 <TR><TD CLASS=CR><B><?php echo get_string('type','block_mrbs')?></B></TD>
   <TD CLASS=CL><SELECT NAME="type">
 <?php
-for ($c = "A"; $c <= "J"; $c++)
+for ($c = "A"; $c <= "Z"; $c++)
 {
 	if (!empty($typel[$c]))
 		echo "<OPTION VALUE=$c" . ($type == $c ? " SELECTED" : "") . ">$typel[$c]\n";
Index: plugins/blocks/mrbs/web/edit_users.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/edit_users.php,v
retrieving revision 1.4
diff -u -r1.4 edit_users.php
--- plugins/blocks/mrbs/web/edit_users.php	1 Aug 2008 04:02:11 -0000	1.4
+++ plugins/blocks/mrbs/web/edit_users.php	2 Aug 2008 04:19:52 -0000
@@ -20,7 +20,7 @@
 *									      *
 \*****************************************************************************/
 
-// $Id: edit_users.php,v 1.4 2008/08/01 04:02:11 arborrow Exp $
+// $Id: edit_users.php,v 1.9.2.3 2005/09/02 10:42:34 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 require_once "grab_globals.inc.php";
 include "config.inc.php";
@@ -45,7 +45,7 @@
 CREATE TABLE $tbl_users
 (
   /* The first four fields are required. Don't remove or reorder. */
-  id        int DEFAULT '0' NOT NULL auto_increment,
+  id        int NOT NULL auto_increment,
   name      varchar(30),
   password  varchar(40),
   email     varchar(75),
@@ -413,4 +413,4 @@
 print "</table>\n";
 
 include "trailer.php";
-?>
+?>
\ No newline at end of file
Index: plugins/blocks/mrbs/web/edit_entry_handler.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/edit_entry_handler.php,v
retrieving revision 1.4
diff -u -r1.4 edit_entry_handler.php
--- plugins/blocks/mrbs/web/edit_entry_handler.php	1 Aug 2008 04:02:11 -0000	1.4
+++ plugins/blocks/mrbs/web/edit_entry_handler.php	2 Aug 2008 04:19:52 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: edit_entry_handler.php,v 1.4 2008/08/01 04:02:11 arborrow Exp $
+// $Id: edit_entry_handler.php,v 1.22.2.5 2007/02/13 12:53:27 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 require_once "grab_globals.inc.php";
 include "config.inc.php";
@@ -42,6 +42,21 @@
     exit;
 }
 
+if ($name == '')
+{
+     print_header_mrbs($day, $month, $year, $area);
+     ?>
+       <H1><?php echo get_string('invalid_booking','block_mrbs'); ?></H1>
+       <?php echo get_string('must_set_description','block_mrbs'); ?>
+   </BODY>
+</HTML>
+<?php
+     exit;
+}       
+
+# Support locales where ',' is used as the decimal point
+$duration = preg_replace('/,/', '.', $duration);
+
 if( $enable_periods ) {
 	$resolution = 60;
 	$hour = 12;
Index: plugins/blocks/mrbs/web/trailer.php
===================================================================
RCS file: /cvsroot/moodle/contrib/plugins/blocks/mrbs/web/trailer.php,v
retrieving revision 1.4
diff -u -r1.4 trailer.php
--- plugins/blocks/mrbs/web/trailer.php	1 Aug 2008 04:02:11 -0000	1.4
+++ plugins/blocks/mrbs/web/trailer.php	2 Aug 2008 04:19:53 -0000
@@ -1,5 +1,5 @@
 <?php
-# $Id: trailer.php,v 1.4 2008/08/01 04:02:11 arborrow Exp $
+# $Id: trailer.php,v 1.10.2.1 2006/10/09 15:54:00 jberanek Exp $
 require_once("../../../config.php"); //for Moodle integration
 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_string('viewweek','block_mrbs').":</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_string('viewmonth','block_mrbs').":</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: plugins/blocks/mrbs/web/site_faq_de.html
===================================================================
RCS file: plugins/blocks/mrbs/web/site_faq_de.html
diff -N plugins/blocks/mrbs/web/site_faq_de.html
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/blocks/mrbs/web/site_faq_de.html	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,411 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+<!-- $Id: site_faq_de.html,v 1.1.2.2 2006/01/26 11:34:02 jberanek Exp $ -->
+  <title>site_faq_de</title>
+</head>
+
+
+<body>
+
+<p><span style="font-weight: bold; font-family: Helvetica,Arial,sans-serif;"><a name="Top"></a><span style="font-weight: bold;">Generelles</span>:</span></p>
+
+<span style="font-family: Helvetica,Arial,sans-serif;">Mit dem Raumbuchungssystem MRBS k&ouml;nnen Sie sowohl
+R&auml;ume wie auch Ger&auml;te oder sonstige Dinge buchen bzw.
+reservieren.<br>
+
+Hierzu w&auml;hlen Sie zun&auml;chst unter Bereiche den
+gew&uuml;nschten "Bereich" aus.&nbsp; Je nach gew&auml;hlter
+Ansicht (Tag/Woche/Monat)<br>
+
+sehen Sie entweder alle R&auml;ume/Ger&auml;te oder nur einen
+einzelnen, den Sie dann geeignet ausw&auml;hlen m&uuml;ssen.<br>
+
+Der 3-Monats-Kalender dient zur schnellen Navigation - die jeweilige
+Ansicht (Tag/Woche/Monat) sowie der ausgew&auml;hlte
+Raum/Ger&auml;t bleibt erhalten.<br>
+
+Der Knopf "Start" neben der Datums-Eingabemaske f&uuml;hrt immer
+zur Tagesansicht des eingestellten Bereichs.<br>
+
+Raum/Ger&auml;te-Reservierungen f&uuml;hren Sie durch einen
+Klick auf das "Plus"-Zeichen (+) des gew&uuml;nschten
+Raum/Ger&auml;ts in der gew&uuml;nschten Zeitspalte </span><span style="font-family: Helvetica,Arial,sans-serif;"></span><br>
+
+<p style="font-family: helvetica,arial,sans-serif;"><b>Anmeldung</b>
+</p>
+
+<menu><a href="#authenticate"><u>Wie melde ich
+mich an?</u></a><br>
+
+<a href="#meeting_delete"><u>Warum kann ich eine
+Buchung nicht
+aendern/loeschen?</u></a><br>
+
+</menu>
+
+<b style=""><span style="font-size: 12pt; font-family: Arial; color: black;">Anlegen
+/
+Aendern von Besprechungen</span></b>
+<menu><a href="#repeating"><u>Wie kann ich
+eine (periodisch)
+wiederkehrende Buchung anlegen?</u></a><br>
+
+<a href="#repeating_delete"><u>Wie kann ich eine
+Buchung innerhalb
+einer Reihe von periodisch wiederkehrenden Buchungen loeschen?</u></a><br>
+
+<a href="#multiple_sites"><u>Wie kann ich Raeume an
+verschiedenen
+Standorten einplanen?</u></a><br>
+
+<a href="#too_many"><u>Meine Besprechung konnte
+nicht angelegt werden,
+da es "zu viele" Eintraege gab!</u></a><br>
+
+<a href="#multiple_users"><u>Was passiert, wenn
+mehrere Benutzer die
+gleiche Besprechung einplanen?</u></a><br>
+
+</menu>
+
+<b style=""><span style="font-size: 12pt; font-family: Arial; color: black;">Verschiedenes</span></b>
+<menu><a href="#search"><u>Suchen</u></a><br>
+
+<a href="#report"><u>Bericht</u></a><br>
+
+<a href="#internal_external"><u>Was ist
+der Unterschied zwischen
+"Intern" und "Extern"?</u></a><br>
+
+</menu>
+
+<b style=""><span style="font-size: 12pt; font-family: Arial; color: black;" lang="EN-GB">Etwas ueber
+das &ldquo;Meeting Room Booking System&rdquo;</span></b>
+<menu><a href="#how_much"><u>Wie viel hat das
+System gekostet?</u></a><br>
+
+<a href="#about"><u>Wie arbeitet das System und wer
+hat es geschrieben?</u></a><br>
+
+</menu>
+
+<hr>
+<menu></menu>
+
+<p>
+<a name="authenticate"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Wie
+melde
+ich mich an?</span></b></a>
+</p>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial;">Das System kann
+mit
+verschiedenen
+Authentifizierungsmethoden konfiguriert werden, dazu gehoeren LDAP,
+Netware und
+SMB. Wenden Sie sich bitte an ihren Systemadministrator, wenn Sie
+Schwierigkeiten bei der Anmeldung haben.</span><br>
+
+</div>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial;"></span></div>
+
+<p style="margin-left: 40px; font-family: helvetica,arial,sans-serif;" class="MsoNormal"><font size="-1"><span style="font-size: 10pt;">Einige
+Systemfunktionen koennen auf besti</span><span style="font-size: 10pt;">mmte
+Benu</span><span style="font-size: 10pt;">tzer
+beschraenkt sein, und
+daher werden die uebrigen Benutzer die Meldung: &bdquo;You do not
+have access
+right to
+modify this item!&ldquo; erhalten.</span>Wenden Sie sich
+bitte an ihren
+Systemadministratoren, wenn ihre Benutzerberechtigungen nicht korrekt
+fuer sie
+eingestellt sind.Wenn das System auf der Grundlage der
+Authentifizierungsmethode LDAP
+eingerichtet ist, dann bedeutet dies, dass sie Zugang zu dem System mit
+dem
+gleichen<span style="">&nbsp; </span>Benutzernamen
+und Passwort z.B.
+"Mark Belanger" "MyPassword" wie zu ihrem E-Mail System
+haben.</font></p>
+
+<font size="-1"><span style="font-size: 10pt; color: black; font-family: helvetica,arial,sans-serif;"></span></font>
+<a href="#top">Top</a>
+<hr>
+<p></p>
+
+<p>
+<a name="meeting_delete"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Warum
+kann
+ich eine
+Buchung nicht loeschen bzw. abaendern?</span></b></a>
+</p>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial; color: black;">Nur
+die
+Person, die die Besprechung im System angelegt hat, kann diese auch
+loeschen
+bzw. abaendern. Nehmen Sie Kontakt mit einem der Administratoren der
+Besprechungszimmer oder mit der Person, die die Besprechung
+urspruenglich
+angelegt hat, auf um diese loeschen bzw. aendern zu lassen</span>.
+</div>
+
+<a href="#top">Top</a>
+<hr>
+<p></p>
+
+<p>&nbsp; <a name="repeating"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Wie
+kann
+ich eine (periodisch) wiederkehrende
+Buchung anlegen?</span></b></a>
+</p>
+
+<div style="margin-left: 40px; font-size: 10pt; font-family: Arial; color: black;">
+Wenn sie auf die
+gewuenschte Besprechungszeit klicken, kommen Sie auf den
+Bildschirm
+zum Anlegen einer Besprechung.<br>
+
+Nach Eingabe einere <span style="font-weight: bold;">Kurzbeschreibung</span>
+und evtl. einer optionalen <span style="font-weight: bold;">Vollst&auml;ndigen
+Beschreibung</span>, sowie von <span style="font-weight: bold;">Tag</span> ,&nbsp;<span style="font-weight: bold;">Dauer</span>, <span style="font-weight: bold;">Bereiche</span>, <span style="font-weight: bold;">R&auml;ume</span>
+(halten Sie die STRG-Taste beim Klicken gedr&uuml;ckt um mehrere zu
+selektieren), waehlen Sie die geeignete Art der
+Wiederholung aus. Der Raum wird fuer die gleiche Uhrzeit an den Tagen,
+die durch Ihren Wiederholungsschluessel (Art der Wiederholung)
+festgelegt sind, bis zum Endtermin (Ende der Wiederholung)
+eingeplant. Taeglich&nbsp; bedeutet eine Einplanung fuer jeden Tag.
+Woechentlich nimmt die Einplanungen an den Wochentagen vor, die
+sie unter Tag der Wiederholung ausgewaehlt
+haben.
+</div>
+
+<font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt; color: black;"></span></font><a href="#top">Top</a>
+<hr>
+<p></p>
+
+<p>
+<a name="repeating_delete"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Wie
+kann
+ich eine
+Buchung innerhalb einer Reihe von periodisch wiederkehrenden
+Besprechungen
+loeschen?</span></b></a>
+</p>
+
+<menu></menu>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial; color: black;">Waehlen
+Sie den entsprechenden Besprechungstermin aus und gehen Sie danach auf
+die
+Auswahl <b>Eintrag loeschen</b></span>.
+</div>
+
+<a href="#top">Top</a>
+<hr>
+<p></p>
+
+<p>&nbsp;&nbsp;<a name="multiple_sites"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Wie
+kann
+ich Raeume an
+verschiedenen Standorten einplanen?</span></b></a>
+</p>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial; color: black;">Das
+ist
+nicht moeglich. Gegenwaertig kann das System nicht mehrere Raeume
+gleichzeitig
+einplanen. Sie muessen jeden Raum separat einplanen. Stellen Sie bitte
+sicher,
+dass die Raeume an den verschiedenen Orten zu der gewuenschten Zeit
+verfuegbar
+sind, bevor sie eine Belegung vornehmen</span>.
+</div>
+
+<a style="font-family: Helvetica,Arial,sans-serif;" href="#top">Top</a>
+<hr style="font-family: Helvetica,Arial,sans-serif;">
+<p style="font-family: Helvetica,Arial,sans-serif;"></p>
+
+<p style="font-weight: bold; font-size: 10pt; font-family: Helvetica,Arial,sans-serif;"><a name="too_many">Meine
+Besprechung
+konnte nicht angelegt werden, da es &bdquo;zu viele
+Eintraege&ldquo;
+gab!</a></p>
+
+<div style="margin-left: 40px; font-size: 10pt; font-family: Helvetica,Arial,sans-serif;">
+Die
+Obergrenze fuer die Anzahl der Wiederholungseintr&auml;ge eines
+Besprechungseintrags liegt im System bei 365. Die Zahl kann aber bei
+Bedarf
+erhoeht werden. Bitte informieren Sie den Buchungsadministrator.</div>
+
+<a href="#top">Top</a>
+<hr>
+<p></p>
+
+<p>
+<a name="multiple_users"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Was
+passiert, wenn mehrere
+Benutzer die gleiche Besprechung einplanen?</span></b></a><a name="multiple_users"></a>
+</p>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial; color: black;">Die
+einfache Antwort ist: der erste, der den Button
+&bdquo;Speichern&ldquo; drueckt,
+macht das
+Rennen. Hinter den Kulissen benutzt das System eine einwandfrei
+arbeitende<span style="">&nbsp; </span>fuer
+mehrere Benutzer und
+gleichzeitige
+Verarbeitung mehrerer Anforderungen ausgerichtete relationale
+Datenbank, die
+viele Tausende von gleichzeitigen Benutzern bedienen kann</span>.
+</div>
+
+<a href="#top">Top</a>
+<hr>
+<p style="font-weight: bold; font-size: 10pt; font-family: Helvetica,Arial,sans-serif;"><a name="search"></a></p>
+<p style="font-weight: bold; font-size: 10pt; font-family: Helvetica,Arial,sans-serif;"><a name="search">Suchen</a></p>
+
+<div style="margin-left: 40px; font-size: 10pt; font-family: Helvetica,Arial,sans-serif;">
+Mit Hilfe des Such-Feldes wird in allen Buchungs-Eintr&auml;gen
+gesucht. Gesucht wird in folgenden Kategorien:<br>
+
+"Erstellt von", "Kurzbeschreibung", "Beschreibung".<br>
+
+Zum Suchen den Such-Begriff in das Such-Feld eingeben und "Return"
+dr&uuml;cken. Als Ergebnis erscheint eine Liste mit gefundenen
+Buchungseintr&auml;gen die den Such-Begriff &nbsp;enthalten.<br>
+
+Wenn Sie auf "<span style="font-weight: bold;">Sie sind </span>&lt;Benutzername&gt;"
+klicken, erhalten Sie eine Liste aller von Ihnen in der Zukunft
+reservierten R&auml;umen/Ger&auml;ten.<br>
+
+</div>
+
+<span style="font-family: Helvetica,Arial,sans-serif;">&nbsp;</span><a style="font-family: Helvetica,Arial,sans-serif;" href="file:///h:/mrbs/site_faq_de.html#top">Top</a>
+<hr style="font-family: Helvetica,Arial,sans-serif;">
+<p><a name="report"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;"></span></b></a></p>
+<p><a name="report"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Bericht<span style="">&nbsp; </span>und
+"Extern"?</span></b></a>
+</p>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial; color: black;">
+Ein Bericht generiert eine komplette Liste von Terminen, gefiltert nach bestimmten Kriterien.
+</span>.<br>
+
+</div>
+
+&nbsp;<a href="#top">Top</a>
+<hr>
+<p><a name="internal_external"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;"></span></b></a></p>
+<p><a name="internal_external"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Was
+ist
+Unterschied zwischen "Intern"<span style="">&nbsp; </span>und
+"Extern"?</span></b></a>
+</p>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial; color: black;">Standardmaessig
+gibt es im System MRBS zwei Besprechungsarten. <b style="">"Intern"</b>
+bedeutet, dass an der Besprechung nur Firmenangestellte
+teilnehmen.<span style="">&nbsp; </span><b style="">"Extern"</b><span style="">&nbsp;
+</span>heisst,
+dass als Teilnehmer auch Kunden, Lieferanten, Geldanleger, usw.
+vorgesehen
+sind.<span style="">&nbsp; </span>Sie koennen
+fuer ihren Standort bis
+zu 10 Besprechungsarten nach ihren eigenen Beduerfnissen definieren.
+Jeder Besprechungsart ist eine Farbe zugeordnet und die Besprechung
+werden in
+der Kalenderuebersicht entsprechend farblich unterlegt. Eine Uebersicht
+ueber die
+Besprechungsarten und ihre farbliche Darstellung befindet sich am Fuss
+der
+Kalenderuebersicht</span>.<br>
+
+</div>
+
+&nbsp;<a href="#top">Top</a>
+<hr>
+<br>
+
+<p>
+<a name="how_much"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Wieviel
+hat
+das System gekostet?</span></b></a>
+</p>
+
+<div style="margin-left: 40px;"><span style="font-size: 10pt; font-family: Arial; color: black;">Nichts.
+Weitere Informationen entnehmen Sie bitte dem naechsten Abschnitt</span>.<br>
+
+</div>
+
+&nbsp;<a href="#top">Top</a>
+<hr>
+<p></p>
+
+<p>
+<a name="about"><b style=""><span style="font-size: 10pt; font-family: Arial; color: black;">Wie
+arbeitet das System und wer hat es geschrieben?</span></b></a><a name="about"></a>
+</p>
+
+<div style="margin-left: 40px;"><font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt; color: black;">Das </span><span style="font-size: 10pt; color: black;"><a href="http://sourceforge.net/project/?group_id=5113">Meeting
+Room
+Booking System</a></span></font><font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt; color: black;"> ist eine Open source
+Software,
+die unter Gnu Public License (GPL) vertrieben wird. Das bedeutet, die
+Software kann unentgeltlich benutzt, vertrieben und geaendert werden.
+Der groesste Teil des Systems
+ist in </span><a href="http://www.php.net">PHP</a>,
+<span style="font-size: 10pt;">geschrieben, dies ist eine
+Open Source
+Programmiersprache , die in Webseiten eingebettet werden kann,
+vergleichbar den
+Microsoft active server pages. PHP eignet sich besonders gut fuer den
+Zugriff auf Datenbanken.</span><span style="font-size: 10pt;"><span style="font-size: 10pt; color: black;"> Das Datenbanksystem,
+das dem
+Anwendungssystem zugrunde liegt, ist entweder </span><a href="http://www.mysql.com">MySQL</a>
+oder <a href="http://www.postgresql.org">PostgreSQL</a>.<span style="font-size: 10pt;">MySQL ist ein sehr schneller, fuer
+mehrere
+Benutzer
+und parallele Verarbeitung verschiedener Benutzeranforderungen
+ausgerichteter,
+leistungsfaehiger SQL (Structured Query Language) Datenbankserver ,
+dies
+trifft
+auch fuer GPL zu. PostgreSQL ist ein Multi User, Open Source und
+objektorientierter SQL
+Datenbankserver mit allen Leistungsmerkmalen. </span><span style="font-size: 10pt;"><span style="font-size: 10pt; color: black;">Das
+System laeuft auf vielen
+Plattformen, auch auf einer PC-Architektur mit einem </span><a href="http://www.linux.com">Linux</a> -Betriebsssystem.<span style="font-size: 10pt;">Linux ist eine kostenloses, Open
+Source und <span style="">&nbsp;</span>unix-aehnliches
+Betriebssystem.<o:p></o:p></span><span style="font-size: 10pt; color: black;"> Auch der eingesetzte
+Webserver
+ist eine kostenlose Open Source Software.Der</span> <a href="http://www.apache.org">Apache</a> Webserver
+ist der weitverbreiteste Webserver.</span></span></font></div>
+
+<menu style="font-family: helvetica,arial,sans-serif; margin-left: 40px;"><font size="-1"> <o:p></o:p></font></menu>
+
+<div style="margin-left: 40px;"><font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt; color: black;"></span></font><font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt; color: black;"></span><span style="font-size: 10pt;"></span></font><font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt;"></span></font><font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt;"> </span>Die
+Quintessenz lautet:</font><font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt; color: black;"></span></font><br>
+
+<font style="font-family: helvetica,arial,sans-serif;" size="-1"><span style="font-size: 10pt; color: black;"><b>Jeder
+Bestandteil des
+Systems vom Betriebssystem bis zur Anwendungssoftware
+ist vollkommen kostenloser Quellcode.</b></span></font></div>
+
+<menu style="font-family: helvetica,arial,sans-serif;">
+<p></p>
+
+</menu>
+
+<a href="#top">Top</a>
+<hr>
+<p></p>
+
+</body>
+</html>
Index: plugins/blocks/mrbs/web/robots.txt
===================================================================
RCS file: plugins/blocks/mrbs/web/robots.txt
diff -N plugins/blocks/mrbs/web/robots.txt
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/blocks/mrbs/web/robots.txt	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /
Index: plugins/blocks/mrbs/web/version.php
===================================================================
RCS file: plugins/blocks/mrbs/web/version.php
diff -N plugins/blocks/mrbs/web/version.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/blocks/mrbs/web/version.php	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
+require_once("../../../config.php"); //for Moodle integration
+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: plugins/blocks/mrbs/web/session_remote_user.php
===================================================================
RCS file: plugins/blocks/mrbs/web/session_remote_user.php
diff -N plugins/blocks/mrbs/web/session_remote_user.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/blocks/mrbs/web/session_remote_user.php	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,90 @@
+<?php 
+/********************************************************************************************\
+*                                                                                            *
+*   File name       session_remote_user.inc                                                  *
+*                                                                                            *
+*   Description     Get user identity/password using the REMOTE_USER environment variable.   *
+*                   Both identity and password equal the value of REMOTE_USER.               *
+*                                                                                            *
+*   Notes           To use this session scheme, set in config.inc.php:                       *
+*                     $auth['session']  = 'remote_user';                                     *
+*                     $auth['type'] = 'none';
+*                                                                                            *
+*                   If you want to display a logout link, set in config.inc.php:             *
+*                     $auth['remote_user']['logout_link'] = '/logout/link.html';             *
+*                                                                                            *
+*   History                                                                                  *
+*    2006-01-04 Bjorn.Wiberg@its.uu.se  Created based on session_http.inc                    *
+*    2006-02-16 Bjorn.Wiberg@its.uu.se  Made logout link a configuration item                *
+*                                                                                            *
+\*********************************************************************************************/
+
+// $Id: session_remote_user.inc,v 1.1.2.1 2006/04/26 10:01:43 jberanek Exp $
+require_once("../../../config.php"); //for Moodle integration
+/* authGet()
+ * 
+ * Request the user name/password
+ * 
+ * Returns: Nothing
+ */
+function authGet()
+{
+  // User is expected to already be authenticated by the web server, so do nothing
+}
+
+function getUserName()
+{
+  if ((!isset($_SERVER['REMOTE_USER'])) || (!is_string($_SERVER['REMOTE_USER'])) || (empty($_SERVER['REMOTE_USER']))) {
+    return NULL;
+  } else {
+    return $_SERVER['REMOTE_USER'];
+  }
+}
+
+// Print the logon entry on the top banner.
+function PrintLogonBox()
+{
+	global $user_list_link;
+        global $auth;
+  
+	$user = getUserName();
+
+	if (isset($user))
+	{
+	// words 'you are xxxx' becomes a link to the
+        // 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"; ?>
+
+    <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>
+<?php if (isset($user_list_link)) print "	  <br>\n	  " .
+	    "<A href='$user_list_link'>" . get_vocab('user_list') . "</A><br>\n" ;
+?>
+
+<?php
+// Retrieve logout link from configuration, if specified
+if (isset($auth['remote_user']['logout_link']) && is_string($auth['remote_user']['logout_link']) && (!empty($auth['remote_user']['logout_link']))) {
+  print '<A HREF="' . $auth['remote_user']['logout_link'] .'">' . get_vocab('logoff') . "</A><BR>\n";
+}
+?>
+
+    </TD>
+<?php
+    }
+    else
+    {
+?>
+    </TABLE>
+    <H1>Error, REMOTE_USER was not set when it should have been</H1>
+<?php
+    exit;
+    }
+}
+
+?>
