header('Location: '. url_rewrite(AT_SOCIAL_BASENAME.'applications.php', AT_PRETTY_URL_IS_HEADER)); exit; } //Delete application if (isset($_GET['delete']) && intval($_GET['delete']) > 0) { $app->deleteApplication(); $msg->addFeedback('GADGET_REMOVED_SUCCESSFULLY'); header('Location: '. $_SERVER['HTTP_REFERER']); exit; } //Display application settings if (isset($_GET['settings'])){ include(AT_INCLUDE_PATH.'header.inc.php'); $savant->assign('settings', $app->getSettings()); //userPrefs $savant->assign('user_settings', $app->getApplicationSettings($_SESSION['member_id'])); $savant->assign('app_id', $app->getId()); //id $savant->display('social/application_settings.tmpl.php'); include(AT_INCLUDE_PATH.'footer.inc.php'); exit; } //Save settings if (isset($_POST['app_settings'])){ foreach ($app->getSettings() as $key=>$value){ if(isset($_POST[$key])){ //save values iff it is in the userPrefs serialized string. //don't save values blindly from the $_POST. $value = $addslashes($_POST[$key]); $app->setApplicationSettings($_SESSION['member_id'], $key, $value);