MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.143.237.140
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/arkey.shop/../theservicemen.co.in/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/arkey.shop/../theservicemen.co.in/admin/manage_query.php
<?php
include_once 'session.php';
?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Admin</title>

    <!-- Custom fonts for this template-->
    <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link ref="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
        rel="stylesheet">

    <!-- Custom styles for this template-->
    <link href="css/sb-admin-2.min.css" rel="stylesheet">
                  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
 


    <style>
        div.dataTables_wrapper div.dataTables_filter input {
            box-shadow: 0px 0 0 !important;
            transform: translate(-123px,1px);
        }
        .open
        {
            background-color:green; 
            padding:5px; 
            color:white;
        }
        .pending
        {
            background-color:#e1dd62;
            padding:5px; 
            color:white;
        }
        .closed
        {
            background-color:#d11d1d;
            padding:5px; 
            color:white; 
        }
        .lead
        {
           background-color:#6266e1;
            padding:5px; 
            color:white; 
        }
        .card form
        {
            margin-top:20px;
            text-align:center;
        }
    </style>

    
    <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
     <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
   


</head>

<body id="page-top">

    <!-- Page Wrapper -->
    <div id="wrapper">

       <?php include_once('side-bar.php')?>

        <!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

            <!-- Main Content -->
            <div id="content">

                <!-- Topbar -->
                <?php include_once('topbar.php');?>
                <!-- End of Topbar -->

                <!-- Begin Page Content -->
                <div class="container-fluid">

                    <!-- Page Heading -->
                    <div class="d-sm-flex align-items-center justify-content-between mb-4">
                    <!--    <h1 class="h3 mb-0 text-gray-800 fas fa-book">Service List</h1>-->
                    <!--    <a href="add-service.php" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i-->
                    <!--            class="fas fa-plus fa-sm text-white-50"></i> Add New Service</a>-->
                    <input type="button" class="btn btn-success m-2" onclick="export_data()" value="Download data" >
                        
                    </div>
                    <?php
                    include_once('config.php');
                    $sub_sql="";
$toDate=$fromDate="";
if(isset($_POST['submit'])){
	$from=$_POST['from'];
	$fromDate=$from;
	$fromArr=explode("/",$from);
	$from=$fromArr['2'].'-'.$fromArr['1'].'-'.$fromArr['0'];
	$from=$from." 00:00:00";
	
	$to=$_POST['to'];
	$toDate=$to;
	$toArr=explode("/",$to);
	$to=$toArr['2'].'-'.$toArr['1'].'-'.$toArr['0'];
	$to=$to." 23:59:59";
	
	$sub_sql= " where datetime >= '$from' && datetime <= '$to' ";
}
$res=mysqli_query($db,"select * from tb7_user_issue $sub_sql order by id desc"); 
                    
                    ?>
                    
                    <!-- DataTales Example -->
                    <div class="card shadow mb-4">
<!--                        <form name="frmSearch" method="POST" ">-->
<!--	 <p class="search_input">-->
<!--		<input type="date" placeholder="From Date" id="post_at" name="from_date"  value="<?php echo $post_at; ?>" class="input-control" />-->
<!--	    <input type="date" placeholder="To Date" id="post_at_to_date" name="to_date" style="margin-left:10px"  value="<?php echo $post_at_to_date; ?>" class="input-control"  />			 -->
<!--		<input type="submit" name="date_submit" value="Search" >-->
<!--	</p>-->
<!--</form>-->
	<form method="post">
		<label for="from">From</label>
		<input type="text" id="from" name="from" required value="<?php echo $fromDate?>">
		<label for="to">to</label>
		<input type="text" id="to" name="to" required value="<?php echo $toDate?>">
		<input type="submit" name="submit" value="Filter">
	</form>
                        <div class="card-body">
                            
                            <div class="table-responsive">
                                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                                    <thead>
                                        <tr>
                                            <th>Complaint No.</th>
                                            <th>Name</th>
                                            <th>Email</th>
                                            <th>Phone</th>
                                            <!--<th>Alt Phone</th>-->
                                            <th>Service</th>
                                            <!--<th>Product Company Name</th>-->
                                            <!--<th>image</th>-->
                                            <th>Address</th>
                                            <!--<th>State</th>-->
                                            <!--<th>City</th>-->
                                            <!--<th>District</th>-->
                                            <!--<th>Tehsil</th>-->
                                            <!--<th>PIN</th>-->
                                            <th>Date And Time</th>
                                            <!--<th>Status</th>-->
                                            <th>Action</th>
                                        </tr>
                                    </thead>
                                   
                                    <tbody>
                                        <?php
                                            if(mysqli_num_rows($res)>0){
                                            while($data = mysqli_fetch_assoc($res)){
                                        ?>
                                        <tr>
                                            <td>20230<?php echo $data['id']?></td>
                                            <td><?php echo $data['name']?></td>
                                            <td><?php echo $data['email']?></td>
                                            <td><?php echo $data['phone']?></td>
                                            <!--<td><a href="tel:<?php echo $data['alt_phone']?>"><?php echo $data['alt_phone']?></a></td>-->
                                            <td><?php echo $data['subject']?></td>
                                            <!--<td><?php echo $data['product_desc']?></td>-->
                                            <!--<td><a href="./img/services/<?php echo $data['image']?>" target="_child"><img width="80px" src ="./img/services/<?php echo $data['image']?>"></a></td>-->
                                            <td><?php echo $data['message']?></td>
                                            <!--<td><?php echo $data['state']?></td>-->
                                            <!--<td><?php echo $data['city']?></td>-->
                                            <!--<td><?php echo $data['district']?></td>-->
                                            <!--<td><?php echo $data['tehsil']?></td>-->
                                            <!--<td><?php echo $data['pin']?></td>-->
                                            <td><?php echo $data['datetime']?></td>
                                            <!--<td ><span style="text-transform:uppercase;" class="<?php echo $data['status']?>"><?php echo $data['status']?></span></td>-->
                                            
                                                        <td>
                                            <div style="padding-top:0px;">
                                                 <!--<a class="btn btn-success m-2" href="update_enquries.php?id=<?php echo $data['id']?>"><i class="fa fa-edit"></i></a>-->
                                            <a class="btn btn-danger m-2" href="query_delete.php?id=<?php echo $data['id']?>"><i class="fa fa-trash"></i></a>
                                            </td>
                                            </tr>
                                    
                                        
                                      
                                        <?php
                                            }
                                              }
                                            else{
                                                echo "<h1>No Data Found</h1>";
                                            }
                                        
                                        ?>
                                    </tbody>
                                </table>
                                <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
<script>
    function export_data(){
        let dataTable=document.getElementById('dataTable');
        var fb=XLSX.utils.table_to_book(dataTable,{sheet:'Sheetname'});
        XLSX.write(fb,{
            bookType:'xlsx',
            type:'base64'
        });
        XLSX.writeFile(fb, 'data.xlsx');
    }
</script>
                            </div>
                        </div>
                    </div>


                </div>
                <!-- /.container-fluid -->

            </div>
            <!-- End of Main Content -->
            
            <!-- Footer -->
            <?php include_once('footer.php')?>
            
              <!---->
             
 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
                                <script>
  $( function() {
    var dateFormat = "dd/mm/yy",
      from = $( "#from" )
        .datepicker({
          defaultDate: "+1w",
          changeMonth: true,
          numberOfMonths: 1,
		  dateFormat:"dd/mm/yy",
        })
        .on( "change", function() {
          to.datepicker( "option", "minDate", getDate( this ) );
        }),
      to = $( "#to" ).datepicker({
        defaultDate: "+1w",
        changeMonth: true,
        numberOfMonths: 1,
		dateFormat:"dd/mm/yy",
      })
      .on( "change", function() {
        from.datepicker( "option", "maxDate", getDate( this ) );
      });
 
    function getDate( element ) {
      var date;
      try {
        date = $.datepicker.parseDate( dateFormat, element.value );
      } catch( error ) {
        date = null;
      }
 
      return date;
    }
  } );
  </script>
                                <!---->

</body>

</html>

MMCT - 2023