Files
HotLunches/gh.ip.check.php
2026-10-19 15:22:52 -07:00

33 lines
778 B
PHP

<?php
include "db.php";
$query = "SELECT * FROM `login_log` WHERE `user_ip` LIKE '207.194.253.26' ORDER BY last_login";
$results = db_query($query);
echo("\nLOGIN LOG\n");
while ($row = db_fetch_assoc($results)) {
$snum = $row['school_num'];
$sname = db_getVal("SELECT school_name FROM schools WHERE record_num = $snum");
echo("$sname\n");
print_r($row);
echo("\n");
}
$query = "SELECT * FROM `activity_log` WHERE `user_ip` LIKE '207.194.253.26' ORDER BY school_num,activity_time";
$results = db_query($query);
echo("\nACTIVITY LOG\n");
while ($row = db_fetch_assoc($results)) {
$snum = $row['school_num'];
$sname = db_getVal("SELECT school_name FROM schools WHERE record_num = $snum");
echo("$sname\n");
print_r($row);
echo("\n");
}
?>