📁
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
5593.27 KB
0644
🗑️
⬇️
✏️
🔒
Editing: deficient.php
<?php include "admin_header.php"; ?> <div style="overflow-x:scroll;" class="p-3" id="def"> <p style="color:black; font-weight:500; font-size :27px;">Deficient Stocks</p> <table class='table table-condensed table-hover' id="dataTable" 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 s.* FROM stocks s JOIN variation v ON s.group_id = v.group_id WHERE s.status='Yes' GROUP BY s.group_id HAVING SUM(v.shop) <= 0"; $sql2 = mysqli_query($con,$sql); $count = mysqli_num_rows($sql2); if ($count <= 0) {echo "No Deficient Stocks Available!";} else{ while ($row = mysqli_fetch_array($sql2)) { $ord=$row['id']; $group=$row['group_id']; //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"]; if($ord!=''){ //Get total variations $sqlc = "SELECT * from variation where item='$ord'"; $sql2c = mysqli_query($con,$sqlc); $countvar = mysqli_num_rows($sql2c); //Available Shop Stocks $sqlb = "SELECT sum(shop) from variation where group_id='$group'"; $sql2b = mysqli_query($con,$sqlb); while($rob = mysqli_fetch_array($sql2b)) $avashop=$rob[0]; //Get category $sqc = "SELECT * from pry_category where s='$cat'"; $sqcs = mysqli_query($con,$sqc); while ($roc = mysqli_fetch_array($sqcs)) { $cats=$roc["name"];}} //only Superadmin can delete stock if($stat=="superadmin"){$view="block";} else{$view="none";} $bg="black"; //color for stocks if ($avashop < 20 && $avashop > 15){$bg="black";} else if ($avashop < 15 && $avashop > 10){$bg="yellow";} else if ($avashop < 10 && $avashop > 5){$bg="orange";} else if($avashop < 5){$bg="red";} echo " <tr bgcolor='#fff' > <td><img src='".$imageURL ."' class='img' loading='lazy' width='50px' height='50px'/></td> <td width='200px' style='color:".$bg."; font-weight:600;'>" . $row['group_id'] . "</td> <td width='200px' >" . $row['name'] . "</td> <td width='200px'>" . $avashop. "</td> <td> <form action='stockedit.php?deficient=1' method='post'> <input type='text' name='orderid' value='" . $row['s'] . "' required hidden> <button type='submit' name='submi' value='Edit Product' class='btn btn-sm btn-primary'>Edit Product</button></form> </td> </tr>"; }}?> </table> </div> <?php include "footer.php";?>
💾 Save Changes