#27 ical export, link explained
This commit is contained in:
parent
304af8e8f0
commit
f8ec85e4c6
|
@ -66,10 +66,17 @@ function user_myshifts() {
|
|||
if ($html == "")
|
||||
$html = '<tr><td>Keine...</td><td></td><td></td><td></td><td></td><td>Gehe zum <a href="' . page_link_to('user_shifts') . '">Schichtplan</a> um Dich für Schichten einzutragen.</td></tr>';
|
||||
|
||||
if ($user['ical_key'] == "") {
|
||||
$user['ical_key'] = md5($user['Nick'] . time() . rand());
|
||||
sql_query("UPDATE `User` SET `ical_key`='" . sql_escape($user['ical_key']) . "' WHERE `UID`='" . sql_escape($user['UID']) . "' LIMIT 1");
|
||||
}
|
||||
|
||||
return template_render('../templates/user_myshifts.html', array (
|
||||
'h' => $LETZTES_AUSTRAGEN,
|
||||
'shifts' => $html,
|
||||
'msg' => $msg
|
||||
'msg' => $msg,
|
||||
'ical_link' => page_link_to_absolute('ical') . '&key=' . $user['ical_key'],
|
||||
'reset_link' => page_link_to('user_myshifts') . '&reset'
|
||||
));
|
||||
}
|
||||
?>
|
|
@ -3,6 +3,10 @@ function page_link_to($page) {
|
|||
return '?p=' . $page;
|
||||
}
|
||||
|
||||
function page_link_to_absolute($page) {
|
||||
return (isset ($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . preg_replace("/\?.*$/", '', $_SERVER['REQUEST_URI']) . page_link_to($page);
|
||||
}
|
||||
|
||||
function make_navigation() {
|
||||
global $p;
|
||||
global $privileges;
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<p>
|
||||
Hier sind Deine Schichten.
|
||||
<br/>
|
||||
Versuche bitte <b>15 Minuten</b> vor Schichtbeginn anwesend zu sein!
|
||||
Versuche bitte <b>15 Minuten</b>
|
||||
vor Schichtbeginn anwesend zu sein!
|
||||
<br/>
|
||||
Du kannst Dich %h% Stunden vor Schichtbeginn noch aus Schichten wieder austragen.
|
||||
</p>
|
||||
|
@ -33,3 +34,10 @@
|
|||
%shifts%
|
||||
</tbody>
|
||||
</table>
|
||||
<hr />
|
||||
<h2>iCal Export</h2>
|
||||
<p>
|
||||
Zum abonnieren in Deiner Kalender-Software benutze folgenden öffentlichen Link (daher bitte geheimhalten, im Notfall Deinen <a href="%reset_link%">Key zurücksetzen</a>):
|
||||
<br/>
|
||||
<a href="%ical_link%">%ical_link%</a>
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue