<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;
<?php require_once "../../inc/initialize.php"; $database = new MySQLDatabase(); if (isset($_POST)) { $acceptance_log = new AccAcceptanceLog(); $acceptance_log->student_id = $_POST['applicant_number']; $acceptance_log->ResponseCode = $_POST['response_code']; $result = $database->query("SELECT * FROM `interswitch_error_code` WHERE `response_code` = '" . $acceptance_log->ResponseCode . "'"); $result = $database->fetch_array($result); $acceptance_log->ResponseDescription = $result['response_description']; $acceptance_log->PaymentReference = $_POST['payment_reference']; $acceptance_log->Amount = $_POST['amount']; $acceptance_log->returned_amount = $_POST['amount'] * 100 . ".00"; $acceptance_log->status = $_POST['student_status']; if ($acceptance_log->save()) { echo '<h4 class="alert alert-success">Success</h4>'; echo '<hr>'; echo "<p>You have successfully added a new record into acceptance fees acceptance log for applicant with application number: " . $acceptance_log->student_id . ".</p>"; echo '<hr>'; } else { echo '<h4 class="alert alert-error">Error</h4>'; echo '<hr>'; echo "Failed to insert into acceptance log."; echo '<hr>'; } }