expanded tabs
authorRoland Hieber <devnull@localhost>
Sun, 22 Feb 2009 00:25:42 +0000 (01:25 +0100)
committerRoland Hieber <devnull@localhost>
Sun, 22 Feb 2009 00:25:42 +0000 (01:25 +0100)
inc/mod_roomReservationBookingPage.inc
inc/mod_roomReservationBookingTable.inc
inc/mod_roomReservationBookingsManager.inc
inc/mod_roomReservationConfig.inc
inc/mod_roomReservationConfigPage.inc
inc/mod_roomReservationRoomWhitelistListBox.inc
inc/mod_roomReservationTimesliceListBox.inc

index 219c7bd..61fc219 100644 (file)
@@ -39,7 +39,7 @@ require_once("mod_room-reservation/mod_roomReservationConfig.inc");
  */
 class mod_roomReservationBookingPage extends mod_roomReservationPage {
   
-       /** (mod_roomReservationConfig) Reference to the configuration object */
+  /** (mod_roomReservationConfig) Reference to the configuration object */
   protected $oCfg;
   /** 
    * (mod_roomReservationRoomsManager) Reference to the rooms manager object 
@@ -174,7 +174,7 @@ class mod_roomReservationBookingPage extends mod_roomReservationPage {
     if(count($aor) > 0) {
       echo _c("room-reservation:Room:") . sprintf(" <select onchange=".
         "'document.forms[\"room\"].submit()' width='250' ".
-       "name='mod_roomReservationBookingTable[room]'>\n", $this->getStart());
+        "name='mod_roomReservationBookingTable[room]'>\n", $this->getStart());
       foreach($aor as $or) {
         // note to myself: no qu() here, seems this is being done automagically
         echo sprintf("<option value='%s'%s>%s</option>\n", $or->getName(),
@@ -185,14 +185,14 @@ class mod_roomReservationBookingPage extends mod_roomReservationPage {
         $GLOBALS["stdbtn"], _("Change"));
     } else {
       printf("<p>%s</p>\n", _c("room-reservation:No rooms have been ".
-       "configured yet."));
+        "configured yet."));
       return;
     }
         
     // Print line with next 5 or so weeks
     $strSep = "&nbsp;| ";
     $strLink = sprintf("<a href='%s?mod_roomReservationBookingTable[date]=%%d".
-       "&mod_roomReservationBookingTable[room]=%%s'>%%s</a>",
+      "&mod_roomReservationBookingTable[room]=%%s'>%%s</a>",
       $_SERVER["PHP_SELF"]);
     echo "<p>".sprintf($strLink, time(), qu($this->getRoom()),
       _c("room-reservation:Current Week")) . $strSep;
index fd85ef1..af31dda 100644 (file)
@@ -95,9 +95,9 @@ class mod_roomReservationBookingsTable /* extends mclWidget */ {
    */
   protected $cAction;
   /**
-        * (timestamp) The date of the requested booking or the date to show in the
-        * booking table
-        */
+   * (timestamp) The date of the requested booking or the date to show in the
+   * booking table
+   */
   protected $tsDate;
   /**
    * (string) The name of the room of the requested booking or the room to be
@@ -320,7 +320,7 @@ class mod_roomReservationBookingsTable /* extends mclWidget */ {
       $this->strRoom = $str;
     } else {
       throw new Exception(_c("room-reservation:This room is not available ".
-       "for booking."));
+        "for booking."));
     }
   }
  
@@ -600,7 +600,7 @@ CSS;
    * @param $ts (timestamp) current date
    * @param $ob (mod_roomReservationBooking) the booking
    * @param $cFlags (constant) Flags,
-   *   See @ref bookingtable_printbooking_flags for more information.
+   *   See @ref bookingtable_printbooking_flags for more information.
    * @param $asMsgs (array of strings) Additional messages to be printed
    *  inside the cell, one array element per message
    * @return (int) the span of the booking
@@ -634,8 +634,8 @@ CSS;
           "booking is a recurring booking. If you delete it, the period will ".
           "be deallocated for <b>every week</b>, not just this single week!"));
         $strAfter .= sprintf("<p name='form' id='form' style='".
-               "text-align:center'><form action='%s?".
-               "mod_roomReservationBookingTable[action]=submitdelete#form' ".
+          "text-align:center'><form action='%s?".
+          "mod_roomReservationBookingTable[action]=submitdelete#form' ".
           "method='post'>%s%s<br /><%s name='mod_roomReservationBookingTable".
           "[submitdelete]' value='%s' /> <%s name='".
           "mod_roomReservationBookingTable[submitdelete]' value='%s' />".
@@ -704,27 +704,27 @@ CSS;
     $sWeeklyForm = "";
     if($this->oCfg->userIsAdmin()) {
       $sWeeklyForm = sprintf("<label for='interval'>%s</label> %s<br />".
-       "<label for='account'>%s</label> <%s name='".
-       "mod_roomReservationBookingTable[account]' id='account' value='%s' ".
+        "<label for='account'>%s</label> <%s name='".
+        "mod_roomReservationBookingTable[account]' id='account' value='%s' ".
         "size='15' /><br />", _c("room-reservation:Repetition:"), 
         select("mod_roomReservationBookingTable[interval]",
         $this->nPostInterval, array(0 => _c("Select:None"), 1 =>
         _c("room-reservation:every week")), array("add" => "id='interval'")),
         _c("room-reservation:Account, if not yourself:"), $GLOBALS["stdedt"],
-                               $this->strPostAccount);
+        $this->strPostAccount);
     }
     
     echo sprintf("<td name='form' id='form' style='text-align:left'>%s".
-       "<form action='%s?mod_roomReservationBookingTable[action]=".
-       "submit#form' method='post'><label for='tslast'>%s</label> %s".
-       "<br /><label for='reason'>%s</label> <%s id='reason' size='15' ".
-       "value='%s' name='mod_roomReservationBookingTable[reason]' /><br />%s".
-       "<%s name='mod_roomReservationBookingTable[submitbooking]' value='%s' />".
-       "<input type='hidden' name='mod_roomReservationBookingTable[date]' ".
-       "value='%s' /><input type='hidden' name='".
-       "mod_roomReservationBookingTable[room]' value='%s' /><input ".
-       "type='hidden' name='mod_roomReservationBookingTable[tsfirst]' ".
-       "value='%s' /></form></td>\n", (count($asErrors) > 0) ? $strErrors : "",
+      "<form action='%s?mod_roomReservationBookingTable[action]=".
+      "submit#form' method='post'><label for='tslast'>%s</label> %s".
+      "<br /><label for='reason'>%s</label> <%s id='reason' size='15' ".
+      "value='%s' name='mod_roomReservationBookingTable[reason]' /><br />%s".
+      "<%s name='mod_roomReservationBookingTable[submitbooking]' value='%s' />".
+      "<input type='hidden' name='mod_roomReservationBookingTable[date]' ".
+      "value='%s' /><input type='hidden' name='".
+      "mod_roomReservationBookingTable[room]' value='%s' /><input ".
+      "type='hidden' name='mod_roomReservationBookingTable[tsfirst]' ".
+      "value='%s' /></form></td>\n", (count($asErrors) > 0) ? $strErrors : "",
       $_SERVER["PHP_SELF"], _c("room-reservation:until:"),
       select("mod_roomReservationBookingTable[tslast]", $this->getTsLast(),
       $this->oCfg->getTimesliceEndings(true)), _c("room-reservation:Reason:"),
index 124068d..3f2cab6 100644 (file)
@@ -184,7 +184,7 @@ class mod_roomReservationBookingsManager {
       // No UID yet, insert new booking
       // @todo write interval and user if interval > 0
       $strLog = sprintf("Raum „%s“ am %s von %s bis %s gebucht ".
-       "(Begründung: %s)", $ob->getRoom(), date("d\.m\.Y", $ob->getDate()),
+        "(Begründung: %s)", $ob->getRoom(), date("d\.m\.Y", $ob->getDate()),
         gmdate("G:i", $oTsB[$ob->getTsFirst()]), gmdate("G:i",
         $oTsE[$ob->getTsLast()]), $ob->getReason());
     } else {
@@ -240,7 +240,7 @@ class mod_roomReservationBookingsManager {
       $oTsE[$ob->getTsLast()]), $ob->getReason());
     // Delete it from the database
     if(!db_query("DELETE FROM mod_roomreservation_bookings WHERE ".
-       "rrb_uid = $1;", $nUid)) {
+      "rrb_uid = $1;", $nUid)) {
       throw new SQLException(MOD_ROOM_RESERVATION_ERROR_SQL);
       return false;
     } else {
@@ -261,7 +261,7 @@ class mod_roomReservationBookingsManager {
       return false;   // user is not logged in
     } else {
       $hQuery = db_query("SELECT rrb_act FROM mod_roomreservation_bookings WHERE ".
-       "rrb_uid = $1;", intval($nID));
+        "rrb_uid = $1;", intval($nID));
       if(!is_resource($hQuery)) {
         throw new SQLException(MOD_ROOM_RESERVATION_ERROR_SQL);
         return false;
index 8dde982..a1f943a 100644 (file)
@@ -122,7 +122,7 @@ class mod_roomReservationConfig {
    * @{
    */
   
-       /**
+  /**
    * Add a timeslice. A check is done that the timeslices do not overlap, and
    * in this case, an Exception is thrown.
    * @param $oTs (mod_roomReservationTimeslice)
@@ -183,7 +183,7 @@ class mod_roomReservationConfig {
         throw new SQLException(MOD_ROOM_RESERVATION_ERROR_SQL);
       } else {
         log_insert(sprintf("Raum „%s“ für Buchungen zur Verfügung gestellt",
-         $sRoom));
+    $sRoom));
       }
     }
   }
@@ -195,7 +195,7 @@ class mod_roomReservationConfig {
    */
   public function unWhitelistRoom($sRoom) {
     $h = db_query("DELETE FROM mod_roomreservation_roomswhitelist WHERE ".
-       "rrr_name = $1;", $sRoom);
+      "rrr_name = $1;", $sRoom);
     if(!$h) {
       throw new SQLException(MOD_ROOM_RESERVATION_ERROR_SQL);
     } else {
@@ -212,7 +212,7 @@ class mod_roomReservationConfig {
    */
   public function isRoomWhitelisted($sRoom) {
     $h = db_query("SELECT * FROM mod_roomreservation_roomswhitelist WHERE ".
-       "rrr_name=$1;", $sRoom);
+      "rrr_name=$1;", $sRoom);
     if(!$h) {
       throw new SQLException(MOD_ROOM_RESERVATION_ERROR_SQL);
     }
@@ -256,7 +256,7 @@ class mod_roomReservationConfig {
     array_merge($this->asMessages, array($sMessage));
   }
   
-       /**
+  /**
    * Get all timeslices in chronological order
    * @return array of rmTimeslice
    */
index 706b9f0..58e3129 100644 (file)
@@ -85,11 +85,11 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
     
     // first column
     echo "<table border='0' cellspacing='10' cellpadding='0'><tr>".
-       "<td style='width:50%;'>\n";
+      "<td style='width:50%;'>\n";
     
     GroupBox(_c("room-reservation:Available rooms"), "host");
     printf("<p>%s</p>", _c("room-reservation:The following rooms are ".
-       "available for booking:"));
+      "available for booking:"));
     echo "<div style='margin:8px;'>";
     $this->orwlb->show();
     echo "</div>\n";
@@ -107,9 +107,9 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
       "action. Please use the %sgroup administration%s to assign and revoke ".
       "privileges."), "<a href='/idesk/admin/act/groups.php'>", "</a>"),
       _c("room-reservation:Please note that every group with the booking ".
-       "privilege can also implicitly view the booking table and every group with ".
-       "the administration privilege can also implicitly book and view the ".
-       "booking table."));
+      "privilege can also implicitly view the booking table and every group with ".
+      "the administration privilege can also implicitly book and view the ".
+      "booking table."));
     echo "<p><table style='width:100%'><tr>\n";
     echo sprintf("<td>%s%s</td><td>%s</td>\n", icon("keys"),
       _("View the booking table").":", $asViewGroups == array() ?
@@ -133,8 +133,8 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
     
     GroupBox(_c("room-reservation:Periods"), "mod_room-reservation_timeslice");
     printf("<p>%s</p>", _c("room-reservation:Here you can fill in the ".
-       "periods where bookings can be undertaken. A booking period can ".
-       "e.&nbsp;g. correspond to a lesson."));
+      "periods where bookings can be undertaken. A booking period can ".
+      "e.&nbsp;g. correspond to a lesson."));
     echo "<div style='margin:8px;'>";
     $this->otlb->show();
     echo "</div>\n";
