1

Topic: Admins vs Moders

??? ? ??????? ????????? ?????? ???????????????? (? ???? v1.0.1 ??????!)

If you want a Job done right, you do it yourself!

2

Re: Admins vs Moders

???????? ???.
????? ? 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.');
        }

??? ?? ????????, ???? ??? ????. ????? ???-???? ????? ???? ????.

Big Brother is not watching you, Big Brother is testing you

3

Re: Admins vs Moders

Áàíèò òîëüêî òàê. Íå ðàáîòàåò. Ïðîáîâàë è ïî id òîæå... sad sad sad

If you want a Job done right, you do it yourself!

4

Re: Admins vs Moders

???????? ????? if (intval($ban_status) == 2) ?????????:
var_dump($ban_status);
? ??????, ??? ??????? ?? ?????. ?????? ?????? ??????????. ???? ???????? ???-?? ??????, ???? ???????????, ???? ?????? ?????? ?? ????????, .... ???? ? ?????-?? ??????????? :)

Big Brother is not watching you, Big Brother is testing you

5

Re: Admins vs Moders

?? ????????! ???? ?????! sad big_smile

P.S. nyuk, ? ???? ???? ICQ?

If you want a Job done right, you do it yourself!

6

Re: Admins vs Moders

? ??????? ??????.

Big Brother is not watching you, Big Brother is testing you