Example #1
0
	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);
			}
		}
		$msg->addFeedback('GADGET_SETTINGS_SAVED');
		header('Location: '. url_rewrite(AT_SOCIAL_BASENAME.'applications.php', AT_PRETTY_URL_IS_HEADER));
		exit;
	}

	//loop through all app and print out the thumbnail
	$iframe_url = $app->getIframeUrl($_REQUEST['id'], 'canvas', $_GET['appParams']);

	//display
	include(AT_INCLUDE_PATH.'header.inc.php');
	$savant->assign('iframe_url', $iframe_url);
	$savant->assign('app', $app);
	$savant->display('social/individual_application.tmpl.php');
	include(AT_INCLUDE_PATH.'footer.inc.php');
	exit;
}

//list all my applications
$list_of_my_apps = $app->listMyApplications();

include(AT_INCLUDE_PATH.'header.inc.php');
$savant->display('social/pubmenu.tmpl.php');