Parašė Jaunelis· 2008 Gru. 7 00:12:16
#13
Taigi turiu dar viena problema dėl tų panelių šį kart tai su online ushers panel man reikia kad iš šitokio kodo:
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
if ($settings['maintenance'] != "1") {
$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
$result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user=".$cond."");
if (dbrows($result) != 0) {
$result = dbquery("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user=".$cond."");
} else {
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
$result = dbquery("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('$name', '".USER_IP."', '".time()."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60)."");
openside($locale['010']);
$result = dbquery(
"SELECT ton.*, tu.user_id,user_name FROM ".$db_prefix."online ton
LEFT JOIN ".$db_prefix."users tu ON ton.online_user=tu.user_id"
);
$guests = 0; $members = array();
while ($data = dbarray($result)) {
if ($data['online_user'] == "0") {
$guests++;
} else {
array_push($members, array($data['user_id'], $data['user_name']));
}
}
echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['011'].$guests."<br>\n";
if (count($members) > 0) {
$i = 1;
echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['012'];
while (list($key, $member) = each($members)) {
echo "<a href='".BASEDIR."profile.php?lookup=".$member[0]."' class='side'>".$member[1]."</a>";
if ($i != count($members)) echo ", ";
$i++;
}
echo "<br>\n";
} else {
echo $locale['013']."<br>\n";
}
echo "<br><img src='".THEME."images/bullet.gif' alt=''> ".$locale['014'].number_format(dbcount("(user_id)", "users", "user_status<='1'"))."<br>\n";
if ($settings['admin_activation'] == "1") echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['015'].dbcount("(user_id)", "users", "user_status='2'")."<br>\n";
$data = dbarray(dbquery("SELECT user_id,user_name FROM ".$db_prefix."users WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1"));
echo "<img src='".THEME."images/bullet.gif' alt=''> ".$locale['016']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a>\n";
}
closeside_panel();
?>
atrodytų toks kodas:
<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
openside_panel($locale['PD_001']);
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,7");
if (dbrows($result) != 0) {
echo "<table width='100' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 23);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside_panel();
?>
maždauk čia ar taip neimanoma?
Ir dar tam pirmame kode reiktų pataisyti kad tokio dalyko nerodytu kur šioje foto apibrauktas:
IR dar kaip išlyginti visus šiuos kur yra čia paveiksliuke pavaizduotos paneles kad butu maždauk lygiai atrodytu naudoju theme.php toki kodą:
echo "<table cellpadding='0' cellspacing='0' width='100%' class='paneles'>\n<tr>
<td align='center' width='1000'>";
include THEME."latest_downloads_panel.php";
echo "</td>
<td align='center' width='100'>";
include THEME."popular_downloads_panel.php";
echo "</td>
<td align='center' width='100'>";
include THEME."user_info_panel.php";
echo "</td>
<td align='center' width='100'>";
include THEME."online_users_panel.php";
echo "</td>
</tr>
</table><br>\n";
SO kas padės tam +10 jai dar nebusiu daves.