2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2009 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************/
14 $_user_location = 'public';
16 define('AT_INCLUDE_PATH', '../../../include/');
17 require (AT_INCLUDE_PATH.'vitals.inc.php');
18 require(AT_SOCIAL_INCLUDE.'constants.inc.php');
19 include(AT_SOCIAL_INCLUDE.'classes/PrivacyControl/PrivacyObject.class.php');
20 include(AT_SOCIAL_INCLUDE.'classes/PrivacyControl/PrivacyController.class.php');
21 $_custom_css = $_base_path . AT_SOCIAL_BASENAME . 'module.css'; // use a custom stylesheet
23 $controller = new PrivacyController();
24 $private_obj = $controller->getPrivacyObject($_SESSION['member_id']);
26 //handle privacy setting updates
27 if (isset($_POST['submit'])){
29 $private_obj->setProfile($_POST['profile_prefs']);
30 $private_obj->setSearch($_POST['search_prefs']);
31 $private_obj->setActivity($activity_prefs);
33 //update privacy preference
34 PrivacyController::updatePrivacyPreference($_SESSION['member_id'], $private_obj);
37 //Page prints from here
38 include(AT_INCLUDE_PATH.'header.inc.php');
39 $savant->display('pubmenu.tmpl.php');
40 $savant->assign('controller', $controller);
41 $savant->assign('profile_prefs', $private_obj->getProfile());
42 $savant->assign('search_prefs', $private_obj->getSearch());
43 $savant->assign('application_prefs', $private_obj->getActivity());
44 $savant->display('settings/privacy_settings.tmpl.php');
45 include(AT_INCLUDE_PATH.'footer.inc.php');