
Originally Posted by
HoldUp
Hey, I've added this:<img src="https://imgur.com/a/px4jl" border="0" alt=""> <img src="https://i.imgur.com/VskcDZy.png" border="0" alt=""> <img src="http://prntscr.com/hf9sy8" border="0" alt="">into my client and it doesn't auto reload when another user comes online<br>
Can someone help?
create a php file with the name onlinecount.php, and put the code in it
Code:
<?phprequire_once('./data_classes/server-data.php_data_classes-core.php.php');require_once('./data_classes/server-data.php_data_classes-session.php.php');$maintenance2 = mysql_num_rows(mysql_query("SELECT * FROM cms_settings WHERE mantenimiento = '1'"));$useradmin2 = mysql_query("SELECT * FROM users WHERE username = '" . $_SESSION['username'] . "'");$useradmin = mysql_fetch_array($useradmin2);$palavrasbloqueadas=file_get_contents('./Files/PalavrasBloqueadas.txt');if($maintenance2 == '1' && $useradmin['rank'] < 5){ header("Location: manutencao");}?><html><head></head><body><div class="clientOnlineBox"><div class="clientOnlineBoxTxt" id="onlinecount"><small><b><?php echo $UsersOnline; ?></b> Online!</small></div><img src="http://200.98.70.115/Externos/img/onlineiconclient.png" style="width:29px;height:28px;ht; */position: absolute;margin-left: 130px;margin-top: -19px;"></div></div></body></html>
Change what's inside <?php in the first line, to that of your cms
Then use this div in your client.php
Code:
<script type="text/javascript"> setInterval("$('#onlinecount').load('onlinecount.php');", 5000);</script>
<div id="onlinecount"><?phpinclude ("onlinecount.php");?></div>
5000 = 5 seconds