Log in

View Full Version : PHP Code, How can i give promosions to see only admins?


aycan555
09-10-2006, 03:21 PM
Hi i want to protect this code which only admins can see:

print_table_start();
print_table_header("Latest 10 PM",3);

echo "<tr valign=\"top\">

<td class=\"thead\">From</td>
<td class=\"thead\">To</td>
<td class=\"thead\" >Title</td>
</tr>";

$resultpm = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "pmtext ORDER BY dateline DESC LIMIT 0, 10");

require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());

$aaa = 1;
while ($pmxread = $db->fetch_array($resultpm))
{

$yazi = $bbcode_parser->parse($pmxread['message'], 0, true);

$users = unserialize($pmxread['touserarray']);
$kim = unserialize($pmxread['touserarray']);


echo "<tr><td class=\"alt$aaa\">".$pmxread['fromusername']."</td><td class=\"alt$aaa\">".$pmxread['touserarray']."</td><td class=\"alt$aaa\"><b>".$pmxread['fromusername']."</b><br />$yazi</td></tr>";
$aaa++;
if ($aaa>2)
{
$aaa = 1;
}
}

print_table_footer(2, '', '', 0);

This is latest 10 PM hack but i do not want to Super Moderators view this?

How can i protect it..