Esempio n. 1
0
             } 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.";
         echo '<hr>';
Esempio n. 2
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['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 -->