📁
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
5133.69 KB
0644
🗑️
⬇️
✏️
🔒
Editing: preitems_display.php
<?php $sql = "SELECT so.* from orders o JOIN stock_orders so ON o.orderid=so.orderid WHERE o.payment='online' && o.pay_status='paid' && so.preorder > 0 ORDER BY so.s DESC"; $sql2 = mysqli_query($con, $sql); while ($row = mysqli_fetch_array($sql2)) { $ord = $row['orderid']; $prenum = $row['preorder']; $quantity = $row['quantity']; $item = $row['stockid']; $itemname = $row['name']; $color = $row['color']; $stocks = 0; // Get Variations $sqv = "SELECT * from variation WHERE s='$color' "; $sq2v = mysqli_query($con, $sqv); while ($roe = mysqli_fetch_array($sq2v)) { $theproduct = $roe['item']; $group = $roe['group_id']; $colornames = $roe['color']; } // Select the inventory data for the product from all stores $sqlb = "SELECT SUM(shop) AS shop FROM variation WHERE group_id = '$group' AND color = '$colornames'"; $sql2b = mysqli_query($con, $sqlb); while ($rob = mysqli_fetch_array($sql2b)) { $stocks = $rob['shop']; } $colorname = ($color != 'null') ? "($colornames)" : ""; $disabletext = ($stocks > 0) ? "" : "disabled"; echo " <tr bgcolor='#fff'> <td width='100px'>$ord<br></td> <td width='200px'>$group</td> <td width='200px'>$itemname $colorname</td> <td width='100px'>$prenum</td> <td width='100px'>$stocks</td> <td> <button class='btn btn-sm btn-primary shadow-sm' type='button' data-toggle='modal' data-target='#modal$row[s]' $disabletext> FULFILL PREORDER </button> </td> <div class='modal fade' id='modal$row[s]' role='dialog' tabindex='-1'> <div class='modal-dialog modal-dialog-scrollable modal-dialog-centered'> <div class='modal-content'> <div class='modal-header'> <h6 class='modal-title w-100 text-center' style='color:black;'>Fulfill Product</h6> </div> <div class='modal-body w-100 text-center' style='color:#FFFFFF;'> <p style='color:black; font-weight:500;'> Are you sure you want to fulfill part of this order for product ($itemname) with available stocks? </p> <form action='' method='post'> <input type='text' name='productrow' value='$row[s]' required hidden /> <input type='text' name='prenum' value='$prenum' required hidden /> <input type='text' name='quantity' value='$quantity' required hidden /> <input type='text' name='productnum' value='$stocks' required hidden /> <input type='text' name='color' value='$color' required hidden /> <input type='text' name='stock' value='$item' required hidden /> <input type='text' name='group' value='$group' required hidden /> <input type='text' name='product' value='$itemname' required hidden /> <input type='text' name='orderid' value='$ord' required hidden /> <p><button style='background-color:#FF339A;' class='btn btn-sm btn-primary shadow-sm' type='submit' name='fulfillorder'>Yes, Proceed</button></p> </form> <p><button class='btn btn-sm btn-primary shadow-sm' data-dismiss='modal'>No, stop action</button></p> </div> </div> </div> </div> </tr>"; include "fufillorder.php"; } ?>
💾 Save Changes