Hello,
How can i bring the "STARS" from a Image., where you see: {$row['number']} out of 5
i have a code from: Michael, From IPS..
<center>
<i><b>Be aware:</b> We allow nudity Wallpapers & Photographs and it may appear on front page<br><font size="1">(Guests are <b>Not</b> allowed to Download such wallpapers)</font></i>
<br><br>
</center>
<?php
/* Init */
$return = "";
$to_show = 24;
$per_row = 6;
$count = 0;
/* Query */
$this->DB->build( array( 'select' => 'i.id AS picid, i.masked_file_name, i.directory, i.caption, i.member_id',
'from' => array( 'gallery_images' => 'i' ),
'add_join' => array( 0 => array( 'select' => 'g.rate AS number',
'from' => array( 'gallery_ratings' => 'g' ),
'where' => 'i.id=g.img_id',
'type' => 'left' ) ),
'add_join' => array( 1 => array( 'select' => 'm.name as uname',
'from' => array( 'members' => 'm' ),
'where' => 'i.member_id=m.member_id',
'type' => 'left' ) ),
'order' => 'i.id DESC',
'limit' => array( 0, $to_show ),
) );
$this->DB->execute();
/* Got some rows */
if ( $this->DB->getTotalRows() )
{
$return .= "<div><table><tr>";
while ( $row = $this->DB->fetch() )
{
$count++;
$return .= <<<EOF
<td class='short'>
<a href="index.php?app=gallery&module=images§ion=viewimage&img={$row['picid']}">
<img src="uploads/{$row['directory']}/tn_{$row['masked_file_name']}" alt="{$row['caption']}" />
</a><br />
<i>Uploaded By:</i><br>
<a href='index.php?app=gallery&module=user&user={$row['member_id']}'><b>{$row['uname']}</b></a></strong><br /><i>Rating:</i> {$row['number']} out of 5
</td>
EOF;
/* New row */
if ( $count && $count % $per_row == 0 )
{
$return .= "</tr><tr>";
}
}
$return .= "</tr></table></div>";
}
/* Return */
print $return;
?>