$form_data['reciprocated_relationship'] = $extra['reciprocated_relationship']; $form_data['email_validation'] = $extra['email_validation']; $form_data['top_navigation_bar'] = @$extra['top_navigation_bar']; $form_data['network_content_moderation'] = @$extra['network_content_moderation']; // can be missing $form_data['action'] = 'edit'; $form_data['inner_logo_image'] = $network_info->inner_logo_image; } // also check if the person who is editing the network is really the owner of network if (@$_POST['action'] == 'delete' && !$error) { if (@$_POST['delete_network'] == 1) { $delete_permission = current_user_can('delete_network'); if ($delete_permission) { //delete network and redirect to mother network homepage // FIX ME where we want to send after deletion $m = mothership_info(); Network::delete($network_info->network_id); header('location:' . $m['url'] . "?msg=7029"); exit; } else { throw new PAException(OPERATION_NOT_PERMITTED, 'You are not authorised to delete the network.'); } } else { $error = TRUE; $error_msg = 'Please confirm network deletion by selecting deletion checkbox.'; } } if (@$_POST['action'] == 'edit' && !$error) { $vartoset = array('name', 'tagline', 'category', 'desc', 'header_image', 'header_image_option', 'network_group_title', 'action', 'type'); filter_all_post($_POST); //filters all data of html
/** constructor It is initialized by : i) mothership_info - info of mother network ii) network info - global - info of current network if any iii) base url of the site iv) current page - holding the name of the script currently running **/ public function __construct() { Logger::log("Enter: Content::__construct"); $this->mothership_info = mothership_info(); $this->network_info = PA::$network_info; if (!empty($this->network_info)) { $this->nid = $this->network_info->network_id; } $this->base_url = PA::$url; // NOTE: if (preg_match("|/([a-zA-Z0-9._-]+\\.php)\$|", $_SERVER['SCRIPT_NAME'], $m)) { // This code part should be removed if (false !== strpos($_SERVER['SCRIPT_NAME'], 'dynamic.php')) { // after all modules has been $this->current_page = $_REQUEST['page_id']; // refactored and adapted to new architecture } else { // after that all constants that beginning with $this->current_page = $m[1]; // FILE_ should be replaced with PAGE_ } } else { $this->current_page = NULL; } Logger::log("Exit: Content::__construct"); }
// Display welcome Message if logged in, otherwise show login prompt if (PA::logged_in() || !isset($configure['show_splash_page']) || $configure['show_splash_page'] == INACTIVE) { $uname = $user->get_name(); $message = "Welcome, {$uname}! <a href='logout.php'>Logout</a>"; } else { $message = ' <form action="dologin.php?action=login" method="post" style="margin: 0px;"> <input type="hidden" name="InvID" value=""/> <input type="hidden" name="GInvID" value=""/> Username<input type="text" name="username"/> Password<input type="password" name="password"/> <input type="submit" value="login"/> or <a href="register.php">REGISTER</a></form>'; } $parameter = js_includes("all"); $mothership_info = mothership_info(); ?> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>Welcome to PeopleAggregator</title> <script type="text/javascript" src="<?php echo PA::$theme_url; ?> javascript/jquery.js"></script> <link href="<?php echo PA::$theme_url; ?> /style_index.css" rel="stylesheet" type="text/css" media="all">