"; print_r($_SESSION); include_once('includes/dbh.inc.php'); // Ensure this is included include_once('includes/functions.php'); // Ensure this is included $Loginlast = $_SESSION['Loginlast'] ?? null; $LoginMemberID = $_SESSION['LoginMemberID'] ?? null; $full_url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $title = 'Home page'; // Function to escape HTML entities function escape_html($string) { return htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); } ?> <?php echo escape_html($title); ?>

0) { $site_details = db_select("SELECT * FROM site_details WHERE MessageID = 1", [], false); echo "******SUBSCRIPTION NOTICE******

"; echo escape_html($site_details['InvoiceMess1']); echo escape_html($site_details['InvalidDate']); echo "

"; echo ""; echo ""; $member_types = db_select("SELECT * FROM member_type WHERE MemberTypeID > 0 AND MemberTypeID < 4"); foreach ($member_types as $type) { echo ""; echo ""; echo ""; echo ""; } echo "
Member TypeFees
" . escape_html($type['MemberType']) . "$" . escape_html($type['MemberDues']) . "

"; echo "***********************************"; } // Check for password update requirement if ($Loginlast === '0000-00-00 00:00:00') { echo "

Please change your password

"; include_once("ChangePW.php"); } /*?>

We have made some updates to the site. If you encounter any issues or problems, please let Stuart Anderson know as soon as possible, and he will address them.
Via email stuart.a@steamrail.nz

0) { echo "
"; echo "

We have noticed that your Driver Licence has expired. Can you please update your details. Expired on "; foreach ($expired_licenses as $license) { echo date('d-m-Y', strtotime($license['data_value'])); } echo " Click here to update it

"; } // Include trip view and notices based on user access level include_once 'trip_view.php'; if ($_SESSION['notice_type1'] == '1' || $LoginAccessLevel > 8) { include_once('welcome_notices/alert1.php'); } if ($_SESSION['notice_type2'] == '1' || $LoginAccessLevel > 8) { include_once('welcome_notices/alert2.php'); } // Check for terms acceptance if ($_SESSION['terms'] === '0000-00-10') { echo ""; echo "
"; if (isset($_POST['submit_terms'])) { db_execute("UPDATE user SET terms = NOW() WHERE user_id = ?", [$LoginMemberID]); $_SESSION['terms'] = date('Y-m-d'); } } // Password expiration check $d = strtotime("-6 Months"); $today = date("Y-m-d H:i:s", $d); $new_passwords = db_select("SELECT * FROM user_data WHERE data_type = 'new-password' AND data_user_id = ? AND data_date >= ? ORDER BY data_value ASC LIMIT 1", [$LoginMemberID, $today], false); if (!$new_passwords) { echo ""; echo "
";?>