<?php
include 'db.php';
//php /home/g6gv45l41sgk/public_html/acmeregistrar.com/adminpanel/status_checker.php
mysqli_query($conn,"
UPDATE cverify SET status='Surveillance-1 Due'
WHERE CURDATE()>=first_surveillance
AND surveillance1_done=0
AND status='Active'
");

mysqli_query($conn,"
UPDATE cverify SET status='Suspended', sdate=CURDATE()
WHERE status LIKE 'Surveillance%'
AND CURDATE()>DATE_ADD(first_surveillance,INTERVAL 30 DAY)
");

mysqli_query($conn,"
UPDATE cverify SET status='Renewal Due'
WHERE CURDATE()>=edate AND renewed=0
");

mysqli_query($conn,"
UPDATE cverify SET status='Withdrawn', wdate=CURDATE()
WHERE status='Renewal Due'
AND CURDATE()>DATE_ADD(edate,INTERVAL 30 DAY)
");
?>