Merge branch 'master' of https://vcs.wybt.net/engelsystem/git
This commit is contained in:
commit
e82c31a76d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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") . "*"),
|
||||
|
|
|
@ -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>';
|
||||
}
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue