Beispiel #1
0

<a href="add.php" class="pull-right btn btn-primary btn-sm">Add Student</a>

<table class="table table-hover table-striped">
	<tr>
		<th>ID</th>
		<th>NAME</th>
		<th>EMAIL</th>
		<th>CONTACT NO</th>
		<th>COURSE</th>
		<th>ACTION</th>
	</tr>

<?php 
foreach ($studentrepository->get_all() as $student) {
    ?>
	<tr>
		<td><?php 
    echo $student->get_id();
    ?>
</td>
		<td><?php 
    echo $student->get_first_name();
    ?>
 <?php 
    echo $student->get_last_name();
    ?>
</td>
		<td><?php 
    echo $student->get_email();
Beispiel #2
0
		<th>Blood Group</th>
		<th>Email</th>
		<th>Contact</th>
		<th>Program</th>
		<th>Action</th>
	</tr>

	<?php 
// an object of class 'StudentRepository' is made here
// there, it creates objects of 'db' class and 'Student' class
// all database function is in 'db' class and is accessed using the object
// setter functions of class 'Student' are accessed from the object of 'Student'
// they are used to set the values obtained from database to the private variable in 'Student'
// then multiple objects of 'Student' is stored in array in 'StudentRepository'
// that array is returned here using the object of 'StudentRepository'
foreach ($student_info->get_all("first_name asc") as $std) {
    ?>
		<tr>
			<td><?php 
    echo $std->get_id();
    ?>
</td>
			<td><?php 
    echo $std->get_first_name() . " " . $std->get_last_name();
    ?>
</td>																									
			<td><?php 
    echo $std->get_dob();
    ?>
</td>
			<td><?php 
Beispiel #3
0
		<th>Email</th>
		<th>Contact</th>
		<th>Program</th>
		<th>Action</th>
	</tr>

	<?php 
// an object of class 'StudentRepository' is made here
// there, it creates objects of 'db' class and 'Student' class
// all database function is in 'db' class and is accessed using the object
// setter functions of class 'Student' are accessed from the object of 'Student'
// they are used to set the values obtained from database to the private variable in 'Student'
// then multiple objects of 'Student' is stored in array in 'StudentRepository'
// that array is returned here using the object of 'StudentRepository'
$student_info = new StudentRepository();
foreach ($student_info->get_all() as $std) {
    ?>
		<tr>
			<td><?php 
    echo $std->get_id();
    ?>
</td>
			<td><?php 
    echo $std->get_first_name() . " " . $std->get_last_name();
    ?>
</td>																									
			<td><?php 
    echo $std->get_dob();
    ?>
</td>
			<td><?php 
Beispiel #4
0
</div>

	<table class="table table-bordered table-striped table-hover">
		<tr>
			<th>ID</th>
			<th>NAME</th>
			<th>EMAIL</th>
			<th>CONTACT NO</th>
			<th>COURSE</th>
			<th>ACTION</th>
		</tr>
	

<?php 
$student = new StudentRepository();
foreach ($student->get_all() as $std) {
    ?>
			

		<tr>
			<td><?php 
    echo $std->get_id();
    ?>
</td>
			<td><?php 
    echo $std->get_first_name();
    ?>
 <?php 
    echo $std->get_last_name();
    ?>
</td>
Beispiel #5
0
		</tr>
		<tr>
			<th><input type="checkbox" id="select_all"/></th>
			<th>Id</th>
			<th>Full Name</th>
			<th>DOB</th>
			<th>Blood Group</th>
			<th>Email</th>
			<th>Address</th>
			<th>Contact</th>
			<th>Program</th>
			<th>Action</th>
		</tr>

		<?php 
$student_list = $repository->get_all();
foreach ($student_list as $student) {
    ?>
			<tr>
				<td><input type="checkbox" name="id" value="<?php 
    echo $student->get_id();
    ?>
"></td>
				<td><?php 
    echo $student->get_id();
    ?>
</td>
				<td><?php 
    echo $student->get_first_name();
    ?>
 <?php 
Beispiel #6
0
	<script src="assets/js/bootstrap.min.js"></script>
</head>
<body>
	<div class="container">
		<table class="table table-hover table-striped">

			<tr>
					<th><input type="checkbox" id="checkbox" name="selectall"></th>
					<th>ID</th>
					<th>Name</th>
					<th>Email</th>
					<th>Action</th>
				</tr>

		<?php 
foreach ($repository->get_all() as $value) {
    ?>
	

			
				<tr>
					<td><input type="checkbox" id="checkbox" name="selectall"></td>
					<td><?php 
    echo $value->get_id();
    ?>
</td>
					<td><?php 
    echo $value->get_first_name();
    ?>
 <?php 
    echo $value->get_last_name();
Beispiel #7
0
	
	
	<div class="page-header">
	  <h1>Student List <small> Students currently involved</small></h1>
	</div>
	<table class="table table-striped table-bordered table-hover">
		<tr>
			<th><input type="checkbox" name="stdcheck"></th>
			<th>ID</th>
			<th>Name</th>
			<th>Email</th>
			<th>Action</th>		
		</tr>
		
	<?php 
foreach ($studentrepository->get_all() as $value) {
    ?>

		
		<tr>
			<td><input type="checkbox" name="stdcheck"></td>
			<td><?php 
    echo $value->get_id();
    ?>
</td>
			<td><?php 
    echo $value->get_first_name();
    ?>
 <?php 
    echo $value->get_last_name();
    ?>
Beispiel #8
0
$repository->add($student2);
include_once "header.php";
?>

<table class="table table-bordered table-hover table-striped">
<tr>
	<th><input type="checkbox" id="select-all"/></th>
	<th>Id</th>
	<th>Name</th>
	<th>Email</th>
	<th>Action</th>
</tr>

<?php 
$repository->delete(3);
foreach ($repository->get_all() as $s) {
    ?>
<tr>
	<td><input type="checkbox" name="id[]" value="<?php 
    echo $s->get_id();
    ?>
"/></td>
	<td><?php 
    echo $s->get_id();
    ?>
</td>
	<td><?php 
    echo $s->get_first_name();
    ?>
 <?php 
    echo $s->get_last_name();