MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.144.249.63
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/ppcad7no/gujarataxi.com/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/gujarataxi.com/admin/manage-booking.php
<?php require_once("header.php");?>
<?php require_once("left-nav.php");?>
<style>
.v-middle {
vertical-align:middle !important;
}
</style>

<?php                  
$web_site=db_scalar("select admin_website_url from tbl_admin where 1 and admin_user_type='Admin' ");
$phone=db_scalar("select admin_phone from tbl_admin where 1 and admin_user_type='Admin' ");
$mobile=db_scalar("select admin_mobile from tbl_admin where 1 and admin_user_type='Admin' ");
$email=db_scalar("select admin_email from tbl_admin where 1 and admin_user_type='Admin' ");
$comp_name=db_scalar("select admin_company_name from tbl_admin where 1 and admin_user_type='Admin' ");

?>
<?php
if($st!=""){
$st=$_REQUEST['st'];
$pageID=$_REQUEST['pid'];

if($st==1){
$sql="UPDATE tbl_registration SET reg_status='Inactive' WHERE reg_id='$pageID' ";   
$res=db_query($sql); 
if($res>0){
$_SESSION["msg"]="Selected user is deactivated successfully."; 


$mail_inactive=mysqli_fetch_array(db_query("select * from tbl_registration where 1 and reg_id='$pageID' "));

         ///////////////****** Mailer to client start here **********************//////////////
   $hostName = $_SERVER['HTTP_HOST'];          
   
$msgmail="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<title>TradeKeyIndia.com-Largest B2B Portal In India</title>
 </head>
<body>
<h2 style='font-family:Constantia; background-color:red; color:white; text-align:center; text-transform:uppercase;'>warning</h2>

<h2 style='font-family:Constantia;'>Dear $mail_inactive[reg_name],</h2>

<p style='font-family:Courier New; font-size:16px;'>Your account has been deactivated by admin due to our terms and conditions.</p>

<p style='font-family:Courier New; font-size:16px;'>Login Details as Below:-</p>

<p style='font-family:Courier New; font-size:16px;'>

<table border='0'>
<tr><td style='font-family:Courier New; font-size:16px;'>Website</td><td style='font-family:Courier New; font-size:16px;'>:  $web_site</td></tr>
<tr><td style='font-family:Courier New; font-size:16px;'>Login ID</td><td style='font-family:Courier New; font-size:16px;'>:  $mail_inactive[reg_email]</td></tr>
<tr><td style='font-family:Courier New; font-size:16px;'>Password</td><td style='font-family:Courier New; font-size:16px;'>:  $mail_inactive[reg_pass]</td></tr>
</table>
</p>
<p style='font-family:Courier New; font-size:16px;'>We are always here to assist you.</p>
<p style='font-family:Courier New; font-size:16px;'>Customer Support :</p>
<p style='font-family:Courier New; font-size:16px;'>Email Address : $email</p>
<p style='font-family:Courier New; font-size:16px;'>Contact Number : $mobile </p>

</body>
</html>";
//$toEmail = $email;
$toEmail = $mail_inactive['reg_email'];
$subject = "Account deactivated from $web_site";
              $from="$email";
            $Headers1 = "From: $comp_name<$from>\n";
            $Headers1 .= "X-Mailer: PHP/". phpversion();
            $Headers1 .= "X-Priority: 3 \n";
            $Headers1 .= "MIME-version: 1.0\n";
            $Headers1 .= "Content-Type: text/html; charset=iso-8859-1\n"; 
            @mail("$toEmail", "$subject", "$msgmail","$Headers1","-fenquiry@tradekeyindia.com");
            //@mail("amitabh.tradekeyindia@gmail.com", "Subject", "Msg1","$Headers1","-fenquiry@tradekeyindia.com");
             $toEmail."<br>";
///////////////****** Mailer to client end here **********************//////////////
///////////////// Mail To Admin //////////////////////////////////


if($email){
@mail($mail_to_admin,$sub_admin,$mail_admin_body,$headers_admin);
 }

}  
}else{
$sql="UPDATE tbl_registration SET reg_status='Active' WHERE reg_id='$pageID' ";  
$res=db_query($sql); 
if($res>0){
$_SESSION["msg"]="Selected user is activated successfully.";   


$mail_active=mysqli_fetch_array(db_query("select * from tbl_registration where 1 and reg_id='$pageID' "));

         ///////////////****** Mailer to client start here **********************//////////////
   $hostName = $_SERVER['HTTP_HOST'];          
   
$msgmail="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<title>TradeKeyIndia.com-Largest B2B Portal In India</title>
 </head>
<body>

<h2 style='font-family:Constantia;'>Dear $mail_active[reg_name],</h2>

<p style='font-family:Courier New; font-size:16px;'>Your account has been activated, now you can login with following details.</p>

<p style='font-family:Courier New; font-size:16px;'>Login Details as Below:-</p>

<p style='font-family:Courier New; font-size:16px;'>

<table border='0'>
<tr><td style='font-family:Courier New; font-size:16px;'>Website</td><td style='font-family:Courier New; font-size:16px;'>:  $web_site</td></tr>
<tr><td style='font-family:Courier New; font-size:16px;'>Login ID</td><td style='font-family:Courier New; font-size:16px;'>:  $mail_active[reg_email]</td></tr>
<tr><td style='font-family:Courier New; font-size:16px;'>Password</td><td style='font-family:Courier New; font-size:16px;'>:  $mail_active[reg_pass]</td></tr>
</table>
</p>
<p style='font-family:Courier New; font-size:16px;'>We are always here to assist you.</p>
<p style='font-family:Courier New; font-size:16px;'>Customer Support :</p>
<p style='font-family:Courier New; font-size:16px;'>Email Address : $email</p>
<p style='font-family:Courier New; font-size:16px;'>Contact Number : $mobile </p>
</body>
</html>";
//$toEmail = $email;
$toEmail = "$mail_active[reg_email]";
$subject = "Account activated from $web_site";
              $from="$email";
            $Headers1 = "From: $comp_name<$from>\n";
            $Headers1 .= "X-Mailer: PHP/". phpversion();
            $Headers1 .= "X-Priority: 3 \n";
            $Headers1 .= "MIME-version: 1.0\n";
            $Headers1 .= "Content-Type: text/html; charset=iso-8859-1\n"; 
            @mail("$toEmail", "$subject", "$msgmail","$Headers1","-fenquiry@tradekeyindia.com");
            //@mail("amitabh.tradekeyindia@gmail.com", "Subject", "Msg1","$Headers1","-fenquiry@tradekeyindia.com");
             $toEmail."<br>";
///////////////****** Mailer to client end here **********************//////////////
///////////////// Mail To Admin //////////////////////////////////


if($email){
@mail($mail_to_admin,$sub_admin,$mail_admin_body,$headers_admin);
 }
}  
   
}

header("location:manage-booking.php");
exit;
}
?>

<?php
$del_id=$_GET['del_id'];
if($del_id!=""){

$sql="DELETE FROM tbl_registration  WHERE reg_id='$del_id' ";  
$res=db_query($sql); 
if($res>0){
$_SESSION["msg"]="Selected user is deleted successfully.";  

}

header("location:manage-booking.php");
exit;
}
?>




<?php
if(is_post_back()) {
     $Arr_size=sizeof($arr_ids);
     
   $arr_ids = $_REQUEST['arr_ids'];
   if(is_array($arr_ids)) {
      $str_ids = implode(',', $arr_ids); 
      if(isset($_REQUEST['Delete']) || isset($_REQUEST['Delete_x']) ) {
         db_query("delete from  tbl_registration where reg_id in ($str_ids)");
      } else if(isset($_REQUEST['Activate']) || isset($_REQUEST['Activate_x']) ) {
         $res=db_query("update  tbl_registration set reg_status = 'Active' where reg_id in ($str_ids)");
           
           if($res>0){
      //   $_SESSION["msg"]="Selected user is actived successfully.";
              for($i=0; $i<$Arr_size; $i++)
    {
 
$mail_active=mysqli_fetch_array(db_query("select * from tbl_registration where 1 and reg_id='$arr_ids[$i]' "));

         ///////////////****** Mailer to client start here **********************//////////////
   $hostName = $_SERVER['HTTP_HOST'];          
   
$msgmail="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<title>TradeKeyIndia.com-Largest B2B Portal In India</title>
 </head>
<body>

<h2 style='font-family:Constantia;'>Dear $mail_active[reg_name],</h2>

<p style='font-family:Courier New; font-size:16px;'>Your account has been activated, now you can login with following details.</p>

<p style='font-family:Courier New; font-size:16px;'>Login Details as Below:-</p>

<p style='font-family:Courier New; font-size:16px;'>

<table border='0'>
<tr><td style='font-family:Courier New; font-size:16px;'>Website</td><td style='font-family:Courier New; font-size:16px;'>:  $web_site</td></tr>
<tr><td style='font-family:Courier New; font-size:16px;'>Login ID</td><td style='font-family:Courier New; font-size:16px;'>:  $mail_active[reg_email]</td></tr>
<tr><td style='font-family:Courier New; font-size:16px;'>Password</td><td style='font-family:Courier New; font-size:16px;'>:  $mail_active[reg_pass]</td></tr>
</table>
</p>
<p style='font-family:Courier New; font-size:16px;'>We are always here to assist you.</p>
<p style='font-family:Courier New; font-size:16px;'>Customer Support :</p>
<p style='font-family:Courier New; font-size:16px;'>Email Address : $email</p>
<p style='font-family:Courier New; font-size:16px;'>Contact Number : $mobile / $phone</p>
</body>
</html>";
//$toEmail = $email;
$toEmail = "$mail_active[reg_email]";
$subject = "Account activated from $web_site";
              $from="$email";
            $Headers1 = "From: $comp_name<$from>\n";
            $Headers1 .= "X-Mailer: PHP/". phpversion();
            $Headers1 .= "X-Priority: 3 \n";
            $Headers1 .= "MIME-version: 1.0\n";
            $Headers1 .= "Content-Type: text/html; charset=iso-8859-1\n"; 
            @mail("$toEmail", "$subject", "$msgmail","$Headers1","-fenquiry@tradekeyindia.com");
            //@mail("amitabh.tradekeyindia@gmail.com", "Subject", "Msg1","$Headers1","-fenquiry@tradekeyindia.com");
             $toEmail."<br>";
///////////////****** Mailer to client end here **********************//////////////
///////////////// Mail To Admin //////////////////////////////////


if($email){
@mail($mail_to_admin,$sub_admin,$mail_admin_body,$headers_admin);
 } }
           $_SESSION["msg"]="Selected user is actived successfully.";     
           }
           
      } else if(isset($_REQUEST['Deactivate']) || isset($_REQUEST['Deactivate_x']) ) {
         $res=db_query("update  tbl_registration set reg_status = 'Inactive' where reg_id in ($str_ids)");
         
          if($res>0){
         //  $_SESSION["msg"]="Selected user is deactivated successfully.";   
           
                       for($j=0; $j<$Arr_size; $j++)
    {

$mail_inactive=mysqli_fetch_array(db_query("select * from tbl_registration where 1 and reg_id='$arr_ids[$j]' "));

         ///////////////****** Mailer to client start here **********************//////////////
   $hostName = $_SERVER['HTTP_HOST'];          
   
$msgmail="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<title>TradeKeyIndia.com-Largest B2B Portal In India</title>
 </head>
<body>
<h2 style='font-family:Constantia; background-color:red; color:white; text-align:center; text-transform:uppercase;'>warning</h2>

<h2 style='font-family:Constantia;'>Dear $mail_inactive[reg_name],</h2>

<p style='font-family:Courier New; font-size:16px;'>Your account has been deactivated by admin due to our terms and conditions.</p>

<p style='font-family:Courier New; font-size:16px;'>Login Details as Below:-</p>

<p style='font-family:Courier New; font-size:16px;'>

<table border='0'>
<tr><td style='font-family:Courier New; font-size:16px;'>Website</td><td style='font-family:Courier New; font-size:16px;'>:  $web_site</td></tr>
<tr><td style='font-family:Courier New; font-size:16px;'>Login ID</td><td style='font-family:Courier New; font-size:16px;'>:  $mail_inactive[reg_email]</td></tr>
<tr><td style='font-family:Courier New; font-size:16px;'>Password</td><td style='font-family:Courier New; font-size:16px;'>:  $mail_inactive[reg_pass]</td></tr>
</table>
</p>
<p style='font-family:Courier New; font-size:16px;'>We are always here to assist you.</p>
<p style='font-family:Courier New; font-size:16px;'>Customer Support :</p>
<p style='font-family:Courier New; font-size:16px;'>Email Address : $email</p>
<p style='font-family:Courier New; font-size:16px;'>Contact Number : $mobile / $phone</p>

</body>
</html>";
//$toEmail = $email;
$toEmail = $mail_inactive['reg_email'];
$subject = "Account deactivated from $web_site";
              $from="$email";
            $Headers1 = "From: $comp_name<$from>\n";
            $Headers1 .= "X-Mailer: PHP/". phpversion();
            $Headers1 .= "X-Priority: 3 \n";
            $Headers1 .= "MIME-version: 1.0\n";
            $Headers1 .= "Content-Type: text/html; charset=iso-8859-1\n"; 
            @mail("$toEmail", "$subject", "$msgmail","$Headers1","-fenquiry@tradekeyindia.com");
            //@mail("amitabh.tradekeyindia@gmail.com", "Subject", "Msg1","$Headers1","-fenquiry@tradekeyindia.com");
             $toEmail."<br>";
///////////////****** Mailer to client end here **********************//////////////
///////////////// Mail To Admin //////////////////////////////////


if($email){
@mail($mail_to_admin,$sub_admin,$mail_admin_body,$headers_admin);
 } }
   $_SESSION["msg"]="Selected user is deactivated successfully."; 
           }
           
      }
   }

   header("Location: ".$_SERVER['HTTP_REFERER']);
   exit;
}


if($_REQUEST['search_value'])
{
 $search_con="and booking_user_name like '%$_REQUEST[search_value]%' OR booking_user_email like '%$_REQUEST[search_value]%' OR booking_user_mobile like '%$_REQUEST[search_value]%' ";
 
}


$start = intval($start);
$pagesize = intval($pagesize)==0?$pagesize=DEF_PAGE_SIZE:$pagesize;

$order_by == '' ? $order_by = 'booking_id' : true;
$order_by2 == '' ? $order_by2 = 'desc' : true;
 
$sql = "select * from  tbl_booking   where 1 $search_con";
$sql = apply_filter($sql, $reg_name, 'like','booking_package_name');
$sql .= " order by $order_by $order_by2 ";
$sql .= " limit $start, $pagesize ";
//echo $sql;
$pager = new midas_pager_sql($sql, $pagesize, $start);
if($pager->total_records) {
   $result = db_query($sql);
}
?>

<script language="JavaScript" type="text/javascript" src="../includes/general.js"></script>

         <!-- =============================================== -->
         <!-- Content Wrapper. Contains page content -->
         <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
               <div class="header-icon">
                  <i class="fa fa-user-circle-o" aria-hidden="true"></i>

               </div>
               <div class="header-title">
                  <h1>Booking
                  
