Beispiel #1
0
<?php

include 'header.php';
checkAndRedirectNotAuthorizedUsers($_SESSION, "PROFESSOR");
$username = $_SESSION['user'];
echo "<h1>Welcome: " . $username . "</h1>";
include 'footer.php';
Beispiel #2
0
<?php

include 'header.php';
checkAndRedirectNotAuthorizedUsers($_SESSION, "ADMIN");
?>
<script src="departmentAjax.js"></script>
<script src="formSubmitAjax.js"></script>

<div class="formContainer">
    <div id="msg"></div>
    <div class="department" id="add">
        <h4>Add Department </h4>
        <form action="manageDepartmentsSubmit.php" method="post">
            <?php 
$uni = getAllUniversitiesNames();
echo generateDropDownList($uni, 'selectedUniversity');
?>
            <input type="text" name="departmentName" placeholder="Department Name"><br>
            <input type="text" name="secretaryUsername" placeholder="Secretary Username"><br>
            <input type="text" name="secretaryPassword" placeholder="Secretary Password"><br>
            <input type="submit" name="submit" value="add">
        </form>
    </div>

    <div class="department" id="rename">
        <h4>Rename Department </h4>
        <form action="manageDepartmentsSubmit.php" method="post">
            <?php 
echo generateDropDownListWithFirstOption(getAllUniversitiesNames(), "Select University", 'selectedUniversity', 'selectedUniversityRename');
echo generateDropDownListWithFirstOption(null, "Select University First", 'selectedDepartment', 'selectedDepartmentRename');
?>
Beispiel #3
0
<?php

include 'header.php';
checkAndRedirectNotAuthorizedUsers($_SESSION, "STUDENT");
$username = $_SESSION['user'];
echo "<h1>Welcome: " . $username . "</h1>";
echo "<h4>These are your grades: </h4>";
echo getTableWithStudentGrades($username);
include 'footer.php';
Beispiel #4
0
<?php

include 'header.php';
checkAndRedirectNotAuthorizedUsers($_SESSION, array("ADMIN", "SECRETARY", "PROFESSOR"));
?>
<script src="gradesAjax.js"></script>
<script src="formSubmitAjax.js"></script>

<div class="formContainer">
    <div id="msg"></div>
    <div class="grade" id="add">
        <h4>Add Grade</h4>
        <form action="manageGradesSubmit.php" method="post">
            <?php 
if (isLoginAsAdmin()) {
    echo generateDropDownListWithFirstOption(getAllUniversitiesNames(), "Select University", 'selectedUniversity', 'selectedUniversityAdd');
    echo generateDropDownListWithFirstOption(null, "Select University First", 'selectedDepartmentId', 'selectedDepartmentAdd');
    echo generateDropDownListWithFirstOption(null, "Select Department First", 'selectedStudentId', 'selectedStudentAdd');
    echo generateDropDownListWithFirstOption(null, "Select Student First", 'selectedCourseId', 'selectedCourseAdd');
} else {
    if (isLoginAsSecretary()) {
        $departmentId = $_SESSION["departmentId"];
        echo "<input type='hidden' id='selectedDepartmentAdd' name='selectedDepartmentId' value='{$departmentId}'>";
        echo generateDropDownListWithFirstOptionAndSpecifiedValueKey(getStudents($departmentId), "Select Student", 'selectedStudentId', 'selectedStudentAddSec', 'studentId', 'studentUsername');
        echo generateDropDownListWithFirstOption(null, "Select Student First", 'selectedCourseId', 'selectedCourseAddSec');
    } else {
        if (isLoginAsProfessor()) {
            $departmentId = $_SESSION["departmentId"];
            echo "<input type='hidden' id='selectedDepartmentAdd' name='selectedDepartmentId' value='{$departmentId}'>";
            echo generateDropDownListWithFirstOptionAndSpecifiedValueKey(getStudents($departmentId), "Select Student", 'selectedStudentId', 'selectedStudentAddSec', 'studentId', 'studentUsername');
            echo generateDropDownListWithFirstOption(null, "Select Student First", 'selectedCourseId', 'selectedCourseAddSec');
Beispiel #5
0
<?php

include 'header.php';
checkAndRedirectNotAuthorizedUsers($_SESSION, "SECRETARY");
$username = $_SESSION['user'];
echo "<h1>Welcome: " . $username . "</h1>";
include 'footer.php';