Ir para conteúdo

Featured Replies

Postado

Itens mais vendidos no seu site

Preview:

34hchmb.jpg

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>&#218;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 ++!

15nra01.gif

O conteúdo é bom e de qualidade? Te ajudei?
Então não esqueça do REP!

  • 2 years later...

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo