<thead> <tr> <th>SN</th> <th>Application No</th> <th>Amount</th> <th>Payment Date</th> <th>Application Status</th> </tr> </thead> <?php if (isset($histories) && !empty($histories)) { $serial_no = 1; # Loop through applicantion history for an applicant foreach ($histories as $history) { $sql_trans = "SELECT * FROM `adm_access_code` WHERE `jamb_rem_no` = '" . $history->application_no . "'"; $transaction = AdmAccess::find_by_sql($sql_trans); $tranx_record = array_shift($transaction); ?> <tbody> <tr> <td><?php echo $serial_no; ?> </td> <td><?php if (isset($tranx_record->jamb_rem_no)) { echo $tranx_record->jamb_rem_no; } ?> </td> <td><?php
$acceptance->student_id = $form_no; $acceptance->ResponseCode = $ResponseCode; $acceptance->ResponseDescription = $ResponseDescription; $acceptance->Amount = $amount / 100; $acceptance->returned_amount = $amount . '.00'; $acceptance->MerchantReference = $PaymentReference; $acceptance->PaymentReference = $RefNumb; $acceptance->Interswitch_date = $TranxDate; $acceptance->status = $Applicant_detail->student_status; if (!empty($acc_id_final)) { $acceptance->id = $acc_id_final->id; } else { $acceptance->Initiating_date = date('Y-m-d H:i:s'); } // Save Record into Table acceptance_log or update as the need be $acceptance->save(); echo "done"; } elseif (isset($_POST['action']) && $_POST['action'] == 'insertaccesscode') { $adm = new AdmAccess(); $adm->jamb_rem_no = $form_no; $adm->pin = $RefNumb; $adm->amount = $amount . '.00'; $adm->payment_date = $TranxDate; $adm->payment_code = $RetRefNumb; $adm->reg_num = $form_no; $adm->full_name = $Applicant_detail->surname . " " . $Applicant_detail->first_name . " " . $Applicant_detail->middle_name; $adm->status = $Applicant_detail->student_status; // Save Record into Table adm_access_code $adm->save(); echo 'done'; }
$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); $payment_record = array_shift($payment); # Redirect applicant to make payment if no user is found if (empty($payment_record)) { redirect_to('payment.php'); } # Get log record for payment $sql_log = "SELECT * FROM `acceptance_log` WHERE `student_id` = '" . $orderId . "'"; $log_payment = AcceptanceLog::find_by_sql($sql_log); $log = array_shift($log_payment); $payment_breakdown = unserialize($log->returned_paymentreference); // $naira = ₦ # Data to be inserted into QR Code $data = $user->full_name; $data .= ' ' . $orderId . ' ' . $payment_record->amount; # QR Code image path on server
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" /> <title>University of Jos, Nigeria - Transcript System</title> <?php require_once LIB_PATH . DS . 'javascript.php'; require_once LIB_PATH . DS . 'css.php';
<?php require_once "../../inc/initialize.php"; $database = new MySQLDatabase(); if (isset($_POST)) { $AdmAccess = new AdmAccess(); $AdmAccess->db_fields = array('jamb_rem_no', 'pin', 'amount', 'payment_date', 'ip_addr', 'payment_code', 'branch_code', 'bank_code', 'reg_num', 'full_name', 'status'); $AdmAccess->jamb_rem_no = $_POST['applicant_number']; $AdmAccess->pin = $_POST['access_code']; $AdmAccess->amount = $_POST['amount'] * 100 . ".00"; $AdmAccess->payment_date = $_POST['transaction_date']; $AdmAccess->ip_addr = $_POST['ip_address']; $AdmAccess->branch_code = $_POST['branch_code']; $AdmAccess->reg_num = $_POST['applicant_number']; $AdmAccess->full_name = $_POST['full_name']; $AdmAccess->status = $_POST['student_status']; /*print_r($AdmAccess); die();*/ if ($AdmAccess->save()) { echo '<h4 class="alert alert-success">Success</h4>'; echo '<hr>'; echo "<p>You have successfully added a new record into acceptance log for applicant with application number: " . $AdmAccess->jamb_rem_no . ".</p>"; echo '<hr>'; } else { echo '<h4 class="alert alert-error">Error</h4>'; echo '<hr>'; echo "Failed to insert into acceptance log."; echo '<hr>'; } }
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'; require_once LIB_PATH . DS . 'css.php'; ?> <style type="text/css">
<?php require_once "../../inc/initialize.php"; $adm = new AdmAccess(); $adm->id = $_POST['adm_id']; $adm->pin = $_POST['access_code']; $adm->amount = $_POST['amount'] * 100 . '.00'; $adm->payment_date = $_POST['transaction_date']; $adm->ip_addr = $_POST['ip_address']; $adm->payment_code = $_POST['payment_code']; $adm->branch_code = $_POST['branch_code']; $adm->full_name = $_POST['full_name']; $adm->status = $_POST['student_status']; $adm->db_fields = array('pin', 'amount', 'payment_date', 'ip_addr', 'payment_code', 'branch_code', 'bank_code', 'full_name', 'status'); if ($adm->save()) { echo '<h4 class="alert alert-success">Success</h4>'; echo '<hr>'; echo "You have successfully edited the payment record for applicant with application number: " . $_POST['applicant_number']; echo '<hr>'; } else { echo '<h4 class="alert alert-error">Error</h4>'; echo '<hr>'; echo "Your updates were not saved"; }
<?php require_once "../../inc/initialize.php"; $id = $_POST['adm_id']; $adm = new AdmAccess(); $adm->id = $id; if ($adm->delete()) { echo '<h4 class="alert alert-success">Success</h4>'; echo '<hr>'; echo "Payment record successfully deleted"; echo '<hr>'; echo '<a href="search_adm.php">Continue</a<>'; } else { echo '<h4 class="alert alert-error">Error</h4>'; echo '<hr>'; echo "Payment record not deleted"; }
<br> <br> <!-- Content --> <div class="row-fluid"> <?php include_layout_template('admin_menu.php'); ?> <div class="span9"> <h2>Transaction Log (Successful Payment)</h2> <hr> <?php //$acc_log = new AcceptanceLog(); $result = AdmAccess::find_by_sql("SELECT * FROM `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;
$RetRefNumb = $rea['RetRefNumb']; $TranxDate = $rea['TranxDate']; echo ' <h4 class="alert alert-info">Interswitch says</h4> <table class="table table-hover"> <tr ><td>Response Code:</td><td>' . $ResponseCode . '</td></tr> <tr ><td>Response Description:</td><td>' . $ResponseDescription . '</td></tr> <tr ><td>Amount:</td><td>' . $amount . '</td></tr> <tr ><td>Merchant Reference:</td><td>' . $PaymentReference . '</td></tr> <tr ><td>Payment Reference:</td><td>' . $RefNumb . '</td></tr> <tr ><td>Returned Ref Number:</td><td>' . $RetRefNumb . '</td></tr> <tr ><td>Transaction Date:</td><td>' . $TranxDate . '</td></tr> </table>'; if ($ResponseCode == '00') { //get fullname of applicant $adm = new AdmAccess(); $sqlcheck = "SELECT id FROM `adm_access_code` WHERE `jamb_rem_no` = '" . $_POST['number'] . "'"; $check = $adm->find_by_sql($sqlcheck); // Check if the record does not exist in both acceptance_log and adm_access_code then insert and if they do update it if (empty($check)) { $sql_fullname = "SELECT applicant_id, surname, first_name, middle_name, student_status "; $sql_fullname .= "FROM `personal_details` WHERE `form_id` = '" . $_POST['number'] . "'"; $Applicant_details = User::find_by_sql($sql_fullname); $Applicant_detail = array_shift($Applicant_details); $acceptance = new AcceptanceLog(); $acceptance->db_fields = array('ResponseCode', 'ResponseDescription', 'Amount', 'returned_amount', 'MerchantReference', 'PaymentReference', 'status'); $sql_acc_id = "SELECT id FROM `acceptance_log` WHERE student_id='" . $_POST['number'] . "'"; $acc_id = $acceptance->find_by_sql($sql_acc_id); $acc_id_final = array_shift($acc_id); $acceptance->ResponseCode = $ResponseCode; $acceptance->ResponseDescription = $ResponseDescription;