GOOGLE
<?php include('header.php');
if($_SESSION['user_id']==""){ ?>
<script>
window.location.href='../loginpage.php';
</script>
<?php } ?>
<?php include('navbar_user.php'); ?>
<div class="container">
<div class="margin-top">
<div class="row">
<!-- <div class="span2">
<ul class="nav nav-tabs nav-stacked">
<li>
<a href="#add_user" data-toggle="modal" ><i class="icon-plus icon-large"></i> <strong>Add User</strong></a>
</li>
</ul>
<?php //include('modal_add_user.php'); ?>
</div> -->
<?php $name = mysql_query("SELECT * FROM `registration` WHERE `id`='".$_SESSION['user_id']."'");
$selName = mysql_fetch_array($name);?>
<div class="span12">
<table cellpadding="0" cellspacing="0" border="0" class="table table-bordered" id="example">
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><i class="icon-user icon-large"></i> Users List <span style="color: white; float: right;">Welcome: <?php echo $selName['name'];?> <?php echo $selName['lname']?></span>
</strong>
</div>
<thead>
<tr>
<th style="background-color: green; color: white;">Sr.No.</th>
<th style="background-color: green; color: white;">Name</th>
<th style="background-color: green; color: white;">Email ID</th>
<th style="background-color: green; color: white;">Mobile No</th>
<th style="background-color: green; color: white;">Class</th>
<th style="background-color: green; color: white;">Designation</th>
<th style="background-color: green; color: white;">Image</th>
<th style="background-color: green; color: white;">Approve</th>
<th style="background-color: green; color: white;">Approved Date</th>
<th style="background-color: green; color: white;">Suspended Date</th>
</tr>
</thead>
<tbody>
<?php $user_query=mysql_query("select * from `registration` WHERE `designation`='Student' OR `designation`='Teacher'")or die(mysql_error());
$i=1;
while($row=mysql_fetch_array($user_query)){
$id=$row['user_id'];
$img = $row['image']; ?>
<tr class="del<?php echo $id ?>">
<td><?php echo $i;?></td>
<td><?php echo $row['name']; echo " "; echo $row['lname']; ?></td>
<td><?php echo $row['email_id']; ?></td>
<td><?php echo $row['mobile_no']; ?></td>
<td><?php echo $row['class']; ?></td>
<td><?php echo $row['designation']; ?></td>
<td><img src="../<?php echo $row['image'];?>" width="80"></td>
<td width="100">
<?php if($row['approve']=='0'){?>
<a href="approve.php?id=<?php echo $row['id'];?>" rel="tooltip" title="Approve" id="edit" onclick="return confirm('Are you sure you want to Approve?')" class="btn btn-success">Approve</a>
<?php }else{ ?>
<a rel="tooltip" title="Suspend" href='suspended.php?id=<?php echo $row['id'];?>' onclick="return confirm('Are you sure you want to Suspend?')" class="btn btn-danger">Suspend</a>
<?php } ?>
</td>
<td><b style="color: green;"><?php echo $row['approval_date']; ?></b></td>
<td><b style="color: red;"><?php echo $row['suspended_date']; ?></b></td>
<?php include('toolttip_edit_delete.php'); ?>
<!-- Modal edit user -->
</tr>
<?php $i++; } ?>
</tbody>
</table>
<div id="edit" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-body">
<div class="alert alert-info"><strong>Edit User</strong></div>
<div id="app"></div>
</div>
</div>
</div>
<script type="text/javascript">
/* $(document).ready( function() {
$('.btn-danger').click( function() {
var id = $(this).attr("id");
if(confirm("Are you sure you want to delete this Data?")){
$.ajax({
type: "POST",
url: "delete_user.php",
data: ({id: id}),
cache: false,
success: function(html){
$(".del"+id).fadeOut('slow');
}
});
}else{
return false;}
});
}); */
function Approvaajax(id)
{
var id = +id;
$.ajax({
type: 'post',
url: 'modal_edit_user.php',
data: {
id:id,
},
success: function (data) {
alert(html);
// We get the element having id of display_info and put the response inside it
$( '#app' ).html(data);
}
});
}
</script>
</script>
</div>
</div>
</div>
</div>
<?php include('footer.php') ?>
Copyright © 1945 -