• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Whats wrong with this script? rep+++

Jaac

[PHP] *Linux*
Joined
Dec 15, 2010
Messages
180
Reaction score
9
Can you help me? when I put it on my gesior acc the page appears in blanck

PHP:
<?php
$main_content .= '<div style="text-align: center; font-weight: bold;"><h2><font color=Red>Last bought items on ' . $config['server']['serverName'] . '</h2></font></div>
<center>
<table border="0" cellspacing="1" cellpadding="4" width="80%">
	<tr bgcolor="' . $config['site']['vdarkborder'] . '">
	    <td class="white" style="text-align: center; font-weight: bold;"><center>#</center></td>
		<td class="white" style="text-align: center; font-weight: bold;">Pic</td>
		<td class="white" style="text-align: center; font-weight: bold;">Nombre Player</td>
		<td class="white" style="text-align: center; font-weight: bold;">Nombre Item</td>
		<td class="white" style="text-align: center; font-weight: bold;">Precio Item</td>
		<td class="white" style="text-align: center; font-weight: bold;">Cantidad</td>
		<td class="white" style="text-align: center; font-weight: bold;">Fecha</td>
	</tr>';

$i = 0;
foreach($SQL->query('SELECT `p_name` AS `name`, `item_name` AS `itemname`, `price`, `trans_time` AS `date`, `quant`, `itemid`
	FROM `z_shop_history`     
	ORDER BY `date` DESC
	LIMIT 10;') as $history)
{
	$i++;
	$main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']). '">
        	<td style="text-align: center;">'.$i.'</td>
        	<td style="text-align: center;"><img src="/server//item_images/'.$history['itemid'].'.gif"></td>
		<td style="text-align: center;"><a href="?subtopic=characters&name=' . urlencode($history['name']) . '">' . $history['name'] . '</a></td>
		<td style="text-align: center;">' . $history['itemname'] . '</td>
		<td style="text-align: center;"><b>' . $history['price'] . '</b></td>
		<td style="text-align: center;"><b>' . $history['quant'] . '</b></td>
		<td style="text-align: center;">'.date("j/F/Y - H:i:s", $history['date']).'</td>
	</tr>';
}

$main_content .= '</table></center><br /><center><b>Hora actual:</b> '.date("j/F/Y - H:i:s").'</center>';
$main_content .= '<br /><div style="text-align: center; font-weight: bold;"><h2><font color=Red>Most bought items</h2></font></div>
<center>
<table border="0" cellspacing="1" cellpadding="4" width="80%">
	<tr bgcolor="' . $config['site']['vdarkborder'] . '">
	    <td class="white" style="text-align: center; font-weight: bold;"><center>#</center></td>
		<td class="white" style="text-align: center; font-weight: bold;">Pic</td>
		<td class="white" style="text-align: center; font-weight: bold;">Nombre Item</td>
		<td class="white" style="text-align: center; font-weight: bold;">Comprado</td>		
	</tr>';

$i = 0;
foreach($SQL->query('SELECT COUNT(`item_name`) AS `count`, `p_name` AS `name`, `item_name` AS `itemname`, `price`, `trans_time` AS `date`, `quant`, `itemid`
	FROM `z_shop_history`     
	GROUP BY `itemname`
	ORDER BY `count` DESC
	LIMIT 10;') as $history)
{
	$i++;
	$main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']). '">
        <td style="text-align: center;">'.$i.'</td>
        <td style="text-align: center;"><img src="/server//item_images/'.$history['itemid'].'.gif"></td>		
		<td style="text-align: center;">'.$history['itemname'].'</td>		
		<td style="text-align: center;">'.$history['count'].' times</td>		
	</tr>';
}

$main_content .= '</table></center><br />';
$main_content .= '<div style="text-align: center; font-weight: bold;"><h2><font color=Red>Top buyers.</h2></font></div>
<center>
<table border="0" cellspacing="1" cellpadding="4" width="80%">
	<tr bgcolor="' . $config['site']['vdarkborder'] . '">
	    <td class="white" style="text-align: center; font-weight: bold;"><center>#</center></td>
		<td class="white" style="text-align: center; font-weight: bold;">Player Name</td>
		<td class="white" style="text-align: center; font-weight: bold;">Wasted Points</td>		
	</tr>';

$i = 0;
foreach($SQL->query('SELECT COUNT(`item_name`) AS `count`, `p_name` AS `name`, `item_name` AS `itemname`, SUM(`price`) as `price`, `trans_time` AS `date`, `quant`, `itemid`
	FROM `z_shop_history`     
	GROUP BY `name`
	ORDER BY `price` DESC
	LIMIT 10;') as $history)
{
	$i++;
	$main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']). '">
        <td style="text-align: center;">'.$i.'</td>
        <td style="text-align: center;"><a href=?subtopic=characters&name=' . urlencode($history['name']) . '>'.$history['name'].'</a></td>		
	<td style="text-align: center;">'.$history['price'].' premium points wasted</td>		
	</tr>';
}

$main_content .= '</table></center><br /><br /><center><b>Hora actual:</b> '.date("j/F/Y - H:i:s").'</center>';
?>
 
Back
Top