halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
aramiyarkai
/
public_html
/
admin
/
Upload FileeE
HOME
<?php error_reporting (0); include "dbc.php"; page_protect(); include "update_order_status.php"; //include "back_functions.php"; ?> <?php include'header.php';?> <div class="main-bar"> <h3><i class="fa fa-archive"></i> Orders</h3> </div> <!-- /.main-bar --> </header> <!-- /.head --> </div> <!-- /#top --> <?php include'admin_admin.php';?> <!-- /#left --> <div id="content"> <div class="outer"> <div class="inner bg-light lter"> <style> .form-control.col-lg-6 { width: 50% !important; } </style> <div class="row"> <div class="col-lg-12"> <div class="box"> <header> <?php $order_id = $_GET['order_id']; ?> <h5><i class="halflings-icon th"></i><span class="break"></span>Order Details For #<?php echo $order_id; ?></h5> <div class="toolbar"></div> </header> <div class="row"> <div class="col-lg-12"> <div class="box"> <div id="collapse4" class="body"> <?php include 'msg_display.php'?> <ul class="nav tab-menu nav-tabs" id="myTab"> <li class="active"><a href="#order">Order Details</a></li> <li><a href="#payment">Payment Details</a></li> <li><a href="#shipping">Shipping Details</a></li> <li><a href="#products">Product Details</a></li> <li><a href="#history">History</a></li> </ul> <?php $sno=1; $sel_order = mysqli_query($link,"select * from shopping_tbl where `order_id` = '$order_id' group by order_id order by id desc "); $rw_order = mysqli_fetch_object($sel_order); $cust = $rw_order->customer_details; $cus = explode(",",$cust); $cust_name = $cus[0]; $cust_mobile = $cus[1]; $cust_email = $cus[2]; $address = $rw_order->delivery_details; $district = $rw_order->district; $state = $rw_order->state; $pincode = $rw_order->pincode; $del_address = $address."<br>".$district.", ".$state.", ".$pincode; ?> <div id="myTabContent" class="tab-content"> <div class="tab-pane active" id="order"> <form name="customer" action="" method="post" enctype="multipart/form-data"> <br><center><input type="submit" name="update_customer" id="update_customer" value="Update Customer Details" class="btn btn-success"></center><br> <table class="table table-bordered"> <tbody> <tr> <td width="30%">Order ID:</td> <td> #<?php echo $rw_order->order_id; ?> <input type="hidden" name="order_id" id="order_id" value="<?php echo $rw_order->order_id; ?>"> </td> </tr> <tr> <td>Invoice No.:</td> <td><?php echo $rw_order->inv_no; ?> | <?php echo $rw_order->inv_date; ?></td> </tr> <tr> <td>Customer:</td> <td><input type="text" name="cust_name" id="cust_name" class="form-control" value="<?php echo $cust_name; ?>"></td> </tr> <tr> <td>E-Mail:</td> <td><input type="text" name="cust_email" id="cust_email" class="form-control" value="<?php echo $cust_email; ?>"></td> </tr> <tr> <td>Mobile:</td> <td><input type="text" name="cust_mobile" id="cust_mobile" class="form-control" value="<?php echo $cust_mobile; ?>"></td> </tr> <tr> <td>Total:</td> <td><i class="fa fa-inr"></i> <?php echo $rw_order->total; ?></td> </tr> <tr> <td>Order Status:</td> <td id="order-status"><?php echo $rw_order->order_status; ?></td> </tr> <tr> <td>Pyament Status:</td> <td id="order-status"><?php echo $rw_order->payment_status; ?></td> </tr> <tr> <td>IP Address:</td> <td><?php echo $rw_order->ip_address; ?></td> </tr> <tr> <td>User Agent:</td> <td><?php echo $rw_order->browser; ?></td> </tr> <tr> <td>Date Added:</td> <td><?php echo $rw_order->order_date; ?></td> </tr> <tr> <td>Date Modified:</td> <td><?php echo $rw_order->order_modified; ?></td> </tr> </tbody> </table> </form> </div> <div class="tab-pane" id="payment"> <form name="payment" action="" method="post" enctype="multipart/form-data"> <br><center><input type="submit" name="update_payment" id="update_payment" value="Update Payment Details" class="btn btn-success"></center><br> <table class="table table-bordered"> <tbody> <tr> <td>Pyament Status:</td> <td id="order-status"><?php echo $rw_order->payment_status; ?> <input type="hidden" name="order_id" id="order_id" value="<?php echo $rw_order->order_id; ?>"> <select name="payment_status" id="payment_status" class="form-control"> <option value="">Please Select</option> <option value="Pending">Pending</option> <option value="Credit">Success</option> </select> </td> </tr> <tr> <td>Payment Type:</td> <td id="order-status"><?php echo $rw_order->payment_type; ?> <select name="payment_type" id="payment_type" class="form-control"> <option value="">Please Select</option> <option value="Online">Online Payment Gateway</option> <option value="GPay">GPay</option> <option value="Transfer">Bank Transfer</option> <option value="Cash">Cash</option> </select> </td> </tr> <tr> <td>Payment Date:</td> <td id="order-status"><input type="text" name="payment_date" id="payment_date" class="form-control" value="<?php echo $rw_order->payment_date; ?>"></td> </tr> <tr> <td>Pyament Ref No:</td> <td id="order-status"><input type="text" name="payment_refno" id="payment_refno" class="form-control" value="<?php echo $rw_order->payment_refno; ?>"></td> </tr> <tr> <td>Payment Desc:</td> <td id="order-status"><textarea name="payment_refno" id="payment_refno" class="form-control"><?php echo $rw_order->payment_desc; ?></textarea></td> </tr> </tbody> </table> </form> </div> <div class="tab-pane" id="shipping"> <form name="customer" action="" method="post" enctype="multipart/form-data"> <br><center><input type="submit" name="update_delivery" id="update_delivery" value="Update Delivery Details" class="btn btn-success"></center><br> <input type="hidden" name="order_id" id="order_id" value="<?php echo $rw_order->order_id; ?>"> <table class="table table-bordered"> <tbody> <tr> <td width="30%">Name:</td> <td><?php echo $cust_name; ?></td> </tr> <tr> <td>Delivery Address:</td> <td><textarea name="address" id="address" class="form-control"><?php echo $del_address; ?></textarea></td> </tr> <tr> <td>Mobile:</td> <td><?php echo $cust_mobile; ?></td> </tr> </tbody> </table> </form> </div> <div class="tab-pane" id="products"> <form name="customer" action="" method="post" enctype="multipart/form-data"> <br><center><input type="submit" name="update_order" id="update_order" value="Update Order" class="btn btn-success"></center><br> <input type="hidden" name="order_id" id="order_id" value="<?php echo $rw_order->order_id; ?>"> <input type="hidden" name="customer_details" id="customer_details" value="<?php echo $rw_order->customer_details; ?>"> <input type="hidden" name="delivery_details" id="delivery_details" value="<?php echo $rw_order->delivery_details; ?>"> <input type="hidden" name="lang" id="lang" value="<?php echo $rw_order->lang; ?>"> <input type="hidden" name="sno" id="sno" value="<?php echo $rw_order->sno; ?>"> <table class="table table-bordered"> <thead> <tr> <td class="text-left">Product</td> <td class="text-right">Quantity</td> <td class="text-right">Unit Price</td> <td class="text-right">Total</td> </tr> </thead> <tbody> <?php $sel_order1 = mysqli_query($link,"select * from shopping_tbl where order_id='$order_id' and `item_status`!='Cancelled'"); $sno=1; while($rw_details1 = mysqli_fetch_object($sel_order1)){ $proid = $rw_details1->product_id; $customer_details = $rw_details1->customer_details; $psize = $rw_details1->size; ?> <tr> <td class="text-left"> <p> <?php echo $rw_details1->product_name; ?> - <?php echo $rw_details1->product_name_en; ?> - <?php echo $psize; ?><br> <?php echo $rw_details1->product_id; ?><br> </p> </td> <td class="text-right"><?php echo $rw_details1->quantity; ?></td> <td class="text-right"><i class="fa fa-inr"></i> <?php echo $rw_details1->price; ?></td> <td class="text-right"><i class="fa fa-inr"></i> <?php echo $rw_details1->line_total; ?></td> </tr> <?php $sno++; } ?> <tr> <td colspan="3" class="text-right">Sub-Total:</td> <td class="text-right" width="20%"><i class="fa fa-inr"></i> <input type="text" name="total" id="total" class="form-control" style="width:80%; display:inline;" value="<?php echo $rw_order->total; ?>" readonly></td> </tr> <tr> <td colspan="3" class="text-right">Discount: <input type="text" name="discount_per" id="discount_per" value="<?php echo $rw_order->discount_per; ?>" class="form-control" style="width:20%; display:inline;" placeholder="Enter % value" onkeyup="calc_per();"></td> <td class="text-right" width="20%"><i class="fa fa-inr"></i> <input type="text" name="discount" id="discount" class="form-control" style="width:80%; display:inline;" value="<?php echo $rw_order->discount; ?>" onkeyup="calc_total();"></td> </tr> <tr> <td colspan="3" class="text-right">Delivery Charges:</td> <td class="text-right" width="20%"><i class="fa fa-inr"></i> <input type="text" name="delivery_charge" id="delivery_charge" class="form-control" style="width:80%; display:inline;" value="<?php echo $rw_order->delivery_charge; ?>" onkeyup="calc_total();"> </td> </tr> <tr> <td colspan="3" class="text-right">Previous Total:</td> <td class="text-right" width="20%"><i class="fa fa-inr"></i> <input type="text" name="old_total" id="old_total" class="form-control" style="width:80%; display:inline;" value="<?php echo $rw_order->grand_total; ?>" readonly></td> </tr> <tr> <td colspan="3" class="text-right">New Total:</td> <td class="text-right" width="20%"><i class="fa fa-inr"></i> <input type="text" name="grand_total" id="grand_total" class="form-control" style="width:80%; display:inline;" value="<?php echo $rw_order->grand_total; ?>" readonly></td> </tr> </tbody> </table> <div class="col-sm-12 col-md-12 productlist"> <table class="table table-bordered" style="background:#fff;"> <thead> <tr> <!--<td>#</td>--> <td class="label1">Product</td> <td class="label2">Rate</td> <td class="label3">Quantity</td> <td class="label4">Line Total</td> </tr> </thead> <tbody class="list"> <?php $sel_query = mysqli_query($link,"select * from product_tbl where (stock_avail='In Stock' or stock_avail='2-3 Days') and status='Active'"); $count = mysqli_num_rows($sel_query); while($row = mysqli_fetch_object($sel_query)){ $pid = $row->product_id; $pname = $row->product_name." - ".$row->product_name_en; $cat_name = $row->cat_name." - ".$row->cat_name_en; $subcat_name = $row->subcat_name." - ".$row->subcat_name_en; $childcat_name = $row->childcat_name." - ".$row->childcat_name_en; $psize = $row->size; $mrp_price = $row->mrp_price; $our_price = $row->selling_price; $minqty = $row->minq; $maxqty = $row->maxq; $savings = $mrp_price - $our_price; ?> <tr> <!--<td height="50"></td>--> <td class="pname"><input type="checkbox" name="pid[]" id="<?php echo $pid; ?>" value="<?php echo $pid; ?>" onChange="chec('<?php echo $pid; ?>')" style="display:none;"><input type="hidden" name="proname<?php echo $pid; ?>" id="proname<?php echo $pid; ?>" value="<?php echo $pname; ?>"><?php echo $pname; ?> <?php /* <br><?php echo $cat_name; ?> - <?php echo $cat_name_en; ?> <br><?php echo $subcat_name; ?> - <?php echo $subcat_name_en; ?> <br><?php echo $childcat_name; ?> - <?php echo $childcat_name_en; */?> </td> <?php /*<td height="50" class="psize"><?php echo $psize; ?></td>*/ ?> <td><input type="text" style="margin:0px;" name="price<?php echo $pid; ?>" id="price<?php echo $pid; ?>" class="form-control" value="<?php echo $our_price; ?>" readonly></td> <td> <button type="button" name="minus" id="minus" class="minus btn btn-default pull-left" onclick="qminus('<?php echo $pid; ?>')">-</button> <input type="text" style="margin:0px; width:62%; text-align: center;" name="qty<?php echo $pid; ?>" id="qty<?php echo $pid; ?>" class="form-control pull-left qty" value="0"> <button type="button" name="plus" id="plus" class="plus btn btn-default pull-left" onclick="qplus('<?php echo $pid; ?>')">+</button> </td> <td><input type="text" style="margin:0px;" name="ltotal<?php echo $pid; ?>" id="ltotal<?php echo $pid; ?>" class="form-control ltotal" value="0.00" readonly></td> </tr> <?php } ?> <tr> <td colspan="2"></td> <td>Total Amount</td> <td><input type="text" class="form-control" style="border:2px #d7a748 solid;" name="new_total" id="new_total" value="0.00" required readonly /></td> </tr> <tr> <td colspan="4"><center><input type="submit" name="submit" id="submit" class="btn btn-default" value="Add Products"></center></td> </tr> </tbody> </table> </div> </form> </div> <div class="tab-pane" id="history"> <table class="table table-bordered"> <thead> <tr> <td class="text-left">Date Added</td> <td class="text-left">Order Detail Id</td> <td class="text-left">Ordered Product</td> <td class="text-left">Comment</td> <td class="text-left">Status</td> <td class="text-left">Customer Notified</td> </tr> </thead> <tbody> <?php $sel_orderdetail = mysqli_query($link,"select * from orderdetails_tbl where `order_id` = '$order_id'"); while($rw_orderdetail = mysqli_fetch_object($sel_orderdetail)){ $sno_id = $rw_orderdetail->sno_id; //$product_id = $rw_orderdetail->product_id; if($sno_id == "all"){ $sel_product_name = "All"; } else { //echo "select * from shopping_tbl where `order_id` = '$order_id' and `sno_id` = '$sno_id' order by id desc"; $sel_order1 = mysqli_query($link,"select * from shopping_tbl where `product_id`='$sno_id'"); $rw_order1 = mysqli_fetch_object($sel_order1); $sel_product_name = $rw_order1->product_name." - ".$rw_order1->product_name_en; } ?> <tr> <td class="text-left"><?php echo $rw_orderdetail->order_modified; ?></td> <td class="text-left"><?php echo $rw_orderdetail->orderdetail_id; ?></td> <td class="text-left"><?php echo $sel_product_name; ?></td> <td class="text-left"><?php echo $rw_orderdetail->order_modify_desc; ?></td> <td class="text-left"><?php echo $rw_orderdetail->order_status; ?></td> <td class="text-left"><?php echo $rw_orderdetail->customer_notify; ?></td> </tr> <?php }?> </tbody> </table> <div class="clearfix"></div> <div class="box"> <form action="" method="post" enctype="multipart/form-data"> <fieldset> <header><h5>Add Order History</h5></header> <div class="form-group"> <label class="col-sm-2 control-label" for="input-order-status">Order Id <span class="required">*</span></label> <div class="col-sm-10"> <input type="text" name="order_id" class="form-control" value="<?php echo $order_id;?>" readonly required> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">Products <span class="required">*</span></label> <div class="col-sm-10"> <?php ?> <select name="product_id" id="product_id" class="form-control" required> <option value="">Please Select</option> <option value="all">Over All Status</option> <?php $sel_pro = mysqli_query($link,"select * from shopping_tbl where `order_id` = '$order_id'"); while($rw_pro = mysqli_fetch_object($sel_pro)){ $product_id = $rw_pro->product_id; ?> <option value="<?php echo $rw_pro->product_id;?>"><?php echo $rw_pro->product_name." - ".$rw_pro->product_name_en;?> </option> <?php }?> </select> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-order-status">Order Status <span class="required">*</span></label> <div class="col-sm-10"> <select name="order_status_id" id="order_status_id" class="form-control" required> <option value="Pending" selected="selected">Pending</option> <option value="Processed">Processed</option> <option value="Cancelled">Cancelled</option> <option value="Out For Delivery">Out For Delivery</option> <option value="Complete">Complete</option> </select> </div> </div> <div id="shipping_status" style="display:none;"> <div class="form-group"> <label class="col-sm-2 control-label" for="selectError">Shipped By</label> <div class="col-sm-10"> <input type="text" name="courier" id="courier" class="form-control"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-notify">Tracking Number</label> <div class="col-sm-10"> <input type="text" name="tracking_no" id="tracking_no" class="form-control"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-notify">Tracking Link</label> <div class="col-sm-10"> <input type="text" name="tracking_link" id="tracking_link" class="form-control"> </div> </div> </div> <div id="delivery_status" style="display:none;"> <div class="form-group"> <label class="col-sm-2 control-label" for="input-notify">Delivered By</label> <div class="col-sm-10"> <input type="text" name="delivered_by" id="delivered_by" class="form-control"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-notify">Delivered To</label> <div class="col-sm-10"> <input type="text" name="delivered_to" id="delivered_to" class="form-control"> </div> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-notify">Notify Customer</label> <div class="col-sm-10"> <input type="checkbox" name="notify_email" value="1" id="input-notify">Notify by email <input type="checkbox" name="notify_sms" value="1" id="input-notify">Notify by sms </div> </div> <div class="clearfix"></div> <div class="form-group"> <label class="col-sm-2 control-label" for="input-comment">Comment</label> <div class="col-sm-10"> <textarea name="comment" rows="8" id="input-comment" class="form-control"></textarea> </div> </div> <div class="form-group"> <br> <input type="submit" name="update_status" value="Update" class="btn btn-primary"> </div> </fieldset> </form> </div> </div> </div> </div> </div><!--/span--> </div> <!--/row--> </div><!--/.fluid-container--> <!-- end: Content --> </div><!--/#content.span10--> </div><!--/fluid-row--> <div class="modal hide fade" id="myModal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h3>Settings</h3> </div> <div class="modal-body"> <p>Here settings can be configured...</p> </div> <div class="modal-footer"> <a href="#" class="btn" data-dismiss="modal">Close</a> <a href="#" class="btn btn-primary">Save changes</a> </div> </div> </div> </div> </div><!-- /.outer --> </div><!-- /#content --> <div id="right" class="bg-light lter"> <div class="alert alert-danger"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Warning!</strong> Best check yo self, you're not looking too good. </div> <!-- .well well-small --> <div class="well well-small dark"> <ul class="list-unstyled"> <li>Visitor <span class="inlinesparkline pull-right">1,4,4,7,5,9,10</span> </li> <li>Online Visitor <span class="dynamicsparkline pull-right">Loading..</span> </li> <li>Popularity <span class="dynamicbar pull-right">Loading..</span> </li> <li>New Users <span class="inlinebar pull-right">1,3,4,5,3,5</span> </li> </ul> </div><!-- /.well well-small --> <!-- .well well-small --> <div class="well well-small dark"> <button class="btn btn-block">Default</button> <button class="btn btn-primary btn-block">Primary</button> <button class="btn btn-info btn-block">Info</button> <button class="btn btn-success btn-block">Success</button> <button class="btn btn-danger btn-block">Danger</button> <button class="btn btn-warning btn-block">Warning</button> <button class="btn btn-inverse btn-block">Inverse</button> <button class="btn btn-metis-1 btn-block">btn-metis-1</button> <button class="btn btn-metis-2 btn-block">btn-metis-2</button> <button class="btn btn-metis-3 btn-block">btn-metis-3</button> <button class="btn btn-metis-4 btn-block">btn-metis-4</button> <button class="btn btn-metis-5 btn-block">btn-metis-5</button> <button class="btn btn-metis-6 btn-block">btn-metis-6</button> </div><!-- /.well well-small --> <!-- .well well-small --> <div class="well well-small dark"> <span>Default</span> <span class="pull-right"><small>20%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-info" style="width: 20%"></div> </div> <span>Success</span> <span class="pull-right"><small>40%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-success" style="width: 40%"></div> </div> <span>warning</span> <span class="pull-right"><small>60%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-warning" style="width: 60%"></div> </div> <span>Danger</span> <span class="pull-right"><small>80%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-danger" style="width: 80%"></div> </div> </div> </div><!-- /#right --> </div><!-- /#wrap --> <?php include'footer.php';?> <script> function qplus(product_id){ var oldVal = $('#qty'+product_id).val(); var newVal = (parseInt($('#qty'+product_id).val(),10) +1); if(newVal > 0){ $("#"+product_id).prop('checked',true); } else { $("#"+product_id).prop('checked',false); newVal = 0; } $('#qty'+product_id).val(newVal); line_total(product_id); update_total(); } function qminus(product_id){ var oldVal = $('#qty'+product_id).val(); var newVal = (parseInt($('#qty'+product_id).val(),10) -1); if(newVal > 0){ $("#"+product_id).prop('checked',true); } else { $("#"+product_id).prop('checked',false); newVal = 0; } $('#qty'+product_id).val(newVal); line_total(product_id); update_total(); } function chec(pid){ if($('#'+pid).is(":checked")){ $("#qty"+pid).prop('required',true); } else { $("#qty"+pid).prop('required',false); } } function calc_per(){ var total = $('#total').val(); var disc_per = $('#discount_per').val(); var discount = (parseFloat(total) * parseFloat(disc_per))/100; discount = discount.toFixed(2); $("#discount").val(discount); } function calc_total(){ var total = $('#total').val(); var discount = $('#discount').val(); var delivery_charge = $('#delivery_charge').val(); var grand_total = parseFloat(total) + parseFloat(delivery_charge) - parseFloat(discount); grand_total = grand_total.toFixed(2); $('#grand_total').val(grand_total); } function line_total(product_id){ var price = $('#price'+product_id).val(); var qty = $('#qty'+product_id).val(); var total = parseFloat(price) * parseFloat(qty); total = total.toFixed(2); $("#ltotal"+product_id).val(total); } function update_total() { var sum = 0; $(".ltotal").each(function(){ sum += +$(this).val(); }); sum = sum.toFixed(2); //alert(sum); $("#new_total").val(sum); } </script>