SCDNG PELER
Server IP : 162.241.126.129  /  Your IP : 3.15.211.55
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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/rvway5nu4/www/cust_sale_itemlist.php
<?php
//require_once('./setting.php');
//echo ABSPATH;  exit; //  F:\xampp\htdocs\carivon/
include("./config/data.config.php"); 
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");
$error='';
$msg='';
if(! isset( $_SESSION['SESS_cust_i_customerID'] ) ){  		
		header('Location: '.SUB_DIR_PROJECT.'/signin.php');
		exit;
}

global $SITE_URL, $IMG_DIR;  
$db	=	new Db( $DB_HOST, $DB_USERNAME, $DB_PASSWORD, $DB_NAME, $DB_REPORT_ERROR, $DB_PERSISTENT_CONN);

if( !empty( $_REQUEST['action']) && $_REQUEST['action'] == 'del' && !empty( $_REQUEST['i_itemID']) ){

		$sql = "SELECT * FROM tbl_items  WHERE i_itemID = '".$_REQUEST['i_itemID']."' AND v_type_of_addedby = 'customer' AND i_added_by_customerId  = '".$_SESSION['SESS_cust_i_customerID']."'  "; 
		$result=$db->query($sql);

		if($result->num_rows) {	
			foreach( $result->row AS $key=>$val){
				$$key  = $val;
			}
			$v_title  = $result->row['v_title'];
			for( $i=1; $i < 11 ; $i++ ) {
				$img  = 'v_image'.$i;
				$imgsrc	  = $$img;
				$deltarget = "$DOCUMENT_ROOT$PIC_DIR/$imgsrc"; 
				if ( $$img != ''  && file_exists("$deltarget"))
				{	
					@unlink($deltarget);
				}
			}

			for( $i=1; $i < 31 ; $i++ ) {
				$img  = 'v_3dimage'.$i;
				$imgsrc	  = $$img;
				$deltarget = "$DOCUMENT_ROOT$PIC_DIR/$imgsrc"; 
				if ( $$img != ''  && file_exists("$deltarget"))
				{	
					@unlink($deltarget);
				}
			}

			$deltarget = "$DOCUMENT_ROOT$PIC_DIR/$item_video"; 
			if ( $item_video != ''  && file_exists("$deltarget"))
			{	
				@unlink($deltarget);
			}

			$delsql  = "DELETE FROM tbl_items  WHERE i_itemID = '".$_REQUEST['i_itemID']."' AND v_type_of_addedby = 'customer' AND i_added_by_customerId  = '".$_SESSION['SESS_cust_i_customerID']."'  ";			
			$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> '.$v_title.' deeted successfully.;
               </div>';
			$_SESSION['msg'] = $PROMPT;
			header('Location: '.SUB_DIR_PROJECT.'/cust_sale_itemlist.php');
			exit;
		 }else{
		 
			$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> There is invalid parameter.;
               </div>';
			$_SESSION['msg'] = $PROMPT;
			header('Location: '.SUB_DIR_PROJECT.'/cust_sale_itemlist.php');
			exit;
		 
		 }

}


$sqlpara = '';
$rvtype = '';

// echo '<pre>';  print_r($_SESSION);  echo '</pre>'; // exit;

$sql = "SELECT * FROM tbl_setting  WHERE i_settingID = '1'  "; 
$result=$db->query($sql);
if($result->num_rows) {		
	foreach( $result->row AS $key=>$val){
			$$key  = stripslashes($val);
	}
		
}





	if( ( isset( $_POST['submitLogin'] ) ) && ( $_POST['submitLogin'] == 'yes' ) ){
	
			$name = addslashes($_REQUEST['first_name']).'  '.addslashes($_REQUEST['last_name']);
			
			$Queryuest = "UPDATE  tbl_register SET first_name = '". addslashes($_REQUEST['first_name'])."', last_name = '". addslashes($_REQUEST['last_name'])."',	phone = '". addslashes($_REQUEST['phone'])."',address = '". addslashes($_REQUEST['address'])."',city = '". addslashes($_REQUEST['city'])."',state = '". addslashes($_REQUEST['state'])."',country = '". addslashes($_REQUEST['country'])."',b_first_name = '". addslashes($_REQUEST['b_first_name'])."',b_last_name = '". addslashes($_REQUEST['b_last_name'])."',b_email = '". addslashes($_REQUEST['b_email'])."',b_phone = '". addslashes($_REQUEST['b_phone'])."',b_address = '". addslashes($_REQUEST['b_address'])."',b_city = '". addslashes($_REQUEST['b_city'])."',b_state = '". addslashes($_REQUEST['b_state'])."',b_country = '". addslashes($_REQUEST['b_country'])."',password = '". md5($_REQUEST['password'])."' WHERE i_customerID = '".$_SESSION['SESS_cust_i_customerID']."' " ; 

			$result=$db->query($Queryuest);

			$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-check-circle"></i> Success :</strong>Update successfully.
			</div>';

			$_SESSION['msg'] = $PROMPT;  
			header('Location: '.SUB_DIR_PROJECT.'/my_account.php');
			exit; 


	}


