<li class="active"> Monitoring Panel</li> </ul> </div> <?php $db = connectDb(); $sql2 = "select * from document_actions"; $rs2 = $db->query($sql2); $nm2 = $rs2->num_rows; for ($k = 0; $k < $nm2; $k++) { $row2 = $rs2->fetch_assoc(); $action[$k]["id"] = $row2['action_code']; $action[$k]["name"] = $row2['action_description']; } $db = connectDb(); if (isset($_POST['active_documents'])) { $department = getDepartment($db, $_POST['active_documents']); $rs = topActiveDocumentsDivision($db, $_POST['active_documents']); } else { $rs = topActiveDocuments($db); } $nm = $rs->num_rows; ?> <div class="wrapper"> <div class="row"> <div class="col-sm-12"> <section class="panel"> <header class="panel-heading"> Most Active Documents <?php if (isset($_POST['active_documents'])) { echo "for " . $department;
<?php session_start(); require_once '../core/init.php'; auth(); // protects this page against unauthenticated users if (isset($_GET['id'])) { $departmentId = $_GET['id']; // fetch department for display $departmet = getDepartment($departmentId)[0]; // fetch categories for display $categories = getCategories($departmentId); //print_r($categories);die(); } /** * Displays all departments * * @var $departments | all departments * @var $userData | data of authenticated user * * Begin page html from here */ ?> <!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">
<div class="col-md-6 col-sm-6"> <input size="16" type="text" value="<?php echo date("Y-m-d H:i"); ?> " readonly class="form_datetime form-control"> </div> </div> <div class="form-group"> <label class="col-md-2 col-sm-2 control-label">Originating Office</label> <div class="col-md-6 col-sm-6"> <?php $db = connectDb(); // retrieved from db_page $departmentName = getDepartment($db, $_SESSION['division_code']); //retrieved from functions/general functions $sql = "select * from originating_office where department_name='" . $departmentName . "'"; $rs = $db->query($sql); $row = $rs->fetch_assoc(); retrieveOfficeListHTML($db, $row['department_code'], 'originating_office', 'origInput'); // retrieved from functions/form functions ?> </div> </div> <div class="form-group"> <label class="col-md-2 col-sm-2 control-label">Originating Officer</label> <div class="col-md-6 col-sm-6"> <?php $db = connectDb();
<?php session_start(); require_once '../core/init.php'; //prevents unautenticated users if (!isset($_SESSION['admin_id'])) { redirect('index'); } $departments = getDepartment(); $courses = getCourse(); ?> <!DOCTYPE html> <html lang="eng"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1" <title>Add questions</title> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"> <script type="text/javascript" src = "js/jquery-2.1.4.min.js"></script> <script type="text/javascript" src="js/bootstrap.min.js"></script> <link rel="stylesheet" type="text/css" href="css/summernote.css"> <script type="text/javascript" src= "js/summernote.js"></script> <link rel="stylesheet" type="text/css" href="css/addquestions.css"> <link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.css"> </head> <body> <a href="admin-dashboard.php" class="btn btn-defauld">Dashboard</a> <br> <div class="wrapper">
$rs = $db->query($sql); $nm = $rs->num_rows; for ($i = 0; $i < $nm; $i++) { $row = $rs->fetch_assoc(); echo "<option value='" . $row['department_code'] . "'>" . $row['department_name'] . "</option>"; } echo "</select>"; echo "</td>"; echo "<td><input class='btn btn-success' type=submit value='Get Most Active' /></td>"; echo "</tr>"; echo "</table>"; ?> </form> <?php if (isset($_POST['divisionActive'])) { $department = getDepartment($db, $_POST['divisionActive']); $db = retrieveRecordsDb(); $rs = topActiveDocumentsDivision($db, $_POST['divisionActive']); $nm = $rs->num_rows; if ($nm > 0) { ?> <table style='font-size:13px;' class='table table-striped table-bordered' width=100%> <thead> <tr> <th colspan=8><h3>Active Documents for <?php echo $department; ?> </h3></th> </tr> <tr>
$app->flash('error', $result); $app->redirect($app->urlFor('departmentAdd')); } } })->name('departmentAdd'); $app->delete('/admin/departments/delete/:department', function ($departmentID) use($app) { $result = deleteDepartment($app->db, $departmentID); if (empty($result)) { $app->halt(200); } else { $app->halt(500, $result); } $app->halt('500', 'Not implemented yet.'); }); $app->get('/admin/departments/edit/:department', function ($departmentID) use($app) { $app->render('html/editDepartment.html', array('department' => getDepartment($app->db, $departmentID))); })->name('editDepartment'); $app->post('/admin/departments/edit/:department', function ($departmentID) use($app) { $result = editDepartment($app->db, $departmentID, $app->request->post('name')); if ($app->request->post('ajax') === 'true') { if ($result === false) { $app->halt(409, $statement->errorInfo()[2]); } else { $app->halt(200); } } if ($result === false) { $app->flash('error', $statement->errorInfo()[2]); $app->redirect($app->urlFor('editDepartment', array('department' => $departmentID))); } else { $app->redirect($app->urlFor('departmentsList'));
?> <td><? $shift_a_skill=getDepartment($row_sub['rec_id'],$txt_date,'%P%',$row['rec_id'],'Third'); echo $shift_a_skill; $shift_a_present_skill=$shift_a_skill+$shift_a_present_skill; ?></td> <? } } mysql_data_seek($result,0); $present_dept_sum=0; if(mysql_num_rows($result)>0) { while($row = mysql_fetch_array($result)) { ?> <td><? echo $present_dept=getDepartment($row_sub['rec_id'],$txt_date,'%P%',$row['rec_id'],'%%'); $present_dept_sum=$present_dept_sum+$present_dept; ?> </td> <? } } mysql_data_seek($result,0); $good_dept_sum=0; if(mysql_num_rows($result)>0) { while($row = mysql_fetch_array($result)) { ?> <td><? echo $good_dept=getGoodWorkDept($row_sub['rec_id'],$txt_date,$row['rec_id'],'%%'); $good_dept_sum=$good_dept_sum+$good_dept; ?> </td>
<?php session_start(); require_once '../core/init.php'; auth(); // protects this page against unauthenticated users if (isset($_POST['course'], $_POST['deptId'])) { // initialise variables for the page $courseId = $_POST['course']; $_SESSION['deptId'] = $_POST['deptId']; $_SESSION['courseId'] = $courseId; //fetch department for display $department = getDepartment($_SESSION['deptId'])[0]; // } elseif (isset($_GET['courseid'])) { // initialize variables for the page $courseId = numDecrypt($_GET['courseid']); $_SESSION['courseId'] = $courseId; } //$_SESSION['start'] = "started"; // fetch course for display $course = getCourse($_SESSION['courseId'])[0]; //print_array($_SESSION); die(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8">
<th>Security Phrase</th> <th>No. of Users allowed</th> </tr> </thead> <tbody> <?php $db = retrieveUsersDb(); $db2 = retrieveRecordsDb(); $rs = listDivSettings($db); $nm = $rs->num_rows; for ($i = 0; $i < $nm; $i++) { $row = $rs->fetch_assoc(); ?> <tr> <td><?php echo getDepartment($db2, $row['division_id']); ?> </td> <td><?php echo $row['division_id']; ?> </td> <td><?php echo $row['security_phrase']; ?> </td> <td><?php echo $row['user_no']; ?> </td> </tr>
require "/DCNFS/users/web/pages/tchen/COEN/174/SCUWaitLister/fcn/parseCourseList.php"; ?> <html> <head> <title>Course List | SCUWaitLister</title> <link rel = "stylesheet" type = "text/css" href = "../css/style.css"> </head> <body> <div class = "head"> <h1>SCUWaitLister</h1> </div> <div class = "content"> <h2>SCUWaitLister Waitlist Selection Page Page</h2> <?php require "../fcn/getDepartment.php"; $theDepartment = getDepartment(); ?> <p> You are using this system as the <?php echo $_SERVER['REDIRECT_REMOTE_USER']; ?> Department.<br /> To change the Department, please restart the browser. </p> <a class = 'return' href='index.php'>Return</a><br /> <?php $courseListLocation = "../resource/" . $theDepartment . "/courseList.csv"; $requestListLocation = "../resource/" . $theDepartment . "/request/*"; if (!file_exists($courseListLocation)) { die("<p>" . "The " . $theDepartment . " Department has not uploaded a course list.<br />" . "Please <a href='upload.php'>upload</a> a course list first.<br />" . "</p>"); }
//include page header include_once 'template/header.php'; //get Company information $companyInfo = getCompany(); $departments = getDepartment(); switch (get_input('section')) { case 'department': $did = get_input('did'); $total = companyTotal($did); if (get_input('add') == 'add') { $pdid = get_input('pdid', 0); include 'template/newdepartment.php'; } else { $employees = getEmployees($did); $departmentInfo = getDepartment($did); $subDepartments = getDepartment($did, true); include 'template/department.php'; } break; case 'employee': $eid = get_input('eid'); $employeeInfo = getEmployees($eid, true); if (get_input('add') == 'add') { $employeeInfo = array(); $eid = 0; $employeeInfo[0]['did'] = get_input('did'); } include 'template/employee.php'; break; default: $total = companyTotal();
//print 'Please confirm your password first'; } else { if ($_POST['password1'] != $_POST['password2']) { //print 'Guy,check your password again.'; echo 'reconfirm your password'; } else { //check if a row with surname, matric_number and level exists $surname = strtoupper($_POST['surname']); $matric_number = strtoupper($_POST['matric_number']); $level = $_POST['level']; $check_query = "SELECT * FROM students WHERE\n level = '{$level}' AND\n name LIKE '{$surname}%' AND\n matric_number = '{$matric_number}'"; $result = mysql_query($check_query) or die('There is error in the query'); if (mysql_num_rows($result) != 0) { //successful registration,create account for the person //get and store useful details $department = getDepartment($_POST['department']); $last_name = $_POST['lastName']; $email = $_POST['email']; $username = $_POST['username']; $password = $_POST['password1']; $insert_query = "INSERT INTO\n voters(fname,lname,level,email,username,password,account_created_on,department)\n VALUES ('{$surname}','{$last_name}','{$level}','{$email}','{$username}','{$password}','NOW()','{$department}')"; mysql_query($insert_query) or die('Error while inserting'); $msg = 'You are a student '; } else { //print 'We currently do not have your studentship details in our database.Contact the administrator.'; $msg = 'There are still some bugs to fix here'; } } } // $msg= 'success'; } elseif ($_POST['submit'] = 'signIn') {
// @author: Kwabena Gyekye Ohene-Bonsu include_once "gen.php"; include_once 'adb.php'; $cmd = get_datan("cmd"); switch ($cmd) { case 2: getLeaveType(); break; case 3: requestLeave(); break; case 4: see_all_my_requests(); break; case 5: getDepartment(); break; case 6: dispatchHardware(); break; case 8: get_it_admin_by_id(); break; // default: // echo "{"; // echo jsonn("result", 0). ","; // echo jsons("message","unknown command"); // echo "}"; } function getLeaveType() {
retrieveShiftListHTML("amorpm"); ?> </td> </tr> <tr> <td>Originating Office:</td> <!-- <td><input type=text name='origInput' /></td> </tr> <tr> <td align=right>-or- Select from the list<input type=checkbox name='origList' value='on' ></td> --> <td> <?php $db = retrieveRecordsDb(); $departmentName = getDepartment($db, $_SESSION['department']); $sql = "select * from originating_office where department_name='" . $departmentName . "'"; $rs = $db->query($sql); $row = $rs->fetch_assoc(); retrieveOfficeListHTML($db, $row['department_code'], 'originating_office', 'origInput'); ?> </td> </tr> <tr> <td>Originating Officer:</td> <td> <?php $db = retrieveRecordsDb(); retrieveOfficerListHTML($db, "originating_officer"); ?> </td>