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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this