Codice PHP:
<?php
if (!eregi("modules.php", $_SERVER[PHP_SELF])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._USERSJOURNAL."";
include("header.php");
include("modules/$module_name/functions.php");
cookiedecode($user);
$username = $cookie[1];
startjournal($sitename,$user);
function all($bgcolor1, $bgcolor2, $bgcolor3, $username) {
global $prefix, $user_prefix, $db, $module_name;
OpenTable();
$conta=1;
echo"<table border=\"0\" width=\"100%\"><tr><td bgcolor=#ffffff width=200>";
echo"[b]Lista degli Autori[/b]</td></tr><tr>";
$sql = "SELECT j.id, j.joid, j.nop, j.ldp, j.ltp, j.micro, u.user_id, u.username FROM ".$prefix."_journal_stats j, ".$user_prefix."_users u where u.username=j.joid ORDER BY 'joid' ASC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
echo"<td><a href=\"modules.php?name=$module_name&file=search&bywhat=aid&exact=1&forwhat=%s\">%s</a></td>, $row[joid], $row[joid]
";
if($conta%2==0)
echo"</td>";
if($conta%2==0)
echo"</tr>";
$conta++;}
echo"</table>";
CloseTable();
}
switch($op) {
case "last":
last20($bgcolor1,$bgcolor2,$bgcolor3, $username);
break;
case "all":
all($bgcolor1,$bgcolor2,$bgcolor3,$siten
ame, $username);
break;
default:
all($bgcolor1,$bgcolor2,$bgcolor3,$siten
ame, $username);
break;
}
journalfoot();
?>
P.S. Quando scrivi il codice sul forum racchiudilo tra [ php ] [ /php ]