if ((!is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"])) || ($marked_clip_ids) || ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["reload"])) { unset ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["reload"]); if (!isset($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_low"])) { $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_low"] = 0; $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_high"] = 10; } $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["considered_resources"] = array(); $semester = new SemesterData; $all_semester = $semester->getAllSemesterData(); $reqObj = new RoomRequest($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["request_id"]); $semObj = Seminar::GetInstance($reqObj->getSeminarId(), true); $multiOverlaps = new CheckMultipleOverlaps(); $semResAssign = new VeranstaltungResourcesAssign($semObj->getId()); //add the requested ressource to selection if ($reqObj->getResourceId()) $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["considered_resources"][$reqObj->getResourceId()] = array("type"=>"requested"); //add resource_ids from room groups if (get_config('RESOURCES_ENABLE_GROUPING')){ $room_group = RoomGroups::GetInstance(); $group_id = $_SESSION['resources_data']['actual_room_group']; if ($room_group->getGroupCount($group_id)){ foreach ($room_group->getGroupContent($group_id) as $val) { $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["considered_resources"][$val] = array("type"=>"grouped"); }
/** * * @param $request_id */ function showRequest($request_id) { global $cssSw, $perm; $reqObj = new RoomRequest($request_id); $semObj = new Seminar($reqObj->getSeminarId()); $sem_link = $perm->have_studip_perm('tutor', $semObj->getId()) ? "seminar_main.php?auswahl=" . $semObj->getId() : "dispatch.php/course/details/?sem_id=" . $semObj->getId() . "&send_from_search=1&send_from_search_page=" . URLHelper::getLink("resources.php?working_on_request=$request_id"); ?> <form method="POST" action="<?echo URLHelper::getLink('?working_on_request=' . $request_id);?>"> <?php echo CSRFProtection::tokenTag(); ?> <input type="hidden" name="view" value="edit_request"> <table border=0 celpadding=2 cellspacing=0 width="99%" align="center"> <tr> <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%"> </td> <td class="<? echo $cssSw->getClass() ?>" colspan="2" width="96%" valign="top"> <a href="<?php echo URLHelper::getLink($sem_link); ?> "> <b><?php echo $semObj->seminar_number ? htmlReady($semObj->seminar_number) . ':' : ''; echo htmlReady($semObj->getName()); ?> </b> </a> <font size="-1"> <br> <? $names = $this->selectSemInstituteNames($semObj->getInstitutId()); print " "._("Art der Anfrage").": ".$reqObj->getTypeExplained()."<br>"; print " "._("Erstellt von").": <a href=\"".URLHelper::getLink('dispatch.php/profile?username='******'%x %H:%M', $reqObj->mkdate) . '<br>'; print " "._("Letzte Änderung") . ": ". strftime('%x %H:%M', $reqObj->chdate) . '<br>'; print " "._("Letzte Änderung von") . ": <a href=\"".URLHelper::getLink('dispatch.php/profile?username='******': '; foreach ($semObj->getMembers('dozent') as $doz) { if ($dozent){ echo ", "; } echo '<a href ="'. URLHelper::getLink('dispatch.php/profile?username='******'username']). '">'.HtmlReady($doz['fullname'])."</a>"; $dozent = true; } print "<br>"; print " "._("verantwortliche Einrichtung").": ".htmlReady($names['inst_name'])."<br>"; print " "._("verantwortliche Fakultät").": ".htmlReady($names['fak_name'])."<br>"; print " "._("aktuelle Teilnehmerzahl").": ".$semObj->getNumberOfParticipants('total').'<br>'; ?> </font> </td> </tr> <tr> <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%"> </td> <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top"> <font size="-1"><b><?php echo _("angeforderte Belegungszeiten"); ?> :</b><br><br> <? $dates = $semObj->getGroupedDates($reqObj->getTerminId(),$reqObj->getMetadateId()); if ($dates['first_event']) { $i = 1; if(is_array($dates['info']) && sizeof($dates['info']) > 0 ){ foreach ($dates['info'] as $info) { $name = $info['name']; if ($info['weekend']) $name = '<span style="color:red">'. $info['name'] . '</span>'; printf ("<font color=\"blue\"><i><b>%s</b></i></font>. %s<br>", $i, $name); $i++; } } if ($reqObj->getType() != 'date') { echo _("regelmäßige Buchung ab").": ".strftime("%x", $dates['first_event']); } } else { print _("nicht angegeben"); } ?> </font> </td> <td style="border-left:1px dotted black; background-color: #f3f5f8" width="51%" rowspan="4" valign="top"> <table cellpadding="2" cellspacing="0" border="0" width="90%"> <tr> <td width="70%"> <font size="-1"><b><?php echo _("angeforderter Raum"); ?> :</b></font> </td> <? unset($resObj); $cols=0; if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key => $val) { $cols++; print "<td width=\"1%\" align=\"left\"><font size=\"-1\" color=\"blue\"><i><b>".$cols.".</b></i></font></td>"; } ?> <td width="29%" align="right"> <!--<font style="font-size:10px;color:blue;"><?//=_("Kapazität")?></font>--> </td> </tr> <tr> <td width="70%"> <? if ($request_resource_id = $reqObj->getResourceId()) { $resObj = ResourceObject::Factory($request_resource_id); print $resObj->getFormattedLink($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["first_event"]); print tooltipicon(_('Der ausgewählte Raum bietet folgende der wünschbaren Eigenschaften:') . "\n" . $resObj->getPlainProperties(TRUE), $resObj->getOwnerId() == 'global'); if ($resObj->getOwnerId() == 'global') { print ' [global]'; } } else print _("Es wurde kein Raum angefordert."); ?> </td> <? $i=0; if(is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"]) && sizeof($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"]) > 0 ) foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key => $val) { print "<td width=\"1%\" nowrap><font size=\"-1\">"; if ($request_resource_id) { if ($request_resource_id == $val["resource_id"]) { print Icon::create('accept', 'accept', ['title' => _("Dieser Raum ist augenblicklich gebucht"), TRUE])->asImg(); echo '<input type="radio" name="selected_resource_id['. $i .']" value="'. $request_resource_id .'" checked="checked">'; } else { $overlap_status = $this->showGroupOverlapStatus($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"][$request_resource_id], $val["events_count"], $val["overlap_events_count"][$request_resource_id], $val["termin_ids"]); print $overlap_status["html"]; printf ("<input type=\"radio\" name=\"selected_resource_id[%s]\" value=\"%s\" %s %s>", $i, $request_resource_id, ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["selected_resources"][$i] == $request_resource_id) ? "checked" : "", ($overlap_status["status"] == 2 || !ResourcesUserRoomsList::CheckUserResource($request_resource_id)) ? "disabled" : ""); } } else print " "; print "</font></td>"; $i++; } ?> <td width="29%" align="right"> <? if (is_object($resObj)) { $seats = $resObj->getSeats(); $requested_seats = $reqObj->getSeats(); if ((is_numeric($seats)) && (is_numeric($requested_seats))) { $percent_diff = (100 / $requested_seats) * $seats; if ($percent_diff > 0) $percent_diff = "+".$percent_diff; if ($percent_diff < 0) $percent_diff = "-".$percent_diff; print "<font style=\"font-size:10px;\">".round($percent_diff)."%</font>"; } } ?> </td> </tr> <? if (get_config('RESOURCES_ENABLE_GROUPING')) { $room_group = RoomGroups::GetInstance(); $group_id = $_SESSION['resources_data']['actual_room_group']; ?> <tr> <td style="border-top:1px solid;" width="100%" colspan="<?php echo $cols + 2; ?> "> <font size="-1"><b><?php echo _("Raumgruppe berücksichtigen"); ?> :</b></font> </td> </tr> <tr> <td colspan="<?php echo $cols; ?> "><font size="-1"> <select name="request_tool_choose_group"> <option <?php echo is_null($group_id) ? 'selected' : ''; ?> value="-"><?php echo _("Keine Raumgruppe anzeigen"); ?> </option> <? foreach($room_group->getAvailableGroups() as $gid){ echo '<option value="'.$gid.'" ' . (!is_null($group_id) && $group_id == $gid ? 'selected' : '') . '>' .htmlReady(my_substr($room_group->getGroupName($gid),0,45)) .' ('.$room_group->getGroupCount($gid).')</option>'; } ?> </select> </font> </td> <td colspan="2"><font size="-1"> <?php echo Button::create(_('Auswählen'), 'request_tool_group'); ?> <br> </font> </td> </tr> <? if ($room_group->getGroupCount($group_id)){ foreach ($room_group->getGroupContent($group_id) as $key) { ?> <tr> <td width="70%"> <? $resObj = ResourceObject::Factory($key); print $resObj->getFormattedLink($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["first_event"]); print tooltipicon(_('Der ausgewählte Raum bietet folgende der wünschbaren Eigenschaften:') . "\n" . $resObj->getPlainProperties(TRUE), $resObj->getOwnerId() == 'global'); if ($resObj->getOwnerId() == 'global') { print ' [global]'; } ?> </td> <? $i=0; if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) { foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key2 => $val2) { print "<td width=\"1%\" nowrap><font size=\"-1\">"; if ($key == $val2["resource_id"]) { print Icon::create('accept', 'accept', ['title' => _("Dieser Raum ist augenblicklich gebucht"), TRUE])->asImg(); echo '<input type="radio" name="selected_resource_id['. $i .']" value="'. $key .'" checked="checked">'; } else { $overlap_status = $this->showGroupOverlapStatus($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"][$key], $val2["events_count"], $val2["overlap_events_count"][$resObj->getId()], $val2["termin_ids"]); print $overlap_status["html"]; printf ("<input type=\"radio\" name=\"selected_resource_id[%s]\" value=\"%s\" %s %s>", $i, $key, ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["selected_resources"][$i] == $key) ? "checked" : "", ($overlap_status["status"] == 2 || !ResourcesUserRoomsList::CheckUserResource($key)) ? "disabled" : ""); } print "</font></td>"; $i++; } } ?> <td width="29%" align="right"> <? if (is_object($resObj)) { $seats = $resObj->getSeats(); $requested_seats = $reqObj->getSeats(); if ((is_numeric($seats)) && (is_numeric($requested_seats))) { $percent_diff = (100 / $requested_seats) * $seats; if ($percent_diff > 0) $percent_diff = "+".$percent_diff; if ($percent_diff < 0) $percent_diff = "-".$percent_diff; print "<font style=\"font-size:10px;\">".round($percent_diff)."%</font>"; } } ?> </td> </tr> <? } } } ?> <tr> <td style="border-top:1px solid;" width="100%" colspan="<?php echo $cols + 2; ?> "> <font size="-1"><b><?php echo _("weitere passende Räume"); ?> :</b> </font> </td> </tr> <? if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["considered_resources"])) foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["considered_resources"] as $key=>$val) { if ($val["type"] == "matching") $matching_rooms[$key] = TRUE; if ($val["type"] == "clipped") $clipped_rooms[$key] = TRUE; if ($val["type"] == "grouped") $grouped_rooms[$key] = TRUE; } if (sizeof($matching_rooms)) { // filter list to [search_limit_low]...[search_limit_high] $search_limit_low = $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_low"]; $search_limit_high = $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_high"]; $matching_rooms = array_slice($matching_rooms, $search_limit_low, $search_limit_high - $search_limit_low); foreach ($matching_rooms as $key=>$val) { ?> <tr> <td width="70%"> <? $resObj = ResourceObject::Factory($key); print $resObj->getFormattedLink($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["first_event"]); print tooltipicon(_('Der ausgewählte Raum bietet folgende der wünschbaren Eigenschaften:') . "\n" . $resObj->getPlainProperties(TRUE), $resObj->getOwnerId() == 'global'); if ($resObj->getOwnerId() == 'global') { print ' [global]'; } ?> </td> <? $i=0; if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) { foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key2 => $val2) { print "<td width=\"1%\" nowrap><font size=\"-1\">"; if ($key == $val2["resource_id"]) { print Icon::create('accept', 'accept', ['title' => _("Dieser Raum ist augenblicklich gebucht"), TRUE])->asImg(); echo '<input type="radio" name="selected_resource_id['. $i .']" value="'. $key .'" checked="checked">'; } else { $overlap_status = $this->showGroupOverlapStatus($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"][$key], $val2["events_count"], $val2["overlap_events_count"][$resObj->getId()], $val2["termin_ids"]); print $overlap_status["html"]; printf ("<input type=\"radio\" name=\"selected_resource_id[%s]\" value=\"%s\" %s %s>", $i, $key, ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["selected_resources"][$i] == $key) ? "checked" : "", ($overlap_status["status"] == 2 || !ResourcesUserRoomsList::CheckUserResource($key)) ? "disabled" : ""); } print "</font></td>"; $i++; } } ?> <td width="29%" align="right"> <? if (is_object($resObj)) { $seats = $resObj->getSeats(); $requested_seats = $reqObj->getSeats(); if ((is_numeric($seats)) && (is_numeric($requested_seats))) { $percent_diff = (100 / $requested_seats) * $seats; if ($percent_diff > 0) $percent_diff = "+".$percent_diff; if ($percent_diff < 0) $percent_diff = "-".$percent_diff; print "<font style=\"font-size:10px;\">".round($percent_diff)."%</font>"; } } ?> </td> </tr> <? } ?> <tr> <td colspan="<?php echo $cols + 2; ?> " align="center"> <font size="-1"> <?php echo _("zeige Räume"); ?> <a href="<?php echo URLHelper::getLink('?dec_limit_low=1'); ?> ">-</a> <input type="text" name="search_rooms_limit_low" size="1" value="<?php echo $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_low"] + 1; ?> "> <a href="<?php echo URLHelper::getLink('?inc_limit_low=1'); ?> ">+</a> bis <a href="<?php echo URLHelper::getLink('?dec_limit_high=1'); ?> ">-</a> <input type="text" name="search_rooms_limit_high" size="1" value="<?php echo $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_high"]; ?> "> <a href="<?php echo URLHelper::getLink('?inc_limit_high=1'); ?> ">+</a> <?php echo Icon::create('arr_2up', 'sort', ['title' => 'ausgewählten Bereich anzeigen'])->asInput(array('name' => 'matching_rooms_limit_submit')); ?> </font> </td> </tr> <? } else print "<tr><td width=\"100%\" colspan=\"".($cols+1)."\"><font size=\"-1\">"._("keine gefunden")."</font></td></tr>"; //Clipped Rooms if (sizeof($clipped_rooms)) { ?> <tr> <td style="border-top:1px solid;" width="100%" colspan="<?php echo $cols + 2; ?> "> <font size="-1"><b><?php echo _("Räume aus der Merkliste"); ?> :</b></font> </td> </tr> <? foreach ($clipped_rooms as $key=>$val) { ?> <tr> <td width="70%"> <? $resObj = ResourceObject::Factory($key); print $resObj->getFormattedLink($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["first_event"]); print tooltipicon(_('Der ausgewählte Raum bietet folgende der wünschbaren Eigenschaften:') . "\n" . $resObj->getPlainProperties(TRUE), $resObj->getOwnerId() == 'global'); if ($resObj->getOwnerId() == 'global') { print ' [global]'; } ?> </td> <? $i=0; if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) { foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key2 => $val2) { print "<td width=\"1%\" nowrap><font size=\"-1\">"; if ($key == $val2["resource_id"]) { print Icon::create('accept', 'clickable', ['title' => _('Dieser Raum ist augenblicklich gebucht'), TRUE])->asImg(); } else { $overlap_status = $this->showGroupOverlapStatus($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"][$key], $val2["events_count"], $val2["overlap_events_count"][$resObj->getId()], $val2["termin_ids"]); print $overlap_status["html"]; printf ("<input type=\"radio\" name=\"selected_resource_id[%s]\" value=\"%s\" %s %s>", $i, $key, ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["selected_resources"][$i] == $key) ? "checked" : "", ($overlap_status["status"] == 2 || !ResourcesUserRoomsList::CheckUserResource($key)) ? "disabled" : ""); } print "</font></td>"; $i++; } } ?> <td width="29%" align="right"> <? if (is_object($resObj)) { $seats = $resObj->getSeats(); $requested_seats = $reqObj->getSeats(); if ((is_numeric($seats)) && (is_numeric($requested_seats))) { $percent_diff = (100 / $requested_seats) * $seats; if ($percent_diff > 0) $percent_diff = "+".$percent_diff; if ($percent_diff < 0) $percent_diff = "-".$percent_diff; print "<font style=\"font-size:10px;\">".round($percent_diff)."%</font>"; } } ?> </td> </font></td> </tr> <? } } ?> </table> </td> </tr> <tr> <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%"> </td> <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top"> <font size="-1"><b><?php echo _("gewünschte Raumeigenschaften"); ?> :</b><br><br> <? $properties = $reqObj->getProperties(); if (sizeof($properties)) { ?> <table width="99%" cellspacing="0" cellpadding="2" border="0"> <? foreach ($properties as $key=>$val) { ?> <tr> <td width="70%"> <li><font size="-1"><?php echo htmlReady($val["name"]); ?> </font></li> </td> <td width="30%"><font size="-1"> <? switch ($val["type"]) { case "bool": /*printf ("%s", ($val["state"]) ? htmlReady($val["options"]) : " - ");*/ break; case "num": case "text": print htmlReady($val["state"]); break; case "select": $options=explode (";",$val["options"]); foreach ($options as $a) { if ($val["state"] == $a) print htmlReady($a); } break; } ?></font> </td> </tr> <? } ?> </table> <? } else print _("Es wurden keine Raumeigenschaften gewünscht."); ?> </font> </td> </tr> <tr> <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%"> </td> <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top"> <font size="-1"><b><?php echo _("Kommentar des Anfragenden"); ?> :</b><br><br> <? if ($comment = $reqObj->getComment()) print $comment; else print _("Es wurde kein Kommentar eingegeben"); ?> </font> </td> </tr> <tr> <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%"> </td> <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top"> <? $user_status_mkdate = $reqObj->getUserStatus($GLOBALS['user']->id); ?> <b><?php echo "Benachrichtigungen"; ?> :</b><br> <input type="radio" onChange="jQuery(this).closest('form').submit()" name="reply_recipients" id="reply_recipients_requester" value="requester" checked> <label for="reply_recipients_requester"> <?php echo _("Ersteller"); ?> </label> <input type="radio" onChange="jQuery(this).closest('form').submit()" name="reply_recipients" id="reply_recipients_lecturer" value="lecturer" <?php echo $reqObj->reply_recipients == 'lecturer' ? 'checked' : ''; ?> > <label for="reply_recipients_lecturer"> <?php echo _("Ersteller und alle Lehrenden"); ?> </label> <br> <b><?php echo "Anfrage markieren"; ?> :</b><br> <input type="radio" onChange="jQuery(this).closest('form').submit()" name="request_user_status" id="request_user_status_0" value="0" checked> <label for="request_user_status_0"> <?php echo _("unbearbeitet"); ?> </label> <input type="radio" onChange="jQuery(this).closest('form').submit()" name="request_user_status" id="request_user_status_1" value="1" <?php echo $user_status_mkdate ? 'checked' : ''; ?> > <label for="request_user_status_1"> <?php echo _("bearbeitet"); ?> </label> <br><br> <b><?php echo _("Kommentar zur Belegung (intern)"); ?> :</b><br><br> <textarea name="comment_internal" style="width: 90%" rows="2"></textarea> </td> </tr> <tr> <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%"> </td> <td class="<? echo $cssSw->getClass() ?>" colspan="2" width="96%" valign="top" align="center"> <div class="button-group"> <? // can we dec? if ($_SESSION['resources_data']["requests_working_pos"] > 0) { $d = -1; if ($_SESSION['resources_data']["skip_closed_requests"]) while ((!$_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $d]["request_id"]]) && ($_SESSION['resources_data']["requests_working_pos"] + $d > 0)) $d--; if ((sizeof($_SESSION['resources_data']["requests_open"]) > 1) && (($_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $d]["request_id"]]) || (!$_SESSION['resources_data']["skip_closed_requests"]))) $inc_possible = TRUE; } if ($inc_possible) { echo Button::create('<< ' . _('Zurück'), 'dec_request'); } echo Button::createCancel(_('Abbrechen'), 'cancel_edit_request'); echo Button::create(_('Löschen'), 'delete_request'); if ((($reqObj->getResourceId()) || (sizeof($matching_rooms)) || (sizeof($clipped_rooms)) || (sizeof($grouped_rooms))) && ((is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) || ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["assign_objects"]))) { echo Button::createAccept(_('Speichern'), 'save_state'); echo Button::createCancel(_('Ablehnen'), 'suppose_decline_request'); } // can we inc? if ($_SESSION['resources_data']["requests_working_pos"] < sizeof($_SESSION['resources_data']["requests_working_on"])-1) { $i = 1; if ($_SESSION['resources_data']["skip_closed_requests"]) while ((!$_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $i]["request_id"]]) && ($_SESSION['resources_data']["requests_working_pos"] + $i < sizeof($_SESSION['resources_data']["requests_working_on"])-1)) $i++; if ((sizeof($_SESSION['resources_data']["requests_open"]) > 1) && (($_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $i]["request_id"]]) || (!$_SESSION['resources_data']["skip_closed_requests"]))) $dec_possible = TRUE; } if ($dec_possible) { echo Button::create(_('Weiter') . ' >>', 'inc_request'); } ?> </div> <? if (sizeof($_SESSION['resources_data']["requests_open"]) > 1) printf ("<br><font size=\"-1\">" . _("<b>%s</b> von <b>%s</b> Anfragen in der Bearbeitung wurden noch nicht aufgelöst.") . "</font>", sizeof($_SESSION['resources_data']["requests_open"]), sizeof($_SESSION['resources_data']["requests_working_on"])); printf ("<br><font size=\"-1\">" . _("Aktueller Request: ")."<b>%s</b></font>", $_SESSION['resources_data']["requests_working_pos"]+1); ?> </td> </tr> </table> </form> <br><br> <? }