load((int)$uid); } catch (PAException $e) { $msg = "Error occured in retreiving user information\n"; $msg .= "
".$e->message."
"; $error = TRUE; } } if (isset($_POST['submit_Personal'])) { /* Function for Filtering the POST data Array */ filter_all_post($_POST); $field = array("turns_on", "turns_off", "cant_live_without", "ideal_match"); $turns_on = trim($_POST['turns_on']); $turns_off = trim($_POST['turns_off']); $cant_live_without = trim($_POST['cant_live_without']); $ideal_match = trim($_POST['ideal_match']); $uid = (int)trim($_POST['uid']); $turns_on_perm = $_POST['turns_on_perm']; $turns_off_perm = $_POST['turns_off_perm']; $cant_live_without_perm = $_POST['cant_live_without_perm']; $ideal_match_perm = $_POST['ideal_match_perm']; for ($i=0; $isave_user_profile($array_user_data, $information_type); } catch (PAException $e) { $msg = "$e->message"; $save_error = TRUE; } if ($save_error == TRUE) { $msg1 = "Sorry: your unable to save data failed.
Reason: ".$msg; } else { // invalidate the cache for user profile $user_id = $_SESSION['user']['id']; $file = "$current_theme_path/user_profile.tpl?uid=$user_id"; CachedTemplate::invalidate_cache($file); header("Location: edit_professionalprofile.php"); } } $user_picture = $user->picture; if ($user->picture) { $img_path = $base_url."/files/".$user->picture; } else { $img_path = $base_url."/images/default.jpg"; } $user_data = array(); $user_personaldata = User::load_user_profile($uid, (int)$_SESSION['user']['id'], $information_type); for ($i=0; $i set('msg', $msg); } $content->set('user_data', $user_data); // header $header = & new Template(CURRENT_THEME_FSPATH."/header.tpl"); $header->set('current_theme_path', $current_theme_path); //$header->set('current_theme_path', $current_theme_path); $header->tier_one_tab = $main_tier; $header->tier_two_tab = $second_tier; $header->tier_three_tab = $third_tier; if ($network_info) { $header->set_object('network_info', $network_info); } $content->set('header', $header); $left_panel = & new Template(CURRENT_THEME_FSPATH."/left_page.tpl"); $left_panel->set('img_path', $img_path); $content->set('left_panel', $left_panel); $right_panel = & new Template(CURRENT_THEME_FSPATH."/right_editprofile.tpl"); $content->set('right_panel', $right_panel); echo $content->fetch(); $footer = & new Template(CURRENT_THEME_FSPATH."/footer.tpl"); echo $footer->fetch(); ?>