Server IP : 162.241.126.129 / Your IP : 3.149.240.101 Web Server : Apache System : Linux 162-241-126-129.cprapid.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64 User : rvway5nu4 ( 1018) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/rvway5nu4/www/admin/order/ |
Upload File : |
<?php include("../../config/data.config.php"); if (!isset($_SESSION["SESS_v_adminLoggedIn"])) { header ("Location: $MAP_VROOT_FILE_PATH/admin/login.php"); exit; } //echo '<pre>'; print_r( $_SESSION ); echo '</pre>'; echo $target = "$DOCUMENT_ROOT$PIC_DIR/use_item/$filename"; exit; include("$LIB_DIR/functions.lib.php"); include("$LIB_DIR/db.php"); include("$LIB_DIR/db/mysqli.php"); include("$LIB_DIR/data.constant.php"); include("$LIB_DIR/sitemsgs.php"); include("$LIB_DIR/class.paging.php"); include("$LIB_DIR/functions.mailer.php"); global $SITE_URL, $IMG_DIR; $db = new Db( $DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_NAME, $DB_REPORT_ERROR, $DB_PERSISTENT_CONN); $img_preview = ''; $img_name = ''; $inactive_checked = ''; $active_checked = ''; $v_title = ''; $i_bannerID = ''; if( !empty( $_REQUEST['action']) && $_REQUEST['action'] == 'edit' && !empty( $_REQUEST['i_bannerID']) ){ $img_preview = ''; $img_name = ''; $inactive_checked = ''; $active_checked = ''; $v_title = ''; $i_bannerID = $_REQUEST['i_bannerID']; $sql = "SELECT * FROM tbl_by_type WHERE i_bannerID = '".$_REQUEST['i_bannerID']."' "; $result=$db->query($sql); if($result->num_rows) { $v_title = $result->row['v_title']; $v_image = $result->row['v_image']; $c_status = $result->row['c_status']; $i_sortOrder = $result->row['i_sortOrder']; if( $c_status == 1 ){ $inactive_checked = ''; $active_checked = 'SELECTED'; }else{ $inactive_checked = 'SELECTED'; $active_checked = ''; } $target = "$DOCUMENT_ROOT$PIC_DIR/$v_image"; if ( $v_image != '' && file_exists("$target")) { $todel_img_name = $v_image; $img_preview = '<BR/><img src="'.$SITE_URL.'/pic/'.$v_image.'" class="img-responsive" >'; } } } if( !empty( $_REQUEST['action']) && $_REQUEST['action'] == 'del' && !empty( $_REQUEST['i_orderID']) && !empty( $_REQUEST['custid']) ){ $sql = "SELECT * FROM tbl_register WHERE i_customerID = '".$_REQUEST['custid']."' "; $result=$db->query($sql); if($result->num_rows) { foreach( $result->row AS $key=>$val){ $$key = $val; } $delsql = "DELETE FROM tbl_order WHERE i_orderID = '".$_REQUEST['i_orderID']."' "; $result=$db->query($delsql); $delsql = "DELETE FROM tbl_order_items WHERE i_orderID = '".$_REQUEST['i_orderID']."' "; $result=$db->query($delsql); $PROMPT = '<div class="alert alert-success alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">X</button> <strong><i class="fa fa-exclamation-circle"></i> success :</strong>Order in reference to '.$last_name.' '.$last_name.' has been deeted successfully.; </div>'; $_SESSION['msg'] = $PROMPT; header('Location: '.SUB_DIR_PROJECT.'/admin/order/mix_rv_orderlist.php'); exit; } } $sid10chld0 = 'actve'; $sid10chld1 = 'actve'; $sid10show = 'show'; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Approved RV Order</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="all,follow"> <!-- Bootstrap CSS--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/vendor/bootstrap/css/bootstrap.min.css"> <!-- Font Awesome CSS--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/vendor/font-awesome/css/font-awesome.min.css"> <!-- Fontastic Custom icon font--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/css/fontastic.css"> <!-- Google fonts - Roboto --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700"> <!-- jQuery Circle--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/css/grasp_mobile_progress_circle-1.0.0.min.css"> <!-- Custom Scrollbar--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/vendor/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css"> <!-- theme stylesheet--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/css/style.default.css" id="theme-stylesheet"> <!-- Custom stylesheet - for your changes--> <link rel="stylesheet" href="<?php echo $SITE_URL; ?>/admin/css/custom.css"> <!-- Favicon--> <link rel="shortcut icon" href="img/favicon.ico"> <!-- Tweaks for older IEs--><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]--> </head> <body> <!-- Side Navbar --> <?php require_once(ABSPATH.'../admin/common/admin_sidebar.php'); ?> <div class="page"> <!-- navbar--> <?php require_once(ABSPATH.'../admin/common/admin_header_nav.php'); ?> <!-- Counts Section --> <section class="dashboard-counts section-padding"> <div class="container-fluid"> <div class="row"> <!-- Count item widget--> <div class="col-xl-12 col-md-12 col-lg-12 card"> <!-- Start Form --> <div class="col-lg-12 col-sm-12"> <form method="post" enctype="multipart/form-data"> <div class=""> <div class="card-header d-flex align-items-center"> <h4>Reject RV Order List </h4> </div> <?php $SUB_SQL = ''; $search_keyword = ''; if( isset( $_REQUEST['submitSearchForm']) && $_REQUEST['submitSearchForm'] == 'yes' && ( !empty($_REQUEST['search_keyword'])) ){ $search_keyword = $_REQUEST['search_keyword']; $SUB_SQL .= " AND ( " ; $SUB_SQL .= " `first_name` LIKE '%".$_REQUEST['search_keyword']."%' " ; $SUB_SQL .= " OR `last_name` LIKE '%".$_REQUEST['search_keyword']."%' " ; $SUB_SQL .= " OR `subTotalPrice` LIKE '%".$_REQUEST['search_keyword']."%' " ; $SUB_SQL .= " OR `totalPrice` LIKE '%".$_REQUEST['search_keyword']."%' " ; $SUB_SQL .= " OR `i_orderID` = '".(int)$_REQUEST['search_keyword']."' " ; $SUB_SQL .= " ) " ; } ?> <HR/> <div class="col-xl-12 col-md-12 col-lg-12 "> <form method="post" enctype="multipart/form-data"> <div class="row"> <div class="col-lg-9 col-sm-12"> <input type="text" name="search_keyword" id="search_keyword" value="<?php echo $search_keyword; ?>" class="form-control" placeholder="Search Name, Date(YYYY-mm-dd), Subtotal, Total ..." > </div> <div class="col-lg-3 col-sm-12"> <input type="hidden" name="submitSearchForm" value="yes" class="form-control"> <button type="submit" class="btn btn-primary" style="margin-bottom:20px;background-color:#4AAA52;" >Update</button><button type="reset" class="btn btn-secondary" style="margin-left:20px;margin-bottom:20px;" >Reset</button> </div> </div> </form> </div> <?php $sort_by = $_REQUEST['sort_by']; if (!$sort_by) { $sort_by = "O.dt_addedDate"; } $sort_order = $_REQUEST['sort_order']; if (!$sort_order) { $sort_order = "desc"; } GLOBAL $COLORS, $IMG_DIR, $TEMPLATE_DIR, $ARR_STATUS, $ARR_USERS_INDEX; global $SEARCH_RECORDS,$PREV_PAGE_LINK,$NEXT_PAGE_LINK,$TOTAL_RECORDSET,$PAGE_NAVS, $CURRENT_PAGE_NO, $TOTAL_PAGES, $ARR_GLOBAL_STATUS, $ARR_USERS; global $PROMPT, $ARR_GLOBAL_STATUS, $ARR_USERS, $ARR_STATUS, $HTTP_SESSION_VARS, $HTTP_POST_FILES, $HTTP_POST_VARS, $DOCUMENT_ROOT, $PIC_DIR, $BANNER_DIR, $TEMP_DIR, $MAP_VROOT_FILE_PATH, $ARR_INDENTITY_TYPE, $ARR_TITLE; $CURRENT_PAGE_NO=0; $TOTAL_PAGES=0; $TOTAL_RECORDSET=0; $MAX=10; $page = ( isset( $_REQUEST['page'] ) ) ? $_REQUEST['page'] : 0 ; if(!($page)) $page = 0 ; $lastrow=$MAX+$page; $SERCHSUBQUERY_Product = ''; $next_links .= "sort_by=$sort_by&sort_order=$sort_order"; $query1 = "select count( * ) as total from tbl_order AS O LEFT JOIN tbl_register AS R ON ( O.i_customerID = R.i_customerID) where 1 ".$SUB_SQL." AND O.c_status='2'"; $query2 = "select O.*, R.* , O.c_status AS order_c_status from tbl_order AS O LEFT JOIN tbl_register AS R ON ( O.i_customerID = R.i_customerID) where 1 ".$SUB_SQL." AND O.c_status='3'"; $query2.=" order by $sort_by $sort_order limit $page, $MAX "; //echo "<BR/>"; echo $query1; //echo "<BR/>"; //echo "<BR/>"; echo $query2; exit; $result=$db->query($query1); if($result->num_rows) { { $TOTAL_RECORDSET= $result->row['total']; } if($TOTAL_RECORDSET > 0) { $result=$db->query($query2); if ($result->num_rows) { $slno=$page+1; ?> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>#</th> <th>Order No</th> <th>Customer</th> <th>Sub Total</th> <th>Total</th> <th>Phone</th> <th>Staus</th> <th>Date</th> <th ><span class="pull-right" >Edit / Delete</span> </th> </tr> </thead> <tbody> <?php foreach($result->rows AS $key=>$val ){ ?> <tr> <th scope="row"><?php echo $slno; ?></th> <th scope="row"><?php echo $val['i_orderID']; ?>RCR</th> <td><?php echo $val['first_name']; ?> <?php echo $val['last_name']; ?></td> <td><?php echo $val['subTotalPrice']; ?></td> <td><?php echo $val['totalPrice'];; ?></td> <td><?php echo $val['phone'];; ?></td> <td><?php echo $payment_status_array[$val['order_c_status']]; ?></td> <td><?php echo date(DATE_FORMAT_FANCY_TIME, strtotime($val['dt_addedDate'])); ?></td> <td > <a href="<?php echo $SITE_URL; ?>/admin/order/mix_rv_orderlist.php?action=del&i_orderID=<?php echo $val['i_orderID']; ?>&custid=<?php echo $val['i_customerID']; ?>" class="pull-right" ><i class="fa fa-remove" aria-hidden="true"></i> </a> <span class="pull-right" > | </span> <a href="<?php echo $SITE_URL; ?>/admin/order/mix_rv_orderedit.php?action=edit&i_orderID=<?php echo $val['i_orderID']; ?>" class="pull-right" ><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a> </td> </tr> <?php $slno++; } ?> </tbody> </table> </div> <?php //echo "<pre>ss"; print_r($recordsArray); echo "</pre>"; exit; } else { $SEARCH_RECORDS.="<div class='col-sm-12'> No Item </div>"; } //Decide Navigational Page Links if($page > 0) { $prevpage=$page - $MAX; $PREV_PAGE_LINK="| <a href='mix_rv_orderlist.php?page=$prevpage&$next_links' class=menulink>Prev Page</a> |"; } if($TOTAL_RECORDSET > $lastrow) { $NEXT_PAGE_LINK="| <a href='mix_rv_orderlist.php?page=$lastrow&$next_links' class=menulink>Next Page</a> |"; } $PAGE_NAVS=""; for($i=0,$toPrint=1;$i< $TOTAL_RECORDSET;$i+=$MAX,$toPrint++) { if ($lastrow-$i==$MAX) { $PAGE_NAVS.=" <B>".$toPrint."</b> | "; $CURRENT_PAGE_NO = $toPrint; } else { $PAGE_NAVS.=" <a href='mix_rv_orderlist.php?page=$i&$next_links' class=menulink>$toPrint</a> |"; } $TOTAL_PAGES=$toPrint; } } else { $SEARCH_RECORDS.="<div class='col-sm-12'> No Item </div>";; } } echo "<div class='col-sm-12'> $SEARCH_RECORDS </div>"; echo "<div class='col-sm-12'> $PREV_PAGE_LINK $PAGE_NAVS $NEXT_PAGE_LINK </div>"; ?> </form> </div> <!-- End Form --> </div> </div> </div> </section> <!-- Header Section--> <?php require_once(ABSPATH.'../admin/common/admin_footer.php'); ?> </div> <?php require_once(ABSPATH.'../admin/common/admin_footer_js.php'); ?> </body> </html>