Itens mais vendidos no seu site
(meu primeiro tópico aqui.)
Preview:

Tutorial:
1° Passo: Abra seu shopsystem.php e procure
elseif($buy_offer['type'] == 'item') {
e abaixo disso
$SQL->query($save_transaction);
Cole isso:
$bought = 'UPDATE `z_shop_offer` SET `bought` = bought + 1 WHERE `id` ='.$buy_offer['id'].';'; $SQL->query($bought);
2° Passo: Abra seu latestnews.php e procure
<?PHP $time = time();
e abaixo disso cole:
$query = $SQL->query("SELECT * FROM `z_shop_offer`WHERE `offer_type` NOT LIKE 'container' AND `offer_type` NOT LIKE 'changename' AND `offer_type` NOT LIKE 'vipdays' AND `offer_type` NOT LIKE 'redskull' AND `offer_type` NOT LIKE 'unban' ORDER BY `bought` DESC LIMIT 5");
foreach($query as $rows) {
if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; }
$number_of_rows++;
$result .= '
<td bgcolor='.$bgcolor.'>
<center>
<img src="item_images/'.$rows['itemid1'].'.gif"> <br /><br />
Item:</br> <b>'.$rows['offer_name'].'</b><br />
Points: <b>'.$rows['points'].'</b>
</center>
</td>';
}
$main_content .= "<table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" width=\"100%\"><tr bgcolor=".$config['site']['vdarkborder']."><td class=\"white\" colspan=\"5\"><center><strong>Últimos itens vendidos no Shopping</strong></center></td></tr><tr bgcolor=".$config['site']['vdarkborder']."><td class=\"white\" width=\"20%\"><b><center>#1</center></b></td><td class=\"white\" width=\"20%\"><b><center>#2</center></b></td>
<td class=\"white\" width=\"20%\"><b><center>#3</center></b></td>
<td class=\"white\" width=\"20%\"><b><center>#4</center></b></td>
<td class=\"white\" width=\"20%\"><b><center>#5</center></b></td>
</tr>".$result."</table> <br />";
2° Passo: Para finalizar execute essa query em seu phpMyAdmin
ALTER TABLE `z_shop_offer` ADD `bought` INT( 11 ) NOT NULL DEFAULT '0';
Prontinho, script irá funcionar 100% se seguir passa-a-passo corretamente, dúvidas?
Poste aqui!
Script original by: Aleh
Script 100% Editado by: Ruivo
Obrigado, REP ++!