Mini Shell

Direktori : /home/rizant5/public_html-1210/admin/
Upload File :
Current File : /home/rizant5/public_html-1210/admin/online-userdata-ajax.php

<?php
require_once("../config.php");
$data="select * from student_reg a left join courses b on a.course_id=b.course_id where pay_mode='Online'";
if(!empty($_POST['course_id']))
{$data .=" and a.course_id='$_POST[course_id]'";}
 $data=$conn->prepare($data);$data->execute();$result=$data->fetchall();
?>
<table class="table table-bordered table-striped dataTable" id="data-table">
                  <thead><tr><th>Course</th><th>Subscription Date</th><th>Name</th><th>Email ID</th><th>Phone No</th><th>School</th><th>City</th><th>Status</th><th>Action</th></tr></thead>
                 <tbody>
                 	<?php $i=1;
					foreach($result as $row){
						echo "<tr>";
                                                echo "<td>$row[course_name]</td>";
                                                echo "<td>";if($row['start_date']!='0000-00-00'){echo date('d-M-Y', strtotime($row['start_date']));}echo"</td>";
						echo "<td>$row[stu_name]</td>";
						echo "<td>$row[stu_email]</td>";
						echo "<td>$row[stu_phone]</td>";
						echo "<td>$row[school]</td>";
						echo "<td>$row[city]</td>";
						echo "<td>";if($row['stu_status']=='0'){?><a href='online-user.php?action=active&stu_id=<?php echo $row['stu_id'];?>' onclick="return confirm('Are you sure you want to active this user?')" title='Deactive' class='btn btn-warning btn-xs'>Deactive</a>&nbsp;&nbsp;<?php }else{?><a href='online-user.php?action=deactive&stu_id=<?php echo $row['stu_id'];?>' onclick="return confirm('Are you sure you want to deactive this user?')" title='active' class='btn btn-primary btn-xs'>Active</a><?php } echo"</td>";echo"</td>";?>
						<td>
                            <a href='payment-info.php?stu_id=<?php echo $row['stu_id'];?>' title='Payment Info' class='btn btn-info btn-xs'>Pyamnet Info</a>&nbsp;&nbsp;
                            <a href='online-user.php?action=delete&stu_id=<?php echo $row['stu_id'];?>' onclick="return confirm('Are you sure you want to delete?')" title='Delete User' class='btn btn-danger btn-xs'>Delete</a>
                            <?php
                            if($row['stu_status']=='0'){?><a href='online-user.php?action=resume&stu_id=<?php echo $row['stu_id'];?>' onclick="return confirm('Are you sure you want to resume this user?')" title='Resume' class='btn btn-warning btn-xs'>Resume</a>&nbsp;&nbsp;<?php }else{?><a href='online-user.php?action=halt&stu_id=<?php echo $row['stu_id'];?>' onclick="return confirm('Are you sure you want to halt this user?')" title='Halt' class='btn btn-primary btn-xs'>Halt</a><?php }
                            ?>
                        </td><?php
						echo "</tr>";
						$i++;
					}
					?>
                 </tbody>
                 </table>
<script>
$('#data-table').dataTable({
     responsive: true,
	  "ordering": false,
     "dom": 'T<"clear">lfrtip',
     "tableTools": {
           "sSwfPath": "../apptheme/plugins/datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
		   "aButtons": [
            {
                "sExtends": "copy",
                "mColumns": [0, 1, 2, 3, 4, 5]
            },
   			{
                "sExtends": "xls",
                "mColumns": [0, 1, 2, 3, 4, 5]
            },
                        {
                "sExtends": "pdf",
               "mColumns": [0, 1, 2, 3, 4, 5]
            },
        ]
      }
});
</script>

Zerion Mini Shell 1.0