multisite('approve_entry_handler.php'));
$form->setAttributes($attributes);
$hidden_inputs = array('action' => 'approve',
'id' => $target_id,
'series' => ($is_series) ? 1 : 0,
'returl' => $returl);
$form->addHiddenInputs($hidden_inputs);
$element = new ElementInputSubmit();
$element->setAttribute('value', get_vocab('approve'));
$form->addElement($element);
$form->render();
// reject
$form = new Form(Form::METHOD_POST);
$attributes = array('action' => multisite("view_entry.php?$query_string"));
$form->setAttributes($attributes);
$hidden_inputs = array('action' => 'reject',
'returl' => $returl);
$form->addHiddenInputs($hidden_inputs);
$element = new ElementInputSubmit();
$element->setAttribute('value', get_vocab('reject'));
$form->addElement($element);
$form->render();
// more info
$info_time = ($is_series) ? $row['repeat_info_time'] : $row['entry_info_time'];
$info_user = ($is_series) ? $row['repeat_info_user'] : $row['entry_info_user'];
if (empty($info_time))
{
$info_title = get_vocab("no_request_yet");
}
else
{
$info_title = get_vocab("last_request") . ' ' . time_date_string($info_time);
if (!empty($info_user))
{
$info_title .= " " . get_vocab("by") . " $info_user";
}
}
$form = new Form(Form::METHOD_POST);
$attributes = array('action' => multisite("view_entry.php?$query_string"));
$form->setAttributes($attributes);
$hidden_inputs = array('action' => 'more_info',
'returl' => $returl);
$form->addHiddenInputs($hidden_inputs);
$element = new ElementInputSubmit();
$element->setAttributes(array('value' => get_vocab('more_info'),
'title' => $info_title));
$form->addElement($element);
$form->render();
}
else
{
// get the area settings for this room
get_area_settings(get_area($row['room_id']));
// if enough time has passed since the last reminder
// output a "Remind Admin" button, otherwise nothing
if ($reminders_enabled &&
(working_time_diff(time(), $last_reminded) >= $reminder_interval))
{
$form = new Form(Form::METHOD_POST);
$attributes = array('action' => multisite('approve_entry_handler.php'));
$form->setAttributes($attributes);
$hidden_inputs = array('action' => 'remind',
'id' => $row['id'],
'returl' => $returl);
$form->addHiddenInputs($hidden_inputs);
$element = new ElementInputSubmit();
$element->setAttribute('value', get_vocab('remind_admin'));
$form->addElement($element);
$form->render();
}
else
{
echo " ";
}
}
}
function display_table_head() : void
{
echo "\n";
echo "\n";
// We give some columns a type data value so that the JavaScript knows how to sort them
echo " \n";
echo "\n";
}
// display the table head for a subtable
function display_subtable_head(array $row) : void
{
echo "\n";
echo " \n";
echo "" . get_vocab("entry") . " \n";
echo "" . get_vocab("createdby") . " \n";
echo "" . get_vocab("area") . " \n";
echo "" . get_vocab("room") . " \n";
echo "" . get_vocab("start_date") . " \n";
echo "" . get_vocab("duration") . " \n";
echo "" . get_vocab("end_date") . " \n";
echo "" . get_vocab("action") . " \n";
echo "\n";
// We give some columns a type data value so that the JavaScript knows how to sort them
echo " \n";
echo "\n";
}
// display the title row for a series
function display_series_title_row(array $row) : void
{
echo " \n";
// reservation name, with a link to the view_entry page
echo '' .
escape_html($row['name']) ." \n";
// create_by, area and room names
echo "" . escape_html($row['create_by']) . " \n";
echo "" . escape_html($row['area_name']) . " \n";
echo "" . escape_html($row['room_name']) . " \n";
echo "" . get_vocab("series") . " \n";
echo " \n";
echo " \n";
echo " \n";
echo "
" .get_vocab("none_outstanding") . "
\n"; } else // display them in a table { echo "