angel views in english complete

main
Philip Häusler 11 years ago
parent 813751ac7a
commit 85d9bf4f9c

@ -1,5 +1,9 @@
<?php <?php
function credits_title() {
return _("Credits");
}
function guest_credits() { function guest_credits() {
return template_render('../templates/guest_credits.html', array ()); return template_render('../templates/guest_credits.html', array());
} }
?> ?>

@ -1,4 +1,15 @@
<?php <?php
function login_title() {
return _("Login");
}
function register_title() {
return _("Register");
}
function logout_title() {
return _("Logout");
}
// Engel registrieren // Engel registrieren
function guest_register() { function guest_register() {

@ -8,30 +8,29 @@ function user_myshifts() {
global $LETZTES_AUSTRAGEN; global $LETZTES_AUSTRAGEN;
global $user, $privileges; global $user, $privileges;
$msg = ""; $msg = "";
if (isset ($_REQUEST['id']) && in_array("user_shifts_admin", $privileges) && preg_match("/^[0-9]{1,}$/", $_REQUEST['id']) && sql_num_query("SELECT * FROM `User` WHERE `UID`=" . sql_escape($_REQUEST['id'])) > 0) { if (isset($_REQUEST['id']) && in_array("user_shifts_admin", $privileges) && preg_match("/^[0-9]{1,}$/", $_REQUEST['id']) && sql_num_query("SELECT * FROM `User` WHERE `UID`=" . sql_escape($_REQUEST['id'])) > 0) {
$id = $_REQUEST['id']; $id = $_REQUEST['id'];
} else { } else {
$id = $user['UID']; $id = $user['UID'];
} }
list ($shifts_user) = sql_select("SELECT * FROM `User` WHERE `UID`=" . sql_escape($id) . " LIMIT 1"); list($shifts_user) = sql_select("SELECT * FROM `User` WHERE `UID`=" . sql_escape($id) . " LIMIT 1");
if (isset ($_REQUEST['reset'])) { if (isset($_REQUEST['reset'])) {
if ($_REQUEST['reset'] == "ack") { if ($_REQUEST['reset'] == "ack") {
User_reset_api_key($user); User_reset_api_key($user);
success("Key geändert."); success("Key geändert.");
redirect(page_link_to('user_myshifts')); redirect(page_link_to('user_myshifts'));
} }
return template_render('../templates/user_myshifts_reset.html', array ()); return template_render('../templates/user_myshifts_reset.html', array());
} } elseif (isset($_REQUEST['edit']) && preg_match("/^[0-9]*$/", $_REQUEST['edit'])) {
elseif (isset ($_REQUEST['edit']) && preg_match("/^[0-9]*$/", $_REQUEST['edit'])) {
$id = $_REQUEST['edit']; $id = $_REQUEST['edit'];
$shift = sql_select("SELECT `ShiftEntry`.`Comment`, `ShiftEntry`.`UID`, `Shifts`.*, `Room`.`Name`, `AngelTypes`.`name` as `angel_type` FROM `ShiftEntry` JOIN `AngelTypes` ON (`ShiftEntry`.`TID` = `AngelTypes`.`id`) JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `ShiftEntry`.`id`=" . sql_escape($id) . " AND `UID`=" . sql_escape($shifts_user['UID']) . " LIMIT 1"); $shift = sql_select("SELECT `ShiftEntry`.`Comment`, `ShiftEntry`.`UID`, `Shifts`.*, `Room`.`Name`, `AngelTypes`.`name` as `angel_type` FROM `ShiftEntry` JOIN `AngelTypes` ON (`ShiftEntry`.`TID` = `AngelTypes`.`id`) JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `ShiftEntry`.`id`=" . sql_escape($id) . " AND `UID`=" . sql_escape($shifts_user['UID']) . " LIMIT 1");
if (count($shift) > 0) { if (count($shift) > 0) {
$shift = $shift[0]; $shift = $shift[0];
if (isset ($_REQUEST['submit'])) { if (isset($_REQUEST['submit'])) {
$comment = strip_request_item_nl('comment'); $comment = strip_request_item_nl('comment');
$user_source = User($shift['UID']); $user_source = User($shift['UID']);
sql_query("UPDATE `ShiftEntry` SET `Comment`='" . sql_escape($comment) . "' WHERE `id`=" . sql_escape($id) . " LIMIT 1"); sql_query("UPDATE `ShiftEntry` SET `Comment`='" . sql_escape($comment) . "' WHERE `id`=" . sql_escape($id) . " LIMIT 1");
@ -39,19 +38,11 @@ function user_myshifts() {
success("Schicht gespeichert."); success("Schicht gespeichert.");
redirect(page_link_to('user_myshifts')); redirect(page_link_to('user_myshifts'));
} }
return template_render('../templates/user_shifts_add.html', array ( return ShiftEntry_edit_view(User_Nick_render($shifts_user), date("Y-m-d H:i", $shift['start']) . ', ' . shift_length($shift), $shift['Name'], $shift['name'], $shift['angel_type'], $shift['Comment']);
'angel' => User_Nick_render($shifts_user),
'date' => date("Y-m-d H:i", $shift['start']) . ', ' . shift_length($shift),
'location' => $shift['Name'],
'title' => $shift['name'],
'type' => $shift['angel_type'],
'comment' => $shift['Comment']
));
} else } else
redirect(page_link_to('user_myshifts')); redirect(page_link_to('user_myshifts'));
} } elseif (isset($_REQUEST['cancel']) && preg_match("/^[0-9]*$/", $_REQUEST['cancel'])) {
elseif (isset ($_REQUEST['cancel']) && preg_match("/^[0-9]*$/", $_REQUEST['cancel'])) {
$id = $_REQUEST['cancel']; $id = $_REQUEST['cancel'];
$shift = sql_select("SELECT `Shifts`.`start` FROM `Shifts` INNER JOIN `ShiftEntry` USING (`SID`) WHERE `ShiftEntry`.`id`=" . sql_escape($id) . " AND `UID`=" . sql_escape($shifts_user['UID']) . " LIMIT 1"); $shift = sql_select("SELECT `Shifts`.`start` FROM `Shifts` INNER JOIN `ShiftEntry` USING (`SID`) WHERE `ShiftEntry`.`id`=" . sql_escape($id) . " AND `UID`=" . sql_escape($shifts_user['UID']) . " LIMIT 1");
if (count($shift) > 0) { if (count($shift) > 0) {
@ -65,62 +56,71 @@ function user_myshifts() {
redirect(page_link_to('user_myshifts')); redirect(page_link_to('user_myshifts'));
} }
$shifts = sql_select("SELECT * FROM `ShiftEntry` JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `UID`=" . sql_escape($shifts_user['UID']) . " ORDER BY `start`"); $shifts = sql_select("SELECT * FROM `ShiftEntry` JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `UID`=" . sql_escape($shifts_user['UID']) . " ORDER BY `start`");
$myshifts_table = array(); $myshifts_table = array();
$html = ""; $html = "";
$timesum = 0; $timesum = 0;
foreach ($shifts as $shift) { foreach ($shifts as $shift) {
$shift_info = $shift['name']; $shift_info = $shift['name'];
$needed_angel_types_source = sql_select("SELECT DISTINCT `AngelTypes`.* FROM `ShiftEntry` JOIN `AngelTypes` ON `ShiftEntry`.`TID`=`AngelTypes`.`id` WHERE `ShiftEntry`.`SID`=" . sql_escape($shift['SID']) . " ORDER BY `AngelTypes`.`name`"); $needed_angel_types_source = sql_select("SELECT DISTINCT `AngelTypes`.* FROM `ShiftEntry` JOIN `AngelTypes` ON `ShiftEntry`.`TID`=`AngelTypes`.`id` WHERE `ShiftEntry`.`SID`=" . sql_escape($shift['SID']) . " ORDER BY `AngelTypes`.`name`");
foreach($needed_angel_types_source as $needed_angel_type) { foreach ($needed_angel_types_source as $needed_angel_type) {
$shift_info .= '<br><b>' . $needed_angel_type['name'] . ':</b> '; $shift_info .= '<br><b>' . $needed_angel_type['name'] . ':</b> ';
$users_source = sql_select("SELECT `User`.* FROM `ShiftEntry` JOIN `User` ON `ShiftEntry`.`UID`=`User`.`UID` WHERE `ShiftEntry`.`SID`=" . sql_escape($shift['SID']) . " AND `ShiftEntry`.`TID`=" . sql_escape($needed_angel_type['id'])); $users_source = sql_select("SELECT `User`.* FROM `ShiftEntry` JOIN `User` ON `ShiftEntry`.`UID`=`User`.`UID` WHERE `ShiftEntry`.`SID`=" . sql_escape($shift['SID']) . " AND `ShiftEntry`.`TID`=" . sql_escape($needed_angel_type['id']));
$shift_entries = array(); $shift_entries = array();
foreach($users_source as $user_source) { foreach ($users_source as $user_source) {
if($user['UID'] == $user_source['UID']) if ($user['UID'] == $user_source['UID'])
$shift_entries[] = '<b>' . $user_source['Nick'] . '</b>'; $shift_entries[] = '<b>' . $user_source['Nick'] . '</b>';
else else
$shift_entries[] = User_Nick_render($user_source); $shift_entries[] = User_Nick_render($user_source);
} }
$shift_info .= join(", ", $shift_entries); $shift_info .= join(", ", $shift_entries);
} }
$myshift = array( $myshift = array(
'date' => date("Y-m-d", $shift['start']), 'date' => date("Y-m-d", $shift['start']),
'time' => date("H:i", $shift['start']) . ' - ' . date("H:i", $shift['end']), 'time' => date("H:i", $shift['start']) . ' - ' . date("H:i", $shift['end']),
'room' => $shift['Name'], 'room' => $shift['Name'],
'shift_info' => $shift_info, 'shift_info' => $shift_info,
'comment' => $shift['Comment'] 'comment' => $shift['Comment']
); );
$myshift['actions'] = ""; $myshift['actions'] = "";
if ($id == $user['UID']) if ($id == $user['UID'])
$myshift['actions'] .= img_button(page_link_to('user_myshifts') . '&edit=' . $shift['id'], 'pencil', _("edit")); $myshift['actions'] .= img_button(page_link_to('user_myshifts') . '&edit=' . $shift['id'], 'pencil', _("edit"));
if (($shift['start'] > time() + $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges)) if (($shift['start'] > time() + $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges))
$myshift['actions'] .= img_button(page_link_to('user_myshifts') . (($id != $user['UID'])? '&id=' . $id : '') . '&cancel=' . $shift['id'], 'cross', _("sign off")); $myshift['actions'] .= img_button(page_link_to('user_myshifts') . (($id != $user['UID']) ? '&id=' . $id : '') . '&cancel=' . $shift['id'], 'cross', _("sign off"));
$timesum += $shift['end'] - $shift['start']; $timesum += $shift['end'] - $shift['start'];
$myshifts_table[] = $myshift; $myshifts_table[] = $myshift;
} }
if(count($myshifts_table) > 0) if (count($myshifts_table) > 0)
$myshifts_table[] = array('date' => "<b>Summe:</b>", 'time' => "<b>" . round($timesum / (60*60), 1) . " h</b>", 'room' => "", 'shift_info' => "", 'comment' => "", 'actions' => ""); $myshifts_table[] = array(
'date' => '<b>' . _("Sum:") . '</b>',
'time' => "<b>" . round($timesum / (60 * 60), 1) . " h</b>",
'room' => "",
'shift_info' => "",
'comment' => "",
'actions' => ""
);
return page(array( return page(array(
msg(), msg(),
$id == $user['UID'] ? sprintf(_('These are your shifts.<br/>Please try to appear <b>15 minutes</b> before your shift begins!<br/>You can remove yourself from a shift up to %d hours before it starts.'), $LETZTES_AUSTRAGEN) : '', $id == $user['UID'] ? sprintf(_('These are your shifts.<br/>Please try to appear <b>15 minutes</b> before your shift begins!<br/>You can remove yourself from a shift up to %d hours before it starts.'), $LETZTES_AUSTRAGEN) : '',
$id != $user['UID'] ? info(sprintf("You are viewing %s's shifts.", $shifts_user['Nick']), true) : '', $id != $user['UID'] ? info(sprintf("You are viewing %s's shifts.", $shifts_user['Nick']), true) : '',
$id != $user['UID'] ? buttons(array(button(page_link_to('admin_user') . '&amp;id=' . $shifts_user['UID'], "Edit " . $shifts_user['Nick'], 'edit'))) : '', $id != $user['UID'] ? buttons(array(
table(array( button(page_link_to('admin_user') . '&amp;id=' . $shifts_user['UID'], "Edit " . $shifts_user['Nick'], 'edit')
'date' => "Tag", )) : '',
'time' => "Zeit", table(array(
'room' => "Ort", 'date' => _("Day"),
'shift_info' => "Name &amp; Kollegen", 'time' => _("Time"),
'comment' => "Kommentar", 'room' => _("Location"),
'actions' => "Aktion" 'shift_info' => _("Name &amp; workmates"),
), $myshifts_table), 'comment' => _("Comment"),
$id == $user['UID'] && count($shifts) == 0 ? error(sprintf(_("Go to the <a href=\"%s\">shifts table</a> to sign yourself up for some shifts."), page_link_to('user_shifts')), true) : '', 'actions' => _("Action")
"<h2>Exports</h2>" . sprintf(_("Export of shown shifts. <a href=\"%s\">iCal format</a> or <a href=\"%s\">JSON format</a> available (please keep secret, otherwise <a href=\"%s\">reset the api key</a>)."), page_link_to_absolute('ical') . '&key=' . $shifts_user['api_key'], page_link_to_absolute('shifts_json_export') . '&key=' . $shifts_user['api_key'], page_link_to('user_myshifts') . '&reset') ), $myshifts_table),
$id == $user['UID'] && count($shifts) == 0 ? error(sprintf(_("Go to the <a href=\"%s\">shifts table</a> to sign yourself up for some shifts."), page_link_to('user_shifts')), true) : '',
'<h2>' . _("Exports") . '</h2>' . sprintf(_("Export of shown shifts. <a href=\"%s\">iCal format</a> or <a href=\"%s\">JSON format</a> available (please keep secret, otherwise <a href=\"%s\">reset the api key</a>)."), page_link_to_absolute('ical') . '&key=' . $shifts_user['api_key'], page_link_to_absolute('shifts_json_export') . '&key=' . $shifts_user['api_key'], page_link_to('user_myshifts') . '&reset')
)); ));
} }
?> ?>

@ -1,4 +1,8 @@
<?php <?php
function user_news_comments_title() {
return _("News comments");
}
function news_title() { function news_title() {
return _("News"); return _("News");
} }
@ -72,7 +76,7 @@ function user_news_comments() {
$text = preg_replace("/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui", '', strip_tags($_REQUEST['text'])); $text = preg_replace("/([^\p{L}\p{P}\p{Z}\p{N}\n]{1,})/ui", '', strip_tags($_REQUEST['text']));
sql_query("INSERT INTO `news_comments` (`Refid`, `Datum`, `Text`, `UID`) VALUES ('" . sql_escape($nid) . "', '" . date("Y-m-d H:i:s") . "', '" . sql_escape($text) . "', '" . sql_escape($user["UID"]) . "')"); sql_query("INSERT INTO `news_comments` (`Refid`, `Datum`, `Text`, `UID`) VALUES ('" . sql_escape($nid) . "', '" . date("Y-m-d H:i:s") . "', '" . sql_escape($text) . "', '" . sql_escape($user["UID"]) . "')");
engelsystem_log("Created news_comment: " . $text); engelsystem_log("Created news_comment: " . $text);
$html .= success("Eintrag wurde gespeichert", true); $html .= success(_("Entry saved."), true);
} }
$html .= '<a href="' . page_link_to("news") . '">&laquo; Back</a>'; $html .= '<a href="' . page_link_to("news") . '">&laquo; Back</a>';
@ -100,22 +104,22 @@ function user_news_comments() {
$html .= ' $html .= '
<br /> <br />
<hr> <hr>
<h2>Neuer Kommentar:</h2> <h2>' . _("New Comment:") . '</h2>
<a name="Neu">&nbsp;</a> <a name="Neu">&nbsp;</a>
<form action="' . page_link_to("news_comments") . '" method="post"> <form action="' . page_link_to("news_comments") . '" method="post">
<input type="hidden" name="nid" value="' . $_REQUEST["nid"] . '"> <input type="hidden" name="nid" value="' . $_REQUEST["nid"] . '">
<table> <table>
<tr> <tr>
<td align="right" valign="top">Text:</td> <td align="right" valign="top">' . _("Message:") . '</td>
<td><textarea name="text" cols="50" rows="10"></textarea></td> <td><textarea name="text" cols="50" rows="10"></textarea></td>
</tr> </tr>
</table> </table>
<br /> <br />
<input type="submit" value="sichern..."> <input type="submit" value="' . _("Save") . '">
</form>'; </form>';
} else { } else {
$html .= "Fehlerhafter Aufruf!"; $html .= _("Fehlerhafter Aufruf!");
} }
return $html; return $html;

@ -5,53 +5,41 @@ function questions_title() {
function user_questions() { function user_questions() {
global $user; global $user;
if (!isset ($_REQUEST['action'])) { if (! isset($_REQUEST['action'])) {
$open_questions = ""; $open_questions = sql_select("SELECT * FROM `Questions` WHERE `AID`=0 AND `UID`=" . sql_escape($user['UID']));
$questions = sql_select("SELECT * FROM `Questions` WHERE `AID`=0 AND `UID`=" . sql_escape($user['UID']));
foreach ($questions as $question) $answered_questions = sql_select("SELECT * FROM `Questions` WHERE `AID`>0 AND `UID`=" . sql_escape($user['UID']));
$open_questions .= '<tr><td>' . str_replace("\n", '<br />', $question['Question']) . '</td><td><a href="' . page_link_to("user_questions") . '&action=delete&id=' . $question['QID'] . '">Löschen</a></td><tr>'; foreach ($answered_questions as &$question) {
$answered_questions = "";
$questions = sql_select("SELECT * FROM `Questions` WHERE `AID`>0 AND `UID`=" . sql_escape($user['UID']));
foreach ($questions as $question) {
$answered_questions .= '<tr><td>' . str_replace("\n", '<br />', $question['Question']) . '</td>';
$answer_user_source = User($question['AID']); $answer_user_source = User($question['AID']);
if($answer_user_source === false) if ($answer_user_source === false)
engelsystem_error("Unable to load user."); engelsystem_error(_("Unable to load user."));
$question['answer_user'] = User_Nick_render($answer_user_source);
$answered_questions .= '<td>' . User_Nick_render($answer_user_source) . '</td><td>' . str_replace("\n", '<br />', $question['Answer']) . '</td>';
$answered_questions .= '<td><a href="' . page_link_to("user_questions") . '&action=delete&id=' . $question['QID'] . '">Löschen</a></td><tr>';
} }
return template_render('../templates/user_questions.html', array ( return Questions_view($open_questions, $answered_questions, page_link_to("user_questions") . '&action=ask');
'link' => page_link_to("user_questions"),
'open_questions' => $open_questions,
'answered_questions' => $answered_questions
));
} else { } else {
switch ($_REQUEST['action']) { switch ($_REQUEST['action']) {
case 'ask' : case 'ask':
$question = strip_request_item_nl('question'); $question = strip_request_item_nl('question');
if ($question != "") { if ($question != "") {
sql_query("INSERT INTO `Questions` SET `UID`=" . sql_escape($user['UID']) . ", `Question`='" . sql_escape($question) . "'"); sql_query("INSERT INTO `Questions` SET `UID`=" . sql_escape($user['UID']) . ", `Question`='" . sql_escape($question) . "'");
redirect(page_link_to("user_questions")); redirect(page_link_to("user_questions"));
} else } else
return error("Gib eine Frage ein!", true); return error(_("Please enter a question!"), true);
break; break;
case 'delete' : case 'delete':
if (isset ($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id'])) if (isset($_REQUEST['id']) && preg_match("/^[0-9]{1,11}$/", $_REQUEST['id']))
$id = $_REQUEST['id']; $id = $_REQUEST['id'];
else else
return error("Incomplete call, missing Question ID.", true); return error(_("Incomplete call, missing Question ID."), true);
$question = sql_select("SELECT * FROM `Questions` WHERE `QID`=" . sql_escape($id) . " LIMIT 1"); $question = sql_select("SELECT * FROM `Questions` WHERE `QID`=" . sql_escape($id) . " LIMIT 1");
if (count($question) > 0 && $question[0]['UID'] == $user['UID']) { if (count($question) > 0 && $question[0]['UID'] == $user['UID']) {
sql_query("DELETE FROM `Questions` WHERE `QID`=" . sql_escape($id) . " LIMIT 1"); sql_query("DELETE FROM `Questions` WHERE `QID`=" . sql_escape($id) . " LIMIT 1");
redirect(page_link_to("user_questions")); redirect(page_link_to("user_questions"));
} else } else
return error("No question found.", true); return error(_("No question found."), true);
break; break;
} }
} }

@ -1,4 +1,8 @@
<?php <?php
function settings_title() {
return _("Settings");
}
function user_settings() { function user_settings() {
global $enable_tshirt_size, $tshirt_sizes, $themes, $locales; global $enable_tshirt_size, $tshirt_sizes, $themes, $locales;
global $user; global $user;
@ -108,7 +112,7 @@ function user_settings() {
} }
engelsystem_log("Own angel types set to: " . join(", ", $user_angel_type_info)); engelsystem_log("Own angel types set to: " . join(", ", $user_angel_type_info));
success("Settings saved."); success(_("Settings saved."));
redirect(page_link_to('user_settings')); redirect(page_link_to('user_settings'));
} }
} elseif (isset($_REQUEST['submit_password'])) { } elseif (isset($_REQUEST['submit_password'])) {

File diff suppressed because it is too large Load Diff

@ -17,19 +17,19 @@ function header_toolbar() {
$toolbar_items = array(); $toolbar_items = array();
if (in_array('register', $privileges)) if (in_array('register', $privileges))
$toolbar_items[] = toolbar_item_link(page_link_to('register'), 'register', "Register", $p == 'register'); $toolbar_items[] = toolbar_item_link(page_link_to('register'), 'register', register_title(), $p == 'register');
if (in_array('user_myshifts', $privileges)) if (in_array('user_myshifts', $privileges))
$toolbar_items[] = toolbar_item_link(page_link_to('user_myshifts'), 'engel', $user['Nick'], $p == 'user_myshifts'); $toolbar_items[] = toolbar_item_link(page_link_to('user_myshifts'), 'engel', $user['Nick'], $p == 'user_myshifts');
if (in_array('user_settings', $privileges)) if (in_array('user_settings', $privileges))
$toolbar_items[] = toolbar_item_link(page_link_to('user_settings'), 'settings', "Settings", $p == 'user_settings'); $toolbar_items[] = toolbar_item_link(page_link_to('user_settings'), 'settings', settings_title(), $p == 'user_settings');
if (in_array('login', $privileges)) if (in_array('login', $privileges))
$toolbar_items[] = toolbar_item_link(page_link_to('login'), 'login', "Login", $p == 'login'); $toolbar_items[] = toolbar_item_link(page_link_to('login'), 'login', login_title(), $p == 'login');
if (in_array('logout', $privileges)) if (in_array('logout', $privileges))
$toolbar_items[] = toolbar_item_link(page_link_to('logout'), 'logout', "Logout", $p == 'logout'); $toolbar_items[] = toolbar_item_link(page_link_to('logout'), 'logout', logout_title(), $p == 'logout');
return toolbar($toolbar_items); return toolbar($toolbar_items);
} }

@ -13,7 +13,9 @@ require_once ('includes/sys_template.php');
require_once ('includes/model/LogEntries_model.php'); require_once ('includes/model/LogEntries_model.php');
require_once ('includes/model/User_model.php'); require_once ('includes/model/User_model.php');
require_once ('includes/view/Questions_view.php');
require_once ('includes/view/Shifts_view.php'); require_once ('includes/view/Shifts_view.php');
require_once ('includes/view/ShiftEntry_view.php');
require_once ('includes/view/User_view.php'); require_once ('includes/view/User_view.php');
require_once ('includes/helper/internationalization_helper.php'); require_once ('includes/helper/internationalization_helper.php');
@ -37,10 +39,12 @@ require_once ('includes/pages/admin_shifts.php');
require_once ('includes/pages/admin_user.php'); require_once ('includes/pages/admin_user.php');
require_once ('includes/pages/admin_user_angeltypes.php'); require_once ('includes/pages/admin_user_angeltypes.php');
require_once ('includes/pages/guest_faq.php'); require_once ('includes/pages/guest_faq.php');
require_once ('includes/pages/guest_login.php');
require_once ('includes/pages/user_messages.php'); require_once ('includes/pages/user_messages.php');
require_once ('includes/pages/user_myshifts.php'); require_once ('includes/pages/user_myshifts.php');
require_once ('includes/pages/user_news.php'); require_once ('includes/pages/user_news.php');
require_once ('includes/pages/user_questions.php'); require_once ('includes/pages/user_questions.php');
require_once ('includes/pages/user_settings.php');
require_once ('includes/pages/user_shifts.php'); require_once ('includes/pages/user_shifts.php');
require_once ('includes/pages/user_wakeup.php'); require_once ('includes/pages/user_wakeup.php');
@ -83,6 +87,7 @@ elseif (in_array($p, $privileges)) {
$content = user_news(); $content = user_news();
} elseif ($p == "news_comments") { } elseif ($p == "news_comments") {
require_once ('includes/pages/user_news.php'); require_once ('includes/pages/user_news.php');
$title = user_news_comments_title();
$content = user_news_comments(); $content = user_news_comments();
} elseif ($p == "user_meetings") { } elseif ($p == "user_meetings") {
$title = meetings_title(); $title = meetings_title();
@ -103,16 +108,16 @@ elseif (in_array($p, $privileges)) {
$title = wakeup_title(); $title = wakeup_title();
$content = user_wakeup(); $content = user_wakeup();
} elseif ($p == "user_settings") { } elseif ($p == "user_settings") {
require_once ('includes/pages/user_settings.php'); $title = settings_title();
$content = user_settings(); $content = user_settings();
} elseif ($p == "login") { } elseif ($p == "login") {
require_once ('includes/pages/guest_login.php'); $title = login_title();
$content = guest_login(); $content = guest_login();
} elseif ($p == "register") { } elseif ($p == "register") {
require_once ('includes/pages/guest_login.php'); $title = register_title();
$content = guest_register(); $content = guest_register();
} elseif ($p == "logout") { } elseif ($p == "logout") {
require_once ('includes/pages/guest_login.php'); $title = logout_title();
$content = guest_logout(); $content = guest_logout();
} elseif ($p == "admin_questions") { } elseif ($p == "admin_questions") {
$title = admin_questions_title(); $title = admin_questions_title();
@ -165,6 +170,7 @@ elseif (in_array($p, $privileges)) {
} }
} elseif ($p == "credits") { } elseif ($p == "credits") {
require_once ('includes/pages/guest_credits.php'); require_once ('includes/pages/guest_credits.php');
$title = credits_title();
$content = guest_credits(); $content = guest_credits();
} elseif ($p == "faq") { } elseif ($p == "faq") {
$title = faq_title(); $title = faq_title();

@ -1,22 +1,3 @@
<p>
Unbeantwortete Fragen:
</p>
<table>
<thead>
<tr>
<th>
Frage
</th>
<th>
&nbsp;
</th>
</tr>
</thead>
<tbody>
%open_questions%
</tbody>
</table>
<hr/>
<p> <p>
Beantwortete Fragen: Beantwortete Fragen:
</p> </p>

@ -1,45 +0,0 @@
<form action="" method="post">
<fieldset>
<p>
<label>
Helfer:
</label>
%angel%
</p>
<p>
<label>
Datum/Dauer:
</label>
%date%
</p>
<p>
<label>
Ort:
</label>
%location%
</p>
<p>
<label>
Titel:
</label>
%title%
</p>
<p>
<label>
Typ:
</label>
%type%
</p>
<p>
<label>
Kommentar:
<br/>
(Nur für Dich)
</label>
<textarea name="comment">%comment%</textarea>
</p>
<p>
<input type="submit" name="submit" value="Speichern" />
</p>
</fieldset>
</form>
Loading…
Cancel
Save