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/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_item_rentID']) && !empty( $_REQUEST['i_itemID']) ){ $sql = "SELECT * FROM tbl_item_rent WHERE i_item_rentID = '".$_REQUEST['i_item_rentID']."' AND i_itemID = '".$_REQUEST['i_itemID']."' "; $result=$db->query($sql); if($result->num_rows) { foreach( $result->row AS $key=>$val){ $$key = $val; } $delsql = "DELETE FROM tbl_item_rent WHERE i_item_rentID = '".$_REQUEST['i_item_rentID']."' AND i_itemID = '".$_REQUEST['i_itemID']."' "; $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>Booking between '.date(DATE_FORMAT_FANCY_TIME, strtotime($rent_startDate)).' , '.date(DATE_FORMAT_FANCY_TIME, strtotime($rent_endDate)).' has been deeted successfully.; </div>'; $_SESSION['msg'] = $PROMPT; header('Location: '.SUB_DIR_PROJECT.'/admin/order/mix_rv_rentlist.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>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"> <form method="post" enctype="multipart/form-data"> <div class=""> <div class="card-header d-flex align-items-center"> <h4>Mix RV Rent List </h4> </div> <?php $SUB_SQL = ''; $search_keyword = ''; if( (isset( $_REQUEST['submitSearchForm']) && $_REQUEST['submitSearchForm'] == 'yes' && ( !empty($_REQUEST['search_keyword']))) || ( $_GET['search_keyword'] !='' ) ){ $search_keyword = $_REQUEST['search_keyword']; $SUB_SQL .= " AND ( " ; $SUB_SQL .= " Reg.`first_name` LIKE '%".$_REQUEST['search_keyword']."%' " ; $SUB_SQL .= " OR Reg.`last_name` LIKE '%".$_REQUEST['search_keyword']."%' " ; $SUB_SQL .= " OR Reg.`phone` LIKE '%".$_REQUEST['search_keyword']."%' " ; $SUB_SQL .= " OR R.`rent_startDate` LIKE '%".$_REQUEST['search_keyword']."%' " ; $SUB_SQL .= " OR R.`rent_endDate` 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 Name, Date(YYYY-mm-dd), Phone ..." > </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 = "R.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&search_keyword=".$_REQUEST['search_keyword']; $query1 = "SELECT count( * ) as total FROM tbl_item_rent R LEFT JOIN tbl_items AS I ON ( R.i_itemID = I.i_itemID ) LEFT JOIN tbl_register AS Reg ON ( R.i_addedByUserID = Reg.i_customerID ) where 1 ".$SUB_SQL; $query2 = "SELECT R.*, I.v_title, I.brand, Reg.first_name, Reg.last_name, Reg.email, Reg.phone FROM tbl_item_rent R LEFT JOIN tbl_items AS I ON ( R.i_itemID = I.i_itemID ) LEFT JOIN tbl_register AS Reg ON ( R.i_addedByUserID = Reg.i_customerID ) where 1 ".$SUB_SQL; $query2.=" order by $sort_by $sort_order limit $page, $MAX "; //echo "<BR/>"; echo $query1; //exit; //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>RV</th> <th>Customer</th> <th>Phone</th> <th>Start Date</th> <th>End Date</th> <th>Status</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 $val['first_name']; ?> <?php echo $val['last_name']; ?></td> <td><?php echo $val['phone'];; ?></td> <td><?php echo date(DATE_FORMAT_FANCY_TIME, strtotime($val['rent_startDate'])); ?></td> <td><?php echo date(DATE_FORMAT_FANCY_TIME, strtotime($val['rent_endDate'])); ?></td> <td><?php echo $RENT_ARR_STATUS[$val['c_status']]; ?></td> <td > <a href="<?php echo $SITE_URL; ?>/admin/order/mix_rv_rentlist.php?action=del&i_item_rentID=<?php echo $val['i_item_rentID']; ?>&i_itemID=<?php echo $val['i_itemID']; ?>" 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_rentedit.php?action=edit&i_item_rentID=<?php echo $val['i_item_rentID']; ?>" 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_rentlist.php?page=$prevpage&$next_links' class=menulink>Prev Page</a> |"; } if($TOTAL_RECORDSET > $lastrow) { $NEXT_PAGE_LINK="| <a href='mix_rv_rentlist.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_rentlist.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>