First Commit

This commit is contained in:
mark committed 2026-10-19 15:22:52 -07:00
1 parent 5eb9dd037d
commit 2e62c0e60b
11877 files changed
+2035312

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
<?php
include "db.php";
$start = date("Y-m-d",time() - 60 * 60 * 24 * 150);
$cutoff = date("Y-m-d",time() - 60 * 60 * 24 * 7);
$Msg = "New Hot Lunch Schools\n\n";
$schools = db_query("SELECT * FROM schools WHERE status = 'Active' AND start_date > '$start' ORDER BY start_date DESC");
while ($row = db_fetch_assoc($schools)) {
extract($row);
$school_num = $record_num;
$school_name = $school_name;
$Msg .= "$start_date: $school_name, $city, $province\n";
$results = db_query("SELECT * FROM login_log WHERE school_num = $school_num AND user_num > 2 ORDER BY last_login DESC LIMIT 0,1");
if (db_num_rows($results)) {
$row = db_fetch_assoc($results);
extract($row);
if ($last_login < $cutoff) $last_login .= " *****";
$Msg .= " - Last Login: $userid $last_login\n";
}
$Msg .= " - Last Contact: $last_contact_date\n";
$Msg .= "\n";
}
mail("support@easyschoolsoftware.net", "New Hot Lunch Schools - Daily Report", $Msg);
?>