Server IP : 162.241.126.129 / Your IP : 18.218.123.194 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/public_html/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( $_REQUEST['order_frm_submit'] == 'yes' ){ if( $_REQUEST['c_status'] == 2 ){ /// if( site_url != 'http://localhost/carivon/' ){ $to = $_REQUEST['email']; $subject = 'Order changed to '.$payment_status_array[$_REQUEST['c_status']]; $message = 'Hi, There are following order detail<BR/><BR/>'; $message .= $_REQUEST['name'].'<BR/>'; $message .= 'Order number '.$_REQUEST['i_orderID'].' has been changed to ' .$payment_status_array[$_REQUEST['c_status']]; $message .= 'So please conatct to admin<BR/><BR/> Sales Team'; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; $headers .= 'From: <info@rvway.net>' . "\r\n"; //$headers .= 'Cc: myboss@example.com' . "\r\n"; mail($to,$subject,$message,$headers); } /// } //echo '<pre>'; print_r( $_REQUEST ); echo '</pre>'; exit; $sql = "Update tbl_order SET c_status = '".$_REQUEST['c_status']."' WHERE i_orderID = '".$_REQUEST['i_orderID']."' "; $result=$db->query($sql); $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>In reference to Order no: '.$_REQUEST['i_orderID'].' status changed to '.$payment_status_array[$_REQUEST['c_status']].'. </div>'; $_SESSION['msg'] = $PROMPT; header('Location: '.SUB_DIR_PROJECT.'/admin/order/mix_rv_orderlist.php'); exit; } 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>RV Way</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"> <?php $sql = "SELECT * FROM tbl_order WHERE i_orderID = '".$_REQUEST['i_orderID']."' "; $result=$db->query($sql); if($result->num_rows) { foreach( $result->row AS $key=>$val){ $$key = $val; } $order_c_status = $c_status; $itemsAddress = json_decode($items, true); $itemAddr = $itemsAddress['address']; $addressStr .= '<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong> Name : </strong></strong></div><div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">'. $itemAddr['b_first_name'].' '.$itemAddr['b_last_name'].'</div>'; $addressStr .= '<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong> Email : </strong></strong></div><div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">'. $itemAddr['b_email'].'</div>'; $addressStr .= '<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong> Phone : </strong></strong></div><div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">'. $itemAddr['b_phone'].'</div>'; $addressStr .= '<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong> Address : </strong></strong></div><div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">'. $itemAddr['b_address'].'</div>'; $addressStr .= '<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong> City : </strong></strong></div><div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">'. $itemAddr['b_city'].'</div>'; $addressStr .= '<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong> State : </strong></strong></div><div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">'. $itemAddr['b_state'].'</div>'; $sql = "SELECT * FROM tbl_country WHERE iso_code_3 = '".$itemAddr['b_country']."'order by name asc "; $result=$db->query($sql); if($result->num_rows) { $country_str = ''; foreach( $result->rows AS $key=>$val ){ $country_str = $val['name']; } } $addressStr .= '<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong> Country : </strong></div><div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">'. $country_str.'</div>'; } $sql = "SELECT * FROM tbl_register WHERE i_customerID = '".$i_customerID."' "; $result=$db->query($sql); if($result->num_rows) { foreach( $result->row AS $key=>$val){ $$key = $val; } } ?> <BR/> <article class="product_loop"> <form method="post" enctype="multipart/form-data"> <div class="row" style="background-color: #fff;padding:5px; color:#333;"> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong>Payment Status :</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <select name="c_status" class="form-control"> <?php foreach($payment_status_array AS $key=>$val ){ $c_statusSelect = ( $order_c_status == $key ) ? 'SELECTED' : ''; ?> <option value="<?php echo $key; ?>" <?php echo $c_statusSelect; ?> > <?php echo $val; ?> </option> <?php } ?> </select> </div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <input type="hidden" name="i_orderID" value="<?php echo $_REQUEST['i_orderID']; ?>RCR" class="form-control"> <input type="hidden" name="order_frm_submit" value="yes" class="form-control"> <input type="hidden" name="name" value="<?php echo $first_name; ?> <?php echo $last_name; ?>" class="form-control"> <input type="hidden" name="email" value="<?php echo $email; ?>" class="form-control"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form> </article> <HR/> <h3>Payment</h3> <article class="product_loop"> <div class="row" style="background-color: #fff;padding:5px; color:#333;"> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong>Payment Status :</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $payment_status_array[$c_status]; ?></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <strong>Order No:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $_REQUEST['i_orderID']; ?>RCR</div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong>Type :</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php if( $v_deleivery_charge == 0 ) { echo 'Pickup'; }else{ echo 'Delivery'; } ?> </div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <strong>Sub Total:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $subTotalPrice; ?> </div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <strong>Total:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $totalPrice; ?> </div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <strong>Date:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo date(DATE_FORMAT_FANCY_TIME, strtotime($dt_addedDate)); ?> </div> </div> </article><HR/> <h3>Customer</h3> <article class="product_loop"> <div class="row" style="background-color: #fff;padding:5px; color:#333;"> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong>Custmer Name :</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $first_name; ?> <?php echo $last_name; ?></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <strong>Email:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $email; ?> </div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong>Phone :</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $phone; ?> </div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"> <strong>City:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $city; ?> </div> </div> </article><HR/> <h3>Addrress:</h3> <article class="product_loop"> <div class="row" style="background-color: #fff;padding:5px; color:#333;"> <?php echo $addressStr; ?> </div> </article><BR/><BR/> <?php $sql = "SELECT * FROM tbl_order_items WHERE i_orderID = '".$i_orderID."' "; $result=$db->query($sql); if($result->num_rows) { ?> <article class="product_loop"> <div class="row" style="background-color: #424741;padding:5px; color:#fff;"> <div class="col-lg-5 col-md-3 col-sm-12 col-xs-12">Product</div> <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">Quantity</div> <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">Unit Price</div> <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">RV Type</div> <div class="col-lg-2 col-md-4 col-sm-12 col-xs-12">Price</div> </div> </article> <?php $count = 0; $subTotalPrice = 0; $totalPrice = 0; //echo '<pre>'; print_r( $result->rows ); echo '</pre>'; exit; foreach( $result->rows AS $key=>$val){ foreach($val as $key1=>$val1){ $$key1 = $val1; } $count++; $rem = ( $count % 2); if( $rem == 1){ $itemrow = 'itemrow1'; }else{ $itemrow = 'itemrow2'; } $target = "$DOCUMENT_ROOT$PIC_DIR/$image"; $imgSRC = ''; if ( $image != '' && file_exists("$target")) { $imgSRC = $SITE_URL.'/pic/'.$image; } $sale_price = (isset($sale_price))? (float) filter_var($sale_price, FILTER_SANITIZE_NUMBER_INT) :0; $quantity = (isset($quantity))? (float) filter_var($quantity, FILTER_SANITIZE_NUMBER_INT):0; $Price = ( $sale_price * $quantity ); $subTotalPrice = ( $subTotalPrice + $Price); ?> <div class="row <?php echo $itemrow; ?>" style="" > <div class="col-lg-5 col-md-3 col-sm-12 col-xs-12"> <div class="item-name"><?php echo $v_title; ?></div> <div class="card col-lg-8 col-lg-8 col-sm-12"><?php echo $img_src; ?> <a href="<?php echo site_url.'admin/use_item/edit_use_item.php?action=edit&i_itemID='.$i_itemID; ?>" class="item-title"> <img class="img-fluid img-rounded lazyloaded img-responsive" alt="<?php echo $v_title; ?>" title="<?php echo $v_title; ?>" src="<?php echo $imgSRC; ?>"> </a> </div> </div> <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12"><?php echo $quantity; ?></div> <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12"><?php echo $curreny_type.' '. $sale_price; ?></div> <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12"><?php echo $rv_type_array[$sale_type]; ?></div> <div class="col-lg-2 col-md-4 col-sm-12 col-xs-12"><?php echo $curreny_type.' '. $Price; ?></div> </div> <?php } ?> <div class="row" style=""> <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12" align="right"><strong>Sub Total:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12" align="right"><strong><?php echo $subTotalPrice; ?></strong></div> </div> <?php if($v_deleivery_charge > 0 ) { ?> <div class="row" style=""> <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12" align="right"><strong>Delivery Charge:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12" align="right"><strong><?php echo $v_deleivery_charge; ?></strong></div> </div> <?php } ?> <div class="row" style=""> <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12" align="right" ><strong>Total:</strong></div> <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12" align="right" ><strong><?php $totalPrice = ( $subTotalPrice + $v_deleivery_charge ); echo $totalPrice; ?></strong></div> </div> <?php } ?> <BR/> <BR/> </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>