protect useraccount 1.2.8
المشرف: alhitary
protect useraccount 1.2.8
?????? ????? ..
????? ??????? ?? ??? ?????? ??? ????? ??? ????? 2.0.10 ??? ???? ???? ??? ??? ??? ???? ??????? ?????? ???? ???? ????? ??? ???? ?? ???? ??? ..
?????? ??????? ?? admin_users.php ??? ??? ?? ?????? ?????? ??? ????????? ??????? ???? ????? ..
??? ???????? ??????? ??? ????? ??????? ?? ??? ????? ?? ?????? ?????? ?????? ?? ???? .. ???? ??? ???????? ???? ???? ???
??? ????? ?? ??????? ??? ????? ?? ?????? ?????? ?? ??????? ????? ??????? .. ????? ???? ???? ???? ????? ????? ??? ??? ?? ????? ????? ??? ??? ?????? ??? ????? ??????? ????? ?? ????? ??? ???? ??????? ??????? ????? .. ???? ????? ???? ??? ??? .. ??????? ????? ?? ???? Save ????? ..
????? ????? ????? ????? ???? ????? ???? ..
????? ???? ?????? ?? ?????? ??????? .
http://www.phpbb.com/phpBB/catdb.php?mo ... &id=796310[/color]
????? ??????? ?? ??? ?????? ??? ????? ??? ????? 2.0.10 ??? ???? ???? ??? ??? ??? ???? ??????? ?????? ???? ???? ????? ??? ???? ?? ???? ??? ..
?????? ??????? ?? admin_users.php ??? ??? ?? ?????? ?????? ??? ????????? ??????? ???? ????? ..
??? ???????? ??????? ??? ????? ??????? ?? ??? ????? ?? ?????? ?????? ?????? ?? ???? .. ???? ??? ???????? ???? ???? ???

