File manager - Edit - /home/custbahd/irungikitchen.com/admin/filters/arrivals/out/index.php
Back
<?php session_start(); include_once('../../../db/connection.php'); $sql = "SELECT * FROM shop ORDER BY arrival_time DESC"; //use for MySQLi-OOP $query = $conn->query($sql); while($row = $query->fetch_assoc()){ $arrival_time = $row['arrival_time']; } ?> <?php if(isset($_GET['id'])){ $sql = "UPDATE shop SET recent_arrival=''"; //use for MySQLi OOP $conn->query($sql); } ?> <?php if(isset($_GET['id'])){ $sql = "UPDATE shop SET arrivals = '', arrival_time = '$arrival_time' WHERE id = '".$_GET['id']."'"; //use for MySQLi OOP if($conn->query($sql)){ $_SESSION['success'] = 'Item removed from new arrivals successfully'; } else{ $_SESSION['error'] = 'Something went wrong while approving the new arrivals process'; } } header('location: ../../../'); ?> <?php if(isset($_GET['id'])){ $sql = "UPDATE shop SET recent_arrival= '1' WHERE arrival_time > '$arrival_time' ORDER BY arrival_time DESC LIMIT 1"; //use for MySQLi OOP $conn->query($sql); } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 2.5 |
proxy
|
phpinfo
|
Settings