Exemplo n.º 1
0
 function guess_url($src)
 {
     return guess_url($src, $this->get_base_url());
 }
Exemplo n.º 2
0
function render_current_user_profile($user)
{
    $conn = get_db_conn();
    $sql = 'SELECT id, from_user, quote, source_type FROM quotes WHERE `to_user`=\'' . $user . '\' AND `state`=\'pending\';';
    $pending_rows = mysql_query($sql, $conn);
    if (mysql_num_rows($pending_rows) == 0) {
        return '<fb:visible-to-user uid="' . $user . '">You\'ve answered all the quotes!</fb:visible-to-user>';
    }
    $fbml = '<fb:visible-to-user uid="' . $user . '"><ul>';
    while ($row = mysql_fetch_assoc($pending_rows)) {
        $fbml = $fbml . '<li>' . profile_guess_link($row['from_user'], guess_url($row['id']), $row['source_type'], $row['quote']) . '</li>';
        $fbml = $fbml . '<br />';
    }
    return $fbml . '</ul></fb:visible-to-user>';
}