File: /home/asjudine/www/admin/modules/contacts.php
<?php
if (!eregi("admin.php", $PHP_SELF)) { die ("Access Denied"); }
//$hlpfile = "manual/sections.html";
$result = sql_query("select radminency, radminsuper from $prefix"._authors." where aid='$aid'", $dbi);
list($radminency, $radminsuper) = sql_fetch_row($result, $dbi);
if ($radminsuper==1) {
/*********************************************************/
/* Contacts Manager Functions */
/*********************************************************/
function readcontacts() {
global $module_name, $prefix, $dbi;
include("header.php");
echo "aca toy";
$result = sql_query("select * from $prefix"._contacts." where 1 ORDER BY contact_id DESC limit 0,20", $dbi);
echo "<center><table border=\"1\" width=\"100%\" bgcolor=\"#ffffff\">";
while(list($contactmail, $contactuname, $contactmensaje) = sql_fetch_row($result, $dbi)) {
echo "<tr><td align=\"right\"><b>$contactmail</b>"
."</td><td align=\"left\" width=\"100%\">$contactuname"
."</td><td align=\"center\">$contactmensaje"
echo " </td></tr></table></center><br>\n";
}
include("footer.php");
}
switch ($op) {
case "readcontacts":
readcontacts();
break;
}
} else {
echo "Access Denied";
}
?>