Folder reorganize 1
This commit is contained in:
21
includes/remaininghours.php
Normal file
21
includes/remaininghours.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
include("dbinfo.php");
|
||||
|
||||
$con=mysqli_connect($host,$username,$password,$database);
|
||||
$query = "SELECT 24-TIME_TO_SEC(
|
||||
TIMEDIFF(
|
||||
CASE
|
||||
WHEN CURRENT_TIME() < '5:00:00'
|
||||
THEN ADDTIME(CURRENT_TIME(), '240000')
|
||||
ELSE CURRENT_TIME() END,
|
||||
'05:00:00'))/3600 AS hoursleft";
|
||||
$result=mysqli_query($con,$query);
|
||||
|
||||
$include4=mysqli_fetch_array($result,MYSQLI_ASSOC);
|
||||
|
||||
mysqli_close($con);
|
||||
?>
|
||||
|
||||
|
||||
<?php echo ($include4['hoursleft']); ?>
|
||||
|
||||
Reference in New Issue
Block a user