summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2012-12-27 15:00:41 +0100
committerPhilip Häusler <msquare@notrademark.de>2012-12-27 15:00:41 +0100
commite82c31a76defb0cd3b611e13e33faa091a97cebc (patch)
treed6f6d3c16f4ffab46ab950865fc400df7fec877e /includes
parent1cf84a87be359705de20657892352cb060d8704f (diff)
parent7a2eae0a4b41232d7a9dd9dfec7bf8dfe5e919bf (diff)
Merge branch 'master' of https://vcs.wybt.net/engelsystem/git
Diffstat (limited to 'includes')
-rw-r--r--includes/pages/admin_active.php2
-rw-r--r--includes/pages/admin_arrive.php4
-rw-r--r--includes/pages/admin_free.php2
-rw-r--r--includes/pages/guest_login.php2
-rw-r--r--includes/pages/user_myshifts.php7
-rw-r--r--includes/pages/user_settings.php2
-rw-r--r--includes/sys_auth.php9
7 files changed, 10 insertions, 18 deletions
diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php
index 241d0904..7811d795 100644
--- a/includes/pages/admin_active.php
+++ b/includes/pages/admin_active.php
@@ -92,7 +92,7 @@ function admin_active() {
$match = false;
$index = join("", $usr);
foreach ($tokens as $t)
- if (strstr($index, trim($t))) {
+ if (stristr($index, trim($t))) {
$match = true;
break;
}
diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php
index 70a43394..805813cd 100644
--- a/includes/pages/admin_arrive.php
+++ b/includes/pages/admin_arrive.php
@@ -35,7 +35,7 @@ function admin_arrive() {
$match = false;
$index = join("", $usr);
foreach ($tokens as $t)
- if (strstr($index, trim($t))) {
+ if (stristr($index, trim($t))) {
$match = true;
break;
}
@@ -57,4 +57,4 @@ function admin_arrive() {
'link' => page_link_to('admin_arrive')
));
}
-?> \ No newline at end of file
+?>
diff --git a/includes/pages/admin_free.php b/includes/pages/admin_free.php
index 88a96965..43b2e1a7 100644
--- a/includes/pages/admin_free.php
+++ b/includes/pages/admin_free.php
@@ -33,7 +33,7 @@ function admin_free() {
$match = false;
$index = join("", $usr);
foreach ($tokens as $t)
- if (strstr($index, trim($t))) {
+ if (stristr($index, trim($t))) {
$match = true;
break;
}
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index 98776867..aaf7b0f1 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -146,7 +146,7 @@ function guest_register() {
form_text('hometown', Get_Text("makeuser_Hometown"), $hometown),
$enable_tshirt_size ? form_select('tshirt_size', Get_Text("makeuser_T-Shirt"), $tshirt_sizes, $tshirt_size) : '',
form_textarea('comment', Get_Text("makeuser_text2"), $comment),
- form_checkboxes('angel_types', "What do you want to do?", $angel_types, $selected_angel_types),
+ form_checkboxes('angel_types', "What do you want to do?<br>(<a href=\"https://events.ccc.de/congress/2012/wiki/Volunteers#What_kind_of_volunteers_are_needed.3F\">Description of job types</a>)", $angel_types, $selected_angel_types),
form_info("", "Restricted angel types need will be confirmed later by an archangel. You can change your selection in the options section."),
form_password('password', Get_Text("makeuser_Passwort") . "*"),
form_password('password2', Get_Text("makeuser_Passwort2") . "*"),
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index d8f94b81..f38a81d0 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -79,9 +79,10 @@ function user_myshifts() {
$html .= '<td>' . $shift['name'] . '</td>';
$html .= '<td>' . $shift['Comment'] . '</td>';
$html .= '<td>';
- $html .= '<a href="' . page_link_to('user_myshifts') . '&edit=' . $shift['id'] . '">' . Get_Text('edit') . '</a>';
- if ($shift['start'] - time() > $LETZTES_AUSTRAGEN * 3600)
- $html .= ' | <a href="' . page_link_to('user_myshifts') . '&cancel=' . $shift['id'] . '">' . Get_Text('sign_off') . '</a>';
+ if ($id == $user['UID'])
+ $html .= '<a href="' . page_link_to('user_myshifts') . '&edit=' . $shift['id'] . '">' . Get_Text('edit') . '</a>';
+ if (($shift['start'] - time() > $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges))
+ $html .= ' | <a href="' . page_link_to('user_myshifts') . (($id != $user['UID'])? '&id=' . $id : '') . '&cancel=' . $shift['id'] . '">' . Get_Text('sign_off') . '</a>';
$html .= '</td>';
$html .= '</tr>';
}
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index 70033d18..999b890d 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -182,7 +182,7 @@ function user_settings() {
form_text('jabber', "Jabber", $jabber),
form_text('hometown', Get_Text("makeuser_Hometown"), $hometown),
$enable_tshirt_size ? form_select('tshirt_size', Get_Text("makeuser_T-Shirt"), $tshirt_sizes, $tshirt_size) : '',
- form_checkboxes('angel_types', "What do you want to do?", $angel_types, $selected_angel_types),
+ form_checkboxes('angel_types', "What do you want to do?<br>(<a href=\"https://events.ccc.de/congress/2012/wiki/Volunteers#What_kind_of_volunteers_are_needed.3F\">Description of job types</a>)", $angel_types, $selected_angel_types),
form_submit('submit', Get_Text("save"))
)),
form(array (
diff --git a/includes/sys_auth.php b/includes/sys_auth.php
index 68cf17e4..4ca56632 100644
--- a/includes/sys_auth.php
+++ b/includes/sys_auth.php
@@ -5,15 +5,6 @@
function load_auth() {
global $user, $privileges;
- if (!isset ($_SESSION['IP']))
- $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
-
- if ($_SESSION['IP'] != $_SERVER['REMOTE_ADDR']) {
- session_destroy();
- error("Your session has been destroyed because your ip-address changed.");
- header("Location: " . page_link_to('start'));
- }
-
$user = null;
if (isset ($_SESSION['uid'])) {
$user = sql_select("SELECT * FROM `User` WHERE `UID`=" . sql_escape($_SESSION['uid']) . " LIMIT 1");