Topic: Admins vs Moders
??? ? ??????? ????????? ?????? ???????????????? (? ???? v1.0.1 ??????!)
You are not logged in. Please login or register.
PunBB Forums → Archive → Admins vs Moders
??? ? ??????? ????????? ?????? ???????????????? (? ???? v1.0.1 ??????!)
???????? ???.
????? ? admin/bans.php:
if ($ban_user != '') {
$result = $db->query('SELECT id, username, email FROM '.$db->prefix.'users WHERE username=\''.escape(strtolower($ban_user)).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
if ($db->num_rows($result)) {
list($ban_id, $ban_user, $ban_email) = $db->fetch_row($result);
$result = $db->query('SELECT poster_ip FROM '.$db->prefix.'posts WHERE poster_id='.$ban_id.' ORDER BY posted DESC LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
if ($db->num_rows($result))
$ban_ip = $db->result($result, 0);
}
else
message('No user by that username registered. If you want to add a ban not tied to a specific username just leave the username blank.');
}
????????? ??:
if ($ban_user != '') {
$result = $db->query('SELECT id, username, email, status FROM '.$db->prefix.'users WHERE username=\''.escape(strtolower($ban_user)).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
if ($db->num_rows($result)) {
list($ban_id, $ban_user, $ban_email, $ban_status) = $db->fetch_row($result);
if (intval($ban_status) == 2)
message('Are you crazy? Can not ban administrator!');
$result = $db->query('SELECT poster_ip FROM '.$db->prefix.'posts WHERE poster_id='.$ban_id.' ORDER BY posted DESC LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
if ($db->num_rows($result))
$ban_ip = $db->result($result, 0);
}
else
message('No user by that username registered. If you want to add a ban not tied to a specific username just leave the username blank.');
}
??? ?? ????????, ???? ??? ????. ????? ???-???? ????? ???? ????.
Áàíèò òîëüêî òàê. Íå ðàáîòàåò. Ïðîáîâàë è ïî id òîæå...
???????? ????? if (intval($ban_status) == 2) ?????????:
var_dump($ban_status);
? ??????, ??? ??????? ?? ?????. ?????? ?????? ??????????. ???? ???????? ???-?? ??????, ???? ???????????, ???? ?????? ?????? ?? ????????, .... ???? ? ?????-?? ??????????? :)
?? ????????! ???? ?????!
P.S. nyuk, ? ???? ???? ICQ?
? ??????? ??????.
PunBB Forums → Archive → Admins vs Moders
Powered by PunBB, supported by Informer Technologies, Inc.