📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
chb_data
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
4988.09 KB
0644
🗑️
⬇️
✏️
🔒
Editing: warning.php
<?php include "admin_header.php"; $color=$_GET['color']; $quantityCondition = "SUM(v.shop) <= 20"; if ($color == "orange") {$quantityCondition = "SUM(v.shop) <= 20 AND SUM(v.shop) >= 10"; } elseif ($color == "yellow") {$quantityCondition = "SUM(v.shop) <= 10 AND SUM(v.shop) >= 5"; } elseif ($color == "red") {$quantityCondition = "SUM(v.shop) <= 5"; } else{$color = "warning";} ?> <div style="overflow-x:scroll;" class="p-3" id="def"> <p style="color:black; font-weight:500; text-transform:capitalize; font-size :20px;"><?php echo $color; ?> Stocks</p> <table class='table table-condensed table-hover ' style="color:black; font-size:13px; font-weight:500;" data-toggle='bootgrid'> <thead><tr bgcolor="#FF339A" style="color:white;"> <th data-column-id='employee_name' width='200px'>Media</th> <th data-column-id='employee_name' width='200px'>Barcode</th> <th data-column-id='employee_name' width='200px'>Item</th> <th data-column-id='employee_salary' width='200px'>Available Stocks</th> <th data-column-id='employee_salary' width='200px'></th> </tr> </thead> <?php $sql = "SELECT v.*, s.s, v.shop AS quantity, s.name FROM variation v JOIN stocks s ON v.group_id = s.group_id GROUP BY v.group_id HAVING $quantityCondition"; $sql2 = mysqli_query($con,$sql); $count = mysqli_num_rows($sql2); if ($count <= 0) { echo "No warning stocks in that range available!"; } else{ while ($row = mysqli_fetch_array($sql2)) { $ord=$row['id']; $group=$row['group_id']; $productname=$row['name']; $quantity=$row['quantity']; //Get media $sqla = "SELECT * from stock_images WHERE id='$group' order by s ASC "; $sql2a = mysqli_query($con,$sqla); while($rowa = mysqli_fetch_array($sql2a)) {$imageURL='stocks/'.$rowa["media"];} $cat=$row["category"]; //only Superadmin can delete stock if($stat=="superadmin"){$view="block";} else{$view="none";} $bg="bg-success"; if ($quantity <= 15 && $quantity > 10){$bg="bg-info";} else if ($quantity <= 10 && $quantity > 5){$bg="bg-warning";} else if($quantity <= 5){$bg="bg-danger";} echo "<tr bgcolor='#fff' > <td><img src='".$imageURL ."' class='img' width='50px' height='50px'/></td> <td width='200px' style='font-weight:600;'><span class='badge $bg text-light'>". $row['group_id']. "</span></td> <td width='200px' >" . $productname. "</td> <td width='200px'>" . $quantity. "</td> <td ><form action='stockedit.php?warning=1' method='post'> <input type='text' name='orderid' value='" . $row['s'] . "' required hidden> <input type='submit' name='submi' value='Edit' class='btn btn-sm btn-primary shadow-sm' ></form></td> </tr>"; }}?> </table> </div> <?php include "footer.php";?>
💾 Save Changes