??? ????? ?? ??????? ??? ????? ?? ?????? ?????? ?? ??????? ????? ??????? .. ????? ???? ???? ???? ????? ????? ??? ??? ?? ????? ????? ??? ??? ?????? ??? ????? ??????? ????? ?? ????? ??? ???? ??????? ??????? ????? .. ???? ????? ???? ??? ??? .. ??????? ????? ?? ???? Save ????? ..
????? ????? ????? ????? ???? ????? ???? ..
كود: تحديد الكل
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------------
#
$message = $lang['User_deleted']
message_die(
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
if( $HTTP_POST_VARS['block_account'] )
{
$sql = "UPDATE ".USERS_TABLE." SET
user_blocktime='".(time()+$board_config['block_time']*60)."', user_block_by='$user_ip'
WHERE user_id = '$user_id'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not block user', '', __LINE__, __FILE__, $sql);
}
$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_logged_in="0" WHERE session_user_id="'.$user_id.'"';
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update blocked sessions from database", "", __LINE__, __FILE__, $sql);
}
} else
if( $HTTP_POST_VARS['unblock_account'] )
{
$sql = "UPDATE ".USERS_TABLE." SET
user_blocktime='0', user_badlogin='0'
WHERE user_id = '$user_id'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not unblock user', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ FIND ]------------------------------------------------
#
$viewemail = ( isset( $HTTP
#
#-----[ AFTER, ADD ]------------------------------------------
#
//if you wish to give the user the option of using the admin made password for X days, substitude "0" value in the secound line below with a value of secounds + current time the password will be valid
$force_new_passwd = ( isset( $HTTP_POST_VARS['force_new_passwd']) ) ? ( ( $HTTP_POST_VARS['force_new_passwd'] ) ? TRUE : 0 ) : 0;
$force_new_passwd_sql = ( $force_new_passwd ) ? ", user_passwd_change='0'" : (($this_userdata['user_passwd_change']) ? "" : ", user_passwd_change='".time()."'");
#
#-----[ FIND ]--------
------------------------1----------
#
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql .
#
#-----[ IN-LINE FIND ]------------------------------------------
#
. $avatar_sql
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
. $force_new_passwd_sql
#
#-----[ FIND ]------------------------------------------
#
//
// Let's do an overall check for settings/versions which would prevent
#
#-----[ BEFORE, ADD ]------------------------------------------
#
if ($this_userdata['user_blocktime']<time() )
{
$template->assign_vars(array(
'BLOCK_BY' => ($this_userdata['user_block_by']) ? sprintf($lang['Last_block_by'],decode_ip($this_userdata['user_block_by'])).'<br/>' : '',
'BLOCK' => '<br/><input type="checkbox" name="block_account">'.sprintf ($lang['Block_user'],$board_config['block_time']) ));
} else
{
$template->assign_vars(array(
'BLOCK_UNTIL' => sprintf($lang['Block_until'], create_date($board_config['default_dateformat'], $this_userdata['user_blocktime'], $board_config['board_timezone']) ).'<br/>',
'BLOCK_BY' => ($this_userdata['user_block_by']) ? sprintf($lang['Block_by'],decode_ip($this_userdata['user_block_by'])).'<br/>' : '',
'BLOCK' => '<br/><input type="checkbox" name="unblock_account">'.$lang['Unblock_user'] )).'<br/>';
}
if ($this_userdata['user_passwd_change']>0)
{
$l_force_new_passwd_explain = sprintf ($lang['Password_expire'],create_date($board_config['default_dateformat'],$this_userdata['user_passwd_change']+($board_config['max_password_age']*86400),$board_config['board_timezone']));
$force_new_passwd_checked ='';
} else
{
$l_force_new_passwd_explain = '';
$force_new_passwd_checked = 'value="checked" checked="checked"';
}
#
#-----[ FIND ]------------------------------------------
#
'RANK_SELECT_BOX' => $rank_select_box,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'BAD_LOGIN_COUNT' => $this_userdata['user_badlogin'],
'FORCE_NEW_PASSWD_CHECKED' => $force_new_passwd_checked,
#
#-----[ FIND ]------------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_ACCOUNT_BLOCK' => $lang['Account_block'],
'L_ACCOUNT_BLOCK_EXPLAIN' => $lang['Account_block_explain'],
'L_UNBLOCK' => $lang['Unblock_user'],
'L_BAD_LOGIN_COUNT' => $lang['Badlogin_count'],
'L_FORCE_NEW_PASSWD' => $lang['Force_new_passwd'],
'L_FORCE_NEW_PASSWD_EXPLAIN' => $l_force_new_passwd_explain,
http://www.phpbb.com/phpBB/catdb.php?mo ... &id=796310[/color]
????? ..
??? ????? ???? .. ??? ????? ??????
??? ????? ???? .. ??? ????? ??????

كود: تحديد الكل
#-----[ FIND ]------------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
SET " . $username_sql . $passwd_sql .
#
#-----[ IN-LINE FIND ]--------1--------------------------------
#
. $avatar_sql
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
. $force_new_passwd_sql
????? ??? .
?? ??? ????? ???? ??????? ?????? ????? ????? .. ?? ?? ??????? ????? ???? ?????? ..
?? ??????? ..
_ ????? ??? ?????? ?????? ?????? ??????? ?????? ???? ????? ?????? ????? ???? ??? ????? .
- ??? ???????? ??? ?????? ??????? ??? ???? ??? ???? .. ????? ?? ???? ?? ????? ??? ????? ..
- ????? ???????? ??? ?????? ??????? ???? ????? ?? ???? ?????? ..
- ????? ??? ????? ??????? ?????? ????????? ????? ??? ????? ????? ?????? ???? ??????? ??? ????? ???? ???? ..
??????? ?? ??????? ???????? ?????? ??? ???????? ???? ????? ?????? ..
???? ???? ?????? ????????? ?? ??????? ????? ????? ??? ?? ???? ?????? ..
?????? ???????? ?? ??? ..
?? ??? ????? ???? ??????? ?????? ????? ????? .. ?? ?? ??????? ????? ???? ?????? ..
?? ??????? ..
_ ????? ??? ?????? ?????? ?????? ??????? ?????? ???? ????? ?????? ????? ???? ??? ????? .
- ??? ???????? ??? ?????? ??????? ??? ???? ??? ???? .. ????? ?? ???? ?? ????? ??? ????? ..
- ????? ???????? ??? ?????? ??????? ???? ????? ?? ???? ?????? ..
- ????? ??? ????? ??????? ?????? ????????? ????? ??? ????? ????? ?????? ???? ??????? ??? ????? ???? ???? ..
??????? ?? ??????? ???????? ?????? ??? ???????? ???? ????? ?????? ..
???? ???? ?????? ????????? ?? ??????? ????? ????? ??? ?? ???? ?????? ..
?????? ???????? ?? ??? ..
- broken_ice
- عضو جديد
- مشاركات: 33
- اشترك في: الجمعة سبتمبر 26, 2003 10:16 pm
- مكان: Egypt
- اتصال:
الموجودون الآن
المتصفحون للمنتدى الآن: لا يوجد أعضاء مسجلين متصلين و 5 زوار