<?php # Instance of session class $session = new Session(); // 1. the current page number ($current_page) $page = !empty($_GET['page']) ? (int) $_GET['page'] : 1; // 2. records per page ($per_page) $per_page = 4; // 3. total record count ($total_count) $total_count = AppHistory::count_all(); // use pagination instead $pagination = new Pagination($page, $per_page, $total_count); // Instead of finding all records, just find the records for this page $sql = "SELECT * FROM app_histories where applicant_id='" . $session->id . "' ORDER BY `application_no` DESC "; $sql .= "LIMIT {$per_page} "; $sql .= "OFFSET {$pagination->offset()}"; $histories = AppHistory::find_by_sql($sql); // Need to add ?page=$page to all links we want to // maintain the current page (or store $page in $session) $counter = 1; ?> <table class="table table-hover table-striped table-bordered"> <thead> <tr> <th>SN</th> <th>Application No</th> <th>Amount</th> <th>Payment Date</th> <th>Application Status</th> </tr> </thead> <?php
$user_history = AppHistory::find_by_sql($query_count); $history = array_shift($user_history); // 1. the current page number ($current_page) $page = !empty($_GET['page']) ? (int) $_GET['page'] : 1; // 2. records per page ($per_page) $per_page = 3; // 3. total record count ($total_count) $total_count = AppHistory::count_all(); // use pagination instead $pagination = new Pagination($page, $per_page, $total_count); // Instead of finding all records, just find the records // for this page $sql = "SELECT * FROM app_histories where applicant_id ='" . $session->id . "' ORDER BY `application_no` DESC "; $sql .= "LIMIT {$per_page} "; $sql .= "OFFSET {$pagination->offset()}"; $user_application_histories = AppHistory::find_by_sql($sql); // Need to add ?page=$page to all links we want to // maintain the current page (or store $page in $session) $counter = 1; ?> <h4><p class="label label-info">Application Status</p></h4> <table class="table table-hover table-striped table-bordered"> <thead> <tr> <th>SN</th> <th>Application Number</th> <th>Date</th> <th>View</th> </tr> </thead> <?php
$applicant->full_name = $full_name; $applicant->gender_id = $gender_id; $applicant->date_of_birth = $date_of_birth; $applicant->contact_address = $contact_address; $applicant->mode_of_entry_id = $mode_of_entry_id; $applicant->year_of_graduation = $year_of_graduation; $applicant->year_of_entry = $year_of_entry; $applicant->receiving_address = $receiving_address; $applicant->updated_at = $date_now; if (isset($applied)) { $applicant->applied = $applied; } if ($applicant->save()) { # Get application history $sql_app = "SELECT * FROM `app_histories` WHERE `application_no`='" . $application_no . "' LIMIT 1"; $application_histories = AppHistory::find_by_sql($sql_app); $application_history = array_shift($application_histories); # Update app_histories table $app_history = new AppHistory(); $app_history->db_fields = array('application_flag', 'receiving_address', 'created_at', 'updated_at', 'app_visible'); $app_history->id = $application_history->id; $app_history->receiving_address = $receiving_address; $app_history->application_flag = 1; $app_history->created_at = $date_now; $app_history->updated_at = $date_now; $app_history->app_visible = 1; if ($app_history->save()) { doSleep(2); echo '<h4 class="alert alert-success">Success</h4>'; echo '<hr>'; echo 'Your have successfully submitted your transcript application.<br>';
<?php require_once "inc/initialize.php"; if (!$session->is_logged_in()) { redirect_to("index.php"); } # Instance of user class $user = User::find_by_id($session->id); # Get application history form app_histories table $sql_history = "SELECT * FROM app_histories WHERE applicant_id =" . $user->id . " and application_flag = 0"; $history_details = AppHistory::find_by_sql($sql_history); $app_history_details = array_shift($history_details); $application_no = $app_history_details->application_no; # Check if the application history exist if (empty($app_history_details)) { redirect_to("payment.php"); } else { # Get adm payment details from adm_access_code table $sql_adm = "SELECT * FROM adm_access_code WHERE jamb_rem_no ='" . $app_history_details->application_no . "'"; $adm_details = AdmAccess::find_by_sql($sql_adm); # Check if payment details exist if (empty($adm_details)) { redirect_to("payment.php"); } } ?> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
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']); if ($label) { // $database = new MySQLDatabase(); // $sql_user_details="SELECT * from app_histories aph Join adm_access_code adm, applicant_status aps WHERE aph.application_no = '".$label."' AND adm.application_no=aph.application_no AND aps.application_no= aph.application_no"; // $user_history=$database->query($sql_user_details); // $myhistory = $database->fetch_array($user_history); $sql_app = "SELECT * FROM `app_histories` WHERE `application_no` = '" . $label . "'"; $application = AppHistory::find_by_sql($sql_app); $myapp = array_shift($application); $sql_amount = "SELECT * FROM `adm_access_code` WHERE `jamb_rem_no` = '" . $label . "'"; $transaction = AdmAccess::find_by_sql($sql_amount); $amount = array_shift($transaction); $sql = "SELECT * FROM `applicant_status` WHERE `application_no` = '" . $label . "'"; $process = ApplicantStatus::find_by_sql($sql); } ?> <!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';
$user_history = AppHistory::find_by_sql($query_count); $history = array_shift($user_history); // 1. the current page number ($current_page) $page = !empty($_GET['page']) ? (int) $_GET['page'] : 1; // 2. records per page ($per_page) $per_page = 4; // 3. total record count ($total_count) $total_count = AppHistory::count_all(); // use pagination instead $pagination = new Pagination($page, $per_page, $total_count); // Instead of finding all records, just find the records // for this page $sql = "SELECT * FROM app_histories where applicant_id='" . $session->id . "' ORDER BY `application_no` DESC "; $sql .= "LIMIT {$per_page} "; $sql .= "OFFSET {$pagination->offset()}"; $Users = AppHistory::find_by_sql($sql); // Need to add ?page=$page to all links we want to // maintain the current page (or store $page in $session) $counter = 1; ?> <h4> <p class="label label-info">Transaction History</p></h4> <table class="table table-hover table-striped table-bordered"> <thead> <tr> <th>SN</th> <th>Application No</th> <th>Response Description</th> <th>Amount</th> <th>Initiating Date</th> <th>View</th> </tr>