id = $id;
$this->code = $code;
$this->ext = $ext;
$this->created_at = $created_at;
$this->uploaded_by = $uploaded_by;
$this->is_in_user_set = $is_in_user_set;
$this->rating = $rating;
$this->visibility = $visibility;
}
function get_id()
{
return $this->id;
}
function get_code()
{
return $this->code;
}
function get_ext()
{
return $this->ext;
}
function get_created_at()
{
return $this->created_at;
}
function get_uploaded_by()
{
return $this->uploaded_by;
}
function is_added_by_user()
{
return $this->is_in_user_set;
}
function get_rating()
{
return $this->rating;
}
function get_visibility()
{
return $this->visibility;
}
}
function html_random_emote(PDO &$db)
{
$stmt = $db->prepare("SELECT id, ext, code FROM emotes WHERE visibility = 1 AND is_featured = false ORDER BY RAND() LIMIT 1");
$stmt->execute();
if ($row = $stmt->fetch()) {
echo ''
?>
prepare("SELECT id, ext, code FROM emotes WHERE visibility = 1 AND is_featured = true ORDER BY updated_at DESC LIMIT 1");
$stmt->execute();
if ($row = $stmt->fetch()) {
echo ''
?>