Пример #1
0
function do_viewfriends2()
{
    global $db, $main_smarty, $user, $the_template;
    $friend = new Friend();
    $friends = $friend->get_friend_list_2();
    $main_smarty->assign('the_template', $the_template);
    $main_smarty->assign('friends', $friends);
}
Пример #2
0
function do_viewfriends2()
{
    global $db, $user, $the_template;
    $friend = new Friend();
    $friends = $friend->get_friend_list_2();
    echo "<h2>People who have added you as a friend</h2>";
    if ($friends) {
        echo '<table style=width:50% class=listing><th>username</th><th>message</th>';
        foreach ($friends as $myfriend) {
            echo '<tr><td>';
            echo '<a href="' . getmyurl('user2', $myfriend->user_login, 'profile') . '">' . $myfriend->user_login . '</a></td>';
            echo '<td><a href="#view_message" rel="view_message~!~view=small_msg_compose~!~login='******'"	class="lbOn"><img src=' . my_pligg_base . '/templates/' . $the_template . '/images/user_message.png border=0></a></td>';
        }
        echo '</tr></table>';
    } else {
        echo "<br /><br /><center><strong>nobody has added you as a friend</strong></center>";
    }
}
Пример #3
0
function do_viewfriends2()
{
    global $db, $main_smarty, $user, $the_template;
    $friend = new Friend();
    $friends = $friend->get_friend_list_2();
    $output = "<h2>&#928;&#959;&#953;&#972;&#962; &#956;&#949; &#949;&#967;&#949;&#953; &#960;&#961;&#959;&#963;&#952;&#941;&#963;&#949;&#953; &#963;&#945;&#957; friend</h2>";
    if ($friends) {
        $output .= '<table><th width="250px">Username</th><th width="500px">Message</th>';
        foreach ($friends as $myfriend) {
            $friend_avatar = get_avatar('small', $myfriend->user_avatar_source, $myfriend->user_login, $myfriend->user_email);
            $output .= '<tr>';
            $output .= '<td><img src="' . $friend_avatar . '" align="absmiddle"/> <a href="' . getmyurl('user2', $myfriend->user_login, 'profile') . '">' . $myfriend->user_login . '</a></td>';
            $output .= '<td><a href="' . my_pligg_base . '/module.php?module=simple_messaging&view=compose&to=' . $myfriend->user_login . '&return=' . urlencode($_SERVER['REQUEST_URI']) . '"><img src="' . my_pligg_base . '/templates/' . $the_template . '/images/user_message.png" border="0"></a></td>';
            $output .= '</tr>';
        }
        $output .= '</table>';
    } else {
        $output .= "<br /><br /><center><h2>(0) friend.</h2>";
    }
    $main_smarty->assign('user_page', $output);
}
Пример #4
0
function do_followers($user_id)
{
    global $db, $main_smarty, $user, $the_template;
    $friend = new Friend();
    $friends = $friend->get_friend_list_2($user_id);
    $main_smarty->assign('the_template', $the_template);
    $main_smarty->assign('follower', $friends);
}