?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Caravon</title>
    <!-- mobile responsive meta -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<?php require_once($ROOT_DIR.'/page_content/us/common/header_common_link1.php'); ?>
	<?php //require_once($ROOT_DIR.'/page_content/us/common/header_common_link2.php'); ?>
	<?php require_once($ROOT_DIR.'/page_content/us/common/header_common_link3.php'); ?>
	<?php require_once($ROOT_DIR.'/page_content/us/common/header_common_link4.php');  ?>
</head>
<body>
	
	<!-- <div class="preloader"></div> -->
    <div class="page-wrapper"  >

		<!-- space for preloader -->
		<header class="site-header header-one" >
			<div class="top-header">
				<?php require_once($ROOT_DIR.'/page_content/us/common/header_top.php'); ?>
			</div><!-- /.top-header -->
			<nav class="navbar navbar-expand-lg navbar-light header-navigation stricky header-style-one" >
				<?php require_once($ROOT_DIR.'/page_content/us/common/header_nav.php'); ?>
            </nav>
		</header><!-- /.site-header -->
		<?php // require_once($ROOT_DIR.'/page_content/minimal-bootstrap-carousel_h.php'); ?>
		<?php // require_once($ROOT_DIR.'/page_content/us/home/minimal-bootstrap-carousel.php'); ?>
		<!--Start AAAAAAAAAAAAAAAAAAAAAAAAAAAAA -->
        <div style="margin:20px 0px 20px 0px;">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
<?php
if( isset($_REQUEST['para']) ){
	$para = $_REQUEST['para'];
	$para_key  = $rv_array[$para];
	$i_rv_settingID  = $_REQUEST['i_rv_settingID'];
	$sql = "SELECT * FROM tbl_rv_setting  WHERE i_rv_settingID = '1'  "; 
	$result=$db->query($sql);
	if($result->num_rows) {		
		foreach( $result->row AS $key=>$val){
				$$key  = stripslashes($val);
		}	
	}
}

