• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[ModernAAC] Online Players Records

hodleo

Formerly cbrm -Crypto enthusiast, Retired scripter
Staff member
Global Moderator
Joined
Jan 6, 2009
Messages
6,598
Solutions
3
Reaction score
955
Location
Caribbean Sea
Tc3flcvVm9.png

----------------------------------------------------
igaGVC5TI.png


/system/pages/record.php
PHP:
<?php
/* Online Players Record 
// By CyberM for ModernAAC
// OTLand.NET */

$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();

#Load online players record
$record = $SQL->query('select * from server_record order by record desc limit 20;')->fetchAll();
?>

<div class='message'>
    <div class='title'>
        Online Players Records
    </div>
</div><br/>

<?php if(empty($record[0]['record'])) return alert('There are no records of online players.');?>

<center>
    Max amount of online players was of <?php echo $record[0]['record'] ?> players on <?php echo date("M j Y", $record[0]['timestamp']) ?>
</center><br/>

<table border="0" cellspacing="0" cellpadding="5" width="100%" class="cellspadding">
    <tr class="tableheader">
        <td align="center" width="30%">
            <span style="font-weight:bold;">Players</span>
        </td>
        <td width="70%" align="center">
            <span style="font-weight:bold;">Date</span>
        </td>
    </tr>

<?php
    foreach($record as $record):
        echo'<tr><td align="center" >'.$record['record'].'</center></td>';
        echo'<td align="center">'.date("M j Y, H:i:s T", $record['timestamp']).'</td></tr>';
    endforeach;
?>
</table>

Access via http://localhost//index.php/p/v/record

 
remember I was once trying to figure out how to write that dmn query, now I know. THx :D
 
Back
Top