Escolar Documentos
Profissional Documentos
Cultura Documentos
<?php
require_once 'connect.php';
$fadmin = $qadmin->fetch_array();
ADMIN
<!DOCTYPE html>
<?php
require_once 'valid.php';
?>
<head>
<title>Library System</title>
</head>
</div>
</div>
</nav>
<br />
<br />
</div>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "home.php"><i class = "glyphicon
glyphicon-home"></i> Home</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
tasks"></i> Accounts</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "book.php"><i class = "glyphicon
glyphicon-book"></i> Books</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
th"></i> Transaction</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon
glyphicon-cog"></i> Settings</a>
</li>
</ul>
</div>
<button id = "add_admin" type = "button" class = "btn btn-primary"><span class = "glyphicon glyphicon-
plus"></span> Add new</button>
<button id = "show_admin" type = "button" style = "display:none;" class = "btn btn-success"><span class
= "glyphicon glyphicon-circle-arrow-left"></span> Back</button>
<br />
<br />
<div id = "admin_table">
<tr>
<th>Username</th>
<th>Password</th>
<th>Firstname</th>
<th>Middlename</th>
<th>Lastname</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
while($f_admin = $q_admin->fetch_array()){
?>
<td><a href = "#" class = "btn btn-danger deladmin_id" value = "<?php echo $f_admin['admin_id']?>"><span
class = "glyphicon glyphicon-remove"></span> Delete</a> <a href = "#" class = "btn btn-warning
eadmin_id" value = "<?php echo $f_admin['admin_id']?>"><span class = "glyphicon glyphicon-
edit"></span> Edit</a></td>
</tr>
<?php
?>
</tbody>
</table>
</div>
<div id = "edit_form"></div>
<label>Username:</label>
<input type = "text" required = "required" name = "username" class = "form-control" />
</div>
<label>Password:</label>
<input type = "password" maxlength = "12" name = "password" required = "required" class = "form-
control" />
</div>
<label>Firstname:</label>
<input type = "text" name = "firstname" required = "required" class = "form-control" />
</div>
<label>Middlename:</label>
<input type = "text" name = "middlename" placeholder = "(Optional)" class = "form-control" />
</div>
<input type = "text" required = "required" name = "lastname" class = "form-control" />
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<br />
<br />
<br />
<label class = "navbar-text pull-right">Library System © Group- 1)baban majumder, 2)jyotirmoy
dutta,3) sourav bhowmick,4) subhadip karak 5)saikat pal</label>
</div>
</nav>
</body>
$(document).ready(function(){
$('#table').DataTable();
});
</script>
$(document).ready(function(){
$('#add_admin').click(function(){
$(this).hide();
$('#show_admin').show();
$('#admin_table').slideUp();
$('#admin_form').slideDown();
$('#show_admin').click(function(){
$(this).hide();
$('#add_admin').show();
$('#admin_table').slideDown();
$('#admin_form').slideUp();
});
});
});
</script>
$(document).ready(function(){
$result = $('<center><label>Deleting...</label></center>');
$('.deladmin_id').click(function(){
$admin_id = $(this).attr('value');
$(this).parents('td').empty().append($result);
$('.deladmin_id').attr('disabled', 'disabled');
$('.eadmin_id').attr('disabled', 'disabled');
setTimeout(function(){
}, 1000);
});
$('.eadmin_id').click(function(){
$admin_id = $(this).attr('value');
$('#show_admin').show();
$('#show_admin').click(function(){
$(this).hide();
$('#edit_form').empty();
$('#admin_table').show();
$('#add_admin').show();
});
$('#admin_table').fadeOut();
$('#add_admin').hide();
$('#edit_form').load('load_admin.php?admin_id=' + $admin_id);
});
});
</script>
</html>
BOOK
<!DOCTYPE html>
<?php
require_once 'valid.php';
?>
<head>
<title>Library System</title>
</head>
</div>
</div>
</nav>
<br />
<br />
</div>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "home.php"><i class = "glyphicon
glyphicon-home"></i> Home</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
tasks"></i> Accounts</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "book.php"><i class = "glyphicon
glyphicon-book"></i> Books</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
th"></i> Transaction</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon
glyphicon-cog"></i> Settings</a>
</ul>
</li>
</ul>
</div>
<div class = "col-lg-1"></div>
<button id = "add_book" type = "button" class = "btn btn-primary"><span class = "glyphicon glyphicon-
plus"></span> Add new</button>
<button id = "show_book" type = "button" style = "display:none;" class = "btn btn-success"><span class =
"glyphicon glyphicon-circle-arrow-left"></span> Back</button>
<br />
<br />
<div id = "book_table">
<tr>
<th>Book Title</th>
<th>Category</th>
<th>Author</th>
<th>Date Published</th>
<th>Available</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
while($fbook = $qbook->fetch_array()){
?>
<tr>
<td><a class = "btn btn-danger delbook_id" value = "<?php echo $fbook['book_id']?>"><span class =
"glyphicon glyphicon-remove"></span> Delete</a> <a value = "<?php echo $fbook['book_id']?>" class =
"btn btn-warning ebook_id"><span class = "glyphicon glyphicon-edit"></span> Edit</a></td>
</tr>
<?php
?>
</tbody>
</table>
</div>
<div id = "edit_form"></div>
<label>Book Title:</label>
<input type = "text" name = "book_title" required = "required" class = "form-control" />
</div>
<label>Book Description:</label>
</div>
<label>Book Category:</label>
</div>
<label>Book Author:</label>
<input type = "text" name = "book_author" class = "form-control" required = "required" />
</div>
<label>Date Published:</label>
<input type = "date" name = "date_publish" required = "required" class = "form-control" />
</div>
<label>Quantity:</label>
<input type = "number" min = "0" name = "qty" required = "required" class = "form-control" />
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<br />
<br />
<br />
<label class = "navbar-text pull-right">Library System © Group- 1)baban majumder, 2)jyotirmoy
dutta,3) sourav bhowmick,4) subhadip karak 5)saikat pal</label>
</div>
</nav>
</body>
$(document).ready(function(){
$('#table').DataTable();
});
</script>
$(document).ready(function(){
$('#add_book').click(function(){
$(this).hide();
$('#show_book').show();
$('#book_table').slideUp();
$('#book_form').slideDown();
$('#show_book').click(function(){
$(this).hide();
$('#add_book').show();
$('#book_table').slideDown();
$('#book_form').slideUp();
});
});
});
</script>
$(document).ready(function(){
$result = $('<center><label>Deleting...</label></center>');
$('.delbook_id').click(function(){
$book_id = $(this).attr('value');
$(this).parents('td').empty().append($result);
$('.delbook_id').attr('disabled', 'disabled');
$('.ebook_id').attr('disabled', 'disabled');
setTimeout(function(){
}, 1000);
});
$('.ebook_id').click(function(){
$book_id = $(this).attr('value');
$('#show_book').show();
$('#show_book').click(function(){
$(this).hide();
$('#edit_form').empty();
$('#book_table').show();
$('#book_admin').show();
});
$('#book_table').fadeOut();
$('#add_book').hide();
$('#edit_form').load('load_book.php?book_id=' + $book_id);
});
});
</script>
</html>
BORROW
<?php
require_once 'connect.php';
if(!ISSET($_POST['student_no'])){
echo '
window.location = "borrowing.php";
</script>
';
}else{
if(!ISSET($_POST['selector'])){
echo '
window.location = "borrowing.php";
</script>
';
}else{
foreach($_POST['selector'] as $key=>$value){
$book_qty = $value;
$student_no = $_POST['student_no'];
$book_id = $_POST['book_id'][$key];
alert("Successfully Borrowed");
window.location = "borrowing.php";
</script>
';
BORROWING
<!DOCTYPE html>
<?php
require_once 'valid.php';
?>
<head>
<title>Library System</title>
</head>
</div>
</div>
</nav>
<div class = "container-fluid">
<br />
<br />
</div>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "home.php"><i class = "glyphicon
glyphicon-home"></i> Home</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
tasks"></i> Accounts</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "book.php"><i class = "glyphicon
glyphicon-book"></i> Books</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
th"></i> Transaction</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon
glyphicon-cog"></i> Settings</a>
</ul>
</li>
</ul>
</div>
<label>Student Name:</label>
<br />
<?php
while($fborrow = $qborrow->fetch_array()){
?>
<?php
?>
</select>
</div>
</div>
<tr>
<th>Select</th>
<th>Book Title</th>
<th>Book Category</th>
<th>Book Author</th>
<th>Date Published</th>
<th>Quantity</th>
<th>Left</th>
</tr>
</thead>
<tbody>
<?php
while($f_book = $q_book->fetch_array()){
$new_qty = $q_borrow->fetch_array();
?>
<tr>
<td>
<?php
if($total == 0){
}else{
?>
</td>
</tr>
<?php
?>
</tbody>
</table>
</form>
</div>
</div>
<label class = "navbar-text pull-right">Library System © Group- 1)baban majumder, 2)jyotirmoy
dutta,3) sourav bhowmick,4) subhadip karak 5)saikat pal</label>
</div>
</nav>
</body>
$(document).ready(function(){
})
</script>
$(document).ready(function(){
$("#table").DataTable();
});
</script>
</html>
CHECK ADMIN
<?php
require_once 'connect.php';
$username = $_POST['username'];
$password = $_POST['password'];
$f_admin = $q_admin->fetch_array();
$v_admin = $q_admin->num_rows;
echo 'Success';
session_start();
$_SESSION['admin_id'] = $f_admin['admin_id'];
}else{
echo 'Error';
CONNECT
<?php
if(!$conn){
DELETE ADMIN
<?php
require_once 'connect.php';
header('location: admin.php');
DELETE BOOK
<?php
require_once 'connect.php';
header("location: book.php");
DELETE STUDENT
<?php
require_once 'connect.php';
header('location: student.php');
require_once 'connect.php';
if(ISSET($_POST['edit_admin'])){
$username = $_POST['username'];
$password = $_POST['password'];
$firstname = $_POST['firstname'];
$middlename = $_POST['middlename'];
$lastname = $_POST['lastname'];
$v_admin = $q_admin->num_rows;
if($v_admin == 1){
echo '
window.location = "admin.php";
</script>
';
}else{
$conn->query("UPDATE `admin` SET `username` = '$username', `password` = '$password', `firstname` =
'$firstname', `middlename` = '$middlename', `lastname` = '$lastname' WHERE `admin_id` =
'$_REQUEST[admin_id]'") or die(mysqli_error());
echo '
alert("Save Changes");
window.location = "admin.php";
</script>
';
require_once 'connect.php';
if(ISSET($_POST['edit_book'])){
$book_title = $_POST['book_title'];
$book_desc = $_POST['book_desc'];
$book_category = $_POST['book_category'];
$book_author = $_POST['book_author'];
$date_publish = $_POST['date_publish'];
$qty = $_POST['qty'];
echo '
alert("Save Changes");
window.location = "book.php";
</script>
';
}
EDIT STUDENT QUERY
<?php
require_once 'connect.php';
if(ISSET($_POST['edit_student'])){
$student_no = $_POST['student_no'];
$firstname = $_POST['firstname'];
$middlename = $_POST['middlename'];
$lastname = $_POST['lastname'];
$course = $_POST['course'];
$section = $_POST['section'];
$vstudent = $qstudent->num_rows;
if($vstudent['student_no'] == 1){
echo '
window.location = "student.php";
</script>
';
}else{
echo'
alert("Save Changes");
window.location = "student.php";
</script>
';
}
HOME
<!DOCTYPE html>
<?php
require_once 'valid.php';
?>
<head>
<title>Library System</title>
</head>
</div>
</div>
</nav>
<br />
<br />
</div>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
tasks"></i> Accounts</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "book.php"><i class = "glyphicon
glyphicon-book"></i> Books</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
th"></i> Transaction</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon
glyphicon-cog"></i> Settings</a>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
</body>
</html>
INDEX
<!DOCTYPE html>
<?php
session_start();
if(ISSET($_SESSION['admin_id'])){
header('location:home.php');
?>
<head>
<title>Library System</title>
</head>
</div>
</div>
</nav>
<br />
<br />
<h4>Login Here..</h4>
</div>
</div>
<br />
<button type = "button" id = "login" class = "btn btn-primary btn-block"><span class = "glyphicon
glyphicon-save"></span> Login</button>
</div>
</form>
<div id = "result"></div>
<br />
<br />
<br />
<br />
<br />
<br />
</div>
</div>
</div>
<label class = "navbar-text pull-right">Library System © Group- 1)baban majumder, 2)jyotirmoy
dutta,3) sourav bhowmick,4) subhadip karak 5)saikat pal</label>
</div>
</nav>
</body>
</html>
LOAD ADMIN
<?php
require_once 'connect.php';
$fedit_admin = $qedit_admin->fetch_array();
?>
<label>Username:</label>
<input type = "text" value = "<?php echo $fedit_admin['username']?>" required = "required" name =
"username" class = "form-control" />
</div>
<label>Password:</label>
<input type = "password" value = "<?php echo $fedit_admin['password']?>" maxlength = "12" name =
"password" required = "required" class = "form-control" />
</div>
<div class = "form-group">
<label>Firstname:</label>
<input type = "text" value = "<?php echo $fedit_admin['firstname']?>" name = "firstname" required =
"required" class = "form-control" />
</div>
<label>Middlename:</label>
</div>
<label>Lastname:</label>
<input type = "text" value = "<?php echo $fedit_admin['lastname']?>" required = "required" name =
"lastname" class = "form-control" />
</div>
</div>
</form>
</div>
LOAD BOOK
<?php
require_once 'connect.php';
$f_book = $q_book->fetch_array();
?>
<label>Book Title:</label>
<input type = "text" value = "<?php echo $f_book['book_title']?>" name = "book_title" required = "required"
class = "form-control" />
</div>
<label>Book Description:</label>
<input type = "text" value = "<?php echo $f_book['book_description']?>" name = "book_desc" class =
"form-control" />
</div>
<label>Book Category:</label>
<input type = "text" name = "book_category" value = "<?php echo $f_book['book_category']?>" class =
"form-control" required = "required"/>
</div>
<label>Book Author:</label>
<input type = "text" name = "book_author" value = "<?php echo $f_book['book_author']?>" class = "form-
control" required = "required" />
</div>
<label>Date Published:</label>
<input type = "date" name = "date_publish" value = "<?php echo $f_book['date_publish']?>" required =
"required" class = "form-control" />
</div>
<label>Quantity:</label>
<input type = "number" min = "0" value = "<?php echo $f_book['qty']?>" name = "qty" required = "required"
class = "form-control" />
</div>
</div>
</form>
</div>
LOAD STUDENT
<?php
require_once 'connect.php';
$f_student = $q_student->fetch_array();
?>
<label>Student ID:</label>
<input type = "text" name = "student_no" value = "<?php echo $f_student['student_no']?>" required =
"required" class = "form-control" />
</div>
<label>Firstname:</label>
<input type = "text" name = "firstname" value = "<?php echo $f_student['firstname']?>" required =
"required" class = "form-control" />
</div>
<label>Middlename:</label>
<input type = "text" name = "middlename" value = "<?php echo $f_student['middlename']?>" placeholder =
"(Optional)" class = "form-control" />
</div>
<label>Lastname:</label>
<input type = "text" required = "required" value = "<?php echo $f_student['lastname']?>" name =
"lastname" class = "form-control" />
</div>
<label>Course:</label>
<input type = "text" required = "required" value = "<?php echo $f_student['course']?>" name = "course"
class = "form-control" />
</div>
<label>Yr&Section:</label>
<input type = "text" maxlength = "12" name = "section" value = "<?php echo $f_student['section']?>"
required = "required" class = "form-control" />
</div>
</div>
</form>
</div>
LOGOUT
<?php
session_start();
unset($_SESSION['admin_id']);
header('location: index.php');
?>
RETURN
<?php
require_once 'connect.php';
header('location: returning.php');
RETURNING
<!DOCTYPE html>
<?php
require_once 'valid.php';
?>
<head>
<title>Library System</title>
</head>
</div>
</div>
</nav>
<br />
<br />
</div>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "home.php"><i class = "glyphicon
glyphicon-home"></i> Home</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
tasks"></i> Accounts</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "book.php"><i class = "glyphicon
glyphicon-book"></i> Books</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
th"></i> Transaction</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon
glyphicon-cog"></i> Settings</a>
</ul>
</li>
</ul>
</div>
<tr>
<th>Student</th>
<th>Book Title</th>
<th>Book Author</th>
<th>Status</th>
<th>Date Returned</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
while($freturn = $qreturn->fetch_array()){
?>
<tr>
<td>
<?php
$fstudent = $qstudent->fetch_array();
echo $fstudent['firstname']."".$fstudent['lastname'];
?>
</td>
<td>
<?php
$fbook = $qbook->fetch_array();
echo $fbook['book_title'];
?>
</td>
<td>
<?php
$fbook = $qbook->fetch_array();
echo $fbook['book_author'];
?>
</td>
<td>
<?php
if($freturn['status'] == 'Returned'){
echo '<center><button disabled = "disabled" class = "btn btn-primary" type = "button" href = "#" data-
toggle = "modal" data-target = "#return"><span class = "glyphicon glyphicon-check"></span>
Returned</button></center>';
}else{
?>
</td>
</tr>
<?php
?>
</tbody>
</table>
<br />
<br />
<br />
</div>
</div>
<label class = "navbar-text pull-right">Library System © Group- 1)baban majumder, 2)jyotirmoy
dutta,3) sourav bhowmick,4) subhadip karak 5)saikat pal</label>
</div>
</nav>
</body>
<script src = "js/jquery.js"></script>
$(document).ready(function(){
})
</script>
$(document).ready(function(){
$("#table").DataTable();
});
</script>
</html>
require_once 'connect.php';
if(ISSET($_POST['save_admin'])){
$username = $_POST['username'];
$password = $_POST['password'];
$firstname = $_POST['firstname'];
$middlename = $_POST['middlename'];
$lastname = $_POST['lastname'];
$v_admin = $q_admin->num_rows;
if($v_admin == 1){
echo '
</script>
';
}else{
echo '
window.location = "admin.php";
</script>
';
require_once 'connect.php';
if(ISSET($_POST['save_book'])){
$book_title = $_POST['book_title'];
$book_desc = $_POST['book_desc'];
$book_category = $_POST['book_category'];
$book_author = $_POST['book_author'];
$date_publish = $_POST['date_publish'];
$qty = $_POST['qty'];
echo'
window.location = "book.php";
</script>
';
<?php
require_once 'connect.php';
if(ISSET($_POST['save_student'])){
$student_no = $_POST['student_no'];
$firstname = $_POST['firstname'];
$middlename = $_POST['middlename'];
$lastname = $_POST['lastname'];
$course = $_POST['course'];
$section = $_POST['section'];
$vstudent = $qstudent->num_rows;
if($vstudent['student_no'] == 1){
echo '
window.location = "student.php";
</script>
';
}else{
echo'
window.location = "student.php";
</script>
';
}
STUDENT
<!DOCTYPE html>
<?php
require_once 'valid.php';
?>
<head>
<title>Library System</title>
</head>
</div>
</div>
</nav>
<br />
<br />
</div>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
tasks"></i> Accounts</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = "book.php"><i class = "glyphicon
glyphicon-book"></i> Books</a></li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon glyphicon-
th"></i> Transaction</a>
</ul>
</li>
<li><a style = "font-size:18px; border-bottom:1px solid #d3d3d3;" href = ""><i class = "glyphicon
glyphicon-cog"></i> Settings</a>
</ul>
</li>
</ul>
</div>
<button id = "add_student" type = "button" class = "btn btn-primary"><span class = "glyphicon glyphicon-
plus"></span> Add new</button>
<button id = "show_student" type = "button" style = "display:none;" class = "btn btn-success"><span class
= "glyphicon glyphicon-circle-arrow-left"></span> Back</button>
<br />
<br />
<div id = "student_table">
<tr>
<th>Student ID</th>
<th>Firstname</th>
<th>Middlename</th>
<th>Lastname</th>
<th>Course</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
while($fstudent = $qstudent->fetch_array()){
?>
<tr>
</tr>
<?php
?>
</tbody>
</table>
</div>
<div id = "edit_form"></div>
<label>Student ID:</label>
<input type = "text" name = "student_no" required = "required" class = "form-control" />
</div>
<label>Firstname:</label>
<input type = "text" name = "firstname" required = "required" class = "form-control" />
</div>
<label>Middlename:</label>
<input type = "text" name = "middlename" placeholder = "(Optional)" class = "form-control" />
</div>
<label>Lastname:</label>
<input type = "text" required = "required" name = "lastname" class = "form-control" />
</div>
<label>Course:</label>
<input type = "text" required = "required" name = "course" class = "form-control" />
</div>
<label>Yr&Section:</label>
<input type = "text" maxlength = "12" name = "section" required = "required" class = "form-control" />
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<br />
<br />
<br />
<label class = "navbar-text pull-right">Library System © Group- 1)baban majumder, 2)jyotirmoy
dutta,3) sourav bhowmick,4) subhadip karak 5)saikat pal</label>
</div>
</nav>
</body>
$(document).ready(function(){
$('#table').DataTable();
});
</script>
$(document).ready(function(){
$('#add_student').click(function(){
$(this).hide();
$('#show_student').show();
$('#student_table').slideUp();
$('#student_form').slideDown();
$('#show_student').click(function(){
$(this).hide();
$('#add_student').show();
$('#student_table').slideDown();
$('#student_form').slideUp();
});
});
});
</script>
$(document).ready(function(){
$result = $('<center><label>Deleting...</label></center>');
$('.delstudent_id').click(function(){
$student_id = $(this).attr('value');
$(this).parents('td').empty().append($result);
$('.delstudent_id').attr('disabled', 'disabled');
$('.estudent_id').attr('disabled', 'disabled');
setTimeout(function(){
}, 1000);
});
$('.estudent_id').click(function(){
$student_id = $(this).attr('value');
$('#show_student').show();
$('#show_student').click(function(){
$(this).hide();
$('#edit_form').empty();
$('#student_table').show();
$('#add_student').show();
});
$('#student_table').fadeOut();
$('#add_student').hide();
$('#edit_form').load('load_student.php?student_id=' + $student_id);
});
});
</script>
</html>
VALID
<?php
require_once 'connect.php';
session_start();
if(!ISSET($_SESSION['admin_id'])){
header('location: index.php');
}
THANK YOU