Files
HotLunches/school-reset.php
2026-10-19 15:22:52 -07:00

64 lines
2.1 KiB
PHP

<?php
$school_num = 218;
include "db.php";
include "include/table.php";
// Get school name
$results = db_query("select * from schools where record_num = $school_num");
$school = db_fetch_array($results);
$school_name = trim($school['school_name']);
$siteType = "hotlunch";
if (strpos($url,'fundraiserorders.com') !== false) $siteType = 'fundraising';
if (strpos($url,'payschoolfees.net') !== false) $siteType = 'schoolfees';
if (strpos($url,'registrationnow.net') !== false) $siteType = 'registration';
if ($siteType == "hotlunch" && strpos($url, "hotlunches.net") === false) $url = "www.$url";
echo("$school_name\n");
$formatted_content = new Table("formatted_content");
// Create login screen message
$content_type = 'C';
$content_id = "Login Page";
$query = "delete from formatted_content where school_num = $school_num and content_id = '$content_id'";
db_query($query);
switch ($siteType) {
case 'hotlunch':
$content = "<p>Welcome to the $pac_name and Hot Lunch web site. On this site parents will be " .
"able to place hot lunch orders for their children.</p>\n" .
"<p>We believe that by involving and informing parents we will have a more supportive and effective school " .
"environment for our children. It is up to us to work together to ensure our children have the best " .
"possible school experience.</p>\n";
break;
case 'fundraising':
$content = "<p>Welcome to the $pac_name fund raising web site. On this site parents will be " .
"place fund raising orders for our $orgType.</p>\n";
break;
case 'schoolfees':
$content = "<p>Welcome to the $pac_name school fees web site. On this site parents will be able to pay school fees and " .
"register children for fieldtrips.</p>\n";
break;
case 'registration':
$content = "<p>Welcome to the $pac_name registration web site.</p>\n";
break;
}
$query = $formatted_content->BuildInsert();
db_query($query);
?>