id);
$i_favorites = int_escape($image->favorites);
global $user;
$username = $user->name;
$html = "
Favorites: $i_favorites
";
if (!$is_favorited)
{
$html .= "
";
}
else
{
$html .= "";
}
$pos = strpos($username, ' ');
if ($pos === false) {
$html .= "
Show my favorites
";
} else {
$userid = $user->id;
$html .= "
Show my favorites
";
}
return $html;
}
public function show_anonymous_html($image) {
$i_image_id = int_escape($image->id);
$i_favorites = int_escape($image->favorites);
$html = "
Favorites: $i_favorites
";
return $html;
}
public function show_favorite_marks($username_array) {
$html = '';
foreach ($username_array as $row) {
$username = $row['name'];
$html .= "$username
";
}
if ($html == '') {
$html = 'Not favorited yet';
}
return $html;
}
}
?>