'updated_pages_in_admin'

parent 52809abf
<!--Body Starts Here-->
<div class="main">
<div class="content">
<div class="report">
<form method="post" action="" class="forms">
<h2>Add Faculty</h2>
<?php
if(isset($_SESSION['validation']))
{
echo $_SESSION['validation'];
unset($_SESSION['validation']);
}
if(isset($_SESSION['add']))
{
echo $_SESSION['add'];
unset($_SESSION['add']);
}
?>
<span class="name">Faculty Title</span>
<input type="text" name="faculty_name" placeholder="Faculty Title" required="true" /> <br />
<span class="name">Time Duration</span>
<input type="text" name="time_duration" placeholder="Time Duration in Minutes" required="true" /><br />
<span class="name">Questions/Set</span>
<input type="text" name="qns_per_page" placeholder="Total Questions Per Page" required="true" /><br />
<span class="name">Total English Qns</span>
<input type="number" name="total_english_qns" placeholder="Total Number of English Questions" required="true" /><br />
<span class="name">Total Math Qns</span>
<input type="number" name="total_math_qns" placeholder="Total Number of Math Questions" /><br />
<span class="name">Is Active?</span>
<input type="radio" name="is_active" value="yes" /> Yes
<input type="radio" name="is_active" value="no" /> No
<br />
<input type="submit" name="submit" value="Add Faculty" class="btn-add" style="margin-left: 15%;" />
<a href="<?php echo SITEURL; ?>admin/index.php?page=faculties">
<button type="button" class="btn-delete">Cancel</button>
</a>
</form>
<?php
if(isset($_POST['submit']))
{
//echo "Clicked";
//Get Values froom the form
$faculty_name=$obj->sanitize($conn,$_POST['faculty_name']);
$time_duration=$obj->sanitize($conn,$_POST['time_duration']);
$qns_per_page=$obj->sanitize($conn,$_POST['qns_per_page']);
$total_english=$obj->sanitize($conn,$_POST['total_english_qns']);
$total_math=$obj->sanitize($conn,$_POST['total_math_qns']);
if(isset($_POST['is_active']))
{
$is_active=$obj->sanitize($conn,$_POST['is_active']);
}
else
{
$is_active="yes";
}
$added_date=date('Y-m-d');
//Normal PHP Validation
if(($faculty_name=="")||($time_duration=="")||($qns_per_page==""))
{
$_SESSION['validation']="<div class='error'>Faculty name or Time Duration or Question Per Page is Empty.</div>";
header('location:'.SITEURL.'admin/index.php?page=add_faculty');
}
//Inserting into the database
$tbl_name='tbl_class';
$data="faculty_name='$faculty_name',
time_duration='$time_duration',
qns_per_set='$qns_per_page',
total_english='$total_english',
total_math='$total_math',
is_active='$is_active',
added_date='$added_date',
updated_date=''";
//Query to Insert Data
$query=$obj->insert_data($tbl_name,$data);
$res=$obj->execute_query($conn,$query);
if($res===true)
{
//Success Message
$_SESSION['add']="<div class='success'>New faculty successfully added.</div>";
header('location:'.SITEURL.'admin/index.php?page=faculties');
}
else
{
//FAil Message
$_SESSION['add']="<div class='error'>Failed to add new faculty. Try again.</div>";
header('location:'.SITEURL.'admin/index.php?page=add_faculty');
}
}
?>
</div>
</div>
</div>
<!--Body Ends Here-->
\ No newline at end of file
<!--Body Starts Here--> <!--Body Starts Here-->
<div class="main"> <div class="container">
<div class="content"> <div class="content">
<div class="report"> <div class="report">
<form method="post" action="" class="forms" enctype="multipart/form-data"> <form method="post" action="" class="forms" enctype="multipart/form-data"><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR><bR>
<h2>Add Question</h2> <h2>Add Question</h2>
<?php <?php
if(isset($_SESSION['add'])) if(isset($_SESSION['add']))
...@@ -30,21 +30,25 @@ ...@@ -30,21 +30,25 @@
<span class="name">Image</span> <span class="name">Image</span>
<input type="file" name="image" /><br /> <input type="file" name="image" /><br />
<div class="user-details">
<div class="input-box">
<span class="name">First Answer</span> <span class="name">First Answer</span>
<input type="text" name="first_answer" placeholder="First Answer" required="true" /><br /> <input type="text" name="first_answer" placeholder="First Answer" required="true" /><br />
</div>
<div class="input-box">
<span class="name">Second Answer</span> <span class="name">Second Answer</span>
<input type="text" name="second_answer" placeholder="Second Answer" required="true" /><br /> <input type="text" name="second_answer" placeholder="Second Answer" required="true" /><br /> </div>
<div class="input-box">
<span class="name">Third Answer</span> <span class="name">Third Answer</span>
<input type="text" name="third_answer" placeholder="Third Answer" required="true" /><br /> <input type="text" name="third_answer" placeholder="Third Answer" required="true" /><br /></div>
<div class="input-box">
<span class="name">Fourth Answer</span> <span class="name">Fourth Answer</span>
<input type="text" name="fourth_answer" placeholder="Fourth Answer" required="true" /><br /> <input type="text" name="fourth_answer" placeholder="Fourth Answer" required="true" /><br /></div>
<div class="input-box">
<span class="name">Fifth Answer</span> <span class="name">Fifth Answer</span>
<input type="text" name="fifth_answer" placeholder="Fifth Answer" required="true" /><br /> <input type="text" name="fifth_answer" placeholder="Fifth Answer" required="true" /><br /></div><br><br>
<span class="name">Answer</span> <span class="name">Answer</span>
......
...@@ -15,41 +15,335 @@ if (!$con) { ...@@ -15,41 +15,335 @@ if (!$con) {
$time=time(); $time=time();
$res=mysqli_query($con,"select * from tbl_student"); $res=mysqli_query($con,"select * from tbl_student");
?> ?>
<!DOCTYPE html> <head>
<html lang="en"> <link rel="stylesheet" href="../box/assets/css/styles.css">
<head> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="custom.css">
<meta name="robots" content="noindex, nofollow"> <link href="https://fonts.googleapis.com/css?family=Raleway:100,200,400,500,600" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1"> <style>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> .container-xl{
<style type="text/css"> color:#5d5c5c;
display: block;
.container { height: 572px;
margin-top: 100px; width:1250px;
border: 1px solid #9C9C9C; overflow-y: auto;
background-color: #fff;
padding:30px; margin-right: -10px;
}
.container h2{
margin-bottom:25px;
}
.text-info { }
color: #000 !important;
}
</style> .table-responsive {
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> margin: 0px 0;
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> Overflow:auto;
</head> }
<body> .table-wrapper {
<div class="container"> background: #fff;
padding: 20px 25px;
border-radius: 3px;
min-width: 1200px;
box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.table-title {
padding-bottom: 15px;
background: #435d7d;
color: #fff;
padding: 16px 30px;
min-width: 100%;
margin: -20px -25px 10px;
border-radius: 3px 3px 0 0;
}
.table-title h2 {
margin: 5px 0 0;
font-size: 24px;
}
.table-title .btn-group {
float: right;
}
.table-title .btn {
color: #fff;
float: right;
font-size: 13px;
border: none;
min-width: 50px;
border-radius: 2px;
border: none;
outline: none !important;
margin-left: 10px;
}
.table-title .btn i {
float: left;
font-size: 21px;
margin-right: 10px;
margin-top: -20px;
}
.table-title .btn span {
float: left;
margin-top: -25px;
}
table.table tr th, table.table tr td {
border-color: red;
padding: 12px 30px;
vertical-align: middle;
}
tr:nth-child(even) {background-color: #c8cdd0;}
table.table tr th:first-child {
width: 60px;
}
table.table tr th:last-child {
width: 100px;
}
table.table-striped tbody tr:nth-of-type(odd) {
background-color: #fcfcfc;
}
table.table-striped.table-hover tbody tr:hover {
background: #f5f5f5;
}
table.table th i {
font-size: 13px;
margin: 0 5px;
cursor: pointer;
}
table.table td:last-child i {
opacity: 1;
font-size: 22px;
margin: 0 2px;
}
table.table td a {
font-weight: bold;
color: #566787;
display: inline-block;
text-decoration: none;
outline: none !important;
}
table.table td a:hover {
color: #2196F3;
}
table.table td a.edit {
color: #FFC107;
}
table.table td a.delete {
color: #F44336;
}
table.table td i {
font-size: 19px;
}
table.table .avatar {
border-radius: 50%;
vertical-align: middle;
margin-right: 10px;
}
.pagination {
float: right;
margin: 0 0 5px;
}
.pagination li a {
border: none;
font-size: 13px;
min-width: 30px;
min-height: 30px;
color: #999;
margin: 0 2px;
line-height: 30px;
border-radius: 2px !important;
text-align: center;
padding: 0 6px;
}
.pagination li a:hover {
color: #666;
}
.pagination li.active a, .pagination li.active a.page-link {
background: #03A9F4;
}
.pagination li.active a:hover {
background: #0397d6;
}
.pagination li.disabled i {
color: #ccc;
}
.pagination li i {
font-size: 16px;
padding-top: 6px
}
.hint-text {
float: left;
margin-top: 10px;
font-size: 13px;
}
/* Custom checkbox */
.custom-checkbox {
position: relative;
}
.custom-checkbox input[type="checkbox"] {
opacity: 0;
position: absolute;
margin: 5px 0 0 3px;
z-index: 9;
}
.custom-checkbox label:before{
width: 18px;
height: 18px;
}
.custom-checkbox label:before {
content: '';
margin-right: 10px;
display: inline-block;
vertical-align: text-top;
background: white;
border: 1px solid #bbb;
border-radius: 2px;
box-sizing: border-box;
z-index: 2;
}
.custom-checkbox input[type="checkbox"]:checked + label:after {
content: '';
position: absolute;
left: 6px;
top: 3px;
width: 6px;
height: 11px;
border: solid #000;
border-width: 0 3px 3px 0;
transform: inherit;
z-index: 3;
transform: rotateZ(45deg);
}
.custom-checkbox input[type="checkbox"]:checked + label:before {
border-color: #03A9F4;
background: #03A9F4;
}
.custom-checkbox input[type="checkbox"]:checked + label:after {
border-color: #fff;
}
.custom-checkbox input[type="checkbox"]:disabled + label:before {
color: #b8b8b8;
cursor: auto;
box-shadow: none;
background: #ddd;
}
/* Modal styles */
.modal .modal-dialog {
max-width: 400px;
}
.modal .modal-header, .modal .modal-body, .modal .modal-footer {
padding: 20px 30px;
}
.modal .modal-content {
border-radius: 3px;
font-size: 14px;
}
.modal .modal-footer {
background: #ecf0f1;
border-radius: 0 0 3px 3px;
}
.modal .modal-title {
display: inline-block;
}
.modal .form-control {
border-radius: 2px;
box-shadow: none;
border-color: #dddddd;
}
.modal textarea.form-control {
resize: vertical;
}
.modal .btn {
border-radius: 2px;
min-width: 100px;
}
.modal form label {
font-weight: normal;
}
.search-box {
position: relative;
float: right;
}
.search-box input {
height: 34px;
border-radius: 20px;
padding-left: 35px;
border-color: #ddd;
box-shadow: none;
}
.search-box input:focus {
border-color: #3FBAE4;
}
.search-box i {
color: #a0a5b1;
position: absolute;
font-size: 19px;
top: 8px;
left: 10px;
}
</style>
<script>
$(document).ready(function(){
// Activate tooltip
$('[data-toggle="tooltip"]').tooltip();
// Select/Deselect checkboxes
var checkbox = $('table tbody input[type="checkbox"]');
$("#selectAll").click(function(){
if(this.checked){
checkbox.each(function(){
this.checked = true;
});
} else{
checkbox.each(function(){
this.checked = false;
});
}
});
checkbox.click(function(){
if(!this.checked){
$("#selectAll").prop("checked", false);
}
});
});
</script>
</head>
<div class="container-xl
">
<div class="table-responsive">
<div class="table-wrapper">
<div class="table-title">
<div class="row">
<div class="col-sm-6">
<h2><i class="fa fa-user-circle" aria-hidden="true"></i>&nbsp;Live <b>Attendence</b></h2>
</div>
<div class="col-sm-6"><div class="search-box">
<i class="fa fa-search"></i>
<input type="text" class="form-control" placeholder="Search&hellip;"id="filter"name="filter">
</div> <a href="../admin/pages/tbl_student.csv" class="btn btn-success" data-toggle="modal"><i class="fa fa-download"></i> <span>Export CSV</span></a>
</div>
</div>
</div>
<table class="table table-striped table-hover">
<thead>
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
<th width="5%">#</th> <th width="5%">ID</th>
<th width="80%">Name</th> <th width="40%">Fist Name</th>
<th width="40%"> Last Name</th>
<th width="15%">Status</th> <th width="15%">Status</th>
</tr> </tr>
</thead> </thead>
...@@ -67,6 +361,7 @@ $res=mysqli_query($con,"select * from tbl_student"); ...@@ -67,6 +361,7 @@ $res=mysqli_query($con,"select * from tbl_student");
<tr> <tr>
<th scope="row"><?php echo $i?></th> <th scope="row"><?php echo $i?></th>
<td><?php echo $row['first_name']?></td> <td><?php echo $row['first_name']?></td>
<td><?php echo $row['last_name']?></td>
<td><button type="button" class="btn <?php echo $class?>"><?php echo $status?></button></td> <td><button type="button" class="btn <?php echo $class?>"><?php echo $status?></button></td>
</tr> </tr>
<?php <?php
......
This diff is collapsed.
This diff is collapsed.
...@@ -62,6 +62,12 @@ ...@@ -62,6 +62,12 @@
include('parent.php'); include('parent.php');
} }
break; break;
case "feedback":
{
include('feedback.php');
}
break;
case "faculties": case "faculties":
{ {
......
...@@ -308,7 +308,7 @@ $(document).ready(function(){ ...@@ -308,7 +308,7 @@ $(document).ready(function(){
<div class="col-sm-6"><div class="search-box"> <div class="col-sm-6"><div class="search-box">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
<input type="text" class="form-control" placeholder="Search&hellip;"id="filter"name="filter"> <input type="text" class="form-control" placeholder="Search&hellip;"id="filter"name="filter">
</div><a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-download"></i> <span>Feedback</span></a><a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-download"></i> <span>Export CSV</span></a> </div><a href="<?php echo SITEURL; ?>admin/index.php?page=feedback" class="btn btn-success" data-toggle="modal"><i class="fa fa-comments-o"></i> <span>Feedback</span></a><a href="../admin/pages/tbl_parent.csv" class="btn btn-success" data-toggle="modal"><i class="fa fa-download"></i> <span>Export CSV</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-upload"></i> <span>Import CSV</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-upload"></i> <span>Import CSV</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_parent" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add New Parent</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_parent" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add New Parent</span></a>
......
...@@ -310,7 +310,7 @@ $(document).ready(function(){ ...@@ -310,7 +310,7 @@ $(document).ready(function(){
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus-square"></i> <span>Maths</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus-square"></i> <span>Maths</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-language"></i> <span>Sinhala</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-language"></i> <span>Sinhala</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-pagelines"></i> <span>Enviroment Science</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-pagelines"></i> <span>Enviroment Science</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add Quiz pool</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_question" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add Quiz pool</span></a>
</div> </div>
</div> </div>
...@@ -341,11 +341,12 @@ $(document).ready(function(){ ...@@ -341,11 +341,12 @@ $(document).ready(function(){
<tr> <tr>
<th>S.N.</th> <th>Number</th>
<th>Question</th> <th>Question</th>
<th>Answer</th> <th>Answer</th>
<th>Faculty</th> <th>Grade</th>
<th>Is Active?</th> <th>Content</th>
<th>Active?</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
...@@ -363,6 +364,7 @@ $(document).ready(function(){ ...@@ -363,6 +364,7 @@ $(document).ready(function(){
$question_id=$row['question_id']; $question_id=$row['question_id'];
$question=$row['question']; $question=$row['question'];
$answer=$row['answer']; $answer=$row['answer'];
$image_name=$row['image_name'];
$faculty=$row['faculty']; $faculty=$row['faculty'];
$is_active=$row['is_active']; $is_active=$row['is_active'];
?> ?>
...@@ -370,7 +372,7 @@ $(document).ready(function(){ ...@@ -370,7 +372,7 @@ $(document).ready(function(){
<td><?php echo $sn++; ?>. </td> <td><?php echo $sn++; ?>. </td>
<td style="width: 650px;"><?php echo $question; ?></td> <td style="width: 650px;"><?php echo $question; ?></td>
<td><?php echo $answer; ?></td> <td><?php echo $answer; ?></td>
<td><?php echo $faculty; ?></td></td> <td><?php echo $faculty; ?></td><td><?php echo $image_name; ?></td></td>
<td><?php echo $is_active; ?></td> <td><?php echo $is_active; ?></td>
<td> <td>
<a href="<?php echo SITEURL; ?>admin/index.php?page=update_question&id=<?php echo $question_id; ?>"><button type="button" class="btn-update"><i class="fa fa-cog"></i></button></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=update_question&id=<?php echo $question_id; ?>"><button type="button" class="btn-update"><i class="fa fa-cog"></i></button></a>
......
...@@ -6,16 +6,24 @@ ...@@ -6,16 +6,24 @@
<style> <style>
.container-xl{ .container-xl{
color:black; color:#5d5c5c;
margin-top: 10px; display: block;
height: 572px;
width:1250px;
overflow-y: auto;
margin-right: -10px;
} }
.table-responsive { .table-responsive {
margin: 30px 0; margin: 0px 0;
Overflow:auto Overflow:auto;
} }
.table-wrapper { .table-wrapper {
background: #fff; background: #fff;
...@@ -292,7 +300,7 @@ $(document).ready(function(){ ...@@ -292,7 +300,7 @@ $(document).ready(function(){
<div class="table-title"> <div class="table-title">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h2><i class="fa fa-user-circle" aria-hidden="true"></i>&nbsp;Manage <b>Students</b></h2> <h2><i class="fa fa-check" aria-hidden="true"></i>&nbsp;Manage <b>Results</b></h2>
</div> </div>
...@@ -301,7 +309,7 @@ $(document).ready(function(){ ...@@ -301,7 +309,7 @@ $(document).ready(function(){
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
<input type="text" class="form-control" placeholder="Search&hellip;"id="filter"name="filter"> <input type="text" class="form-control" placeholder="Search&hellip;"id="filter"name="filter">
</div> </div>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add New Student</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>View Activity</span></a>
</div> </div>
</div> </div>
...@@ -313,7 +321,7 @@ $(document).ready(function(){ ...@@ -313,7 +321,7 @@ $(document).ready(function(){
<br><!--Body Starts Here--> <br><!--Body Starts Here-->
<h2>Result Manager</h2>
<!--<button type="button" class="btn-add">Add User</button>--> <!--<button type="button" class="btn-add">Add User</button>-->
<?php <?php
if(isset($_SESSION['delete'])) if(isset($_SESSION['delete']))
...@@ -328,7 +336,9 @@ $(document).ready(function(){ ...@@ -328,7 +336,9 @@ $(document).ready(function(){
<th>Full Name</th> <th>Full Name</th>
<th>Date</th> <th>Date</th>
<th>Mark</th> <th>Mark</th>
<th>Faculty</th> <th>Grade</th>
<th>Duration</th>
<th>Activity</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
...@@ -346,6 +356,8 @@ $(document).ready(function(){ ...@@ -346,6 +356,8 @@ $(document).ready(function(){
$student_id=$row['student_id']; $student_id=$row['student_id'];
$marks=$row['marks']; $marks=$row['marks'];
$added_date=$row['added_date']; $added_date=$row['added_date'];
$duration=$row['duration'];
$acttype=$row['acttype'];
?> ?>
<tr> <tr>
<td><?php echo $sn++; ?>. </td> <td><?php echo $sn++; ?>. </td>
...@@ -366,10 +378,12 @@ $(document).ready(function(){ ...@@ -366,10 +378,12 @@ $(document).ready(function(){
$faculty=$obj->get_faculty($tbl,$student_id,$conn); $faculty=$obj->get_faculty($tbl,$student_id,$conn);
echo $faculty_name=$obj->get_facultyname($tbl2,$faculty,$conn); echo $faculty_name=$obj->get_facultyname($tbl2,$faculty,$conn);
?> ?>
<td><?php echo $duration; ?></td>
<td><?php echo $acttype; ?></td>
</td> </td>
<td> <td>
<a href="<?php echo SITEURL; ?>admin/index.php?page=view_result&student_id=<?php echo $student_id; ?>&added_date=<?php echo $added_date; ?>"><button type="button" class="btn-update">VIEW</button></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=view_result&student_id=<?php echo $student_id; ?>&added_date=<?php echo $added_date; ?>"><button type="button" class="btn-update"><i class="fa fa-eye"></button></a></i>
<a href="<?php echo SITEURL; ?>admin/pages/delete_result.php?summary_id=<?php echo $summary_id; ?>&student_id=<?php echo $student_id; ?>&added_date=<?php echo $added_date; ?>"><button type="button" class="btn-delete">DELETE</button></a> <a href="<?php echo SITEURL; ?>admin/pages/delete_result.php?summary_id=<?php echo $summary_id; ?>&student_id=<?php echo $student_id; ?>&added_date=<?php echo $added_date; ?>"><button type="button" class="btn-delete"><i class="fa fa-trash"></button></a></i>
</td> </td>
</tr> </tr>
<?php <?php
......
...@@ -312,7 +312,7 @@ $(document).ready(function(){ ...@@ -312,7 +312,7 @@ $(document).ready(function(){
<div class="col-sm-6"><div class="search-box"> <div class="col-sm-6"><div class="search-box">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
<input type="text" class="form-control" placeholder="Search&hellip;"id="filter"name="filter"> <input type="text" class="form-control" placeholder="Search&hellip;"id="filter"name="filter">
</div> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-download"></i> <span>Export CSV</span></a> </div> <a href="../admin/pages/tbl_student.csv" class="btn btn-success" data-toggle="modal"><i class="fa fa-download"></i> <span>Export CSV</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-upload"></i> <span>Import CSV</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-upload"></i> <span>Import CSV</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add New Student</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add New Student</span></a>
...@@ -345,11 +345,11 @@ $(document).ready(function(){ ...@@ -345,11 +345,11 @@ $(document).ready(function(){
<tr> <tr>
<tr> <tr>
<th>S.N.</th> <th>ID</th>
<th>Full Name</th> <th>Full Name</th>
<th>Email</th> <th>Email</th>
<th>Contact</th> <th>Contact</th>
<th>Faculty</th> <th>Grade</th>
<th>Is Active?</th> <th>Is Active?</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
......
"0","0","sajith","madushanka","sajithmadu@gmail.com","sajith","sajith123","09723748976",,,"2021-04-20","0000-00-00"
"1","0","Samantha","Kure","samanthk@gmail.com","samantha","Asdf@12345","0786756464","Wijaya niwasa, malab",,"2021-07-05","0000-00-00"
"2","0","kamal","perera","kamapp@gmail.com","kamaltha","Asdf@12345","0765433455","Malawatta road,Colom",,"2021-07-05","0000-00-00"
"3","0","pawan","anjelo","pawanaj@gmail.com","pawantha","Asdf@12345","07836373524","3lane,Battaramulla,",,"2021-07-05","0000-00-00"
"1","Student","Thapa","student@gmail.com","student","student","98367253","male","1","no","2017-06-27","2021-06-17","0"
"2","Janith","madushanka","janithmadushanka614@gmail.com","IT17142656","Asdf@12345","0776313755","male","1","no","2021-06-05","2021-06-05","0"
"3","sajith","madushanka","admin@example.com","student","Asdf@12345","0716313566","male","2","yes","2021-06-05","0000-00-00","1623440465"
"4","perera","Madushanka","janithmadushanka77@yahoo.com","s123","s123","0876533355","on","1","no","2021-06-19","0000-00-00","0"
"5","rumesh","kalinga","rumekali@gmail.com","rumesh","Asdf@12345","077765678","on","1","yes","2021-07-01","0000-00-00","0"
"6","sajith","perera","sajith.p@gmail.com","sajith","Asdf@12345","0778373937","on","1","yes","2021-07-04","0000-00-00","0"
"7","kamal","niwantha","kamaniwa@gmail.com","kamal","Asdf@12345","0783937396","on","1","yes","2021-07-04","0000-00-00","0"
"8","chamath","madushanka","chamathm@gmail.com","chamath","Asdf@12345","0776313755","on","2","yes","2021-07-04","0000-00-00","0"
"9","anjelo","kumar","anjelo@gmail.com","angi","Asdf@12345","0757576726","on","1","yes","2021-07-04","0000-00-00","0"
<!--Body Starts Here-->
<?php
if(isset($_GET['id']))
{
$faculty_id=$_GET['id'];
//Getting VAlues fro the datadabase
$tbl_name="tbl_class";
$where="faculty_id=$faculty_id";
$query=$obj->select_data($tbl_name,$where);
$res=$obj->execute_query($conn,$query);
$count_rows=$obj->num_rows($res);
if($count_rows==1)
{
$row=$obj->fetch_data($res);
$faculty_name=$row['faculty_name'];
$time_duration=$row['time_duration'];
$qns_per_page=$row['qns_per_set'];
$total_english=$row['total_english'];
$total_math=$row['total_math'];
$is_active=$row['is_active'];
}
else
{
header('location:'.SITEURL.'admin/index.php?page=faculties');
}
}
else
{
header('location:'.SITEURL.'admin/index.php?page=faculties');
}
?>
<div class="main">
<div class="content">
<div class="report">
<form method="post" action="" class="forms">
<h2>Update Faculty</h2>
<?php
if(isset($_SESSION['update']))
{
echo $_SESSION['update'];
unset($_SESSION['update']);
}
?>
<span class="name">Faculty Title</span>
<input type="text" name="faculty_name" value="<?php echo $faculty_name; ?>" required="true" /> <br />
<span class="name">Time Duration</span>
<input type="number" name="time_duration" value="<?php echo $time_duration; ?>" required="true" /><br />
<span class="name">Questions/Set</span>
<input type="number" name="qns_per_page" value="<?php echo $qns_per_page; ?>" required="true" /><br />
<span class="name">Total English Qns</span>
<input type="number" name="total_english_qns" value="<?php echo $total_english; ?>" required="true" /><br />
<span class="name">Total Math Qns</span>
<input type="number" name="total_math_qns" value="<?php echo $total_math; ?>" /><br />
<span class="name">Is Active?</span>
<input <?php if($is_active=="yes"){echo "checked='checked'";} ?> type="radio" name="is_active" value="yes" /> Yes
<input <?php if($is_active=="no"){echo "checked='checked'";} ?> type="radio" name="is_active" value="no" /> No
<br />
<input type="submit" name="submit" value="Update Faculty" class="btn-update" style="margin-left: 15%;" />
<button type="button" class="btn-delete">Cancel</button>
</form>
<?php
if(isset($_POST['submit']))
{
//echo "Clcked";
//Getting all the values from the forms
$faculty_name=$obj->sanitize($conn,$_POST['faculty_name']);
$time_duration=$obj->sanitize($conn,$_POST['time_duration']);
$qns_per_page=$obj->sanitize($conn,$_POST['qns_per_page']);
$total_english=$obj->sanitize($conn,$_POST['total_english_qns']);
$total_math=$obj->sanitize($conn,$_POST['total_math_qns']);
$is_active=$obj->sanitize($conn,$_POST['is_active']);
$updated_date=date('Y-m-d');
$tbl_name='tbl_class';
$data="faculty_name='$faculty_name',
time_duration='$time_duration',
qns_per_set='$qns_per_page',
total_english='$total_english',
total_math='$total_math',
is_active='$is_active',
updated_date='$updated_date'";
$where="faculty_id='$faculty_id'";
$query=$obj->update_data($tbl_name,$data,$where);
$res=$obj->execute_query($conn,$query);
if($res===true)
{
$_SESSION['update']="<div class='success'>Faculty successfully updated.</div>";
header('location:'.SITEURL.'admin/index.php?page=faculties');
}
else
{
$_SESSION['update']="<div class='error'>Failed to update faculty. Please try again.</div>";
header('location:'.SITEURL.'admin/index.php?page=update_faculty&id='.$faculty_id);
}
}
?>
</div>
</div>
</div>
<!--Body Ends Here-->
\ No newline at end of file
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
{ {
header('location:'.SITEURL.'admin/index.php?page=questions'); header('location:'.SITEURL.'admin/index.php?page=questions');
} }
?> ?><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>r><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<div class="main"> <div class="main">
<div class="content"> <div class="content">
<div class="report"> <div class="report">
......
tt<!--Body Starts Here-->
<head> <head>
<link rel="stylesheet" href="../box/assets/css/styles.css"> <link rel="stylesheet" href="../box/assets/css/styles.css">
...@@ -304,7 +304,7 @@ $(document).ready(function(){ ...@@ -304,7 +304,7 @@ $(document).ready(function(){
<div class="table-title"> <div class="table-title">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<h2><i class="fa fa-user-circle" aria-hidden="true"></i>&nbsp;Manage <b>Students</b></h2> <h2><i class="fa fa-user-circle" aria-hidden="true"></i>&nbsp;Manage <b>Lessons</b></h2>
</div> </div>
...@@ -316,7 +316,7 @@ $(document).ready(function(){ ...@@ -316,7 +316,7 @@ $(document).ready(function(){
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-video-camera"></i> <span>Video Lesson</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-video-camera"></i> <span>Video Lesson</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-calendar"></i> <span>Lesson Shedule</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-calendar"></i> <span>Lesson Shedule</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-calendar"></i> <span>Live Lesson</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-calendar"></i> <span>Live Lesson</span></a>
<a href="<?php echo SITEURL; ?>admin/index.php?page=add_student" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add New Lesson</span></a> <a href="<?php echo SITEURL; ?>admin/index.php?page=my_uploads" class="btn btn-success" data-toggle="modal"><i class="fa fa-plus"></i> <span>Add New Lesson</span></a>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment