JezK
Edit File: memberExpInterestDetail.php
<?php include_once '../databaseConn.php'; include_once './lib/requestHandler.php'; $DatabaseCo = new DatabaseConn(); include_once '../class/Config.class.php'; $configObj = new Config(); $email_status = ""; if(isset($_GET['email_status'])) { $email_status = $_GET['email_status']; $_SESSION['email_status'] = $_GET['email_status']; } else if(isset($_GET['page'])) { $email_status = $_SESSION['email_status']; } else { $_SESSION['email_status'] = "all"; $email_status = "all"; } $isPostBack = ($_SERVER["REQUEST_METHOD"]==="POST"); if($isPostBack) { $ACTION = isset($_POST['action']) ? $_POST['action'] :"" ; if(isset($_POST['msg_id']) && is_array($_POST['msg_id'])) { $msg_id_arr = $_POST['msg_id']; $msg_id_val = "("; foreach($msg_id_arr as $msg_id) { $msg_id_val .= $msg_id.","; } $msg_id_val = substr($msg_id_val, 0, -1); $msg_id_val .=")"; switch($ACTION) { case 'DELETE': $SQL_STATEMENT = "delete from chat where id in ".$msg_id_val; break; } $statusObj = handle_post_request("UPDATE",$SQL_STATEMENT,$DatabaseCo); $STATUS_MESSAGE = $statusObj->getStatusMessage(); } else { $statusObj = new Status(); $statusObj->setActionSuccess(false); $STATUS_MESSAGE = "Please select value to complete action."; } } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Manage | Most Expressed Profile </title> <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> <!-- Bootstrap 3.3.2 --> <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <!-- Font Awesome Icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <!-- DATA TABLES --> <link href="plugins/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" /> <!-- Theme style --> <link href="dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" /> <!-- AdminLTE Skins. Choose a skin from the css/skins folder instead of downloading all of them to reduce the load. --> <link href="dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="css/all_check.css"/> <link href="plugins/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/util/redirection.js"></script> <link rel="stylesheet" type="text/css" href="css/libs/nifty-component.css"/> </head> <body class="skin-blue"> <div class="wrapper"> <?php include "page-part/header.php"; ?> <!-- Left side column. contains the logo and sidebar --> <?php include "page-part/left_panel.php"; ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-lg-12 col-xs-12 col-sm-12"> <?php $main_menu_count = getRowCount("select count(id) from chat".getWhereClauseForStatus($email_status),$DatabaseCo); if($main_menu_count>0) { $SQL_STATEMENT = "SELECT *, COUNT(*) AS `Rows`, `selected_member_id` FROM `selected_profiles` GROUP BY `selected_member_id` ORDER BY `Rows` DESC"; ?> <div class="col-xs-12"> <!-- /.box --> <div class="box"> <div class="box-header"> <h3 class="box-title"><?php echo strtoupper($email_status); ?> Most Expressed Profile List</h3> </div><!-- /.box-header --> <div class="box-body"> <form method="post" action="memberschat" id="action_form"> <table id="example" class="table table-bordered table-striped"> <thead> <tr> <th>S.NO </th> <th>User Name</th> <th>Full Name</th> <th>Mobile Number</th> <th>Gender</th> <th>No of Interests Received</th> <th>Details</th> </tr> <div id="result"></div> </thead> <tbody> <?php $DatabaseCo->dbResult=$DatabaseCo->getSelectQueryResult($SQL_STATEMENT); $rowCount=0; $ii=1; while($DatabaseCo->dbRow = mysqli_fetch_object($DatabaseCo->dbResult)) { $to=mysqli_query($DatabaseCo->dbLink,"select * from register where index_id='".$DatabaseCo->dbRow->selected_member_id."'"); $data_to=mysqli_fetch_array($to); ?> <tr> <td><?php echo $ii++; ?></td> <td><?php echo $data_to['matri_id'];?></td> <td><?php echo $data_to['firstname'].' '.$data_to['lastname'];?></td> <td><?php echo $data_to['mobile'];?></td> <td><?php echo $data_to['gender'];?></td> <td><?php echo $DatabaseCo->dbRow->Rows;?></td> <td><a href="memberFullProfile?index_id=<?php echo $DatabaseCo->dbRow->selected_member_id;?>" class="btn btn-success" target="_blank">View Profile</a> <a href="memberinterests?selected_member_id=<?php echo $DatabaseCo->dbRow->selected_member_id;?>" class="btn btn-default" target="_blank">View Members</a></td> </tr> <?php } ?> </tbody> </table> <input type="hidden" name="action" value="" id="action"/> </form> </div><!-- /.box-body --> </div><!-- /.box --> </div> <?php } else { ?> <div class="col-lg-12 col-xs-12 col-sm-12"> <h4>There are no data for <?php echo strtoupper($email_status); ?> Message. Please add data.</h4> <br/> <img src="../img/no-data.png" alt="No Data" style="border: 2px solid #ccc;"/> </div> <?php } ?> <!-- /.col --> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php include "page-part/footer.php"; ?> </div><!-- ./wrapper --> <!-- jQuery 2.1.3 --> <script src="plugins/jQuery/jQuery-2.1.3.min.js"></script> <script src="dist/assets/javascripts/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script> <script src="dist/assets/javascripts/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script> <!-- Bootstrap 3.3.2 JS --> <script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <!--jquery for left menu active class--> <script type="text/javascript" src="dist/js/general.js"></script> <script type="text/javascript" src="dist/js/cookieapi.js"></script> <script type="text/javascript"> setPageContext("useractivity","memexpDel"); </script> <!--jquery for left menu active class end--> <!-- DATA TABES SCRIPT --> <script src="plugins/datatables/jquery.dataTables.js" type="text/javascript"></script> <script src="plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script> <!-- AdminLTE App --> <script src="dist/js/app.min.js" type="text/javascript"></script> <!--3D Slit effect pop js--> <script src="js/classie.js"></script> <script src="js/modalEffects.js"></script> <!--ends--> <!-- page script --> <script type="text/javascript"> /* $(function () { var refreshRequired = false; $("input[name=msg_id]").click(function(){ $("#selectall").prop("checked", false); }); // js for Check/Uncheck all CheckBoxes by Checkbox // $("#selectall").click(function(){ $(".second").prop("checked",$("#selectall").prop("checked")) }) $('#example1').dataTable({ "aaSorting": [ [3,'desc'] ], 'aoColumnDefs': [{ 'bSortable': false, 'info': true, "paging": true, 'aTargets': [0,1,2,], 'pageLength': 10 }] } ); });*/ $('#example').dataTable(); var refreshRequired = false; $("input[name=msg_id]").click(function(){ $("#selectall").prop("checked", false); }); // js for Check/Uncheck all CheckBoxes by Checkbox // $("#selectall").click(function(){ $(".second").prop("checked",$("#selectall").prop("checked")) }) var dataTable = $('#example1').DataTable( { "processing": true, "serverSide": true, "aaSorting": [ [5,'desc'] ], "columnDefs": [ { "orderable": false, "targets": [0,1,2] } ], "ajax":{ url :"web-services/processing/memberchats?status=<?php echo $_SESSION['email_status'];?>", // json type: "post", // method , by default get error: function() { // error handling $(".table").html(""); $("#example1").append('<tbody class="table"><tr><th colspan="6">No data found in the server</th></tr></tbody>'); $("#example1_processing").css("display","none"); } } }); </script> </body> </html>