Location: PHPKode > projects > PhpBlock > A9.8/script/getconnections.php
<?php
include_once "../site.class.php";
include_once $PATH_TO_CODE."/script/connect.php";

include_once $PATH_TO_CODE."/script/fonction.php";
include_once $PATH_TO_CODE."/script/log.class.php";

$locPass = getGetPost("pass", "");
if($locPass == "123456") {
    $locPassOk = true;
}
$locConnectionType = getGetPost("type", "");
if($locPassOk) {
    if("" == $locConnectionType) {
        $locWhereConnection = "";
    } else {
        $locWhereConnection = " WHERE connectionType=$locConnectionType ";
    }
    $res = executer("SELECT login, connectionDate, ip FROM player LEFT JOIN playerConnection USING (playerId) $locWhereConnection ORDER BY connectionDate DESC LIMIT 1000");
    echo "<table><tr><th>login<th>date<th>ip";
    while($row = mysql_fetch_array($res)){
        $locLogin = $row[0];
        $locConnectionDate = $row[1];
        $locIp = $row[2];
        echo "<tr><td>$locLogin<td>$locConnectionDate<td>$locIp</tr>";
    }
    echo "</table>";
}
?>
Return current item: PhpBlock