#6 prepare for shift entries
This commit is contained in:
parent
1bb1997e04
commit
4f220e30ce
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
function user_shifts() {
|
||||
if (isset ($_REQUEST['shift_id'])) {
|
||||
return template_render('../templates/user_shifts_add.html', array ());
|
||||
} else {
|
||||
$shifts = sql_select("SELECT * FROM `Shifts` ORDER BY `start`");
|
||||
$days = array ();
|
||||
foreach ($shifts as $shift)
|
||||
|
@ -31,7 +34,7 @@ function user_shifts() {
|
|||
$entries = sql_select("SELECT * FROM `ShiftEntry` JOIN `User` ON (`ShiftEntry`.`UID` = `User`.`UID`) WHERE `SID`=" . sql_escape($shift['SID']) . " AND `TID`=" . sql_escape($angeltype['TID']) . " ORDER BY `Nick`");
|
||||
$entry_list = array ();
|
||||
if ($angeltype['count'] - count($entries) > 0)
|
||||
$entry_list[] = '<a href="">'.($angeltype['count'] - count($entries)) . ' missing »</a>';
|
||||
$entry_list[] = '<a href="' . page_link_to('user_shifts') . '&shift_id=' . $shift['SID'] . '&type_id=' . $angeltype['TID'] . '">' . ($angeltype['count'] - count($entries)) . ' missing »</a>';
|
||||
$shifts_table .= join(", ", $entry_list);
|
||||
$shifts_table .= '<br />';
|
||||
}
|
||||
|
@ -45,6 +48,7 @@ function user_shifts() {
|
|||
'shifts_table' => $shifts_table
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
function make_day_select($days, $day, $id) {
|
||||
$html = array ();
|
||||
|
|
|
@ -113,6 +113,7 @@ fieldset table {
|
|||
}
|
||||
|
||||
fieldset p {
|
||||
clear: both;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<form action="" method="post">
|
||||
<fieldset>
|
||||
<p>
|
||||
<label>
|
||||
Angel:
|
||||
</label>
|
||||
%angel%
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Date/Duration:
|
||||
</label>
|
||||
%date%
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Location:
|
||||
</label>
|
||||
%location%
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Title:
|
||||
</label>
|
||||
%title%
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Type:
|
||||
</label>
|
||||
%type%
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
Comment:
|
||||
<br/>
|
||||
(For your eyes only)
|
||||
</label>
|
||||
<textarea name="comment"></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" name="submit" value="Send" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
Loading…
Reference in New Issue