Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions PDF Format/pftTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<td>'. $grades[$x]['subject_name'] .'</td>
<td>'. ($grades[$x]['lec_units'] + $grades[$x]['lab_units']) .'</td>
<td>'. $grades[$x]['grade'] .'</td>
<td></td>
<td><textarea style="width:100%; margin:0;border:none;" rows="1"></textarea></td>
</tr>';
}

Expand Down Expand Up @@ -202,7 +202,7 @@
<div class="text-center">
<small>
<strong>
<u><?php echo $adviser;?></u>
<b><input type="text" style="width:100%; margin:0;border:none;border-bottom: 1px solid;;text-align: center;" value="<?php echo $adviser;?>"></input></b>
</strong>
<br>
Adviser
Expand All @@ -223,7 +223,7 @@

<div class="col-12">
<small class="float-start">
<strong>RODERICK P. GO, PhD</strong>
<strong><input type="text" style="width:100%; margin:0;border:none;border-bottom: 1px solid;text-align: center;" value="RODERICK P. GO, PhD"></input></strong>
<br>
OIC-DEAN, CSS
</small>
Expand Down Expand Up @@ -251,15 +251,15 @@

<div class="col-6 mt-2">
<small>
<strong>LUCY FELIX-SADIWA, MSCS</strong>
<strong><input type="text" style="width:100%; margin:0;border:none;text-align: center;" value="LUCY FELIX-SADIWA, MSCS"></input></strong>
<br>
Member/Computer Science Department Head
</small>
</div>

<div class="col-6 mt-2">
<small>
<strong>GADMAR M. BELAMIDE, MEnggEd</strong>
<strong><input type="text" style="width:100%; margin:0;border:none;text-align: center;" value="GADMAR M. BELAMIDE, MEnggEd"></input></strong>
<br>
Member/College Secretary
</small>
Expand All @@ -268,7 +268,7 @@

<div class="col-6 mt-2">
<small>
<strong>MARJORIE A. ROJAS</strong>
<strong><input type="text" style="width:100%; margin:0;border:none;text-align: center;" value="MARJORIE A. ROJAS"></input></strong>
<br>
Member/Student Affairs Coordinator
</small>
Expand All @@ -277,16 +277,15 @@

<div class="col-6 mt-2">
<small>
<strong>JOHN ED AUGUSTUS A. ESCORIAL, MIT</strong>
<strong><input type="text" style="width:100%; margin:0;border:none;text-align: center;" value="JOHN ED AUGUSTUS A. ESCORIAL, MIT"></input></strong>
<br>
Member/Information Technology Department Head
</small>
</div>

<div class="col-12 mt-2 text-center">
<small>
<strong>ODON A. MARAVILLAS JR, MSCS
</strong>
<strong><input type="text" style="width:100%; margin:0;border:none;text-align: center;" value="ODON A. MARAVILLAS JR, MSCS"></input></strong>
<br>
Chairperson/Associate Dean
</small>
Expand Down Expand Up @@ -352,10 +351,16 @@ function download(){
callback: function(docPDF) {
docPDF.save('HTML Linuxhint web page.pdf');
},
x: 15,
y: 15,
width: 170,
windowWidth: 650
x: 20,
y: 2,
width: 170,
windowWidth: 700,
// orientation: "portrait",
// unit: "in",
// format: [8, 12],
orientation: "l",
unit: "in",
// format: 'legal',
});
}

Expand Down
306 changes: 190 additions & 116 deletions apply/admin-application.php

Large diffs are not rendered by default.

97 changes: 68 additions & 29 deletions apply/adviser-application.php

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion apply/adviser-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
$conn = mysqli_connect('localhost', 'root', '', 'deanslist');