@@ -142,14 +142,14 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
     
     GroupBox(_c("room-reservation:Further options"), "manage");
     printf("<div style='margin:8px;'><form action='%s' method='post'>".
-       "<table><tr>\n", $_SERVER["PHP_SELF"]);
+      "<table><tr>\n", $_SERVER["PHP_SELF"]);
 
     printf("<td><input type='hidden' name='mod_roomReservationConfigPage".
-       "[showweekend]' value='0' /><%s name='mod_roomReservationConfigPage".
-       "[showweekend]' id='mod_roomReservationConfigPageShowWeekend' ".
-       "value='1' %s /></td><td><label for='".
-       "mod_roomReservationConfigPageShowWeekend'><b>%s</b></label><br />".
-       "<span class='mod_roomReservationConfigPageExplanation'>%s</span></p>",
+      "[showweekend]' value='0' /><%s name='mod_roomReservationConfigPage".
+      "[showweekend]' id='mod_roomReservationConfigPageShowWeekend' ".
+      "value='1' %s /></td><td><label for='".
+      "mod_roomReservationConfigPageShowWeekend'><b>%s</b></label><br />".
+      "<span class='mod_roomReservationConfigPageExplanation'>%s</span></p>",
       $GLOBALS["smlchk"], $this->bPostShowWeekend ? "checked='checked' " : "",
       _c("room-reservation:Show weekend"), _c("room-reservation:If ".
       "selected, the weekdays saturday and sunday are also shown in the ".
@@ -157,23 +157,23 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage {
 
     echo "</tr><tr>\n";
     printf("<td><input type='hidden' name='mod_roomReservationConfigPage".
-       "[showlessons]' value='0' /><%s name='mod_roomReservationConfigPage".
-       "[showlessons]' id='mod_roomReservationConfigPageShowLessons' ".
-       "value='1'%s /></td><td><label for='".
-       "mod_roomReservationConfigPageShowLessons'><b>%s</b></label><br />".
-       "<span class='mod_roomReservationConfigPageExplanation'>%s</span></p>",
+      "[showlessons]' value='0' /><%s name='mod_roomReservationConfigPage".
+      "[showlessons]' id='mod_roomReservationConfigPageShowLessons' ".
+      "value='1'%s /></td><td><label for='".
+      "mod_roomReservationConfigPageShowLessons'><b>%s</b></label><br />".
+      "<span class='mod_roomReservationConfigPageExplanation'>%s</span></p>",
       $GLOBALS["smlchk"], $this->bPostShowLessons ? "checked='checked' " : "",
       _c("room-reservation:Show &bdquo;lesson&rdquo; texts"),
       _c("room-reservation:Check this box to show texts like ".
-       "&bdquo;<i>n</i>th lesson&rdquo in the booking page. If this box is ".
-       "unchecked, none of these texts are shown."));
+        "&bdquo;<i>n</i>th lesson&rdquo in the booking page. If this box is ".
+        "unchecked, none of these texts are shown."));
       
     printf("</tr><tr><td colspan='2'><%s name='mod_roomReservationConfigPage".
-       "[submit]' value='%s' /></td>", $GLOBALS["stdbtn"], _("OK"));
+      "[submit]' value='%s' /></td>", $GLOBALS["stdbtn"], _("OK"));
     echo "</tr></table></form></div>\n";
     _GroupBox();
 
     echo "</td></tr></table>\n";
   }
 }
