[svn r17974] Minor - Lang variables changed, added Database:: functions, UI improvements... FS#821

skala
Julio Montoya 16 years ago
parent 334315b8d0
commit c8da657b03
  1. 13
      main/reservation/m_item.php
  2. 28
      main/reservation/m_reservation.php
  3. 4
      main/reservation/reservation.php
  4. 107
      main/reservation/rsys.php
  5. 23
      main/reservation/subscribe.php

@ -29,7 +29,6 @@
---------------------------------------------------------------------
*/
require_once ('rsys.php');
Rsys :: protect_script('m_item');
$tool_name = get_lang('ResourceList');
//$interbreadcrumb[] = array ("url" => "../admin/index.php", "name" => get_lang('PlatformAdmin'));
@ -265,7 +264,7 @@ switch ($_GET['action']) {
api_display_tool_title(get_lang('EditRight'));
$form = new FormValidator('itemright', 'post', "m_item.php?id=".$item['id']."&action=m_rights&subaction=edit");
$form->add_textfield('classn', get_lang('LangClass'), true, array ('readonly' => 'readonly'));
$form->add_textfield('classn', get_lang('Class'), true, array ('readonly' => 'readonly'));
$form->addElement('checkbox', 'edit_right', get_lang('EditRight'));
$form->addElement('checkbox', 'delete_right', get_lang('DeleteRight'));
@ -315,7 +314,7 @@ switch ($_GET['action']) {
$interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
$interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageItems'));
$interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageResources'));
Display :: display_header(str_replace('#ITEM#', $item['name'], get_lang('MItemRights')));
api_display_tool_title(get_lang('MItemRights2'));
@ -329,7 +328,7 @@ switch ($_GET['action']) {
$table = new SortableTable('itemrights', array ('Rsys', 'get_num_itemrights'), array ('Rsys', 'get_table_itemrights'), 1);
$table->set_header(0, '', false, array ('style' => 'width:10px'));
$table->set_additional_parameters(array('action'=>'m_rights','item_id'=>$_GET['item_id']));
$table->set_header(1, get_lang('LangClass'), false);
$table->set_header(1, get_lang('Class'), false);
$table->set_header(2, get_lang('EditItemRight'), false);
$table->set_header(3, get_lang('DeleteItemRight'), false);
$table->set_header(4, get_lang('MBookingPeriodsRight'), false);
@ -356,7 +355,7 @@ switch ($_GET['action']) {
$interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
$interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageItems'));
$interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageResources'));
//$interbreadcrumb[] = array ("url" => "m_item.php", "name" => $tool_name);
Display :: display_header(get_lang('AddNewResource'));
@ -429,9 +428,9 @@ switch ($_GET['action']) {
default :
$NoSearchResults = get_lang('NoItems');
$interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
//$interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageItems'));
//$interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageResources'));
Display :: display_header(get_lang('ManageItems'));
Display :: display_header(get_lang('ManageResources'));
api_display_tool_title(get_lang('ResourceList'));
echo $msg;

@ -43,9 +43,10 @@ $tool_name = get_lang('BookingPeriodList');
* @param - int $id The reservation-id
*/
function modify_filter($id) {
$out = '<a href="m_reservation.php?action=edit&amp;id='.$id.'" title="'.get_lang("EditBookingPeriod").'"><img alt="" src="../img/edit.gif" /></a>';
$out .= ' <a href="m_reservation.php?action=delete&amp;id='.$id.'" title="'.get_lang("DeleteBookingPeriod").'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang("ConfirmDeleteBookingPeriod")))."'".')) return false;"><img alt="" src="../img/delete.gif" /></a>';
$out .= ' <a href="m_reservation.php?action=accept&amp;rid='.$id.'" title="'.get_lang("AutoAccept").'"><img alt="" src="../img/visible.gif" /></a>';
$out = ' <a href="m_reservation.php?action=accept&amp;rid='.$id.'" alt="'.get_lang('AutoAccept').'"><img title="'.get_lang('AutoAccept').'" alt="'.get_lang('AutoAccept').'" src="../img/students.gif" /></a>';
$out .= '<a href="m_reservation.php?action=edit&amp;id='.$id.'" alt="'.get_lang('EditBookingPeriod').'"><img title="'.get_lang('EditBookingPeriod').'" alt="'.get_lang('EditBookingPeriod').'" src="../img/edit.gif" /></a>';
$out .= ' <a href="m_reservation.php?action=delete&amp;id='.$id.'" alt="'.get_lang('DeleteBookingPeriod').'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang("ConfirmDeleteBookingPeriod")))."'".')) return false;"><img title="'.get_lang('DeleteBookingPeriod').'" alt="'.get_lang('DeleteBookingPeriod').'" src="../img/delete.gif" /></a>';
return $out;
}
@ -92,13 +93,13 @@ if (isset ($_POST['action'])) {
*/
switch ($_GET['action']) {
case 'overviewsubscriptions' :
case 'overviewsubscriptions' :
$interbreadcrumb[] = array ("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
$interbreadcrumb[] = array ("url" => "m_reservation.php", "name" => get_lang('ManageBookingPeriods'));
Display :: display_header(get_lang('OverviewSubscriptions'));
api_display_tool_title(get_lang('Overview'));
echo '<div class="actions">';
echo '<form id="cat_form" action="m_reservation.php" method="get">';
echo '<input type="hidden" name="action" value="overviewsubscriptions"/>';
@ -119,6 +120,7 @@ switch ($_GET['action']) {
break;
case 'accept' :
$NoSearchResults = get_lang('NoReservation');
if (empty ($_GET['rid'])) {
$_GET['rid'] = $_POST['rid'];
}
@ -141,10 +143,10 @@ switch ($_GET['action']) {
$table->set_header(0, '', false, array ('style' => 'width:10px'));
$table->set_header(1, get_lang('SubscribedPerson'), true);
$table->set_header(2, get_lang('Class'), true);
$table->set_header(3, get_lang('SubscribedStartDate'), true);
$table->set_header(4, get_lang('SubscribedEndDate'), true);
$table->set_header(5, get_lang('Accept'), true, array ('style' => 'width:30px;'));
$table->set_header(6, get_lang('Delete'), true, array ('style' => 'width:30px;'));
$table->set_header(3, get_lang('SubscribedStartDate'), false);
$table->set_header(4, get_lang('SubscribedEndDate'), false);
$table->set_header(5, get_lang('Accept'), false, array ('style' => 'width:30px;'));
$table->set_header(6, get_lang('Delete'), false, array ('style' => 'width:30px;'));
$table->set_form_actions(array ('accept_users' => get_lang('AcceptUsers'), 'unaccept_users' => get_lang('UnacceptedUsers'), 'delete_subscriptions' => get_lang('Delete_subscriptions')), 'accepting');
//$table->set_form_actions(array ('accept_users' => get_lang('AcceptUsers'), 'unaccept_users' => get_lang('UnacceptedUsers')), 'accepting');
$table->display();
@ -291,10 +293,7 @@ switch ($_GET['action']) {
'H' => date('H',time()),
'i' => '00'
);
$defaultvalues['start'] = $date_defaults_start;
$defaultvalues['end'] = $date_defaults_end;
$defaultvalues['subscribe_from'] = $date_defaults_start_sub;
@ -311,8 +310,7 @@ switch ($_GET['action']) {
$form->setDefaults($defaultvalues);
$form->Display();
}
else {
} else {
if ($_GET['cat_id'] != 0)
Display :: display_normal_message(get_lang('NoItems'),false);
}

@ -75,7 +75,7 @@ elseif((empty($_SESSION['swidth']))) {
else
$gogogo=true;
echo '<div style="float: left;"><form id="cat_form" action="reservation.php" method="get"><input type="hidden" name="cat" value="'.$_GET['cat'].'" /><div style="float: left;">'.get_lang('ResourceType').': <select name="cat" onchange="this.form.submit();"><option value="0">'.get_lang('NONE').'</option>';
echo '<div style="float: left;"><form id="cat_form" action="reservation.php" method="get"><input type="hidden" name="cat" value="'.$_GET['cat'].'" /><div style="float: left;">'.get_lang('ResourceType').': <select name="cat" onchange="this.form.submit();"><option value="0">'.get_lang('Select').'</option>';
$cats = Rsys :: get_category_with_items();
if(count($cats)>0){
@ -89,7 +89,7 @@ if ($gogogo&&!empty($_GET['cat'])) {
$itemlist = Rsys :: get_cat_items($_GET['cat']);
echo '<div style="float: left;">';
if (count($itemlist) != 0) {
echo '<form id="item_form" action="reservation.php?cat='.$_GET['cat'].'&amp;item=" method="get">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="cat" value="'.$_GET['cat'].'" />'.get_lang('Resource').': <select name="item" onchange="this.form.submit();"><option value="0">'.get_lang('NONE').'</option>';
echo '<form id="item_form" action="reservation.php?cat='.$_GET['cat'].'&amp;item=" method="get">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="cat" value="'.$_GET['cat'].'" />'.get_lang('Resource').': <select name="item" onchange="this.form.submit();"><option value="0">'.get_lang('Select').'</option>';
foreach ($itemlist as $id => $item)
echo '<option value="'.$id.'"'. ($id == $_GET['item'] ? ' selected="selected"' : '').'>'.$item.'</option>';
echo '</select></form>';

@ -583,33 +583,33 @@ class Rsys {
if ($lijn2[1] == $lijn[0]) {
if ($lijn2[2] == 0) {
$tabel[$count][2] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=edit&set=1\'" />';
$tabel[$count][2] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=edit&set=1\'" />';
} else {
$tabel[$count][2] = '<img src="../img/setting_true.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=edit&set=0\'" />';
$tabel[$count][2] = '<img src="../img/right.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=edit&set=0\'" />';
}
if ($lijn2[3] == 0) {
$tabel[$count][3] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=delete&set=1\'" />';
$tabel[$count][3] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=delete&set=1\'" />';
} else {
$tabel[$count][3] = '<img src="../img/setting_true.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=delete&set=0\'" />';
$tabel[$count][3] = '<img src="../img/right.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=delete&set=0\'" />';
}
if ($lijn2[4] == 0) {
$tabel[$count][4] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=manage&set=1\'" />';
$tabel[$count][4] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=manage&set=1\'" />';
} else {
$tabel[$count][4] = '<img src="../img/setting_true.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=manage&set=0\'" />';
$tabel[$count][4] = '<img src="../img/right.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=manage&set=0\'" />';
}
if ($lijn2[5] == 0) {
$tabel[$count][5] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=view&set=1\'" />';
$tabel[$count][5] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=view&set=1\'" />';
} else {
$tabel[$count][5] = '<img src="../img/setting_true.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=view&set=0\'" />';
$tabel[$count][5] = '<img src="../img/right.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=view&set=0\'" />';
}
$controle = true;
}
}
if (!$controle) {
$tabel[$count][2] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=edit&set=1\'" />';
$tabel[$count][3] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=delete&set=1\'" />';
$tabel[$count][4] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=manage&set=1\'" />';
$tabel[$count][5] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=view&set=1\'" />';
$tabel[$count][2] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=edit&set=1\'" />';
$tabel[$count][3] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=delete&set=1\'" />';
$tabel[$count][4] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=manage&set=1\'" />';
$tabel[$count][5] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_item.php?action=m_rights&subaction=switch&class_id='.$lijn[0].'&item_id='.$itemid.'&switch=view&set=1\'" />';
}
$tabel[$count][6] = $itemid."-".$lijn[0];
}
@ -762,11 +762,18 @@ class Rsys {
$begindatum = $item['start_at'];
$einddatum = $item['end_at'];
$inhoud = str_replace('#NAME#', $item_name, get_lang("BlackoutMessage".$value));
$inhoud = str_replace('#BEGINDATUM#', $begindatum, $inhoud);
$inhoud = str_replace('#EINDDATUM#', $einddatum, $inhoud);
if ($value==1) {
$inhoud = str_replace('#NAME#', $item_name, get_lang('ReservationActive'));
$inhoud = str_replace('#BEGIN#', $begindatum, $inhoud);
$inhoud = str_replace('#BEGIN#', $einddatum, $inhoud);
$titel = str_replace('#NAME#', $item_name, get_lang('ReservationAvailable'));
} else {
$inhoud = str_replace('#NAME#', $item_name, get_lang('ReservationCancelled'));
$inhoud = str_replace('#BEGIN#', $begindatum, $inhoud);
$inhoud = str_replace('#BEGIN#', $einddatum, $inhoud);
$titel = str_replace('#NAME#', $item_name, get_lang('ReservationUnavailable'));
}
$titel = str_replace('#NAME#', $item_name, get_lang("BlackoutTitle".$value));
api_send_mail($user_info['mail'], $titel, $inhoud);
}
@ -1243,7 +1250,7 @@ class Rsys {
}
$sql .= " ORDER BY col".$column." ".$direction." LIMIT ".$from.",".$per_page;*/
$sql = "SELECT dummy AS col0, CONCAT(u.lastname,' ',u.firstname) AS col1, s.user_id AS col2, accepted AS col3, r.start_at, r.end_at, s.start_at, s.end_at
FROM ".Rsys :: getTable('subscription')." s,".Database :: get_main_table(TABLE_MAIN_USER)." u,".Rsys :: getTable('reservation')." r
FROM ".Rsys :: getTable('subscription')." s,".Database :: get_main_table(TABLE_MAIN_USER)." u,".Database :: get_main_table(TABLE_MAIN_RESERVATION_RESERVATION)." r
where u.user_id = s.user_id
and s.reservation_id = r.id";
@ -1258,10 +1265,10 @@ class Rsys {
$count = 0;
$x = count($arr);
while ($count < $x) {
$sql = "SELECT `name`
FROM ".Database :: get_main_table(TABLE_MAIN_CLASS)." cl
INNER JOIN ".Database :: get_main_table(TABLE_MAIN_CLASS_USER)." cu ON cu.class_id = cl.id
WHERE cu.user_id='".$arr[$count][2]."' LIMIT 1";
$sql = "SELECT name
FROM ".Database :: get_main_table(TABLE_MAIN_CLASS)." cl
INNER JOIN ".Database :: get_main_table(TABLE_MAIN_CLASS_USER)." cu ON cu.class_id = cl.id
WHERE cu.user_id=".$arr[$count][2]." LIMIT 1";
$result = api_sql_query($sql, __FILE__, __LINE__);
while ($array = Database::fetch_array($result, 'NUM')) {
$arr2[] = $array;
@ -1270,28 +1277,30 @@ class Rsys {
$count ++;
}
$count = -1;
foreach ($arr as $lijn) {
$count ++;
$controle = false;
$tabel[$count][0] = $lijn[0];
$tabel[$count][1] = $lijn[1];
if ($lijn[3] == 0) {
$tabel[$count][5] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_reservation.php?action=accept&rid='.$_GET['rid'].'&amp;dummy='.$lijn[0].'&switch=edit&set=1\'" />';
} else {
$tabel[$count][5] = '<img src="../img/setting_true.gif" onclick="document.location.href=\'m_reservation.php?action=accept&rid='.$_GET['rid'].'&amp;dummy='.$lijn[0].'&switch=edit&set=0\'" />';
}
$tabel[$count][2] = $lijn[2];
if ($lijn[6] == '0000-00-00 00:00:00' && $lijn[7] == '0000-00-00 00:00:00')
{
$tabel[$count][3] = $lijn[4];
$tabel[$count][4] = $lijn[5];
}
else
{
$tabel[$count][3] = $lijn[6];
$tabel[$count][4] = $lijn[7];
if (is_array($arr)) {
foreach ($arr as $lijn) {
$count ++;
$controle = false;
$tabel[$count][0] = $lijn[0];
$tabel[$count][1] = $lijn[1];
if ($lijn[3] == 0) {
$tabel[$count][5] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_reservation.php?action=accept&rid='.$_GET['rid'].'&amp;dummy='.$lijn[0].'&switch=edit&set=1\'" />';
} else {
$tabel[$count][5] = '<img src="../img/right.gif" onclick="document.location.href=\'m_reservation.php?action=accept&rid='.$_GET['rid'].'&amp;dummy='.$lijn[0].'&switch=edit&set=0\'" />';
}
$tabel[$count][2] = $lijn[2];
if ($lijn[6] == '0000-00-00 00:00:00' && $lijn[7] == '0000-00-00 00:00:00')
{
$tabel[$count][3] = $lijn[4];
$tabel[$count][4] = $lijn[5];
}
else
{
$tabel[$count][3] = $lijn[6];
$tabel[$count][4] = $lijn[7];
}
$tabel[$count][6] = '<img src="../img/wrong.gif" onclick="document.location.href=\'m_reservation.php?action=accept&rid='.$_GET['rid'].'&amp;dummy='.$lijn[0].'&switch=delete\'" />';
}
$tabel[$count][6] = '<img src="../img/setting_false.gif" onclick="document.location.href=\'m_reservation.php?action=accept&rid='.$_GET['rid'].'&amp;dummy='.$lijn[0].'&switch=delete\'" />';
}
return $tabel;
}
@ -1327,10 +1336,16 @@ class Rsys {
$begin_datum = $item['start_at'];
$eind_datum = $item['end_at'];
$titel = str_replace('#ITEM#', $item_name, get_lang("AcceptedUserTitle".$value));
$inhoud = str_replace('#ITEM#', $item_name, get_lang("AcceptedUserMessage".$value));
$inhoud = str_replace('#BEGINDATUM', $begin_datum, $inhoud);
$inhoud = str_replace('#EINDDATUM', $eind_datum, $inhoud);
if ($value==1) {
$titel = str_replace('#ITEM#', $item_name, get_lang('ReservationAccepted'));
$inhoud = str_replace('#ITEM#', $item_name, get_lang('ReservationForItemAccepted'));
} else {
$titel = str_replace('#ITEM#', $item_name, get_lang('ReservationDenied'));
$inhoud = str_replace('#ITEM#', $item_name, get_lang('ReservationForDenied'));
}
$inhoud = str_replace('#BEGIN', $begin_datum, $inhoud);
$inhoud = str_replace('#END', $eind_datum, $inhoud);
api_send_mail($user_info['mail'], $titel, $inhoud);
}

@ -119,18 +119,12 @@ if ($reservation[0][9] < $reservation[0][4]) {
$start_end .= "<li>".$end_time_last_block." en ".$res_end_at."</li>";
}
$start_end .= "</ul>";
}
else
{
} else {
$start_end = " ".Rsys :: timestamp_to_datetime($time_start)." en ".$res_end_at;
}
//$form->addElement('html', "timestart:".$time_start."-".Rsys :: mysql_datetime_to_timestamp($res_start_at));
$form->addElement('html', "<p> **** ".str_replace('#start_end',$start_end,str_replace('#from_till', $from_till,str_replace('#name#', "<b>".$item[3]."</b>",str_replace('#start#', "<b>".$reservation[0][5]."</b>", str_replace('#end#', "<b>".$reservation[0][6]."</b>", get_lang("SubscribeTimePickerInformation"))))))." ****</p>");
//$form->addElement('html', "timestart:".$time_start."-".Rsys :: mysql_datetime_to_timestamp($res_start_at));
$form->addElement('html', "<p>".str_replace('#start_end',$start_end,str_replace('#from_till', $from_till,str_replace('#name#', "<b>".$item[3]."</b>",str_replace('#start#', "<b>".$reservation[0][5]."</b>", str_replace('#end#', "<b>".$reservation[0][6]."</b>", get_lang("SubscribeTimePickerInformation"))))))." </p>");
$form->add_timewindow('startpicker', 'endpicker', get_lang('StartDate'), get_lang('EndDate'));
$form->addElement('hidden', 'min', $reservation[0][12]);
$form->addElement('hidden', 'max', $reservation[0][13]);
@ -139,8 +133,7 @@ if ($reservation[0][9] < $reservation[0][4]) {
//$defaultvalues['endpicker'] = Rsys :: timestamp_to_datetime($datum +900);
$defaultvalues['endpicker'] = Rsys :: timestamp_to_datetime($datum +($min_timepicker*60));
$form->setDefaults($defaultvalues);
}
else {
} else {
$form->addElement('html', "<p> * ".str_replace('#name#', "<b>".$item[3]."</b>",str_replace('#start#', "<b>".$reservation[0][5]."</b>", str_replace('#end#', "<b>".$reservation[0][6]."</b>", get_lang('SubscribeInformation'))))." *</p>");
}
$buttons[] = $form->createElement('submit', 'submit', get_lang('Ok'));
@ -186,14 +179,12 @@ if ($reservation[0][9] < $reservation[0][4]) {
break;
}
}
}
else
} else
$form->display();
}else {
} else {
Display :: display_normal_message(Rsys :: get_return_msg2(get_lang('ReservationTresspassing'), "javascript:history.go(-2)", get_lang('BookingView')),false);
}
Display :: display_footer();
?>
?>
Loading…
Cancel
Save