?>
		<!-- //header -->
		<br>
		<br>

		<!-- Content -->
		<div class="row-fluid">

			<?php 
include_layout_template('admin_menu.php');
?>

			<div class="span9">
				<?php 
if (isset($_POST["uid"])) {
    $user_id = customDecrypt($_POST["uid"]);
    $user = AdminLog::find_by_id($user_id);
    if (isset($user->surname) && isset($user->othernames)) {
        echo '<h5 align="center">Edit ' . $user->surname . ' ' . $user->othernames . '\'s Profile</h5>';
    }
}
?>
				<hr>
				<form action="" method="POST" class="admin_edit_form form-horizontal" >
				  <div class="control-group">
				    <label class="control-label" for="inputSurname">Surname</label>
				    <div class="controls">
				    	<div class="input-prepend">
				      		<span class="add-on"><i class="icon-user"></i></span>
				            <input type="text" id="surname" name="surname" placeholder="Enter surname" value="<?php 
if (isset($user->surname)) {
                 echo '<hr>';
             } else {
                 echo '<h4 class="alert alert-error">Error</h4>';
                 echo '<hr>';
                 echo "Failed to insert into registras table.";
                 echo '<hr>';
             }
         } else {
             echo "file not attached";
             print_r($_FILES);
         }
     }
     break;
 case 'del_registra':
     $registra = new Registra();
     $id = customDecrypt($_POST['rid']);
     $registra_details = $registra->find_by_id($id);
     $registra->id = $registra_details->id;
     if (!empty($registra_details) && !empty($_FILES['signature']['name'])) {
         $registra->id = $registra_details->id;
         unlink(SITE_ROOT . DS . 'registra_signatures' . DS . $registra_details->signature_image);
     }
     if ($registra->delete()) {
         echo '<h4 class="alert alert-success">Success</h4>';
         echo '<hr>';
         echo "<p>You have successfully deleted a registra record from registras table</p>";
         echo '<hr>';
     } else {
         echo '<h4 class="alert alert-error">Error</h4>';
         echo '<hr>';
         echo "Failed to deleted a registra record from registras table.";
<?php

require_once "inc/initialize.php";
$md5mail = md5('email');
if (!isset($_GET[$md5mail])) {
    pageredirect('index.php');
} else {
    $encryptedmail = $_GET[$md5mail];
    $decryptedmail = customDecrypt($encryptedmail);
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>University of Jos, Nigeria</title>
<?php 
require_once LIB_PATH . DS . 'css.php';
?>
</head>
<body>
<?php 
include_layout_template("header.php");
?>

<!--The Main Content Here Please-->
<div class="container">
    <div class="span8 offset2 border-radius">     
          <h5 align="center">Reset Password</h5>
    <hr>
    <form class="contact-us resetpassword" action="#" >
Exemple #4
0
<?php

require_once "inc/initialize.php";
if (isset($_GET["tranx_no"]) && !empty($_GET["tranx_no"])) {
    $orderId = customDecrypt($_GET["tranx_no"]);
} else {
    redirect_to('home.php');
}
# Instance of MySQL Database
$database = new MySQLDatabase();
# Instance of Session
$session = new Session();
# User details
$user = User::find_by_id($session->id);
# Set QR Code to writable location, a place for temp generated PNG files
$PNG_TEMP_DIR = 'inc/qrcode/temp/';
# HTML PNG location prefix
$PNG_WEB_DIR = 'inc/qrcode/temp/';
# QR Code Library
include "inc/qrcode/qrlib.php";
# ofcourse we need rights to create temp dir
if (!file_exists($PNG_TEMP_DIR)) {
    mkdir($PNG_TEMP_DIR);
}
# QR Code properties
$errorCorrectionLevel = 'H';
$matrixPointSize = 4;
# Get payment record for an application form
// $sql = "SELECT * FROM `adm_access_code` WHERE `jamb_rem_no`='".$orderId."' AND `reg_num`='".$orderId."'";
$sql = "SELECT * FROM `adm_access_code` WHERE `jamb_rem_no`='" . $orderId . "'";
$payment = AdmAccess::find_by_sql($sql);
     if ($requirements->save()) {
         echo '<h4 class="alert alert-success">Success</h4>';
         echo '<hr>';
         echo "<p>You have successfully added a new record into requirements table</p>";
         echo '<hr>';
     } else {
         echo '<h4 class="alert alert-error">Error</h4>';
         echo '<hr>';
         echo "Failed to insert into requirements table.";
         echo '<hr>';
     }
     break;
 case 'update_requirements':
     $requirements = new Requirements();
     $requirements->db_fields = array('p_id', 'name', 'content', 'visible');
     $requirements->id = customDecrypt($_POST['rid']);
     $requirements->name = $_POST['title'];
     $requirements->content = $_POST['content'];
     $requirements->p_id = $_POST['p_id'];
     $requirements->visible = $_POST['status'];
     if ($requirements->save()) {
         echo '<h4 class="alert alert-success">Success</h4>';
         echo '<hr>';
         echo "<p>You have successfully updated admission requirements table</p>";
         echo '<hr>';
     } else {
         echo '<h4 class="alert alert-error">Error</h4>';
         echo '<hr>';
         echo "Failed to update admission requirements table.";
         echo '<hr>';
     }
<?php

require_once "../inc/initialize.php";
//checks if admin user is logged in
if (!$session->is_admin_logged_in()) {
    redirect_to('index.php');
}
if (isset($_POST['rid']) && !empty($_POST['rid'])) {
    $registra = Registra::find_by_id(customDecrypt($_POST['rid']));
    // print_r($registra->full_name);
    // die();
}
?>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>University of Jos, Nigeria</title>
		<?php 
require_once LIB_PATH . DS . 'css.php';
?>
	</head>

	<body>

		<!-- beginnning of main content-->
		<!-- header -->
		<?php 
include_layout_template('admin_header.php');
?>
		<!-- //header -->
<?php

require_once "inc/initialize.php";
require_once "inc/vendor/autoload.php";
use Carbon\Carbon;
$dt = Carbon::now();
if (!$session->is_logged_in()) {
    redirect_to("index.php");
}
# Instance of Carbon Class with the current time
$date_now = new Carbon('now');
$label = customDecrypt($_GET['feed']);
if ($label) {
    $feed_details = Feedback::find_by_id($label);
}
?>
<!DOCTYPE HTML>
<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>University of Jos, Nigeria - Transcript System</title>
    <?php 
require_once LIB_PATH . DS . 'javascript.php';
require_once LIB_PATH . DS . 'css.php';
?>
    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
        }
        .sidebar-nav {
<?php

require_once "../../inc/initialize.php";
$reply_title = 'Re: ' . $_POST['title'];
$reply_message = 'In reply to the message you sent <br>&quot;' . $_POST['message'] . '&quot;<br><br>' . $_POST['replymessage'];
$recipient_id = customDecrypt($_POST['recipient_id']);
$sender_id = 1;
$database = new MYSQLDatabase();
$sendsql = "INSERT INTO applicant_notifications (sender_id, title, content, recipient_id, notification_date, notification_time, status) VALUES(" . $sender_id . ", '" . $reply_title . "', '" . $reply_message . "', " . $recipient_id . ", '" . date('Y-m-d') . "', '" . date('H:i') . "', 1)";
$result = $database->query($sendsql);
if ($result) {
    echo '<h4 class="alert alert-success">Success</h4>';
    echo '<hr>';
    echo "Your reply has been sent.";
    echo '<hr>';
} else {
    echo '<h4 class="alert alert-danger">Error</h4>';
    echo '<hr>';
    echo "Your reply was not sent.";
    echo '<hr>';
}
Exemple #9
0
<?php

require_once "inc/initialize.php";
if (isset($_GET['ajiya'])) {
    $form_id = customDecrypt($_GET['ajiya']);
    $sql = "SELECT * FROM `adm_access_code` WHERE `jamb_rem_no`='" . $form_id . "' AND `reg_num`='" . $form_id . "'";
    $payment_record = $database->fetch_array($database->query($sql));
    if (empty($payment_record)) {
        redirect_to('select_form.php');
    }
    $user = new User();
    $user_sql = "SELECT * FROM `personal_details` WHERE `form_id` = '" . $form_id . "'";
    $user = $user->find_by_sql($user_sql);
    $user = array_shift($user);
    $student_status = $user->get_student_status();
    $database = new MYSQLDatabase();
    $sqlprogrammedetails = "SELECT * FROM personal_details p, department d, faculty f, photographs photo WHERE p.applicant_id=" . $user->applicant_id . " AND p.programme_applied_id=d.department_id AND d.faculty_id=f.faculty_id AND p.applicant_id = photo.applicant_id";
    $programmedetails = $database->fetch_array($database->query($sqlprogrammedetails));
    $sessiondetails = $database->fetch_array($database->query("SELECT session FROM application_status WHERE id=1"));
    $paymentdetails = $database->fetch_array($database->query("SELECT * FROM adm_access_code WHERE jamb_rem_no='" . $programmedetails['form_id'] . "'"));
    $invoice = new Invoice();
    $invoice->db_fields = array('applicant_id', 'date', 'amount');
    $invoice->applicant_id = $user->applicant_id;
    $invoice->date = date('Y-m-d H:i:s', time());
    $invoice->amount = $paymentdetails['amount'];
    $invoice->save();
    $invoicedetails = $database->fetch_array($database->query("SELECT * FROM invoice WHERE applicant_id='" . $user->applicant_id . "'"));
    ?>

    <!DOCTYPE HTML>
    <html>
Exemple #10
0
<?php

require_once "inc/initialize.php";
$md5mail = customDecrypt($_GET['email']);
//checks if the link is actually from the mail sent
if (!isset($md5mail)) {
    redirect_to('index.php');
} else {
    $decryptedmail = $md5mail;
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>University of Jos, Nigeria</title>
<?php 
require_once LIB_PATH . DS . 'css.php';
?>
</head>
<body>
<?php 
include_layout_template("header.php");
?>

<!--The Main Content Here Please-->
<div class="container">
<div class="row-fluid">
    <div class="span7 create">
    <h5 align="center">Mail Account Verification</h5>
    <hr>
Exemple #11
0
<?php

require_once "../inc/initialize.php";
//checks if admin user is logged in
if (!$session->is_admin_logged_in()) {
    redirect_to('index.php');
}
if (isset($_POST['nid']) && !empty($_POST['nid'])) {
    $news = News_Events::find_by_id(customDecrypt($_POST['nid']));
    // print_r($news->title);
    // die();
}
?>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>University of Jos, Nigeria</title>
		<?php 
require_once LIB_PATH . DS . 'css.php';
?>
	</head>

	<body>

		<!-- beginnning of main content-->
		<!-- header -->
		<?php 
include_layout_template('admin_header.php');
?>
		<!-- //header -->
include_layout_template('admin_header.php');
?>
	<!-- //header -->
		
	<div class="row-fluid">
		
		<?php 
include_layout_template('admin_menu.php');
?>
			
		<div class="span9 create" >
        
			<?php 
if (isset($_POST["refid"])) {
    $referee_id = customDecrypt($_POST["refid"]);
    $applicant_id = customDecrypt($_POST["aid"]);
    $database = new MySQLDatabase();
    $referee_details = $database->query("SELECT * FROM `referees`, `title` WHERE `referees`.`referees_id`='" . $referee_id . "' AND `referees`.`referee_title_id`=`title`.`title_id`");
    $referee_info = $database->fetch_array($referee_details);
    $applicant_details = User::find_by_id($referee_info['applicant_id']);
    $applicant_form_id = $applicant_details->form_id;
    $applicant_name = User::applicant_fullname($referee_info['applicant_id']);
    $questionnaire = unserialize($referee_info['questionnaire']);
    function check_IC($i)
    {
        global $questionnaire;
        if ($i == $questionnaire["intellectual_capactiy"]) {
            echo "checked";
        }
    }
    function check_CFP($i)
<?php

require_once "../inc/initialize.php";
//checks if admin user is logged in
if (!$session->is_admin_logged_in()) {
    redirect_to('index.php');
}
if (isset($_POST['rid']) && !empty($_POST['rid'])) {
    $requirement = Requirements::find_by_id(customDecrypt($_POST['rid']));
    // print_r($requirement->name);
    // die();
}
?>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>University of Jos, Nigeria</title>
		<?php 
require_once LIB_PATH . DS . 'css.php';
?>
	</head>

	<body>

		<!-- beginnning of main content-->
		<!-- header -->
		<?php 
include_layout_template('admin_header.php');
?>
		<!-- //header -->
Exemple #14
0
    <!-- //header -->
    <br>
    <br>

    <!-- Content -->
    <div class="row-fluid">

      <?php 
include_layout_template('admin_menu.php');
?>

      <div class="span9">
        <h2>Add Themes</h2>
        <hr>
        <?php 
$theme = Theme::find_by_id(customDecrypt($_POST['cid']));
?>
        <form class="form-horizontal add_theme" role="form" id="add_theme">
          <!-- Institution name -->
          <div class="control-group">
            <label class="control-label" for="institution_name">Institution Name: </label>
            <div class="controls">
              <div class="input-prepend">
                <span class="add-on"><i class="icon-pencil"></i></span>
                <input type="text" class="input-xlarge" name="institution_name" id="institution_name" placeholder="Enter Institution Name" value="<?php 
if (isset($theme->institution_name)) {
    echo $theme->institution_name;
}
?>
" />
              </div>
<?php

require_once "inc/initialize.php";
require_once "inc/vendor/autoload.php";
use Carbon\Carbon;
if (!$session->is_logged_in()) {
    redirect_to("index.php");
}
# Instance of Carbon Class with the current time
$date_now = new Carbon('now');
$label = customDecrypt($_GET['app']);
?>
<!DOCTYPE HTML>
<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>University of Jos, Nigeria - Transcript System</title>
    <?php 
require_once LIB_PATH . DS . 'javascript.php';
require_once LIB_PATH . DS . 'css.php';
?>
    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }
    </style>
    </head>
include_layout_template("header.php");
?>

<!--The Main Content Here Please-->


<!-- beginnning of main content-->
<div class="container">
	<div class="row-fluid">
		<div class="span9" >
			<h4>Developers Information Page</h4>
	        <hr>	
	 	</div>
	</div>
    <?php 
$credit = Credit::find_by_id(customDecrypt($_GET['id']));
?>
    <form class="form-horizontal credit" id="credit">
					
					<div class="control-group">
						<label class="control-label">Fullname</label>
						<div class="controls">
							<div class="input-prepend">
								<span class="add-on"><i class="icon-user"></i></span>
								<input type="text" id="fullname" name="fullname" placeholder="Fullname" class="input-xlarge" value="<?php 
if (isset($credit->fullname)) {
    echo $credit->fullname;
}
?>
" readonly />
							</div>
    redirect_to('view_applicant.php');
}
$role = $_SESSION["role"];
function getFileDirectory($filename, $filetype)
{
    if ($filetype == 'Degree Certificate') {
        $rootdirectory = '../documents/certificates/';
    } elseif ($filetype == 'Degree Transcript') {
        $rootdirectory = '../documents/transcripts/';
    } elseif ($filetype == 'Thesis Proposal') {
        $rootdirectory = '../documents/thesis/';
    }
    $rootdirectory .= $filename;
    return $rootdirectory;
}
$applicant_id = customDecrypt($_GET[md5('applicant_id')]);
$user = new User();
$user->applicant_id = $applicant_id;
$progress = $user->find_by_sql("SELECT progress FROM personal_details WHERE applicant_id='" . $user->applicant_id . "'");
$progress = array_shift($progress);
$student_status = $user->get_student_status();
$database = new MySQLDatabase();
$personal_details = $database->query("SELECT * FROM personal_details p, title t, lga l, state s, religion r, nationality n, department d, faculty f, next_of_kin next, marital mar, photographs photo WHERE p.applicant_id='" . $applicant_id . "' AND p.title_id=t.title_id AND p.lga_id=l.lga_id AND l.state_id=s.state_id AND p.religion_id=r.religion_id AND p.country_id=n.country_id AND p.programme_applied_id=d.department_id AND d.faculty_id=f.faculty_id AND p.applicant_id=next.applicant_id AND p.applicant_id=photo.applicant_id AND p.marital_status=mar.marital_status_id");
$personal_details = $database->fetch_array($personal_details);
$admissions = new Admission();
$sql = "select * from admission_status where applicant_id='" . $applicant_id . "'";
$admissions = Admission::find_by_sql($sql);
foreach ($admissions as $admission) {
    $date = $admission->date_completed_application;
    $time = $admission->time_completed_application;
    $academic_session = $admission->academic_session;
Exemple #18
0
     if ($news->save()) {
         echo '<h4 class="alert alert-success">Success</h4>';
         echo '<hr>';
         echo "<p>You have successfully added a new record into news event table</p>";
         echo '<hr>';
     } else {
         echo '<h4 class="alert alert-error">Error</h4>';
         echo '<hr>';
         echo "Failed to insert into news event table.";
         echo '<hr>';
     }
     break;
 case 'update_news':
     $news = new News_Events();
     $news->db_fields = array('title', 'display_line', 'content', 'visible', 'verified_by', 'last_update');
     $news->id = customDecrypt($_POST['nid']);
     $news->title = $_POST['title'];
     $news->display_line = $_POST['display_line'];
     $news->content = $_POST['content'];
     $news->visible = $_POST['status'];
     $admin = AdminLog::find_by_id($_SESSION['applicant_id']);
     $news->verified_by = $admin->surname . " " . $admin->othernames;
     $time = time();
     $news->last_update = date("Y-m-d H:i:s", $time);
     if ($news->save()) {
         echo '<h4 class="alert alert-success">Success</h4>';
         echo '<hr>';
         echo "<p>You have successfully updated news event table</p>";
         echo '<hr>';
     } else {
         echo '<h4 class="alert alert-error">Error</h4>';
						</div>
					</div>
                    
                    <?php 
//$arrayRoleSql = "SELECT * FROM `credit_status` WHERE `status` = 1";
//$result = $database->query($arrayRoleSql);
?>
                    
					
					<!--Save Button-->
					<div id="accept_terms">		
						<div class="control-group">
							  <div class="controls">
							  	<a href="<?php 
if (isset($_POST['from'])) {
    echo customDecrypt($_POST['from']);
}
?>
" class="btn btn-default" name="back" id="back">Back</a>  
								<button type="submit" class="btn btn-info" name="update_amount" id="update_amount">Update</button>
						      </div>
						</div>
					</div>
					<!-- End of Save Button-->
				</form>
				<!-- End of Credit form -->
				
			</div>
            
		</div>
		<!-- //Content -->
<?php

require_once "inc/initialize.php";
require_once "inc/vendor/autoload.php";
use Carbon\Carbon;
$dt = Carbon::now();
if (!$session->is_logged_in()) {
    redirect_to("index.php");
}
# Instance of Carbon Class with the current time
$date_now = new Carbon('now');
$label = customDecrypt($_GET['note']);
if ($label) {
    $note_details = Notification::find_by_id($label);
    if ($note_details->status == 1) {
        $notification = new Notification();
        $notification->db_fields = array('id', 'applicant_id', 'title', 'content', 'sender_admin_id', 'created_at', 'updated_at', 'status', 'visible');
        $notification->id = $note_id;
        //  $notification->read_date   = $dt ;
        $notification->status = 2;
        $notification->save();
    }
}
?>
<!DOCTYPE HTML>
<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>University of Jos, Nigeria - Transcript System</title>
    <?php 
require_once LIB_PATH . DS . 'javascript.php';
<?php

require_once "inc/initialize.php";
$get_id = customDecrypt($_GET['id']);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>University of Jos, Nigeria</title>
<?php 
require_once LIB_PATH . DS . 'css.php';
?>
</head>
<body>
<?php 
include_layout_template("header.php");
?>
<!-- beginnning of main content-->
<div class="container">
	<div class="row-fluid">
		<div class="span7" >
		<h4><a href="index.php"><i class="icon-home"></i> University of Jos Online Form Portal </a></h4>
        <hr>

      	<!-- <h3><i class="icon-bullhorn"></i> News ON</h3> -->
        <!-- # New Content Here -->

          <?php 
if (is_numeric($get_id)) {
    $sql = "SELECT * FROM news_events WHERE id = {$get_id}\r\n                      AND visible = 1\r\n                      AND verified_by !='' \r\n                      LIMIT 1";
<?php

require_once "../../inc/initialize.php";
if (isset($_POST["aid"])) {
    $admission = new Admission();
    $admission->db_fields = array('applicant_id', 'status', 'reason');
    $admission->applicant_id = customDecrypt($_POST["aid"]);
    $admission->status = $_POST["eligibility_status"];
    $admission->reason = $_POST["reason"];
    $sql_adm = "select admission_id from admission_status where applicant_id='" . $admission->applicant_id . "'";
    $res_adm = Admission::find_by_sql($sql_adm);
    $res_adm = array_shift($res_adm);
    $admission->admission_id = $res_adm->admission_id;
    if ($admission->save()) {
        sleep(2);
        echo '<h4 class="alert alert-success"><i class="iconic-o-check" style="color: #51A351"></i> Success</h4>';
        echo '<hr>';
        echo "Eligibility status for this user has been successfully saved.";
        echo "<br>";
        echo '<hr>';
    } else {
        sleep(2);
        echo '<h4 class="alert alert-error">Error</h4>';
        echo '<hr>';
        echo "An error occured while saving eligibility status.";
        echo "<br>";
        echo '<hr>';
    }
}
		<br>
		<br>

		<!-- Content -->
		<div class="row-fluid">

			<?php 
include_layout_template('admin_menu.php');
?>

			<div class="span9">
				<h2>Acceptance Fees Confirmed Payment Log</h2>
				<hr>
						<?php 
//$acc_log = new ACCAcceptanceLog();
$result = AccAdmAccess::find_by_sql("SELECT * FROM `acceptance_adm_access_code` WHERE `jamb_rem_no` = '" . customDecrypt($_GET['q']) . "' AND reg_num = '" . customDecrypt($_GET['q']) . "'");
$result = array_shift($result);
?>
						<!-- Begining of acceptance log form -->
				<form class="form-horizontal adm_access_details">
					<input type="hidden" name="adm_id" value="<?php 
echo $result->id;
?>
"/>
					<div class="control-group">
						<label class="control-label">Application Number</label>
						<div class="controls">
							<div class="input-prepend">
								<span class="add-on"><i class="icon-chevron-down"></i></span>
								<input type="text" readonly name="applicant_number" placeholder="Applicant Number" class="input-xlarge" value="<?php 
echo $result->jamb_rem_no;
		<div class="row-fluid">

			<?php 
if ($progress->progress == 'Completed') {
    include_layout_template('confirmation_menu.php');
} else {
    include_layout_template('main_nav_login.php');
}
?>

			<div class="span8 offset2">
				<h2>Read Notification</h2>
                <hr>
                <?php 
$nid = customDecrypt($_POST["nid"]);
$from = customDecrypt($_POST["from"]);
$notification = $database->fetch_array($database->query("SELECT * FROM `applicant_notifications` WHERE notification_id = " . $nid));
?>
                <form action="<?php 
echo $from;
?>
" method="POST" class="form-horizontal" >
                    
                    <div class="control-group">
                        <label class="control-label" for="inputNotificationTitle">Notification Title: </label>
                        <div class="controls">
                            <div class="input-prepend">
                            <span class="add-on"><i class="icon-envelope"></i></span>
                                <input type="text" class="input-large" value="<?php 
if (isset($notification['title'])) {
    echo $notification['title'];
Exemple #25
0
<?php

require_once "../inc/initialize.php";
if (isset($_POST['exportdatabutton'])) {
    $sql = customDecrypt($_POST['exportdata']);
    $database = new MYSQLDatabase();
    $result = $database->query($sql);
    function admission_status($status)
    {
        switch ($status) {
            case 1:
                return "Pending";
                break;
            case 2:
                return "InEligible";
                break;
            case 3:
                return "Eligible";
                break;
            case 4:
                return "Not Offered";
                break;
            case 5:
                return "Offered Admission";
                break;
            default:
                break;
        }
    }
    $filename = 'Exported data on ' . date('Y-m-d');
    $file_ending = "xls";
<?php

require_once '../../inc/initialize.php';
$admission_status = $_POST["admission_status"];
foreach ($_POST as $key => $value) {
    if ($key != "admission_status") {
        $applicant_id = customDecrypt($value);
        $admissions = new Admission();
        $admissions->db_fields = array('status');
        $admissions->applicant_id = $applicant_id;
        $admissions->status = $admission_status;
        $sql_adm = "select admission_id from admission_status where applicant_id='" . $admissions->applicant_id . "'";
        $res_adm = Admission::find_by_sql($sql_adm);
        $res_adm = array_shift($res_adm);
        $admissions->admission_id = $res_adm->admission_id;
        $admissions->save();
    }
}
echo '<h4 class="alert alert-success"><i class="iconic-o-check" style="color: #51A351"></i> Success</h4>';
echo '<hr>';
echo 'Admission status  successfully set.';
<?php

# Instance of MySQLDatabase
$database = new MySQLDatabase();
# Instance of Session
$session = new Session();
# Instance of User
$user = User::find_by_id($session->id);
$application_no = customDecrypt($_GET["app_no"]);
?>
<h5 align="center">Transcript Application</h5>
<hr>
<h6 align="center">All Fields are Required</h6>
<form action="" method="POST" class="application_form form-horizontal" >
    <!-- Fullname -->
    <div class="control-group">
        <label class="control-label" for="inputApplicationFormNumber">Application Number</label>
        <div class="controls">
            <div class="input-prepend">
                <span class="add-on"><i class="iconic-hash"></i></span>
                <input type="text" class="input-xlarge" required id="app_no" name="app_no" value="<?php 
if (isset($application_no)) {
    echo $application_no;
}
?>
" readonly="readonly" />
            </div>
        </div>
    </div>

    <!-- Title -->
<?php

require_once "../../inc/initialize.php";
// print_r($_POST);
// die();
if (isset($_POST['uid'])) {
    $user = new AdminLog();
    $user->user_id = customDecrypt($_POST['uid']);
    $user->surname = $_POST['surname'];
    $user->othernames = $_POST['othernames'];
    if ($_POST['epassword'] != '') {
        $user->password = sha1($_POST['epassword']);
        $user->db_fields = array('surname', 'othernames', 'password', 'email', 'staff_id', 'rank', 'activated_status', 'role', 'department_id');
    } else {
        $user->db_fields = array('surname', 'othernames', 'email', 'staff_id', 'rank', 'activated_status', 'role', 'department_id');
    }
    $user->email = $_POST['email'];
    $user->staff_id = $_POST['staffid'];
    $user->rank = $_POST['rank'];
    $user->activated_status = $_POST['activated_status'];
    $user->role = $_POST['role'];
    if ($user->role != 4) {
        $user->department_id = 0;
    } else {
        $user->department_id = $_POST['department_id'];
    }
    // print_r($user);
    // die();
    //$database->affected_rows() == 1
    if ($user->save()) {
        echo '<h4 class="alert alert-success">Success</h4>';
		<br>
		<br>

		<!-- Content -->
		<div class="row-fluid">

			<?php 
include_layout_template('admin_menu.php');
?>

			<div class="span9">
				<h2>Acceptance Fee Acceptance Log</h2>
				<hr>
						<?php 
//$acc_log = new AccAcceptanceLog();
$result = AccAcceptanceLog::find_by_sql("SELECT * FROM `acceptance_acceptance_log` WHERE `student_id` = '" . customDecrypt($_GET['q']) . "'");
$result = array_shift($result);
?>
						<!-- Begining of acceptance log form -->
				<form class="form-horizontal acceptance_log_details">
					<input type="hidden" name="acceptance_id" value="<?php 
echo $result->id;
?>
"/>
					<div class="control-group">
						<label class="control-label">Application Number</label>
						<div class="controls">
							<div class="input-prepend">
								<span class="add-on"><i class="icon-chevron-down"></i></span>
								<input type="text" readonly name="applicant_number" placeholder="Applicant Number" class="input-xlarge" value="<?php 
echo $result->student_id;
require_once "../../inc/initialize.php";
//Send mail
$mail = new PHPMailer();
$mail->IsSMTP();
//$mail->SMTPDebug  = 1;
$mail->SMTPAuth = true;
// enable SMTP authentication
$mail->SMTPSecure = "tls";
// sets the prefix to the servier
$mail->Host = "mail.unijos.edu.ng";
// sets GMAIL as the SMTP server
$mail->Port = 25;
$mail->Username = $_POST["email"];
$mail->Password = $_POST["password"];
$mail->SetFrom($mail->Username, customDecrypt($_POST["sender"]));
$mail->AddReplyTo($mail->Username, customDecrypt($_POST["sender"]));
$mail->Subject = $_POST["title"];
$MSG = '
		<style type="text/css">
		.codrops-top{
			line-height: 55px;
			font-size: 30px;
			/*background: rgba(255, 255, 255, 0.4);*/
			background:#069;
			/*text-transform: uppercase;*/
			z-index: 9999;
			position: relative;
			box-shadow: 1px 0px 2px rgba(0,0,0,0.2);
		}
		.codrops-top span.left{
			float: left;