Quick Script - Peaked Users

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
Hey!
Quick release from me here. This works with any CMS ( i believe, only tested with RevCMS )
So the code is :
PHP:
$o =  mysql_result(mysql_query("SELECT users_online FROM server_status LIMIT 1"),0);;
$peak = mysql_result(mysql_query("SELECT peak FROM server_status LIMIT 1"),0);
if($peak < $o) {
    mysql_query("UPDATE server_status SET peak = '{$o}'");
}
This uses MySQL as you can see.

How to add it to your hotel :
Go to app/tpl/skins/skinname/me.php
At the top of page add the code given above.
Go to your database and run this query:
Code:
ALTER TABLE server_status ADD COLUMN peak INT(11)

And, you're done! You can show this in your me page etc.

Thanks
berk
 

MasterJiq

Member
Jul 8, 2016
385
23
Only the users peak updated when users access to /me pages right ? So why not you put this code into index.php file (if isset session)
 

Users who are viewing this thread

Top