www
/
wwwroot
/
magazinmiorita.be
/
admin
➕ New
📤 Upload
✎ Editing:
delete_prod_order.php
← Back
<?php include('../includes/inc.config.php'); include('check_session.php'); $get_order_details = $database->execute("select * from orders where id = '".$_GET['oid']."'"); $row = $database->assoc($get_order_details); $history = $row['history']; $hdata = unserialize($history); foreach($hdata as $val){ $arr = explode('|',$val); $prod_id = $arr[0]; $weight = $arr[1]; $type = $arr[2]; $price = $arr[3]; $qt = $arr[4]; $code = $arr[6]; if($arr[0] != $_GET['oldpid']){ if($type == 'kg'){ $total_price = $price * $weight; }else if($type == 'gr'){ $weight = $weight; $total_price = $price * ($weight/1000); }else if($type == 'mg'){ $weight = $weight; $total_price = $price * ($weight/10000); }else if($type == 'pc'){ $weight = 1; $total_price = $price; } $item_data[] = $prod_id.'|'.$weight.'|'.$type.'|'.$price.'|'.$qt.'|'.$total_price*$qt.'|'.$code; } } $serialized = serialize($item_data); $update = $database->execute("update orders set history = '$serialized' where id = '".$_GET['oid']."'"); if($update){ header("Location: order_details.php?id=".$_GET['oid']); exit; } ?>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel