ok

Mini Shell

Direktori : /proc/thread-self/root/home2/selectio/public_html/thedentalpark.com/admin/
Upload File :
Current File : //proc/thread-self/root/home2/selectio/public_html/thedentalpark.com/admin/contact-req.php

<?php  include "header.php";


if(isset($_GET['del_id']) && $_GET['del_id']!=''){
    
    $id = isset($_GET['del_id']) ? $_GET['del_id'] : '';
    $statement = $pdo->prepare("SELECT * FROM tbl_contact_req WHERE id=?");
	$statement->execute(array($id));
	$edit_result = $statement->fetchAll(PDO::FETCH_ASSOC);
	$edit_count = $statement->rowCount();
	
	if($edit_count > 0){
	    
	    $statement = $pdo->prepare("DELETE FROM tbl_contact_req WHERE id=?");
        $result=$statement->execute(array($id));
        if($result) {
            $_SESSION['contact_success'] = 'Contact Details Delete Successfully' ;
            header("Location:contact-req.php");
                exit;
        } else {
             $_SESSION['contact_error'] = 'Error Occured Not Delete';
             header("Location:contact-req.php");
             exit;
        }
        
	
	}else{
	  $_SESSION['contact_error'] = 'Contact Details Not Delete';
     header("Location:contact-req.php");
     exit;  
	}

}

?>

  
<div class="content-wrapper">
    
        <section class="content-header">
            <h1>Contact List</h1>
            <ol class="breadcrumb">
                <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li>
                <li class="active">Contact List</li>            
            </ol>             
        </section>

        <div class="clearfix"></div>


<section class="content">
    
    <div class="row">
        <div class="col-xs-12">
            
            <div class="row">
                <div class="col-xs-12">
                    <?php if(!empty($_SESSION['contact_error'])) { ?>
                		<div class="callout callout-danger">
                			<p> <i class="icon fa fa-warning"></i> <?php echo $_SESSION['contact_error']; ?></p>
                		</div>
            		<?php  unset($_SESSION['contact_error']); }?>
            
            		<?php if(!empty($_SESSION['contact_success'])){ ?>
                		<div class="callout callout-success">
                			<p> <i class="icon fa fa-check"></i> <?php echo $_SESSION['contact_success']; ?></p>
                		</div>
            		<?php  unset($_SESSION['contact_success']); } ?>
        		</div>
            </div>
            
            <div class="box box-primary">
                <div class="box-header">
                    <h3 class="box-title">Contact List</h3>
                </div>
                <div class="box-body">


                <div class="clearfix"></div>


                    <div class="table-responsive">
                        <table id="StData" class="table table-striped table-bordered table-condensed table-hover" style="margin-bottom:5px;">
                            <thead>
                                <tr>
                                    <td colspan="10" class="p0"><input type="text" class="form-control b0" name="search_table" id="search_table"  placeholder="Search Here" style="width:100%;background-color: darkblue;color: white;"></td>
                                </tr>
                                <tr class="active">
                                    <th>S.No</th>
                                    <th style="min-width:150px;">Name</th>
                                    <th style="min-width:100px;">Mobile No</th>
                                    <th style="min-width:150px;">Email Address</th>
                                    <th style="min-width:200px;">Subject</th>
                                    <th style="min-width:350px;">Message</th>
                                    <th style="min-width:150px;">Contact Date</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td colspan="10" class="dataTables_empty"><center> Loading Pls Wait Data</center></td>
                                </tr>
                            </tbody>
                            
                        </table>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
    
</section>

<?php include "footer.php";?>

<script type="text/javascript">
<?php
$columns = "0, 1, 2, 3, 4, 5, 6, 7, 8";
$data_table = " var search_table = $('#search_table').val();
                var college_id = $('#college_id').val();
                var course_id = $('#course_id').val();
                var specialization_id = $('#specialization_id').val();
                var table = $('#StData').DataTable({
    
                        'ajax' : { 
                            url: 'data-tables/contact-request-data-table.php', 
                            data:{search:search_table}, 
                            type: 'POST'},
                            bFilter: true,
                            bDestroy: true,
                            searching: true,pageLength: 10,
                        'buttons': [
                        { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ $columns ] } },
                        { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ $columns ] } },
                        { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ $columns ] } },
                        { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false,
                        exportOptions: { columns: [ $columns ] } },
                        { extend: 'colvis', text: 'Columns'},
                        ]
    
                    });";

?>
    $(document).ready(function() {        
        get_data();
        function get_data(){
            <?=$data_table?>
        }

        $('#search_table').keyup(function() {  
            get_data();
            document.getElementById("search_table").focus();
        });
        

    });
  

    function get_data(){
            <?=$data_table?>
    }
</script>

Zerion Mini Shell 1.0