Postado Outubro 4, 2011 13 anos Itens mais vendidos no seu site 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. Script original by: Aleh Obrigado, REP ++! O conteúdo é bom e de qualidade? Te ajudei? Então não esqueça do REP!
Postado Janeiro 29, 2014 11 anos Line: <img src="item_images/'.$rows['itemid1'].'.gif"> <br /><br /> Change to: <img src="item_images/'.$rows['id'].'.gif"> <br /><br /> And check out: http://www.ZylensEvo.com.ve/server/
Postado Janeiro 29, 2014 11 anos @Lebens Leia as nossas regras: http://www.tibiaking.com/forum/forum/23-regras-do-forum/ Você reviveu um tópico de 2011! Alertado verbalmente! Atenciosamente, Avuenja. OTAAC | TIBIA CLIENTS
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.