-?>
\ No newline at end of file
+?>
index ae82248..922cfb2 100644 (file)
@@ -144,7 +144,7 @@ class mod_roomReservationRoomWhitelistListBox
     printf("<tr><td class='tbbtm' colspan='%d'>", $GLOBALS["treeview_cols"]);
     CheckCombo();
     printf("<%s name='mod_roomReservationRoomWhitelistListBox[action]".
-       "[delete]' value='%s' />", $GLOBALS["stdbtn"], _("Delete"));
+      "[delete]' value='%s' />", $GLOBALS["stdbtn"], _("Delete"));
     echo "</td></tr>\n";
   }
   
@@ -159,8 +159,8 @@ class mod_roomReservationRoomWhitelistListBox
     TreeViewSubtitle(_("Add"));
     $this->showList($aoRooms);
     TreeViewLine(sprintf("<p><%s name='mod_roomReservationRoomWhitelistList".
-       "Box[action][add]' value='%s' /> <%s name='mod_roomReservationRoom".
-       "WhitelistListBox[action][add]' value='%s' /></p>", $GLOBALS["stdbtn"],
+      "Box[action][add]' value='%s' /> <%s name='mod_roomReservationRoom".
+      "WhitelistListBox[action][add]' value='%s' /></p>", $GLOBALS["stdbtn"],
        _("OK"), $GLOBALS["stdbtn"], _("Cancel")));
   }
   
@@ -180,8 +180,8 @@ class mod_roomReservationRoomWhitelistListBox
       _c("room-reservation:rooms")));
     $this->showList($aoRooms, false);
     TreeViewLine(sprintf("<p><%s name='mod_roomReservationRoomWhitelistList".
-       "Box[action][delete]' value='%s' /> <%s name='mod_roomReservationRoom".
-       "WhitelistListBox[action][delete]' value='%s' /></p>",
+      "Box[action][delete]' value='%s' /> <%s name='mod_roomReservationRoom".
+      "WhitelistListBox[action][delete]' value='%s' /></p>",
        $GLOBALS["stdbtn"], _("OK"), $GLOBALS["stdbtn"], _("Cancel")));
   }
   
