<?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
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * */ $tpl = new TemplatePower(PATH_TPL . "cases" . PATH_SEP . "cases_DynaformHistory.html"); $tpl->prepare(); require_once 'classes/model/AppHistory.php'; G::LoadClass('case'); $oCase = new Cases(); $Fields = $oCase->loadCase($_SESSION['APPLICATION']); // Load form info if (isset($_REQUEST['DYN_UID']) && $_REQUEST['DYN_UID'] != '') { $form = new Form($_REQUEST['PRO_UID'] . PATH_SEP . $_REQUEST['DYN_UID'], PATH_DYNAFORM, SYS_LANG, false); } $historyData = array(); $historyDataAux = array(); $appHistory = new AppHistory(); $c = $appHistory->getDynaformHistory($_REQUEST['PRO_UID'], $_REQUEST['TAS_UID'], $_REQUEST['APP_UID'], $_REQUEST['DYN_UID']); $oDataset = ArrayBasePeer::doSelectRs($c); $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); $changeCount = 0; while ($oDataset->next()) { $aRow = $oDataset->getRow(); $changeCount++; $changedValues = unserialize($aRow['HISTORY_DATA']); $tableName = "_TCHANGE_" . $changeCount; $historyDataAux[$tableName] = $changedValues; } $historyData = array_reverse($historyDataAux); $changeCount = count($historyData); foreach ($historyData as $key => $value) { $tableName = "_TCHANGE_" . $changeCount;
public function updateCase($sAppUid, $Fields = array()) { try { $dynContentHistory = ""; if (isset($Fields["APP_DATA"]) && isset($Fields["APP_DATA"]["DYN_CONTENT_HISTORY"])) { $dynContentHistory = $Fields["APP_DATA"]["DYN_CONTENT_HISTORY"]; unset($Fields["APP_DATA"]["DYN_CONTENT_HISTORY"]); } $oApplication = new Application; if (!$oApplication->exists($sAppUid)) { return false; } $aApplicationFields = $Fields['APP_DATA']; $Fields['APP_UID'] = $sAppUid; $Fields['APP_UPDATE_DATE'] = 'now'; $Fields['APP_DATA'] = serialize($Fields['APP_DATA']); /* $oApp = new Application; $appFields = $oApp->load($sAppUid); */ $oApp = ApplicationPeer::retrieveByPk($sAppUid); $appFields = $oApp->toArray(BasePeer::TYPE_FIELDNAME); if (isset($Fields['APP_TITLE'])) { $appFields['APP_TITLE'] = $Fields['APP_TITLE']; } if (isset($Fields['APP_DESCRIPTION'])) { $appFields['APP_DESCRIPTION'] = $Fields['APP_DESCRIPTION']; } $arrayNewCaseTitleAndDescription = $this->newRefreshCaseTitleAndDescription($sAppUid, $appFields, $aApplicationFields); //Start: Save History --By JHL if (isset($Fields['CURRENT_DYNAFORM'])) { //only when that variable is set.. from Save $FieldsBefore = $this->loadCase($sAppUid); $FieldsDifference = $this->arrayRecursiveDiff($FieldsBefore['APP_DATA'], $aApplicationFields); $fieldsOnBoth = @array_intersect_assoc($FieldsBefore['APP_DATA'], $aApplicationFields); //Add fields that weren't in previous version foreach ($aApplicationFields as $key => $value) { if (!(isset($fieldsOnBoth[$key]))) { $FieldsDifference[$key] = $value; } } if ((is_array($FieldsDifference)) && (count($FieldsDifference) > 0)) { //There are changes $Fields['APP_STATUS'] = (isset($Fields['APP_STATUS'])) ? $Fields['APP_STATUS'] : $FieldsBefore['APP_STATUS']; $appHistory = new AppHistory(); $aFieldsHistory = $Fields; $FieldsDifference['DYN_CONTENT_HISTORY'] = $dynContentHistory; $aFieldsHistory['APP_DATA'] = serialize($FieldsDifference); $appHistory->insertHistory($aFieldsHistory); } } //End Save History //we are removing the app_title and app_description from this array, //because they already be updated in newRefreshCaseTitleAndDescription function if (isset($Fields['APP_TITLE'])) { unset($Fields['APP_TITLE']); } if (isset($Fields['APP_DESCRIPTION'])) { unset($Fields['APP_DESCRIPTION']); } if (isset($Fields["APP_STATUS"]) && $Fields["APP_STATUS"] == "COMPLETED") { if (isset($Fields['CURRENT_USER_UID'])) { $Fields['USR_UID'] = $Fields['CURRENT_USER_UID']; } /*----------------------------------********---------------------------------*/ } $oApp->update($Fields); $DEL_INDEX = isset($Fields['DEL_INDEX']) ? $Fields['DEL_INDEX'] : ''; $TAS_UID = isset($Fields['TAS_UID']) ? $Fields['TAS_UID'] : ''; G::LoadClass('reportTables'); require_once 'classes/model/AdditionalTables.php'; $oReportTables = new ReportTables(); $addtionalTables = new additionalTables(); if (!isset($Fields['APP_NUMBER'])) { $Fields['APP_NUMBER'] = $appFields['APP_NUMBER']; } if (!isset($Fields['APP_STATUS'])) { $Fields['APP_STATUS'] = $appFields['APP_STATUS']; } $oReportTables->updateTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields); $addtionalTables->updateReportTables( $appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields, $Fields['APP_STATUS'] ); //now update the priority in appdelegation table, using the defined variable in task if (trim($DEL_INDEX) != '' && trim($TAS_UID) != '') { //optimized code to avoid load task content row. $c = new Criteria(); $c->clearSelectColumns(); $c->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE); $c->add(TaskPeer::TAS_UID, $TAS_UID); $rs = TaskPeer::doSelectRS($c); $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC); $rs->next(); $row = $rs->getRow(); $VAR_PRI = substr($row['TAS_PRIORITY_VARIABLE'], 2); //end optimized code. $x = unserialize($Fields['APP_DATA']); if (isset($x[$VAR_PRI])) { if (trim($x[$VAR_PRI]) != '') { $oDel = new AppDelegation; $array = array(); $array['APP_UID'] = $sAppUid; $array['DEL_INDEX'] = $DEL_INDEX; $array['TAS_UID'] = $TAS_UID; $array['DEL_PRIORITY'] = (isset($x[$VAR_PRI]) ? ($x[$VAR_PRI] >= 1 && $x[$VAR_PRI] <= 5 ? $x[$VAR_PRI] : '3') : '3'); $oDel->update($array); } } } //Update Solr Index if ($this->appSolr != null) { $this->appSolr->updateApplicationSearchIndex($sAppUid); } if ($Fields["APP_STATUS"] == "COMPLETED") { //Delete records of the table APP_ASSIGN_SELF_SERVICE_VALUE $appAssignSelfServiceValue = new AppAssignSelfServiceValue(); $appAssignSelfServiceValue->remove($sAppUid); } /*----------------------------------********---------------------------------*/ //Return return $Fields; } catch (exception $e) { throw ($e); } }
$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>'; echo 'Please use the <span class="label label-info">Check Status</span> link in the <span class="label label-info">Transcript Activity</span> menu to see the status of your application'; echo '<hr>'; echo '<a href="home.php" class="btn btn-primary">Proceed</a>';
$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
<?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';
/** * Validates all modified columns of given AppHistory object. * If parameter $columns is either a single column name or an array of column names * than only those columns are validated. * * NOTICE: This does not apply to primary or foreign keys for now. * * @param AppHistory $obj The object to validate. * @param mixed $cols Column name or array of column names. * * @return mixed TRUE if all columns are valid or the error message of the first invalid column. */ public static function doValidate(AppHistory $obj, $cols = null) { $columns = array(); if ($cols) { $dbMap = Propel::getDatabaseMap(AppHistoryPeer::DATABASE_NAME); $tableMap = $dbMap->getTable(AppHistoryPeer::TABLE_NAME); if (!is_array($cols)) { $cols = array($cols); } foreach ($cols as $colName) { if ($tableMap->containsColumn($colName)) { $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); $columns[$colName] = $obj->{$get}(); } } } else { if ($obj->isNew() || $obj->isColumnModified(AppHistoryPeer::OBJ_TYPE)) { $columns[AppHistoryPeer::OBJ_TYPE] = $obj->getObjType(); } } return BasePeer::doValidate(AppHistoryPeer::DATABASE_NAME, AppHistoryPeer::TABLE_NAME, $columns); }
if (empty($payment_record)) { # ------------- Update adm_access_code table ---------------------------- # Instance of AdmAccess $adm = new AdmAccess(); $adm->jamb_rem_no = $application_no; $adm->amount = $amount; $adm->payment_date = $tranxTime; $adm->payment_code = $RRR; $adm->reg_num = $application_no; $adm->pin = $orderId; $adm->full_name = $user->full_name; # Save record into adm_access_code table $adm->save(); # ------------- Update app_histories table ---------------------------- # Instance of AppHistory $application_history = new AppHistory(); $application_history->application_no = $application_no; $application_history->applicant_id = $session->id; $application_history->type_id = $type_id; $application_history->mode_id = $mode_id; $application_history->city_or_state = $city_or_state; # Save record into app_histories table $application_history->save(); } ?> <h4><p class="label label-info">Payment Confirmation for Transcript Form</p></h4> <table class="table table-hover table-striped table-bordered"> <thead> <tr class="rowlink"> <td>Name</td> <td><?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>