otlb = new mod_roomReservationTimesliceListBox($this->oCfg); $this->orwlb = new mod_roomReservationRoomWhitelistListBox($this->oCfg); $this->setTitle(_c("room-reservation:Configuration")); $this->setIcon("mod_room-reservation_config"); } public function processRequestVariables() { // default values $this->bPostShowWeekend = $this->oCfg->isShowWeekend(); $this->bPostShowLessons = $this->oCfg->isShowLessons(); if(isset($_POST["mod_roomReservationConfigPage"])) { if(isset($_POST["mod_roomReservationConfigPage"]["showweekend"])) { $this->bPostShowWeekend = ($_POST["mod_roomReservationConfigPage"]["showweekend"] == true); } if(isset($_POST["mod_roomReservationConfigPage"]["showlessons"])) { $this->bPostShowLessons = ($_POST["mod_roomReservationConfigPage"]["showlessons"] == true); } // process the request if(isset($_POST["mod_roomReservationConfigPage"]["submit"])) { $this->oCfg->setShowWeekend($this->bPostShowWeekend); $this->oCfg->setShowLessons($this->bPostShowLessons); try { $this->oCfg->writeConfig(); } catch(Exception $e) { $this->asMessages[] = $e->getMessage(); } } } } public function doShow() { // error messages if(count($this->asMessages) > 0) { printf("
%s
", nl2br(q(join("\n", $this->asMessages)))); } // first column echo "\n";
GroupBox(_c("room-reservation:Available rooms"), "host");
printf(" %s ", _c("room-reservation:The following rooms are ". "available for booking:")); echo "";
$this->orwlb->show();
echo " \n";
_GroupBox();
GroupBox(_("Privileges"), "keys");
$asAdminGroups = rrPrivilegedGroups("mod_roomreservation_admin");
$asBookGroups = rrPrivilegedGroups("mod_roomreservation_book");
$asViewGroups = rrPrivilegedGroups("mod_roomreservation_view");
echo sprintf("%s \n%s \n%s ", _c("room-reservation:This is ". "a short summary of the privileges related to the room reservation ". "schedulde and the groups which have them assigned."), sprintf(_c("room-reservation:If one of these privileges is not assigned to ". "any group, all users on this server are allowed to perform the specified ". "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.")); echo "
| \n";
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.")); echo "";
$this->otlb->show();
echo " \n";
_GroupBox();
GroupBox(_c("room-reservation:Further options"), "manage");
printf("\n";
_GroupBox();
echo " |