From: Roland Hieber Date: Sun, 22 Feb 2009 00:25:42 +0000 (+0100) Subject: expanded tabs X-Git-Tag: REL_9.02.25~4 X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/commitdiff_plain/8b7108cca58842623aeaa7c5d8a758d7147e6894?hp=e72f55ac765a05586d565c67f79dce57d9c1ad76 expanded tabs --- diff --git a/inc/mod_roomReservationBookingPage.inc b/inc/mod_roomReservationBookingPage.inc index 219c7bd..61fc219 100644 --- a/inc/mod_roomReservationBookingPage.inc +++ b/inc/mod_roomReservationBookingPage.inc @@ -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(" \n", (count($asErrors) > 0) ? $strErrors : "", + "
%s". + "
<%s id='reason' size='15' ". + "value='%s' name='mod_roomReservationBookingTable[reason]' />
%s". + "<%s name='mod_roomReservationBookingTable[submitbooking]' value='%s' />". + "
\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:"), diff --git a/inc/mod_roomReservationBookingsManager.inc b/inc/mod_roomReservationBookingsManager.inc index 124068d..3f2cab6 100644 --- a/inc/mod_roomReservationBookingsManager.inc +++ b/inc/mod_roomReservationBookingsManager.inc @@ -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; diff --git a/inc/mod_roomReservationConfig.inc b/inc/mod_roomReservationConfig.inc index 8dde982..a1f943a 100644 --- a/inc/mod_roomReservationConfig.inc +++ b/inc/mod_roomReservationConfig.inc @@ -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 */ diff --git a/inc/mod_roomReservationConfigPage.inc b/inc/mod_roomReservationConfigPage.inc index 706b9f0..58e3129 100644 --- a/inc/mod_roomReservationConfigPage.inc +++ b/inc/mod_roomReservationConfigPage.inc @@ -85,11 +85,11 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage { // first column echo "". - "
\n"; + "\n"; GroupBox(_c("room-reservation:Available rooms"), "host"); printf("

%s

", _c("room-reservation:The following rooms are ". - "available for booking:")); + "available for booking:")); echo "
"; $this->orwlb->show(); echo "
\n"; @@ -107,9 +107,9 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage { "action. Please use the %sgroup administration%s to assign and revoke ". "privileges."), "", ""), _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 "

\n"; echo sprintf("\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("

%s

", _c("room-reservation:Here you can fill in the ". - "periods where bookings can be undertaken. A booking period can ". - "e. g. correspond to a lesson.")); + "periods where bookings can be undertaken. A booking period can ". + "e. g. correspond to a lesson.")); echo "
"; $this->otlb->show(); echo "
\n"; @@ -142,14 +142,14 @@ class mod_roomReservationConfigPage extends mod_roomReservationPage { GroupBox(_c("room-reservation:Further options"), "manage"); printf("
". - "
%s%s%s
\n", $_SERVER["PHP_SELF"]); + "
\n", $_SERVER["PHP_SELF"]); printf("\n"; printf("", $GLOBALS["stdbtn"], _("OK")); + "[submit]' value='%s' />", $GLOBALS["stdbtn"], _("OK")); echo "
<%s name='mod_roomReservationConfigPage". - "[showweekend]' id='mod_roomReservationConfigPageShowWeekend' ". - "value='1' %s />
". - "%s

", + "[showweekend]' value='0' /><%s name='mod_roomReservationConfigPage". + "[showweekend]' id='mod_roomReservationConfigPageShowWeekend' ". + "value='1' %s />

". + "%s

", $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 "
<%s name='mod_roomReservationConfigPage". - "[showlessons]' id='mod_roomReservationConfigPageShowLessons' ". - "value='1'%s />
". - "%s

", + "[showlessons]' value='0' /><%s name='mod_roomReservationConfigPage". + "[showlessons]' id='mod_roomReservationConfigPageShowLessons' ". + "value='1'%s />

". + "%s

", $GLOBALS["smlchk"], $this->bPostShowLessons ? "checked='checked' " : "", _c("room-reservation:Show „lesson” texts"), _c("room-reservation:Check this box to show texts like ". - "„nth lesson&rdquo in the booking page. If this box is ". - "unchecked, none of these texts are shown.")); + "„nth lesson&rdquo in the booking page. If this box is ". + "unchecked, none of these texts are shown.")); printf("
<%s name='mod_roomReservationConfigPage". - "[submit]' value='%s' />
\n"; _GroupBox(); echo "

\n"; } } -?> \ No newline at end of file +?> diff --git a/inc/mod_roomReservationRoomWhitelistListBox.inc b/inc/mod_roomReservationRoomWhitelistListBox.inc index ae82248..922cfb2 100644 --- a/inc/mod_roomReservationRoomWhitelistListBox.inc +++ b/inc/mod_roomReservationRoomWhitelistListBox.inc @@ -144,7 +144,7 @@ class mod_roomReservationRoomWhitelistListBox printf("", $GLOBALS["treeview_cols"]); CheckCombo(); printf("<%s name='mod_roomReservationRoomWhitelistListBox[action]". - "[delete]' value='%s' />", $GLOBALS["stdbtn"], _("Delete")); + "[delete]' value='%s' />", $GLOBALS["stdbtn"], _("Delete")); echo "\n"; } @@ -159,8 +159,8 @@ class mod_roomReservationRoomWhitelistListBox TreeViewSubtitle(_("Add")); $this->showList($aoRooms); TreeViewLine(sprintf("

<%s name='mod_roomReservationRoomWhitelistList". - "Box[action][add]' value='%s' /> <%s name='mod_roomReservationRoom". - "WhitelistListBox[action][add]' value='%s' />

", $GLOBALS["stdbtn"], + "Box[action][add]' value='%s' /> <%s name='mod_roomReservationRoom". + "WhitelistListBox[action][add]' value='%s' />

", $GLOBALS["stdbtn"], _("OK"), $GLOBALS["stdbtn"], _("Cancel"))); } @@ -180,8 +180,8 @@ class mod_roomReservationRoomWhitelistListBox _c("room-reservation:rooms"))); $this->showList($aoRooms, false); TreeViewLine(sprintf("

<%s name='mod_roomReservationRoomWhitelistList". - "Box[action][delete]' value='%s' /> <%s name='mod_roomReservationRoom". - "WhitelistListBox[action][delete]' value='%s' />

", + "Box[action][delete]' value='%s' /> <%s name='mod_roomReservationRoom". + "WhitelistListBox[action][delete]' value='%s' />

", $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 />", $GLOBALS["smlchk"], $nOid, $nOid, + "ReservationRoomWhitelistListBox[l][%d]' value='1'%s />", $GLOBALS["smlchk"], $nOid, $nOid, @$this->anPostSelection[$nOid] ? " checked='checked'" : "", $nOid, icon("host"), $o->getName()) : sprintf("%s%s", $nOid, icon("host"), + "WhitelistListBox[l][%d]' value='1' />%s%s", $nOid, icon("host"), $o->getName()); TreeViewLine($sBox); } diff --git a/inc/mod_roomReservationTimesliceListBox.inc b/inc/mod_roomReservationTimesliceListBox.inc index b4c9cde..91f5bae 100644 --- a/inc/mod_roomReservationTimesliceListBox.inc +++ b/inc/mod_roomReservationTimesliceListBox.inc @@ -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 "
"; + "method='post'>"; $i = 0; foreach($aoTs as $oTs) { $sBox = sprintf("". - "<%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("", $GLOBALS["treeview_cols"]); CheckCombo(); printf("<%s name='mod_roomReservationTimesliceListBox[submit]' ". - "value='%s' />", $GLOBALS["stdbtn"], _("Delete")); + "value='%s' />", $GLOBALS["stdbtn"], _("Delete")); echo "\n"; } else { TreeViewEmpty(); @@ -261,4 +261,4 @@ class mod_roomReservationTimesliceListBox extends mod_roomReservationControl { } /** @} */ } -?> \ No newline at end of file +?>