if (iGUEST) {
$locale['stat001'] = "Member";
$locale['stat002'] = "Members";
$locale['stat003'] = "Some Site Stats";
$locale['stat004'] = "Stats";
$locale['stat005'] = "There has been ";
$locale['stat006'] = " and ";
$locale['stat007'] = " Registered Members since";
$locale['stat008'] = " logged in today and ";
$locale['stat009'] = " new ";
$locale['stat010'] = " registered today. ";
$locale['stat011'] = "We have ";
$locale['stat012'] = " Downloads, ";
$locale['stat013'] = " forum threads and ";
$locale['stat014'] = " forum posts.";
$locale['stat015'] = "There are ";
$locale['stat016'] = " comments";
$locale['stat017'] = " shouts posted.";
$members_registered = dbcount("(user_id)", DB_USERS, "user_status<='1' OR user_status='3' OR user_status='5'");
$members_today = number_format(dbcount("(user_id)", DB_USERS, "user_status<='1' AND user_lastvisit > UNIX_TIMESTAMP(CURDATE())"));
$new_members_today = number_format(dbcount("(user_id)", DB_USERS, "user_status<='1' AND user_joined > UNIX_TIMESTAMP(CURDATE())"));
$downloads = dbcount("(download_id)", DB_DOWNLOADS);
$counter = number_format($settings['counter'])." ".($settings['counter'] == 1 ? $locale['global_170'] : $locale['global_171']."");
$threads = dbcount("(thread_id)", DB_THREADS);
$posts = dbcount("(post_id)", DB_POSTS);
$comments = dbcount("(comment_id)", DB_COMMENTS);
include_once INFUSIONS."shoutbox_panel/infusion_db.php";
$shouts = dbcount("(shout_id)", DB_SHOUTBOX);
$site_opened = dbarray(dbquery("SELECT user_id, user_joined FROM ".DB_USERS." WHERE user_id='1'"));
opentable($locale['stat003']);
echo"<div class='tbl-border center' style='margin-top:5px; margin-bottom: 5px;'>\n";
echo"<div style='float: left; margin-top: 27px; margin-bottom:0px; padding-left: 10px; '><img style='vertical-align:middle; border: 0px; text-align: center; ' src='".IMAGES."stats2.png' alt='".$locale['stat004']."' /></div>\n";
echo "<div class='tbl1' style='margin-top: 1px; margin-bottom: 0px; padding-left: 42px;'>".THEME_BULLET." <span class='small'>".$locale['stat005'].$counter.$locale['stat006'].$members_registered.$locale['stat007']." ".showdate("longdate", $site_opened['user_joined'])."</span>
<br />".THEME_BULLET." <span class='small'>".$members_today." ".($members_today == 1 ? $locale['stat001'] : $locale['stat002']."").$locale['stat008'].$new_members_today.$locale['stat009'].($new_members_today == 1 ? $locale['stat001'] : $locale['stat002']."").$locale['stat010']."</span></div>\n";
echo"<div class='tbl2' style='margin-bottom: 1px; padding-left: 42px;'>\n";
echo THEME_BULLET." <span class='small'> ".$locale['stat011'].$downloads.$locale['stat012']." </span>\n";
echo" <span class='small'> ".$threads.$locale['stat013'].$posts.$locale['stat014']."</span><br />\n";
echo THEME_BULLET." <span class='small'>".$locale['stat015'].$comments.$locale['stat016']."</span>\n";
echo" <span class='small'>".$locale['stat006'].$shouts.$locale['stat017']."</span>\n";
echo"</div></div>\n";
closetable();
}
if (iGUEST) {
}
Category Forum
Code Snippet and functions - 8Labels
None yet
Statistics
6 participants
Notifications
You are not receiving notifications from this thread.
Related Questions