Parašė shit-· 2009 Bal. 7 23:04:19
#1
Nerodo prisijungusiųjų narių, nei svečių gal kažkas blogai kode?
Štai kodas:
echo "<table width='100%'>
<tr>
<td width='33%' valign='top'>";
opentable("Narių <span style='color:#ff66cc;'>informacija</span>");
$rows = dbcount("(*)", "videos", "video_status='1'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
$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 "° Naujų narių vakar: ".dbcount("(user_id)", "users", "user_joined >='".$ganfang."' AND user_joined <='".$gende."'")."<br>";
echo "° Naujų narių šiandien: ".dbcount("(user_id)", "users", "user_joined >='".$hanfang."' AND user_joined <='".$hende."'")."<br>\n";
$result = mysql_query("SELECT user_level FROM ".$db_prefix."users where user_level=103");
$num_rows = mysql_num_rows($result);
$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 "° ".$locale['011'].$guests."<br>\n";
if (count($members) > 0) {
$i = 1;
echo "° ".$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>° ".$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 "° ".$locale['016']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>".$data['user_name']."</a>\n";
closetable();
echo "</td>
</table>";
Redagavo shit-· 2009 Bal. 7 23:04:33