<?php /*?><a href="add-user.php"><button class="btn btn-success pull-right bold " ><i class="fa fa-user-circle-o fa-lg font-black"></i> Add User</button></a><?php */?>

                  
                  </h1>
                  <small>Booking List</small>

                  
                  
               </div>


           
               
            </section>
            <!-- Main content -->
            <section class="content">


              <div class="row">
    
    <div class="col-lg-6">
<form action="" method="get">
    <input type="text" required name="search_value" value="<?=$_REQUEST['search_value']?>" placeholder="Name/Email/Phone">
    <input type="submit" value="Search" >
<?php
if($_REQUEST['search_value']!=""){?>
<a href="manage-booking.php">Clear</a>
<?}?>
</form>
</div>

<!-- <div class="col-lg-6 text-right">
<select onchange="set_filter(this.value)">
    <option value="All" <?php if($_REQUEST['filter_value']=="All"){?> selected <?}?> >All</option>
    <option value="Inactive" <?php if($_REQUEST['filter_value']=="Inactive"){?> selected <?}?>>Inactive</option>
    <option value="Active" <?php if($_REQUEST['filter_value']=="Active"){?> selected <?}?>>Active</option>
</select>    
</div> -->



</div>

               <div class="row">

<?php if($_SESSION["msg"]!=""){?>               
<div class="alert alert-success alert-dismissable fade in text-center" style="background-color:#dff0d8;border:none; color:#000;margin:10px 0 0 0">
    <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
    <strong>Success!&nbsp;&nbsp;&nbsp;</strong> <?=$_SESSION["msg"]?>.
  </div>
<?php 
unset($_SESSION["msg"]);
}?>     

