first commit

This commit is contained in:
LAPTOP-V9RRD1TL\Michelle's Computer
2025-07-21 21:38:17 +08:00
commit f8f8fcaf96
2529 changed files with 227800 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
// update every 12 oclock
include '../connect/cms-config.php' ;
include '../requires/function.php' ;
$select = $mysqli->query( "SELECT * FROM setting_holiday
WHERE deleted_at IS NULL AND holiday_date = '".date('Y-m-d', time())."' LIMIT 1" ) ;
if ( $select->num_rows > 0 ){
$row_select = $select->fetch_assoc() ;
$mysqli_staff = $mysqli->query("SELECT staff_id, staff_name, staff_idno FROM staff
WHERE ( staff_date_resigned IS NULL || staff_date_resigned = '0000-00-00' || staff_date_resigned >= '".TODAYDATE."' ) AND deleted_at IS NULL ") ;
if ( $mysqli_staff->num_rows > 0 ){
while ( $row_staff = $mysqli_staff->fetch_assoc() ){
pushToUserCron( 'holiday', $row_select['holiday_id'], $row_staff['staff_id'], 'Holiday', 'It is public holiday today ( '.$row_select['holiday_name'].' ), kindly enjoy.' ) ;
}
}
}
?>