} } elseif ($t == 'private') { // TODO: The private profile graph is the same as the profile graph, privacy preferences will decide what is visible // TODO: Authorize depending on the WebID URI if (!SMOBAuth::check()) { error_log("not authenticated"); //if($a && $a == 'edit'){ // header( 'Location: '.SMOB_ROOT.'auth?redirect=private/edit' ) ; //} else { // header( 'Location: '.SMOB_ROOT.'auth?redirect=private' ) ; //}; header('Location: ' . SMOB_ROOT . 'auth'); } else { error_log("authenticated"); if ($a && $a == 'edit') { echo PrivateProfile::view_private_profile_form(); } else { echo PrivateProfile::view_private_profile(); exit; } } } elseif ($t == 'logout') { session_start(); session_destroy(); echo 'bye'; } else { $smob = new SMOB($t, $u, $p); $smob->reply_of($r); $smob->go(); } }
function view_private_profile_form() { $file = 'private_profile_template.php'; // if(IS_AJAX) { // } else { $params = PrivateProfile::get_initial_private_form_data(); extract($params); ob_start(); include $file; $contents = ob_get_contents(); ob_end_clean(); return $contents; }