From 5a7a32d5593413640cf42ebe671d30a08d515882 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Thu, 27 Dec 2012 14:24:05 +0100 Subject: make search case-insensitive --- includes/pages/admin_active.php | 2 +- includes/pages/admin_arrive.php | 4 ++-- includes/pages/admin_free.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'includes') 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; } -- cgit v1.2.3-54-g00ecf From 35202cc525c903a08e3cc466c9845ba1fd585617 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Thu, 27 Dec 2012 14:25:33 +0100 Subject: allow IP address change while being logged in --- includes/sys_auth.php | 9 --------- 1 file changed, 9 deletions(-) (limited to 'includes') 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"); -- cgit v1.2.3-54-g00ecf From c0bdfe08711d098f66735a975d1750931dc86a37 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Thu, 27 Dec 2012 14:33:13 +0100 Subject: link to Volunteers page of 29C3 whereever angeltypes are mentioned --- includes/pages/guest_login.php | 2 +- includes/pages/user_settings.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'includes') 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?
(Description of job types)", $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_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?
(Description of job types)", $angel_types, $selected_angel_types), form_submit('submit', Get_Text("save")) )), form(array ( -- cgit v1.2.3-54-g00ecf From 7a2eae0a4b41232d7a9dd9dfec7bf8dfe5e919bf Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Thu, 27 Dec 2012 14:46:55 +0100 Subject: fix sign out button and remove edit button for "myshifts" when viewing other users --- includes/pages/user_myshifts.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'includes') 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 .= '' . $shift['name'] . ''; $html .= '' . $shift['Comment'] . ''; $html .= ''; - $html .= '' . Get_Text('edit') . ''; - if ($shift['start'] - time() > $LETZTES_AUSTRAGEN * 3600) - $html .= ' | ' . Get_Text('sign_off') . ''; + if ($id == $user['UID']) + $html .= '' . Get_Text('edit') . ''; + if (($shift['start'] - time() > $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges)) + $html .= ' | ' . Get_Text('sign_off') . ''; $html .= ''; $html .= ''; } -- cgit v1.2.3-54-g00ecf