Просмотр поста

.
studiouz

Oewgo, На держи только весетку сам сделаешь !

// Контакты
        if (!functions::is_ignor($user['id']) && functions::is_contact($user['id']) != 2) {
            if (!functions::is_friend($user['id'])) {
                $fr_in = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `type`='2' AND `from_id`='$user_id' AND `user_id`='{$user['id']}'"), 0);
                $fr_out = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `type`='2' AND `user_id`='$user_id' AND `from_id`='{$user['id']}'"), 0);
                if ($fr_in == 1) {
                    $friend = '<a class="underline" href="profile.php?act=friends&amp;do=ok&amp;id=' . $user['id'] . '"><img src="../images/ok.png" alt="" /></a>   <a class="underline" href="profile.php?act=friends&amp;do=no&amp;id=' . $user['id'] . '"><img src="../images/no.png" alt="" /></a>';
                } else if ($fr_out == 1) {
                    $friend = '<a class="underline" href="profile.php?act=friends&amp;do=cancel&amp;id=' . $user['id'] . '"><img src="../images/cancel.png" alt="" /></a>';
                } else {
                    $friend = '<a href="profile.php?act=friends&amp;do=add&amp;id=' . $user['id'] . '"><img src="../images/add.png" alt="" /></a>';
                }
            } else {
                $friend = '<a href="profile.php?act=friends&amp;do=delete&amp;id=' . $user['id'] . '"><img src="../images/delete.png" alt="" /></a>';
            }
            echo '' . functions::image('add.gif') . $friend . '';
        }

        if (functions::is_contact($user['id']) != 2) {
            if (!functions::is_contact($user['id'])) {
                echo '<a href="../mail/index.php?id=' . $user['id'] . '"><img src="../images/users.png" alt="" /></a>';
            } else {
                echo '<a href="../mail/index.php?act=deluser&amp;id=' . $user['id'] . '"><img src="../images/users.png" alt="" /></a>';
            }
        }

        if (functions::is_contact($user['id']) != 2) {
            echo '<a href="../mail/index.php?act=ignor&amp;id=' . $user['id'] . '&amp;add"><img src="../images/del.png" alt="" /></a>';
        } else {
            echo '<a href="../mail/index.php?act=ignor&amp;id=' . $user['id'] . '&amp;del"><img src="../images/del.png" alt="" /></a></div>';
        }
        echo '</p>';

        if (!functions::is_ignor($user['id']) && functions::is_contact($user['id']) != 2 && empty($ban['1']) && empty($ban['3'])) {
            echo '<p><form action="../mail/index.php?act=write&amp;id=' . $user['id'] . '" method="post"><input type="submit" value="' . $lng['write'] . '" style="margin-left: 18px"/></form></p>';
        }
        echo '</div>';
    }
    echo '<div class="phdr"><a href="index.php">' . $lng['users'] . '</a></div>';
}