Ik heb net de update naar 2.0.19 gedaan maar daar zat niets in van posting.php...
http://www.olympus-clan.net
EDIT: Bij nader inzien zat er wel wa in 2.0.19 wat te maken had met login:
Code: Selecteer alles
#
#-----[ OPEN ]---------------------------------------------
#
login.php
#
#-----[ FIND ]---------------------------------------------
# Line 60
$sql = "SELECT user_id, username, user_password, user_active, user_level
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$sql = "SELECT user_id, username, user_password, user_active, user_level, user_login_tries, user_last_login_try
#
#-----[ FIND ]---------------------------------------------
# Line 79
if( md5($password) == $row['user_password'] && $row['user_active'] )
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
// If the last login is more than x minutes ago, then reset the login tries/time
if ($row['user_last_login_try'] && $board_config['login_reset_time'] && $row['user_last_login_try'] < (time() - ($board_config['login_reset_time'] * 60)))
{
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_tries = 0, user_last_login_try = 0 WHERE user_id = ' . $row['user_id']);
$row['user_last_login_try'] = $row['user_login_tries'] = 0;
}
// Check to see if user is allowed to login again... if his tries are exceeded
if ($row['user_last_login_try'] && $board_config['login_reset_time'] && $board_config['max_login_attempts'] &&
$row['user_last_login_try'] >= (time() - ($board_config['login_reset_time'] * 60)) && $row['user_login_tries'] >= $board_config['max_login_attempts'])
{
message_die(GENERAL_MESSAGE, sprintf($lang['Login_attempts_exceeded'], $board_config['max_login_attempts'], $board_config['login_reset_time']));
}
#
#-----[ FIND ]---------------------------------------------
# Line 97
$admin = (isset($HTTP_POST_VARS['admin'])) ? 1 : 0;
$session_id = session_begin($row['user_id'], $user_ip, PAGE_INDEX, FALSE, $autologin, $admin);
#
#-----[ AFTER, ADD ]---------------------------------------------
#
// Reset login tries
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_tries = 0, user_last_login_try = 0 WHERE user_id = ' . $row['user_id']);
#
#-----[ FIND ]---------------------------------------------
# Line 115
$redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : '';
$redirect = str_replace('?', '&', $redirect);
#
#-----[ BEFORE, ADD ]---------------------------------------------
#
// Save login tries and last login
if ($row['user_id'] != ANONYMOUS)
{
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_login_tries = user_login_tries + 1, user_last_login_try = ' . time() . '
WHERE user_id = ' . $row['user_id'];
$db->sql_query($sql);
}
Code: Selecteer alles
<form method="post" action="{S_POLL_QUESTION}">
<center><b>{S_POLL_QUESTION}</b></center><br />
<!-- BEGIN poll_option_row -->
<input type="radio" name="vote_id" value="{poll_option_row.OPTION_ID}"><BR>{poll_option_row.OPTION_TEXT} [{poll_option_row.VOTE_RESULT}]<br />
<!-- END poll_option_row -->
<br />
<!-- BEGIN switch_user_logged_out -->
<center>{L_LOGIN_TO_VOTE}</center>
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<center><input type="submit" class="mainoption" name="submit" value="{L_VOTE_BUTTON}" {DISABLED}></center>
<input type="hidden" name="topic_id" value="{S_TOPIC_ID}">
<input type="hidden" name="mode" value="vote">
<!-- END switch_user_logged_in -->
</form>