echo "<center><b><span style='color:gray'> ";
echo "<table width='100%'><tr><td width='10%'>";
openside("Lankomumas");
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,6");
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lastseen = time() - $data['user_lastvisit'];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if ($lastseen < 60){
$lastseen= "<span style='color:orange'>ONLINE</span>";
} elseif ($lastseen < 360){
$lastseen= "5min";
} elseif ($iW > 0){
if ($iW == 1) { $text = "sav."; } else { $text = "sav."; }
$lastseen = $iW." ".$text;
} elseif ($iD > 0){
if ($iD == 1) { $text = "d."; } else { $text = $locale['lsup006']; }
$lastseen = $iD." ".$text;
} else {
$lastseen = $iH.":".$iM.":".$iS;
}
echo "<tr>\n<td class='' align='left'> <img src='".THEME."images/bullet.gif' alt=''>\n";
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n";
echo trimlink($data['user_name'], 15)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";
}
}
echo "</table>";
closeside();
echo "</td><td width='33%'>";
openside("Narių statistika:");
$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 "<span class='small'>°</span> Naujokas: <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side' title='".$data['user_name']."'>".trimlink($data['user_name'], 12)."</a><br />\n";$tag1= date('d');
$tag1= date('d');
$monat1= date('m');
$jahr1= date('Y');
$hanfang = mktime(0,0,0,$monat1,$tag1,$jahr1);
$hende = mktime(23,59,59,$monat1,$tag1,$jahr1);
$ganfang = mktime(0,0,0,$monat1,$tag1-1,$jahr1);
$gende = mktime(23,59,59,$monat1,$tag1-1,$jahr1);
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>";
echo "° Iš viso narių: ".number_format(dbcount("(user_id)", "users", "user_status<='1'"))."<br />\n";
$result = mysql_query("SELECT user_level FROM ".$db_prefix."users where user_level=103");
$num_rows = mysql_num_rows($result);
echo "° Darbuotojų: 13 <br>\n";
echo "° Užbanintų narių: 9<br>\n";
closeside();
echo "</td><td width='33%'>";
openside("MusuApdaila.LT");
$result = dbquery("SELECT count(news_id) FROM ".$db_prefix."news");
echo "° Naujienų ir akcijų: [".dbresult($result, 0)."]<br>";
echo "° Vartotojų grupių: [".dbresult($result, 0)."]<br>";
$result = dbquery("SELECT count(article_id) FROM ".$db_prefix."articles");
echo "° Straipsnių: [".dbresult($result, 0)."]<br>";
$result = dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads");
echo "° Nuotraukų: [286]<br>";
$result = dbquery("SELECT count(weblink_id) FROM ".$db_prefix."weblinks");
echo "° Paslaugų: [24]<br>";
$result = dbquery("SELECT count(shout_id) FROM ".$db_prefix."shoutbox");
echo "° Klausimų: [".dbresult($result, 0)."]<br>";
closeside();
echo "</tr></table>";
echo "<center><b><span style='color:gray'> ";
echo "<table width='100%'><tr><td width='170'>";
openside("Lankomumas");
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_lastvisit>'0' AND user_status='0' ORDER BY user_lastvisit DESC LIMIT 0,6");
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lastseen = time() - $data['user_lastvisit'];
$iW=sprintf("%2d",floor($lastseen/604800));
$iD=sprintf("%2d",floor($lastseen/(60*60*24)));
$iH=sprintf("%02d",floor((($lastseen%604800)%86400)/3600));
$iM=sprintf("%02d",floor(((($lastseen%604800)%86400)%3600)/60));
$iS=sprintf("%02d",floor((((($lastseen%604800)%86400)%3600)%60)));
if ($lastseen < 60){
$lastseen= "<span style='color:orange'>ONLINE</span>";
} elseif ($lastseen < 360){
$lastseen= "5min";
} elseif ($iW > 0){
if ($iW == 1) { $text = "sav."; } else { $text = "sav."; }
$lastseen = $iW." ".$text;
} elseif ($iD > 0){
if ($iD == 1) { $text = "d."; } else { $text = $locale['lsup006']; }
$lastseen = $iD." ".$text;
} else {
$lastseen = $iH.":".$iM.":".$iS;
}
echo "<tr>\n<td class='' align='left'> <img src='".THEME."images/bullet.gif' alt=''>\n";
echo "<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>\n";
echo trimlink($data['user_name'], 15)."</a></td><td class='side-small' align='right'>".$lastseen."</td>\n</tr>\n";
}
}
echo "</table>";
closeside();
echo "</td><td width='170'>";
openside("Narių statistika:");
$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 "<span class='small'>°</span> Naujokas: <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side' title='".$data['user_name']."'>".trimlink($data['user_name'], 12)."</a><br />\n";$tag1= date('d');
$tag1= date('d');
$monat1= date('m');
$jahr1= date('Y');
$hanfang = mktime(0,0,0,$monat1,$tag1,$jahr1);
$hende = mktime(23,59,59,$monat1,$tag1,$jahr1);
$ganfang = mktime(0,0,0,$monat1,$tag1-1,$jahr1);
$gende = mktime(23,59,59,$monat1,$tag1-1,$jahr1);
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>";
echo "° Iš viso narių: ".number_format(dbcount("(user_id)", "users", "user_status<='1'"))."<br />\n";
$result = mysql_query("SELECT user_level FROM ".$db_prefix."users where user_level=103");
$num_rows = mysql_num_rows($result);
echo "° Darbuotojų: 13 <br>\n";
echo "° Užbanintų narių: 9<br>\n";
closeside();
echo "</td><td width='170'>";
openside("MusuApdaila.LT");
$result = dbquery("SELECT count(news_id) FROM ".$db_prefix."news");
echo "° Naujienų ir akcijų: [".dbresult($result, 0)."]<br>";
echo "° Vartotojų grupių: [".dbresult($result, 0)."]<br>";
$result = dbquery("SELECT count(article_id) FROM ".$db_prefix."articles");
echo "° Straipsnių: [".dbresult($result, 0)."]<br>";
$result = dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads");
echo "° Nuotraukų: [286]<br>";
$result = dbquery("SELECT count(weblink_id) FROM ".$db_prefix."weblinks");
echo "° Paslaugų: [24]<br>";
$result = dbquery("SELECT count(shout_id) FROM ".$db_prefix."shoutbox");
echo "° Klausimų: [".dbresult($result, 0)."]<br>";
closeside();
echo "</tr></table>";