load((int)$uid); } catch (PAException $e) { $msg = "Error occured in retreiving user information\n"; $msg .= "
".$e->message."
"; $error = TRUE; } } if (isset($_POST['submit_professional'])) { /* Function for Filtering the POST data Array */ filter_all_post($_POST); $field = array("education", "occupation", "company", "job_description"); $education = trim($_POST['education']); $occupation = trim($_POST['occupation']); $company = trim($_POST['company']); $job_description = trim($_POST['job_description']); $uid = (int)trim($_POST['uid']); $education_perm = $_POST['education_perm']; $occupation_perm = $_POST['occupation_perm']; $company_perm = $_POST['company_perm']; $job_description_perm = $_POST['job_description_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) { $msg2 = "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: user.php?uid=$uid"); } } $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_professionaldata = 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(); ?>