$content = SQL_FETCHARRAY($result);
if ($content['status'] == "CONFIRMED") {
// Check if form was submitted or not
- if (!empty($_POST['ok'])) {
+ if (IS_FORM_SENT()) {
// Check passwords
- if (empty($_POST['password'])) {
+ if (!REQUEST_ISSET_POST(('password'))) {
// No current password entered
$MSG = SPONSOR_NO_CURRENT_PASSWORD_ENTERED;
- } elseif (md5($_POST['password']) != get_session('sponsorpass')) {
+ } elseif (md5(REQUEST_POST('password')) != get_session('sponsorpass')) {
// Entered password didn't match password in DB
$MSG = SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB;
} else {
// Remove all (maybe spoofed) unsafe data from array
foreach ($UNSAFE as $remove) {
- unset($_POST[$remove]);
+ REQUEST_UNSET_POST($remove);
}
// Set last change timestamp
- $_POST['last_change'] = time();
+ REQUEST_SET_POST('last_change', "UNIX_TIMESTAMP()");
// Save data
- $MSG = SPONSOR_SAVE_DATA($_POST, $content);
+ $MSG = SPONSOR_SAVE_DATA(REQUEST_POST_ARRAY(), $content);
}
if (!empty($MSG)) {