$fullname = helper::escapeText($fullname); $location = helper::clearText($location); $location = helper::escapeText($location); $balance = helper::clearInt($balance); $fb_page = helper::clearText($fb_page); $fb_page = helper::escapeText($fb_page); $instagram_page = helper::clearText($instagram_page); $instagram_page = helper::escapeText($instagram_page); $email = helper::clearText($email); $email = helper::escapeText($email); if ($authToken === helper::getAuthenticityToken()) { $account->setUsername($username); $account->setFullname($fullname); $account->setLocation($location); $account->setBalance($balance); $account->setFacebookPage($fb_page); $account->setInstagramPage($instagram_page); $account->setEmail($email); } } header("Location: /admin/profile.php/?id=" . $accountInfo['id']); exit; } } } else { header("Location: /admin/main.php"); } if ($accountInfo['error'] === true) { header("Location: /admin/main.php"); } $stats = new stats($dbo);
$result = array("error" => true, "error_code" => ERROR_UNKNOWN); $account = new account($dbo, $accountId); $account->setLastActive(); $account->setFullname($fullname); $account->setLocation($location); $account->setStatus($bio); $account->setSex($sex); $account->setBirth($year, $month, $day); $account->set_iStatus($iStatus); $account->set_iPoliticalViews($politicalViews); $account->set_iWorldView($worldViews); $account->set_iPersonalPriority($personalPriority); $account->set_iImportantInOthers($importantInOthers); $account->set_iSmokingViews($smokingViews); $account->set_iAlcoholViews($alcoholViews); $account->set_iLooking($lookingViews); $account->set_iInterested($interestedViews); if (helper::isValidURL($facebookPage)) { $account->setFacebookPage($facebookPage); } else { $account->setFacebookPage(""); } if (helper::isValidURL($instagramPage)) { $account->setInstagramPage($instagramPage); } else { $account->setInstagramPage(""); } $result = $account->get(); echo json_encode($result); exit; }