$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>'; } else { $error_message = 1; } } else { $error_message = 1; } } else { $error_message = 1; } # Error message for when something goes wrong if ($error_message == 1) { doSleep(2); echo '<h4 class="alert alert-info">Information</h4>'; echo '<hr>'; echo 'Your information cannot be saved at this time.<br>'; echo 'Please contact us at <span class="label label-info">support@unijos.edu.ng</span> for further enquiries'; echo '<hr>'; echo '<a href="home.php" class="btn btn-primary">Proceed</a>'; }
$phone_number = htmlspecialchars($_POST['phone_number'], ENT_QUOTES); # Update user's information $user = new User(); $user->db_fields = array('id', 'full_name', 'matriculation_no', 'programme_id', 'gender_id', 'year_of_graduation', 'year_of_entry', 'mode_of_entry_id', 'date_of_birth', 'email', 'phone_number', 'contact_address', 'updated_at'); $user->id = $session->id; $user->full_name = $full_name; $user->matriculation_no = $matriculation_no; $user->programme_id = $programme_id; $user->gender_id = $gender_id; $user->year_of_graduation = $year_of_graduation; $user->year_of_entry = $year_of_entry; $user->mode_of_entry_id = $entry_id; $user->date_of_birth = $date_of_birth; $user->email = $email; $user->phone_number = $phone_number; $user->contact_address = $contact_address; $user->updated_at = $dt; if ($user->save()) { doSleep(); echo '<h4 class="alert alert-success">Success</h4>'; echo '<hr>'; echo "<p>You have Successfully updated your profile " . $full_name . " </p>"; echo '<hr>'; } else { # Error Message doSleep(); echo '<h4 class="alert alert-error">Error</h4>'; echo '<hr>'; echo '<p>Your profile update was not successful.</p>'; } }
break; case 9: $pageColor = "Teal"; break; default: $pageColor = "Black"; } return $pageColor; } function setHttpCookie() { if (!empty($_POST["NewCookie"])) { setcookie("CookieTest" . time(), $_POST["NewCookie"], time() + 300, "/"); } } $slept = doSleep(); $pad = doPad(); $httpHeader = setHttpResponse(); setHttpLocation(); setHttpCookie(); $serverName = php_uname("n"); $pageColor = getColor(); $pageTitle = strtolower("{$serverName} {$pageColor}"); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Pragma" content="no-cache"> <title><?php echo $pageTitle; ?>