Jump to content
Sign in to follow this  

Primitīvi foruma stati.

Recommended Posts

/* Norādam ceļu uz galveno foruma mapi*/
require $_SERVER['DOCUMENT_ROOT'].'/init.php';

$total_posts	= \IPS\Db::i()->select( "COUNT(*)", 'forums_posts' )->first();
$total_topics	= \IPS\Db::i()->select( "COUNT(*)", 'forums_topics' )->first();
$mostOnline = json_decode( \IPS\Settings::i()->most_online, TRUE );
$member_count = \IPS\Db::i()->select( 'COUNT(*)', 'core_members' )->first();
<p>Forumā kopā ieraksti: <?php echo $total_posts;?>
<p>Forumā kopā tēmas: <?php echo $total_topics;?>
<p>Visvairāk cilvēku forumā vienlaicīgi: <?php echo $mostOnline['count'];?> šajā laikā <?php echo date("Y-m-d H:i:s",$mostOnline['time']);?>
<p>Forumā kopā reģistrējušies: <?php echo $member_count;?>

Demo: https://wam.lv/skripti/ipbstats.php

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this