Esempio n. 1
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 -->
Esempio n. 2
0
                 echo "<p>You have successfully added a new record into registras table</p>";
                 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>';
Esempio n. 3
0
		<br>
		<br>

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

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

			<div class="span9">
				<h2>Registras</h2>
				<hr>
						<?php 
$query = "SELECT * FROM registras ORDER BY id DESC";
$result = Registra::find_by_sql($query);
$pagecounter = 1;
$serialno = 1;
$max = 10;
$number_of_requirements = sizeof($result);
echo '<div class="tabbable">
								<div class="tab-content">';
foreach ($result as $row) {
    if ($serialno % $max == 1) {
        if ($pagecounter == 1) {
            echo '<div class="tab-pane active" id="' . $pagecounter . '">';
        } else {
            echo '<div class="tab-pane" id="' . $pagecounter . '">';
        }
        echo '<table class="table table-hover">
									<thead>