<?php
$pgMod="student_portal";
$pgAct="view";
if(isset($_GET['action']) && trim($_GET['action'])!='')
		$pgAct=strtolower($_GET['action']);

	?>
	<div class="row-fluid"><div class="span12"><div class="top-bar">
    <h3><i class="icon-eye-open"></i> <?php echo ucwords($pgAct." ".$pgMod); ?></h3>
    </div>
    <div class="well no-padding">
        <table class="table" id="example">
            <thead>
                <tr>
                    <th>S. No</th>
                    <th>Name</th>
                    <th>Father</th>
                    <th>Department</th>
                    <!--<th>Roll No.</th>-->
                    <!--<th>Admission no</th>-->
                    <th>Mobile</th>
                    <th>Action</th>
                </tr>
            </thead>
            <tbody>
           <?php $student = $db->getRows("select * from staff where session='".$_SESSION['admin']['session']."' and status='1'  ");
                    foreach($student as $stu){ $i++; ?>
                        <tr>
                            <td><?php echo $i; ?></td>
                            <td><?php echo $stu['name']; ?></td>
                            <td><?php echo $stu['fname']; ?></td>
                            <td><?php echo $stu['experience']; ?></td>
                            <td><?php echo $stu['mobile']; ?></td>
                            <td><button class="btn btn-info" onclick="enterTeacherPortal('<?php echo $stu['idno']; ?>')">Enter</button></td>
                        </tr>
            <?php }
           ?>
            </tbody>
        </table>
	</div></div></div>

<script type="text/javascript">
    function enterTeacherPortal(idno){
    	$.post( "Exam/ajax.php", { type: "teacherportal" ,idno: idno } , function( data ) {
    	    window.location = data;
    	});
    }
</script>