if (isset($_POST["accept"])) {

$sql = "UPDATE deanslist_applicants SET adviser_status = 'Accepted' WHERE id =".$_POST['app_id']."";
mysqli_query($conn, $sql);
// redirect to this page
Expand Down
286 changes: 286 additions & 0 deletions apply/application-edit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
<?php
session_start();
if (!isset($_SESSION['logged-in'])) {
header('location: ../login/login.php');
}
if(!isset($_GET["id"])){
if (isset($_SESSION['user_type'])){
if (strtolower($_SESSION['user_type']) == 'admin')
header('location: admin-application.php');
else if (strtolower($_SESSION['user_type']) == 'student')
header('location: application-new.php');
else if (strtolower($_SESSION['user_type']) == 'adviser')
header('location: adviser-application.php');
else
header('location: dashboard.php');
}
}
$conn = mysqli_connect('localhost', 'root', '', 'deanslist');
$path = "../";

require_once $path . "class/subject.class.php";
require_once $path . "class/listers.class.php";

include_once '../class/program.class.php';

date_default_timezone_set('Asia/Manila');

$subject = new subject;
$applicant = new Listers;
$subject -> applicant_id = $_SESSION['user_id'];

$listOfSubject = [];

$programs = new Program();

// GET data from dtbase
$listOfSubject = $subject->GetCertainApplicationSubjects($_GET["id"]);

$semtocheck = false;
// ADD A NEW APPLICANT WHEN FIRST STEP DONE
$fullname = $_SESSION['user_firstname'] . " " . $_SESSION['user_lastname'];
$currentDate = date("Y-m-d");


if (isset($_POST['grade'])){
$grades = $_POST['grade'];
$subjectIDs = $_POST['subjectId'];
$appID = $_GET["id"];

$initialGrade = 0;
$count = 0;

foreach($grades as $grade){
$initialGrade += floatval($grade);
$count++;
}
$average = $initialGrade / $count;

foreach($subjectIDs as $key => $n ) {
if ($applicant->updateGradesPerSubject($appID, $n, $grades[$key]) && $applicant->updateApplicantGPA($appID,$average)){
header('location: application-new.php');
}
}
}

?>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/boxicons@latest/css/boxicons.min.css">
<link href="../css/style.css" rel="stylesheet">
<link href="../css/application.css?v=<?php echo time(); ?>" rel="stylesheet">

<script src="https://kit.fontawesome.com/b99e675b6e.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Raleway&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/boxicons@latest/css/boxicons.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

<title>Application | Dean's List Application System - CCS</title>
<link rel="icon" href="../img/ccslogo.png" type="image/icon type">
</head>

<body style="overflow-x: hidden">
<div class="side-bar">
<br>
<div class="logo-details">
<img class="logo" style="margin-left:2px" src="../img/ccslogo.png" width="55" height="60">
<span class="logo-name">Dean's List Application <br> System</span>
</div>
<br>
<ul class="nav-links">
<li>
<a href="../dashboard/dashboard.php">
<i class='bx bx-grid-alt' ></i>
<span class="links-name">Dashboard</span>
</a>
</li>

<?php if($_SESSION['user_type'] == 'student') { ?>
<li>
<a href="../apply/application-new.php" class="active">
<i class='bx bxs-edit'></i>
<span class="links-name">Application</span>
</a>
</li>
<?php } ?>

<?php if($_SESSION['user_type'] == 'adviser') { ?>
<li>
<a href="../apply/adviser-application.php">
<i class='bx bxs-edit'></i>
<span class="links-name">Application | Adviser</span>
</a>
</li>
<?php } ?>

<?php if ($_SESSION['user_type'] == 'admin') { ?>
<li>
<a href="../apply/admin-application.php">
<i class='bx bxs-edit'></i>
<span class="links-name">Application | Admin</span>
</a>
</li>
<?php } ?>

<li>
<a href="../listers/listers.php">
<i class='bx bx-list-check'></i>
<span class="links-name">Dean's Listers</span>
</a>
</li>
<li>
<a href="../faculty/faculty.php">
<i class='bx bx-group' ></i>
<span class="links-name">CCS Faculty</span>
</a>
</li>

<li>
<a href="../programs/programs.php">
<i class='bx bx-book-reader'></i>
<span class="links-name">CCS Courses</span>
</a>
</li>

<?php if($_SESSION['user_type'] == 'admin') { ?>
<li>
<a href="../curriculum/curriculum.php">
<i class='bx bxs-edit'></i>
<span class="links-name">Curriculum</span>
</a>
</li>
<?php } ?>

<?php if ($_SESSION['user_type'] == 'admin') { ?>
<li>
<a href="../settings/settings.php">
<i class='bx bx-cog'></i>
<span class="links-name">Settings</span>
</a>
</li>

<li>
<a href="../users/index.php">
<i class='bx bx-cog'></i>
<span class="links-name">Users</span>
</a>
</li>
<?php } ?>

<hr class="line">
<li id="logout-link">
<a class="logout-link" href="../login/logout.php" title="Logout">
<i class='bx bx-log-out-circle'></i>
<span class="links-name">Logout</span>
</a>
</li>
</ul>
</div>
<div id="logout-dialog" class="dialog" title="Logout">
<p><span>Are you sure you want to logout?</span></p>
</div>

<script>
$(document).ready(function() {
$("#logout-dialog").dialog({
resizable: false,
draggable: false,
height: "auto",
width: 400,
modal: true,
autoOpen: false
});
$(".logout-link").on('click', function(e) {
e.preventDefault();
var theHREF = $(this).attr("href");

$("#logout-dialog").dialog('option', 'buttons', {
"Yes": function() {
window.location.href = theHREF;
},
"No": function() {
$(this).dialog("close");
}
});

$("#logout-dialog").dialog("open");
});
});
</script>

<section class="home-section">
<!-- NAVBAR -->
<nav>
<div class="side-bar-button">
<i class='bx bx-menu small'></i>
<i class='bx bx-menu large'></i>
</div>
<div class="profile-details">
<i class='bx bx-user'></i>
<?php echo '<span class="admin-name">'.$_SESSION['user_firstname'].' '.$_SESSION['user_lastname'].'</span>'; ?>
</div>
</nav>

<script>
var reference = (function self() {
if (sessionStorage.getItem("sidebar") == "small") {
small();
} else {
large();
}
}());

$('.bx-menu.small').on('click', function() {
small();
});
$('.bx-menu.large').on('click', function() {
large();
});

function small() {
$('.bx-menu.small').hide();
$('.bx-menu.large').show();

$('.side-bar').css('width', '60px');
$('.home-section').css('width', 'calc(100% - 60px)');
$('.home-section').css('left', '60px');
$('.home-section nav').css('width', 'calc(100% - 60px)');
$('.home-section nav').css('left', '60px');

sessionStorage.setItem("sidebar", "small");
}

function large() {
$('.bx-menu.small').show();
$('.bx-menu.large').hide();

$('.side-bar').css('width', '250px');
$('.home-section').css('width', 'calc(100% - 100px)');
$('.home-section').css('left', '170px');
$('.home-section nav').css('width', 'calc(100% - 250px)');
$('.home-section nav').css('left', '250px');

sessionStorage.setItem("sidebar", "large");
}
</script>
<!-- NAVBAR -->
<div class="home-content">
<?php
include '../apply/apply-edit.php';
?>
</div>
</section>
</body>
</html>
Loading