-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8752ab1
Showing
864 changed files
with
174,369 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
include 'inc/header.php'; | ||
include 'lib/student.php'; | ||
?> | ||
|
||
<?php | ||
$stu = new Student(); | ||
if( $_SERVER['REQUEST_METHOD'] == 'POST' ) { | ||
$name = $_POST['name']; | ||
$roll = $_POST['roll']; | ||
$insertdata = $stu->insertStudent($name, $roll); | ||
} | ||
?> | ||
|
||
<?php | ||
if(isset($insertdata)) { | ||
echo $insertdata; | ||
} | ||
?> | ||
|
||
|
||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h2> | ||
<a class="btn btn-success" href="add.php">Add Student</a> | ||
<a class="btn btn-info pull-right" href="index.php">Back</a> | ||
</h2> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
<form action="" method="post"> | ||
<div class="form-group"> | ||
<label for="name">Student Name</label> | ||
<input type="text" class="form-control" name="name" id="name" required=""> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="roll">Student Roll</label> | ||
<input type="text" class="form-control" name="roll" id="roll" required=""> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<input type="submit" class="btn btn-primary" name="submit" value="Add-Student"> | ||
</div> | ||
|
||
|
||
</form> | ||
</div> | ||
|
||
</div> | ||
|
||
<?php include 'inc/footer.php'; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<?php | ||
define('ROOT_FOLDER',$_SERVER['DOCUMENT_ROOT'].'/attendance/'); | ||
include ROOT_FOLDER.'inc/header.php'; | ||
include ROOT_FOLDER.'lib/student.php'; | ||
?> | ||
|
||
<?php | ||
$stu = new Student(); | ||
$db = new Database(); | ||
if(isset($_POST['addClass'])) { | ||
$name = $_POST['name']; | ||
$semester = $_POST['semester']; | ||
$section = $_POST['section']; | ||
$_SESSION['feed'] = $stu->insertClass($name, $semester, $section); | ||
} | ||
|
||
if(isset($_GET['delete_Class'])){ | ||
$classId = $_GET['classId']; | ||
$insertdata = $db->delete("DELETE FROM tbl_class WHERE classId='$classId'"); | ||
if($insertdata){ | ||
$_SESSION['feed'] = "<div class='alert alert-success'>Success! Class Deleted Successfully</div>"; | ||
} else{ | ||
$_SESSION['feed'] = "<div class='alert alert-danger'>Success! Class Deletion Unsuccessful</div>"; | ||
} | ||
} | ||
?> | ||
|
||
<?php | ||
if(isset($_SESSION['feed'])) { | ||
echo $_SESSION['feed']; | ||
unset($_SESSION['feed']); | ||
} | ||
?> | ||
|
||
<?php | ||
if(!isset($_SESSION['user_id']) || $_SESSION['user_id']!='admin'){ | ||
echo "<div class='alert alert-danger'><center><h3>Access Denied</h3></center></div>"; | ||
} else{ | ||
?> | ||
|
||
<div class="row"> | ||
<div class="col col-lg-3"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h2> Add Class </h2> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
<form action="" method="post"> | ||
<div class="form-group"> | ||
<label for="semester">Semester</label> | ||
<input type="hidden" name="semester" id="semester" value="0"> | ||
<input type="number" class="form-control" name="semester" id="semester" required=""> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="section">Section</label> | ||
<input type="text" class="form-control" name="section" id="section" required=""> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="name">Class Name</label> | ||
<input type="text" class="form-control" name="name" id="name" required=""> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<input type="submit" class="btn btn-primary" name="addClass" value="Add Class"> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
<div class="col col-lg-9"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h2> Class List </h2> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
<?php | ||
$get_class = $stu->getClass(0); | ||
if($get_class){ | ||
?> | ||
<table class="table table-striped"> | ||
<tr> | ||
<th width="20%">Serial</th> | ||
<th width="20%">Class Id</th> | ||
<th width="20%">Semester</th> | ||
<th width="20%">Section</th> | ||
<th width="20%">Action</th> | ||
</tr> | ||
|
||
<?php | ||
$i = 0; | ||
while($value = $get_class->fetch_assoc()){ | ||
$i++; | ||
?> | ||
|
||
<tr> | ||
<td><?=$i;?></td> | ||
<td><?=$value['classId'];?></td> | ||
<td><?=$value['semester'];?></td> | ||
<td><?=$value['section'];?></td> | ||
<td class="md-2"> | ||
<a id="edit" class="btn btn-success" href="/attendance/edit.php?classId=<?=$value['classId'];?>§ion=<?=$value['section'];?>&semester=<?=$value['semester'];?>&edit_Class=1"><i class="glyphicon glyphicon-edit"></i></a> | ||
<a id="delete" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this entry?')" href="/attendance/admin/add_class.php?classId=<?=$value['classId'];?>&delete_Class=1"><i class="glyphicon glyphicon-minus-sign"></i></a> | ||
</td> | ||
</tr> | ||
|
||
<?php } ?> | ||
</table> | ||
<?php } else{ ?> | ||
<div class='alert alert-warning text-center'>No Class Added.</div> | ||
<?php } ?> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<?php } ?> | ||
<?php include ROOT_FOLDER.'inc/footer.php'; ?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<?php | ||
define('ROOT_FOLDER',$_SERVER['DOCUMENT_ROOT'].'/attendance/'); | ||
include ROOT_FOLDER.'inc/header.php'; | ||
include ROOT_FOLDER.'lib/student.php'; | ||
?> | ||
|
||
<?php | ||
$stu = new Student(); | ||
$db = new Database(); | ||
if(isset($_POST['addCourse'])) { | ||
$courseTitle = $_POST['courseTitle']; | ||
$courseId = $_POST['courseId']; | ||
$semester = $_POST['semester']; | ||
$_SESSION['feed'] = $stu->insertCourse($courseId, $courseTitle, $semester); | ||
} | ||
|
||
if(isset($_GET['delete_Course'])){ | ||
$courseId = $_GET['courseId']; | ||
$insertdata = $db->delete("DELETE FROM tbl_course WHERE courseId='$courseId'"); | ||
if($insertdata){ | ||
$_SESSION['feed'] = "<div class='alert alert-success'>Success! Course Deleted Successfully</div>"; | ||
} else{ | ||
$_SESSION['feed'] = "<div class='alert alert-danger'>Success! Course Deletion Unsuccessful</div>"; | ||
} | ||
} | ||
?> | ||
|
||
<?php | ||
if(isset($_SESSION['feed'])) { | ||
echo $_SESSION['feed']; | ||
unset($_SESSION['feed']); | ||
} | ||
?> | ||
|
||
<?php | ||
if(!isset($_SESSION['user_id']) || $_SESSION['user_id']!='admin'){ | ||
echo "<div class='alert alert-danger'><center><h3>Access Denied</h3></center></div>"; | ||
} else{ | ||
?> | ||
|
||
<div class="row"> | ||
<div class="col col-lg-3"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h2> Add Course </h2> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
<form action="" method="post"> | ||
<div class="form-group"> | ||
<label for="courseId">Course Code (EX: cse-xxxx)</label> | ||
<input type="text" class="form-control" name="courseId" id="courseId" required=""> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="courseTitle">Course Title</label> | ||
<input type="text" class="form-control" name="courseTitle" id="courseTitle" required=""> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="Semester">Semester</label> | ||
<input type="hidden" name="semester" id="semester" value="0"> | ||
<input type="text" class="form-control" name="semester" id="semester" required=""> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<input type="submit" class="btn btn-primary" name="addCourse" value="Add Course"> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
<div class="col col-lg-9"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h2> Course List </h2> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
<?php | ||
$get_course = $stu->getCourse(); | ||
if($get_course){ | ||
?> | ||
<table class="table table-striped"> | ||
<tr> | ||
<th width="20%">Serial</th> | ||
<th width="25%">Course Code</th> | ||
<th width="30%">Course Title</th> | ||
<th width="10%">Semester</th> | ||
<th width="15%">Action</th> | ||
</tr> | ||
|
||
<?php | ||
$i = 0; | ||
while($value = $get_course->fetch_assoc()){ | ||
$i++; | ||
?> | ||
|
||
<tr> | ||
<td><?=$i;?></td> | ||
<td><?=$value['courseId'];?></td> | ||
<td><?=$value['courseTitle'];?></td> | ||
<td><?=$value['semester'];?></td> | ||
<td class="md-2"> | ||
<a id="edit" class="btn btn-success" href="/attendance/edit.php?courseId=<?=$value['courseId'];?>&courseTitle=<?=$value['courseTitle'];?>&semester=<?=$value['semester'];?>&edit_Course=1"><i class="glyphicon glyphicon-edit"></i></a> | ||
<a id="delete" class="btn btn-danger" href="/attendance/admin/add_course.php?courseId=<?=$value['courseId'];?>&delete_Course=1"><i class="glyphicon glyphicon-minus-sign"></i></a> | ||
</td> | ||
</tr> | ||
<?php } ?> | ||
</table> | ||
<?php } else{ ?> | ||
<div class='alert alert-warning text-center'>No Course Added.</div> | ||
<?php } ?> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<?php } ?> | ||
<?php include ROOT_FOLDER.'inc/footer.php'; ?> | ||
|
Oops, something went wrong.