?>


						<h3 class=""><?php echo $rvtype;  ?></h2>
						<h5 class=""><?php echo htmlentities($title_str); ?></h3>
					</div>
				</div>
			</div>
		</div>
        <div class="">
            <div class="container">


                <div class="row">
                    <div class="col-lg-3 d-none d-sm-block" style="border-right:2px solid #ccc;" >
						<?php require_once($ROOT_DIR.'/page_content/my_account_sidebar.php'); ?>				
                    </div><!-- /.col-lg-4 -->
                    <div class="col-lg-9 col-sm-12 col-xs-12">
						<div class="col-sm-12" style="margin-top:2px;" >
						 <?php echo htmlentities($desc_str); ?>
						</div>						
                        
						<section class="product_loop login-area">
						        <?php if( $_SESSION['msg'] ){ 
									 echo $_SESSION['msg']; 
									 unset($_SESSION['msg']);
							} 
							?>
								<div class="row">
								   <!-- Start to item list  -->
											  <div class="col-sm-12">
												  <h3>Sale RV List</h3>											 
										<?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 .= "  `v_title` LIKE '%".$_REQUEST['search_keyword']."%' " ;		
												$SUB_SQL .= " OR  `brand` LIKE '%".$_REQUEST['search_keyword']."%' " ;
												$SUB_SQL .= " OR  `model` LIKE '%".$_REQUEST['search_keyword']."%' " ;
												$SUB_SQL .= " OR  `length` LIKE '%".$_REQUEST['search_keyword']."%' " ;
												$SUB_SQL .= " OR  `width` LIKE '%".$_REQUEST['search_keyword']."%' " ;
												$SUB_SQL .= " OR  `normal_price` LIKE '%".$_REQUEST['search_keyword']."%' " ;
												$SUB_SQL .= " OR  `sale_price` LIKE '%".$_REQUEST['search_keyword']."%' " ;
												$SUB_SQL .= " OR  `curreny_type` LIKE '%".$_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 Keywords likes title, brand, model,lenth breath ..." >
												</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 = "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 = '';
											//echo '<pre>'; print_r($_SESSION);;  exit;
											$next_links .= "sort_by=$sort_by&sort_order=$sort_order";

											$query1 = "select count(   *   ) as total from tbl_items where  1 AND i_added_by_customerId  = '".$_SESSION['SESS_cust_i_customerID']."' AND v_type_of_addedby = 'customer'  ".$SUB_SQL; 
											$query2 = "select * from tbl_items where 1  AND v_type_of_addedby = 'customer' AND i_added_by_customerId  = '".$_SESSION['SESS_cust_i_customerID']."'  ".$SUB_SQL;
										  
											//echo $query1;   echo '<BR/>';
											$query2.=" order by   $sort_by  $sort_order limit  $page, $MAX ";	
											//echo $query2;
											$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>Title</th>
															  <th>Brand</th>
															
															  <th>Staus</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>
																  <td><?php echo $val['v_title']; ?></td>
																  <td><?php echo stripslashes($val['brand']); ?></td>
																  
																  <td><?php echo $ARR_STATUS[$val['c_status']]; ?></td>
																  
																  <td >
																  <a href="<?php echo $SITE_URL;  ?>/cust_sale_itemlist.php?action=del&i_itemID=<?php echo $val['i_itemID']; ?>" class="pull-right"  ><i class="fa fa-remove" aria-hidden="true"></i> </a> <span class="pull-right" > 
																  &nbsp;&nbsp; | &nbsp;&nbsp;</span> 
																  <a href="<?php echo $SITE_URL;  ?>/cust_sale_itemedit.php?action=edit&i_itemID=<?php echo $val['i_itemID']; ?>" 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'> <strong>There is no SALE RV records found.</strong></div>";
												}
												//Decide Navigational Page Links

												if($page > 0)
												{	$prevpage=$page - $MAX;
													$PREV_PAGE_LINK="| <a href='cust_sale_itemlist.php?page=$prevpage&$next_links' class=menulink>Prev Page</a> |";
												}
												
												if($TOTAL_RECORDSET > $lastrow)
												{	$NEXT_PAGE_LINK="| <a href='cust_sale_itemlist.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='cust_sale_itemlist.php?page=$i&$next_links'  class=menulink>$toPrint</a> |";
													}
													$TOTAL_PAGES=$toPrint;
												}
											}
											else
											{	$SEARCH_RECORDS.="<div class='col-sm-12'> <strong>There is no SALE RV records found.</strong> </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>

								  <!-- End to item list  -->
						</section>
                        

						<div class="col-sm-12" style="margin-top:2px;" >
						 <?php echo $footer_desc_str; ?>
						</div>
                    </div><!-- /.col-lg-8 -->

                </div><!-- /.row -->
            </div><!-- /.container -->
        </div><!-- /.blog blog-single -->
		<!--End AAAAAAAAAAAAAAAAAAAAAAAAAAAAA -->
	</div><!-- /.page-wrapper -->

	<footer class="crop">
		<?php  require_once($ROOT_DIR.'/page_content/us/common/footer_middle.php'); ?>
		<?php require_once($ROOT_DIR.'/page_content/us/common/footer_bottom.php'); ?>
	</footer>
    <a href="#" data-target="html" class="scroll-to-target scroll-to-top"><i class="fa fa-long-arrow-up"></i></a>
    <!-- /.scroll-to-top -->
	<?php require_once($ROOT_DIR.'/page_content/us/common/footer_js.php'); ?>

		<script >
		   $('#partner_tab_2').hide();
		   $(".tabparner").on("click", function(){
			var tabparner_id = $(this).attr('id');
				//alert("The paragraph was clicked." + tabparner_id);
				if( tabparner_id == 'tab_1' ){
					$("#tab_1").addClass("activetab");
					$("#tab_1").removeClass("deactivetab");
					$("#tab_2").removeClass("activetab");
					$("#tab_2").addClass("deactivetab");
					$('#partner_tab_1').show();
					$('#partner_tab_2').hide();
				}
				
				if( tabparner_id == 'tab_2' ){
					$("#tab_2").addClass("activetab");
					$("#tab_2").removeClass("deactivetab");
					$("#tab_1").removeClass("activetab");
					$("#tab_1").addClass("deactivetab");
					$('#partner_tab_1').hide();
					$('#partner_tab_2').show();
				}
				
		   }); 



		$(document).ready(function () {

			  $('input[id^="billingAddrresschk"]').click(function () {

				if ($(this).prop('checked')) {
				   var first_name  = $("#first_name").val();
				   $("#b_first_name").val(first_name);

				  var last_name  = $("#last_name").val();
				   $("#b_last_name").val(last_name);

				    var phone  = $("#phone").val();
				   $("#b_phone").val(phone);

				   var address  = $("#address").val();
				   $("#b_address").text(address);

				   var city  = $("#city").val();
				   $("#b_city").val(city);

				   var state  = $("#state").val();
				   $("#b_state").val(state);

				   var country  = $("#country").val();
				   $("#b_country").val(country);
				}
				else {
				   // do what you need here         
				  // alert("Unchecked");
				}
			  });

		  });
		
		</script>


    </body>
</html>

Anon7 - 2022
SCDN GOK