<div class="col-lg-12">

<? if($pager->total_records!=0) {?>
<div class="col-lg-6 text-left" >
<? $pager->show_displaying()?>
</div>
<div class="col-lg-6 text-right" >Records Per Page:
<?=pagesize_dropdown('pagesize', $pagesize);?>
</div>
<?php
}
?>

</div>


                  <div class="col-sm-12">
                     <div class="panel panel-bd lobidrag" data-edit-title='false' data-close='false' data-reload='false'>
                        
                        
                           
                        
                        
                        <div class="panel-heading">
                           <div class="btn-group" id="buttonexport">
                              <a href="#">
                                 <h4>Booking List</h4>
                              </a>
                           </div>
                        </div>
                        
                        



                        
                        <div class="panel-body">
                        <!-- Plugin content:powerpoint,txt,pdf,png,word,xl -->
                           <!-- Plugin content:powerpoint,txt,pdf,png,word,xl -->
<? if($pager->total_records>0) {?>                           
                           
                           <div class="table-responsive">
<form action="" method="post" enctype="multipart/form-data">                           
                              <table id="dataTableExample1" class="table table-bordered table-striped table-hover">
                                 <thead>
                                    <tr class="info">                                      
                                       <th class="text-center">S.No.</th>            
                                       <th class="text-center">User Info.</th>                                       
                                       <th class="text-center">Travel Date</th>
                                       <th class="text-center">Booking Details</th>
                                       <th class="text-center">Payment Status</th>
                                      <!--  <th class="text-center">Action</th>
                                       <th class="text-center"><input name="check_all" type="checkbox" id="check_all" value="1" onclick="checkall(this.form)" /></th> -->
                                    </tr>
                                 </thead>
                                 
<tbody>
                                   
<?
$cnt=0;
while ($line_raw = mysqli_fetch_array($result)) {
   $line = ms_display_value($line_raw);
   @extract($line);
   $css = ($css=='trOdd')?'trEven':'trOdd';
?>                                   
                                    <tr>
                            
                            
                            <td class="text-center v-middle"><?=++$cnt?></td>
                                     
<td class="text-left v-middle"> 
<p><?=$line_raw["booking_user_name"]?></p>
<p><?="<strong>Phone : </strong>".$line_raw["booking_user_mobile"]?></p>
<p><?="<strong>Email : </strong>".$line_raw["booking_user_email"]?></p>     
<p><?="<strong>Address : </strong>".$line_raw["booking_user_address"]?></p>     
</td>
                                     
<td class="text-center v-middle">
<p class="bg-yellow bold"><?=date("d M y",strtotime($line_raw["booking_date"]))?></p>
</td>


<td class="text-left v-middle">
<p><?=$line_raw["booking_package_name"]?></p>
<p><?="<strong>No of person : </strong>".$line_raw["booking_persons"]?></p>
<p><?="<strong>Seat no : </strong>".$line_raw["booking_selected_seat"]?></p>     
<p><?="<strong>Pickup Point : </strong>".$line_raw["booking_pickup_point_name"]?></p>     
<p><?="<strong>Total Amount : </strong>₹".$line_raw["booking_total_price"]?></p>     

</td>

<td class="text-center v-middle">
<span class="label-custom label label-default"><?=$line_raw["booking_payment_status"]?></span>

<?php /*if($line_raw["reg_status"]=="Active"){?>
<a href="manage-booking.php?st=1&pid=<?=$line_raw["reg_id"]?>"><span class="label-custom label label-default">Active</span></a>
<?php }else{?>
<a href="manage-booking.php?st=0&pid=<?=$line_raw["reg_id"]?>"><span class="label-danger label label-default">Inactive</span></a>
<?php }*/?>

</td>
                                   <?/*    <td class="text-center v-middle">

<!-- <p><a href="javascript:void(0);" onClick ="PopupWindowCenter('registration_detail.php?user_id=<?=$reg_id?>&user_type=<?=$reg_user_type?>', 'PopupWindowCenter',1000,400)"><strong style="font-size:12px;"><button type="button" class="btn btn-view btn-sm" ><i class="fa fa-search"></i></button></strong></a>   -->
<p><a href="registration_detail.php?user_id=<?=$reg_id?>&user_type=<?=$reg_user_type?>" target="_blank" ><strong style="font-size:12px;"><button type="button" class="btn btn-view btn-sm" ><i class="fa fa-search"></i></button></strong></a>  

</p>

<!-- <p><a href="add-user.php?reg_id=<?=$line_raw["reg_id"]?>"><button type="button" class="btn btn-add btn-sm" ><i class="fa fa-pencil"></i></button>
</a> </p> -->

<p><a href="manage-booking.php?del_id=<?=$line_raw["reg_id"]?>"><button type="button" class="btn btn-danger btn-sm" ><i class="fa fa-trash"></i></button>
</a> </p>                                         
                                       </td>


<td class="text-center v-middle"><input name="arr_ids[]" type="checkbox" id="arr_ids[]" value="<?=$reg_id?>" /></td>      
*/?>                                     
                                       
                                    </tr>
<?php
}
?>
                                    
<!-- <tr> <td colspan="6">

<button class="btn btn-danger pull-left" type="submit" name="Delete"><i class="fa fa-trash-o"></i>&nbsp;Delete</button>

<button type="submit" name="Deactivate"  class="btn btn-warning pull-right " >Make Inactive</button>

<button type="submit" name="Activate" class="btn btn-success pull-right mr5" >Make Active</button>
</td></tr>         -->                            
                                    
                                    
                                 </tbody>
</form>
                              </table>
                              
<? $pager->show_pager();?>
                                             
                              
                           </div>
<?php }else{?>
<div class="col-lg-12 msg text-center">Sorry, no records found.</div>
<?php }?>
                                  
                           
                        </div>
                     </div>
                  </div>
               </div>
               <!-- customer Modal1 -->
               
               <!-- /.modal -->
               <!-- Modal -->    
               <!-- Customer Modal2 -->
               
               <!-- /.modal -->
            </section>
            <!-- /.content -->
         </div>
<?php require_once("footer.php"); ?>

MMCT - 2023