Acest cod este pentru a afisa pe site jucatorii activi,canalele deschise,conturi create,caractere,bresle,magazine offline,total peturi,total iteme, total cupluri!
Cum se adauga pe site?
1.Creezi un fisier unde vrei tu in site, de preferat inc.
2.Adaugi in fisier codul de mai jos si salvezi.
3.Intrii in index.php sau unde vrei sa apara statisticile.
4. introduci acolo
5.Salvati si dati refresh.
Daca te-am ajutat lasa un like si un comentariu. Multumesc [Trebuie sa fiti înscris şi conectat pentru a vedea această imagine]
Cum se adauga pe site?
1.Creezi un fisier unde vrei tu in site, de preferat inc.
2.Adaugi in fisier codul de mai jos si salvezi.
3.Intrii in index.php sau unde vrei sa apara statisticile.
4. introduci acolo
5.Salvati si dati refresh.
- Cod:
<?php
if(!isset($_SESSION)){session_start();} ?>
<li>Canale deschise: 2
</li>
<li>Jucători online:
<?php
((bool)mysqli_query($sqlServ, "USE player"));
$exe = mysqli_query($sqlServ, "SELECT COUNT(*) as count FROM player WHERE DATE_SUB(NOW(), INTERVAL 5 MINUTE) < last_play;");
$player_online = mysqli_fetch_object($exe)->count;
echo "<span class=\"badge\"><b>$player_online</b></span>";
?></li>
<li>Conturi create:
<?php
((bool)mysqli_query($sqlServ, "USE account"));
$test = "SELECT * from account";
$testquery = mysqli_query($sqlServ, $test);
$num2 = mysqli_num_rows($testquery);
echo "<span class=\"badge\"><b>$num2</b></span>";
?></li>
<li>Caractere create:
<?php
((bool)mysqli_query($sqlServ, "USE player"));
$cont = "SELECT * from player";
$contquery = mysqli_query($sqlServ, $cont);
$num = mysqli_num_rows($contquery);
echo "<span class=\"badge\"><b>$num</b></span>";
?></li>
<li>Bresle create:
<?php
((bool)mysqli_query($sqlServ, "USE player"));
$guild = "SELECT * from guild";
$guildquery = mysqli_query($sqlServ, $guild);
$guild1 = mysqli_num_rows($guildquery);
echo "<span class=\"badge\"><b>$guild1</b></span>";
?></li>
<li>Magazine offline:
<?php
((bool)mysqli_query($sqlServ, "USE player"));
$shop = "SELECT * from player.offline_shop_npc where owner_id";
$shopoff1 = mysqli_query($sqlServ, $shop);
$shopoff2 = mysqli_num_rows($shopoff1);
echo "<span class=\"badge\"><b>$shopoff2</b></span>";
?></li>
<li>Total iteme:
<?php
((bool)mysqli_query($sqlServ, "USE player"));
$testiteme = "SELECT count FROM item";
$testqueryiteme = mysqli_query($sqlServ, $testiteme);
$num2iteme = mysqli_num_rows($testqueryiteme);
echo "<span class=\"badge\"><b>$num2iteme</b></span>";
?></li>
<li>Total cupluri:
<?php
((bool)mysqli_query($sqlServ, "USE player"));
$testcupluri = "SELECT * from marriage";
$testquerycupluri = mysqli_query($sqlServ, $testcupluri);
$num2cupluri = mysqli_num_rows($testquerycupluri);
echo "<span class=\"badge\"><b>$num2cupluri</b></span>";
?></li>
<li>Total înso?itori:
<?php
((bool)mysqli_query($sqlServ, "USE player"));
$testpet = "SELECT * from new_petsystem";
$testquerypet = mysqli_query($sqlServ, $testpet);
$num2pet = mysqli_num_rows($testquerypet);
echo "<span class=\"badge\"><b>$num2pet</b></span>";
?></li>
</li>
Daca te-am ajutat lasa un like si un comentariu. Multumesc [Trebuie sa fiti înscris şi conectat pentru a vedea această imagine]