@@ -197,12 +197,12 @@ class mod_roomReservationRoomWhitelistListBox
         $nOid = pg_fetch_result(db_query("SELECT oid FROM ".
           "rooms WHERE name = $1", $o->getName()), 0, "oid");
         $sBox = $bCheckboxes ? sprintf("<%s id='box%d' name='mod_room".
-               "ReservationRoomWhitelistListBox[l][%d]' value='1'%s /><label ".
-               "for='box%d'>%s%s</label>", $GLOBALS["smlchk"], $nOid, $nOid,
+          "ReservationRoomWhitelistListBox[l][%d]' value='1'%s /><label ".
+          "for='box%d'>%s%s</label>", $GLOBALS["smlchk"], $nOid, $nOid,
           @$this->anPostSelection[$nOid] ? " checked='checked'" : "", $nOid,
           icon("host"), $o->getName()) : 
           sprintf("<input type='hidden' name='mod_roomReservationRoom".
-               "WhitelistListBox[l][%d]' value='1' />%s%s", $nOid, icon("host"),
+          "WhitelistListBox[l][%d]' value='1' />%s%s", $nOid, icon("host"),
           $o->getName());
         TreeViewLine($sBox);
       }
index b4c9cde..91f5bae 100644 (file)
@@ -114,12 +114,12 @@ class mod_roomReservationTimesliceListBox  extends mod_roomReservationControl {
       // Note: we want to handle the timestamps in GMT format, hence the "+0000"
       if(strtotime($this->getNewBegin()." +0000") === false) {
         $this->asMessages[] = _c("room-reservation:The beginning time is ".
-               "invalid.");
+          "invalid.");
         $bErrors = true;
       }
       if(strtotime($this->getNewEnd()." +0000") === false) {
         $this->asMessages[] = _c("room-reservation:The ending time is ".
-               "invalid.");
+          "invalid.");
         $bErrors = true;
       }
       
@@ -222,7 +222,7 @@ class mod_roomReservationTimesliceListBox  extends mod_roomReservationControl {
     }
     
     TreeViewLine(array(sprintf("<%s name='mod_roomReservationTimesliceListBox".
-       "[begin]' value='%s' size='8'/>", $GLOBALS["stdedt"], 
+      "[begin]' value='%s' size='8'/>", $GLOBALS["stdedt"], 
       $this->getNewBegin()), sprintf("<%s name='".
       "mod_roomReservationTimesliceListBox[end]' value='%s' size='8'/> <%s ".
       "name='mod_roomReservationTimesliceListBox[submit]' value='%s' />", 
@@ -234,12 +234,12 @@ class mod_roomReservationTimesliceListBox  extends mod_roomReservationControl {
     $aoTs = $this->oCfg->getTimeslices();
     if(count($aoTs) > 0) {
       echo "<form action='?mod_roomReservationTimesliceListBox[action]=delete' ".
-       "method='post'>";
+        "method='post'>";
       $i = 0;
       foreach($aoTs as $oTs) {
         $sBox = sprintf("<input type='hidden' ".
-               "name='mod_roomReservationTimesliceListBox[l][%d]' value='0' />".
-               "<%s name='mod_roomReservationTimesliceListBox[l][%d]' value='1' />",
+          "name='mod_roomReservationTimesliceListBox[l][%d]' value='0' />".
+          "<%s name='mod_roomReservationTimesliceListBox[l][%d]' value='1' />",
           $i, $GLOBALS["smlchk"], $i);
         // Note: we have only GMT timestamps in the timeslice objects
         TreeViewLine(array($sBox . gmstrftime(_("%#I:%M %p"), $oTs->getBegin()),
@@ -250,7 +250,7 @@ class mod_roomReservationTimesliceListBox  extends mod_roomReservationControl {
       printf("<tr><td class='tbbtm' colspan='%d'>", $GLOBALS["treeview_cols"]);
       CheckCombo();
       printf("<%s name='mod_roomReservationTimesliceListBox[submit]' ".
-       "value='%s' />", $GLOBALS["stdbtn"], _("Delete"));
+        "value='%s' />", $GLOBALS["stdbtn"], _("Delete"));
       echo "</td></tr>\n";
     } else {
       TreeViewEmpty();
@@ -261,4 +261,4 @@ class mod_roomReservationTimesliceListBox  extends mod_roomReservationControl {
   }
   /** @} */
 }
-?>
\ No newline at end of file
+?>
This page took 0.046578 seconds and 4 git commands to generate.