* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* @author [creator, or "Original Author"]
* @license http://bit.ly/aVWqRV PayAsYouGo License
* @copyright Copyright (c) 2010 Broadband Mechanics
* @package PeopleAggregator
*/
$login_required = TRUE;
$use_theme = 'Beta';
//TODO : Remove this when new UI is completely implemented.
include_once "web/includes/page.php";
require_once 'api/Category/Category.php';
require_once 'web/includes/classes/file_uploader.php';
require_once 'api/Message/Message.php';
require_once 'web/includes/functions/auto_email_notify.php';
require_once 'web/includes/functions/mailing.php';
default_exception();
$parameter = js_includes("all");
$header = 'header.tpl';
//default network header while creating groups. While group editing header_group.tpl will be used.
$edit = FALSE;
$title = __("Create Group");
if (!empty($_REQUEST['gid'])) {
    $title = __("Edit Group");
    $user_type = Group::get_user_type($_SESSION['user']['id'], $_REQUEST['gid']);
    $header = 'header_group.tpl';
    $edit = TRUE;
    $groups = new Group();
    $groups->load($_REQUEST['gid']);
    $group_type = $groups->group_type;
}
function setup_module($column, $module, $obj)
 private function bootApp($script)
 {
     global $app, $pa_page_render_start;
     $pa_page_render_start = microtime(TRUE);
     /* timing */
     if (!defined("PA_DISABLE_BUFFERING")) {
         ob_start("pa_end_of_page_ob_filter");
     }
     PA::$config = new PA();
     PA::$project_dir = PA_PROJECT_PROJECT_DIR;
     PA::$core_dir = PA_PROJECT_CORE_DIR;
     $app = new CNBootStrap(PA_PROJECT_ROOT_DIR, $this->current_route, $this->route_query_str);
     $GLOBALS['app'] = $app;
     // make $app object available in global scope
     $app->loadConfigFile(APPLICATION_CONFIG_FILE);
     if (PA::$config->pa_installed) {
         $app->detectDBSettings();
     }
     $app->autoLoadFiles($this->auto_load_list);
     $app->loadLanguageFiles();
     default_exception();
     // register default exception handler
     if (PA::$ssl_force_https_urls) {
         $this->routing_scheme = 'https';
     }
     if (PA::$ssl_security_on) {
         if ($this->dispatcher_scheme != $this->routing_scheme) {
             $this->restoreServerData();
             header("Location: " . $this->routing_scheme . "://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
             // "$path_pref/$file_name" . $path_info . $guery_str);
             exit;
         }
     }
     if (PA::$profiler) {
         register_shutdown_function("show_profiler_statistic");
     }
     PA::$path = PA_INSTALL_DIR;
     PA::$url = PA_BASE_URL;
     PA::$remote_ip = $app->remote_addr;
     if (PA::$config->pa_installed) {
         $app->detectNetwork();
         $app->getCurrentUser();
         if ($script != 'web/cnuser_login_index.php' && PA::$login_uid != SUPER_USER_ID && SITE_UNDER_MAINTAINENCE == 1) {
             $script = "web/cnmaintenance.php";
         }
     } else {
         $script = DEFAULT_INSTALL_SCRIPT;
     }
     ob_get_clean();
     return $script;
 }