}
            if (@$_GET['sort_by'] == 'alphabetic') {
                $obj->sort_by = 'U.login_name';
                $obj->direction = 'ASC';
            } else {
                $obj->sort_by = 'U.created';
                $obj->direction = 'DESC';
            }
            $obj->Paging["page"] = $paging["page"];
            $obj->Paging["show"] = 10;
            $obj->network_info = PA::$network_info;
            $obj->super_user_and_mothership = $super_user_and_mothership;
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_NETWORK_MANAGE_USERS, "Manage Registered User", 'container_two_column.tpl', 'header.php', PUB, HOMEPAGE, PA::$network_info);
if (@$_GET['msg']) {
    require_once 'web/languages/english/MessagesHandler.php';
    $msg_obj = new MessagesHandler();
    $message = $msg_obj->get_message($_GET['msg']);
}
if (@$message) {
    $msg_tpl = new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
    $msg_tpl->set('message', $message);
    $m = $msg_tpl->fetch();
    $page->add_module("middle", "top", $m);
}
$page->html_body_attributes = 'class="hold-transition skin-blue sidebar-collapse sidebar-mini"';
$css_array = get_network_css();
if (is_array($css_array)) {
    foreach ($css_array as $key => $value) {
Ejemplo n.º 2
0
<?php

//  ##############   Include Files  ################ //
require_once 'includes/configuration.php';
require_once 'includes/db_connection.php';
require_once 'includes/functions.php';
require_once 'includes/pageRenderer.php';
//  ##############  Finish Includes  ############### //
startup();
$page = new PageRenderer();
// grab request URI and clean it up to only contain the static url/path segments
$requestUri = urldecode($_SERVER['REQUEST_URI']);
$scriptInfo = pathinfo($_SERVER['SCRIPT_NAME']);
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING'])) {
    $requestUri = substr($requestUri, 0, (strlen($_SERVER['QUERY_STRING']) + 1) * -1);
}
// detect if running in a subdirectory and not webroot and fix static segments in that case
if ($scriptInfo['dirname'] != DIRECTORY_SEPARATOR) {
    $requestUri = str_replace($scriptInfo['dirname'], '', $requestUri);
}
// remove trailing and ending slashes
if ($requestUri[0] == '/') {
    $requestUri = substr($requestUri, 1);
}
if (substr($requestUri, -1) == '/') {
    $requestUri = substr($requestUri, 0, -1);
}
// define default action and controller
$controllerAndAction = $configuration['routes']['_default'];
$pathSegments = array();
// check for action requested via URL
Ejemplo n.º 3
0
  $obj->album_id = $album_id;
  if (isset($_GET['album_id']) && (!empty($_GET['album_id']))) { 
    $obj->album_id = $_GET['album_id'];  
  }
}

if (!empty($login_user)) {
  $title = User::get_login_name_from_id($uid)." - ";
} else {
  $title = "";
}
$title .= "Media Gallery - $network_info->name";

// fetching the data from the Constants.php and Rendering the data of the page 
// at present we are setting the value of setting data 
$page = new PageRenderer("setup_module", PAGE_MEDIA_GALLERY, $title, "container_one_column_media_gallery.tpl", "header_user.tpl", PUB, NULL, $network_info, null, $setting_data);
/* To avoding javascript select value function alert */
if(!isset($_GET['msg_rep'])) {
  if (!empty($msg) || !empty($_GET['msg_id'])) {
    $msg_obj = new MessagesHandler();
    $msg_id = ($_GET['msg_id']) ? $_GET['msg_id']: $msg;
    $dynamic_msg = ($msg_id == 2007)?substr ($type,0,5):NULL;
    $msg = $msg_obj->get_message($msg_id,$dynamic_msg);
    if ($msg) {
      $msg_tpl = & new Template(CURRENT_THEME_FSPATH."/display_message.tpl");
      $msg_tpl->set('message', $msg);
      $page->add_module("middle", "top", $msg_tpl->fetch());
    }
  }
}
// Jtip is shown when user watching the image media
    $groups->load($_REQUEST['gid']);
    $group_type = $groups->group_type;
}
function setup_module($column, $module, $obj)
{
    global $login_uid, $paging, $page_uid, $super_groups_available, $user_type, $group_type;
    switch ($module) {
        case 'AddGroupModule':
            if (!empty($_REQUEST['gid'])) {
                $obj->id = $_REQUEST['gid'];
            }
            break;
    }
}
$setting_data = ModuleSetting::load_setting(PAGE_ADDGROUP, PA::$login_uid);
$page = new PageRenderer("setup_module", PAGE_ADDGROUP, "{$title} - " . PA::$network_info->name, 'container_three_column.tpl', $header, PRI, HOMEPAGE, PA::$network_info, NULL, $setting_data);
$page->add_header_js('addgroup.js');
if (!empty($_REQUEST['msg'])) {
    $message = null;
} else {
    if (!empty($_REQUEST['error_msg'])) {
        $message = null;
    } else {
        $message = null;
    }
}
uihelper_error_msg($message);
if ($edit) {
    uihelper_get_group_style($_REQUEST['gid']);
} else {
    uihelper_get_network_style();
Ejemplo n.º 5
0
            $obj->uid = $uid;
            $obj->media_data = $show_media;
            $obj->contentcollection_type = $cc_info->type;
            break;
        case 'right':
            $obj->uid = $uid;
            if ($moduleName == 'UserPhotoModule') {
                $obj->block_type = 'UserPhotoBlock';
            }
            if ($moduleName != 'AdsByGoogleModule') {
                $obj->block_type = HOMEPAGE;
            }
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_EDIT_MEDIA, "Edit Media", "container_three_column.tpl", "header.tpl", PUB, HOMEPAGE, $network_info);
if (!empty($error)) {
    $msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
    $msg_tpl->set('message', $error);
    $page->add_module("middle", "top", $msg_tpl->fetch());
}
$css_array = get_network_css();
if (is_array($css_array)) {
    foreach ($css_array as $key => $value) {
        $page->add_header_css($value);
    }
}
$css_data = inline_css_style();
if (!empty($css_data['newcss']['value'])) {
    $css_data = '<style type="text/css">' . $css_data['newcss']['value'] . '</style>';
    $page->add_header_html($css_data);
// --- left sidebar (debugging)

function render_debug_sidebar() {
    global $user;
    ob_start();
    echo "<p>badges: "; var_dump($user->list_widgets()); echo "</p>";
    try {
	$default_badge = $user->load_widget("default");
	echo "<p>default badge: "; var_dump($default_badge); echo "</p>";
    } catch (PAException $e) {
	echo "<p>no default badge available.</p>";
    }
    $debug_sidebar = ob_get_contents();
    ob_end_clean();
    return $debug_sidebar;
}

// ---
$page = new PageRenderer(NULL, PAGE_BADGE_CREATE, sprintf(__("%s - My Widgets - %s"), $login_user->get_name(), PA::$network_info->name), "container_three_column.tpl", 'header_user.tpl');
$page->onload = "badge.update();";
$page->add_header_css(PA::$theme_url . "/badge_create.css");

$page->add_module("left", "top", render_left_sidebar());
//$page->add_module("left", "top", render_debug_sidebar()); // debugging
$page->add_module("middle", "top", $page_html);
$page->add_module("right", "top", render_right_sidebar());

uihelper_set_user_heading($page);
echo $page->render();

?>
            //refreshing the network_info after saving it.
            //set $form_data['reciprocated_relationship']if reciprocated relationship is saved
            $form_data['reciprocated_relationship'] = $network_basic_controls['reciprocated_relationship'];
            $form_data['email_validation'] = $network_basic_controls['email_validation'];
            $form_data['top_navigation_bar'] = $network_basic_controls['top_navigation_bar'];
            $form_data['network_content_moderation'] = $network_basic_controls['network_content_moderation'];
            $error_msg = 'Network Information Successfully Updated';
        } catch (PAException $e) {
            $error = TRUE;
            $error_msg = "{$e->message}";
        }
    }
}
//...$_POST if ends
//render the page
$page = new PageRenderer("setup_module", PAGE_NETWORK_STATISTICS, sprintf(__("Network Statistics - %s"), $network_info->name), 'container_two_column.tpl', 'header.tpl', PRI, HOMEPAGE, $network_info);
$error_msg = !empty($error_msg) ? $error_msg : @$permission_denied_msg;
uihelper_error_msg($error_msg);
uihelper_get_network_style();
$page->html_body_attributes = 'class="no_second_tier network_config"';
$css_path = $current_theme_path . '/admin2.css';
$page->add_header_css($css_path);
//..end render the page
/*  ---------- FUNCTION DEFINITION ------------------*/
//call back function
function setup_module($column, $module, $obj)
{
    global $form_data, $error, $error_msg, $configure_permission, $network_info;
    if (!$configure_permission) {
        return 'skip';
    }
                }
                if (isset($rp->reg_user)) {
                    $obj->array_of_errors = @$rp->reg_user->array_of_errors;
                }
            }
            break;
        case 'right':
            $obj->mode = PRI;
            if ($moduleName != 'AdsByGoogleModule') {
                $obj->block_type = HOMEPAGE;
            }
            break;
    }
}
$rp = new RegistrationPage();
try {
    $rp->main();
    $msg = !empty($rp->reg_user->msg) ? nl2br($rp->reg_user->msg) : @$rp->inv_error;
} catch (PAException $e) {
    $msg = $e->getMessage();
}
$page = new PageRenderer("setup_module", PAGE_REGISTER, "Registration Page", "container_three_column.tpl", "header.tpl", PUB, HOMEPAGE, PA::$network_info);
// added by Zoran Hron: JQuery validation & AJAX file upload --
$page->add_header_html(js_includes('jquery.validate.js'));
$page->add_header_html(js_includes('jquery.metadata.js'));
$page->add_header_html(js_includes('ajaxfileupload.js'));
$page->add_header_html(js_includes('user_registration.js'));
uihelper_error_msg($msg);
uihelper_get_network_style();
$page->html_body_attributes = ' id="registration_page"';
echo $page->render();
        case 'middle':
            $obj->get_user_albums();
            $obj->author_id = $_SESSION['user']['id'];
            $content_type = 'BlogPost';
            require_once "web/includes/blocks/createcontent.php";
            if (!empty($cid)) {
                $obj->set_id($cid);
            }
            if (strlen($error) > 0) {
                $obj->set_error_msg($error, $data_array);
            }
            $obj->display = 'blog';
            $obj->targets = $targets;
            $obj->show_external_blogs = $show_external_blogs;
            $obj->is_edit = $is_edit;
            $obj->permission_to_post = $permission_to_post;
            $obj->parent_collection_id = @$obj_content_type->parent_collection_id;
            $obj->ccid = $obj->parent_collection_id ? $obj->parent_collection_id : $ccid;
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_POSTCONTENT, "Create content", "container_one_column_postcontent.tpl", "header.tpl", PRI, HOMEPAGE, PA::$network_info);
// load JQuery forms Plugin
$page->add_header_html(js_includes('forms.js'));
// and the modal overlay functions
$page->add_header_html(js_includes('attach_media_modal.js'));
$css_path = PA::$theme_url . '/modal.css';
$page->add_header_css($css_path);
uihelper_error_msg($post_err);
uihelper_get_network_style();
echo $page->render();
        case 'left':
            $obj->mode = PUB;
            if ($moduleName == 'RecentCommentsModule') {
                $obj->cid = $_REQUEST['cid'];
                $obj->block_type = HOMEPAGE;
                $obj->mode = PRI;
            }
            break;
        case 'middle':
            $obj->mode = PUB;
            $obj->orientation = CENTER;
            $obj->content_id = $_REQUEST['cid'];
            $obj->mode = PUB;
            $obj->uid = $_SESSION['user']['id'];
            $obj->block_type = 'media_management';
            break;
        case 'right':
            $obj->mode = PRI;
            if ($moduleName != 'AdsByGoogleModule') {
                $obj->block_type = HOMEPAGE;
            }
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_MEDIA_MANAGEMENT, "Media Management", "media_gallery_pa.tpl", "header.tpl", PUB, HOMEPAGE, PA::$network_info);
if (!empty($msg1)) {
    $msg_tpl = new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
    $msg_tpl->set('message', $msg1);
    $page->add_module("middle", "top", $msg_tpl->fetch());
}
echo $page->render();
Ejemplo n.º 11
0
            if (@$_GET['view'] == 'Conversations') {
                $obj->mode = 'view_conversations';
            }
            $obj->folder_name = $folder_name = empty($_GET['folder']) ? INBOX : $_GET['folder'];
            $obj->page = empty($_GET['page']) ? 1 : (int) $_GET['page'];
            $obj->Paging = $paging;
            if (isset($_GET['q'])) {
                $obj->search_string = $_GET['q'];
            }
    }
}
//check if user is checking out only his content
if ($uid != $login_uid) {
    throw new PAException(OPERATION_NOT_PERMITTED, "You cant access other user's messages.");
}
$page = new PageRenderer("setup_module", PAGE_MESSAGE, sprintf(__("%s - Private Messages - %s"), $login_user->get_name(), $network_info->name), "container_one_column.tpl", 'header_user.tpl', PRI, HOMEPAGE, $network_info);
/*$css_path = $current_theme_path.'/layout.css';
$page->add_header_css($css_path);
$css_path = $current_theme_path.'/network_skin.css';
$page->add_header_css($css_path);
$css_path = $current_theme_path.'/edit_skin.css';
$page->add_header_css($css_path);*/
// Currently using the CSS from the live site, due to some problem in merging local and server CSS.
$theme_details = get_user_theme($uid);
if (is_array($theme_details['css_files'])) {
    foreach ($theme_details['css_files'] as $key => $value) {
        $page->add_header_css($value);
    }
}
if (!empty($_GET['msg'])) {
    $message = MessagesHandler::get_message($_GET['msg']);
Ejemplo n.º 12
0
     FileCache::store($cache_id, $dynamic_page, 1200);
 }
 // Force login if we're on a private network, unless we're on login.php, register.php or cnuser_login_index.php
 $login_required = $page_settings['page_mode'] != 'public' ? true : false;
 if (!$login_required && PA::$network_info->is_private() && !$login_never_required) {
     $login_required = TRUE;
 }
 // Check user session / login status, and redirect to login page (or
 // request page, for private networks) if required.
 if (!check_session($login_required, $page_redirect_function)) {
     if ($login_required) {
         exit;
     }
 }
 $use_theme = $page_settings['page_theme'];
 $page = new PageRenderer('setup_module', $page_settings['page_id'], sprintf(__('%s - %s'), __($page_settings['page_name']), PA::$network_info->name), $page_settings['page_template'], $page_settings['header_template'], $page_settings['page_mode'], $page_settings['block_type'], PA::$network_info, NULL, NULL);
 if (isset($page_settings['body_attributes'])) {
     $page->html_body_attributes = $page_settings['body_attributes'];
 }
 if (isset($page_settings['javascripts'])) {
     if (is_array($page_settings['javascripts'])) {
         foreach ($page_settings['javascripts'] as $js_file) {
             $page->add_header_html(js_includes($js_file));
         }
     } else {
         $page->add_header_html(js_includes($page_settings['javascripts']));
     }
 }
 if (isset($page_settings['page_css'])) {
     if (is_array($page_settings['page_css'])) {
         foreach ($page_settings['page_css'] as $css_file) {
            if (!empty($user)) {
                $obj->page_user = $user->get_name();
            }
            break;
        case 'right':
            $obj->mode = PRI;
            if ($moduleName != 'AdsByGoogleModule') {
                $obj->block_type = HOMEPAGE;
            }
            if (!empty($_GET['gid'])) {
                if ($moduleName == 'RecentPostModule') {
                    $obj->type = 'group';
                    $obj->gid = $_GET['gid'];
                }
            }
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_VIEW_ALL_MEMBERS, $page_name, "container_three_column.php", $header_tpl, PUB, HOMEPAGE, PA::$network_info);
$page->add_header_html(js_includes('common.js'));
if ($_GET['gid']) {
    uihelper_get_group_style($_GET['gid']);
} else {
    if (!empty($_GET['uid'])) {
        //applying the user theme
        uihelper_set_user_heading($page);
    } else {
        uihelper_get_network_style();
    }
}
echo $page->render();
Ejemplo n.º 14
0
 *
 */
$login_required = TRUE;
//for session protection pages
$use_theme = 'Beta';
include "includes/page.php";
$parameter = '';
$parameter .= js_includes('common.js');
global $query_count_on_page, $page_uid;
$query_count_on_page = 0;
/**
 *  Function : setup_module()
 *  Purpose  : call back function to set up variables 
 *             used in PageRenderer class
 *             To see how it is used see api/PageRenderer/PageRenderer.php 
 *  @param    $column - string - contains left, middle, right
 *            position of the block module 
 *  @param    $moduleName - string - contains name of the block module
 *  @param    $obj - object - object reference of the block module
 *  @return   type string - returns skip means skip the block module
 *            returns rendered html code of block module
 */
function setup_module($column, $moduleName, $obj)
{
}
$page = new PageRenderer("setup_module", PAGE_USER_COMMENT, 'Write comment', "container_three_column.tpl", "header.tpl", PUB, HOMEPAGE, $network_info);
uihelper_error_msg($error_message);
$page->add_header_html($parameter);
$page->html_body_attributes = 'class="no_second_tier" id="pg_homepage"';
uihelper_set_user_heading($page);
echo $page->render();
// for query count
global $query_count_on_page;
$query_count_on_page = 0;
$user = get_login_user();
function setup_module($column, $module, $obj)
{
    global $user;
    switch ($module) {
        case 'EventCalendarModule':
            $obj->title = __('Personal Events');
            $obj->assoc_type = 'user';
            $obj->assoc_id = (int) $_SESSION['user']['id'];
            $obj->may_edit = true;
            // user may edit own events, right? ;)
            $obj->assoc_title = $user->login_name;
            break;
    }
    $obj->mode = PUB;
}
global $msg;
$page = new PageRenderer("setup_module", PAGE_USER_CALENDAR, __("My Events"), "container_one_column.php", "header_user.php", PRI, NULL, PA::$network_info);
$css_path = PA::$theme_url . '/css/calendar.css';
$page->add_header_css($css_path);
$page->add_header_html(js_includes('calendar.js'));
$page->add_header_html(js_includes('date.js'));
$page->add_header_html(js_includes('jquery.dimensions.min.js'));
$page->add_header_html(js_includes('jquery.datePicker.js'));
$page->add_header_html($parameter);
uihelper_error_msg($msg);
uihelper_set_user_heading($page);
echo $page->render();
                $obj->array_of_errors = $array_of_errors;
                $obj->login_name = $login_name;
                $obj->first_name = $first_name;
                $obj->last_name = $last_name;
                $obj->email = $email;
                $obj->user_picture = $user_picture;
                $obj->user_data = $user_data_general;
                $obj->user_personal_data = $user_personal_data;
                $obj->user_professional_data = $user_professional_data;
                $obj->user_social_data = $user_social_data;
                $obj->blogsetting_status = empty($data_profile) ? NULL : $data_profile[0]->field_value;
            }
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_EDIT_PROFILE, sprintf(__("%s - Edit your profile - %s"), $login_user->get_name(), PA::$network_info->name), "container_one_column.php", "header_user.php", NULL, PRI, PA::$network_info);
$page->add_header_html(js_includes('edit_profile.js'));
// ------- added by Zoran Hron: JQuery validation -------------
$page->add_header_html(js_includes('jquery.validate.min.js'));
$page->add_header_html(js_includes('jquery.metadata.js'));
// ------------------------------------------------------------
$theme_details = get_user_theme($login_uid);
if (is_array($theme_details['css_files'])) {
    foreach ($theme_details['css_files'] as $key => $value) {
        $page->add_header_css($value);
    }
}
$css_path = PA::$theme_url . '/modal.css';
$page->add_header_css($css_path);
if (@$_GET['updated'] == 1) {
    $uploaded_msg = " Profile updated successfully";
Ejemplo n.º 17
0
require_once "user_page_functions.php";
/* including Js files */
$parameter = js_includes('common.js');
// for query count
global $query_count_on_page;
$query_count_on_page = 0;
$user = get_login_user();
function setup_module($column, $module, $obj)
{
    global $user;
    switch ($module) {
        case 'EventCalendarModule':
            $obj->title = 'Personal Events';
            $obj->assoc_type = 'user';
            $obj->assoc_id = (int) $_SESSION['user']['id'];
            $obj->may_edit = true;
            // user may edit own events, right? ;)
            $obj->assoc_title = $user->login_name;
            break;
    }
    $obj->mode = PUB;
}
global $msg;
$page = new PageRenderer("setup_module", PAGE_CALENDAR, "My events", "container_one_column.tpl", "header_user.tpl", NULL, PRI, $network_info);
$css_path = $current_theme_path . '/calendar.css';
$page->add_header_css($css_path);
$page->add_header_html(js_includes('calendar.js'));
$page->add_header_html($parameter);
uihelper_error_msg($msg);
uihelper_set_user_heading($page);
echo $page->render();
                $obj->sort_by = @$_GET['sort_by'];
            } else {
                $obj->sort_by = @$_GET['sort_by'];
            }
            if (@$_GET['uid']) {
                $obj->uid = $_GET['uid'];
                $obj->sort_by = @$_GET['sort_by'];
            }
            $obj->Paging["page"] = $paging["page"];
            $obj->Paging["show"] = $paging["show"];
            $obj->total_network = $total_network;
            break;
        case 'NetworksCategoryModule':
            $obj->mode = PUB;
            $obj->block_type = "NetworkCategory";
            $obj->total_network = $total_network;
            break;
        case 'SearchNetworksModule':
            return 'skip';
            break;
        case 'NewestNetworkModule':
            $obj->sort_by = TRUE;
            $obj->title = 'Networks';
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_NETWORKS_HOME, __("Network Directory"), "container_three_column.tpl", "header.tpl", PUB, HOMEPAGE, PA::$network_info, '', $setting_data);
$page->add_header_html($parameter);
$page->html_body_attributes = ' class="no_second_tier" id="pg_network_home"';
uihelper_get_network_style();
echo $page->render();
        //if no error
    }
    // $_post
}
// else end
function setup_module($column, $module, $obj)
{
    global $paging, $configure_permission, $form_data;
    if (!$configure_permission) {
        return 'skip';
    }
    $obj->Paging["page"] = $paging["page"];
    $obj->Paging["show"] = 10;
    $obj->mode = PUB;
    $obj->form_data = $form_data;
}
$page = new PageRenderer("setup_module", PAGE_NETWORK_ANNOUNCEMENT, "Network Announcement", 'container_one_column.tpl', 'header.tpl', PRI, HOMEPAGE, $network_info);
$error_msg = !empty($error_msg) ? $error_msg : $permission_denied_msg;
if ($error_msg) {
    $msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
    $msg_tpl->set('message', $error_msg);
    $m = $msg_tpl->fetch();
    $page->add_module("middle", "top", $m);
}
$css_path = $current_theme_path . '/layout.css';
$page->add_header_css($css_path);
$css_path = $current_theme_path . '/network_skin.css';
$page->add_header_css($css_path);
echo $page->render();
?>
  
Ejemplo n.º 20
0
<?php

$login_required = FALSE;
include "includes/page.php";
$code_esc = intval(@$_REQUEST['code']);
$msg_esc = htmlspecialchars(@$_REQUEST['msg']);
// ---
$page = new PageRenderer(NULL, NULL, "Error {$code_esc}: {$msg_esc}", "generic_error.tpl", 'header.tpl', PRI, HOMEPAGE, $network_info);
$msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/error_middle.tpl");
$msg_tpl->set('code', $code_esc);
$msg_tpl->set('msg', $msg_esc);
$page->add_module("middle", "top", $msg_tpl->fetch());
$page->add_module("middle", "bottom", '<p style="text-align: center"><a href="' . htmlspecialchars($_SERVER['HTTP_REFERER']) . '">back</a></p>');
echo $page->render();
Ejemplo n.º 21
0
}
function setup_module($column, $module, $obj)
{
    global $network_info, $login_uid, $configure_permission;
    switch ($module) {
        case 'EventCalendarModule':
            if (!$configure_permission) {
                return 'skip';
            }
            $obj->title = 'Network Events';
            $obj->assoc_type = 'network';
            $obj->assoc_id = $network_info->network_id;
            $obj->assoc_title = $network_info->name;
            $is_admin = Network::is_admin($network_info->network_id, $login_uid);
            if ($is_admin) {
                $obj->may_edit = true;
            } else {
                $obj->may_edit = false;
            }
            break;
    }
    $obj->mode = PUB;
}
$page = new PageRenderer("setup_module", PAGE_CALENDAR, "Calendar - PeopleAggregator", "container_one_column.tpl", "header.tpl", NULL, PRI, $network_info);
$page->html_body_attributes = 'class="no_second_tier network_config"';
$css_path = $current_theme_path . '/calendar.css';
$page->add_header_css($css_path);
$page->add_header_html(js_includes('calendar.js'));
uihelper_error_msg($msg);
uihelper_get_network_style();
echo $page->render();
{$your_permissions}

<p>{$paging}</p>

<table class="bulk_comment_summary"><tr>
<td>ID</td>
<td>Post</td>
<td>Name</td>
<td>Email</td>
<td>Website</td>
<td>Subject</td>
<td>Comment</td>
<td>IP</td>
<td>X</td>
</tr>
{$comments}
</table>

</div><!-- comment_manage_pane -->
EOS;
    return $page_html;
}
// ---
$user = new User();
$user->load($login_uid);
$page = new PageRenderer(NULL, PAGE_COMMENT_MANAGEMENT, "Manage comments", "container_one_column.tpl", "header.tpl");
$page->add_header_js("fat.js");
$page->add_header_css(PA::$theme_url . "/comment_management.css");
$page->add_module("middle", "top", render_main_page_area($user));
uihelper_set_user_heading($page);
echo $page->render();
Ejemplo n.º 23
0
    }
}
//error displaying
function setup_module($column, $moduleName, $obj)
{
    global $content_type, $users, $uid, $group_ids, $user;
    switch ($column) {
        case 'middle':
            $obj->orientation = CENTER;
            $obj->get_link_categories();
            $obj->uid = $uid;
            break;
    }
    $obj->mode = PUB;
}
$page = new PageRenderer("setup_module", PAGE_LINKS_MANAGEMENT, sprintf(__("%s - My Links - %s"), $login_user->get_name(), $network_info->name), "container_three_column.tpl", "header.tpl", PUB, HOMEPAGE, $network_info);
$page->add_header_html('<script type="text/javascript" language="javascript" src="' . $current_theme_path . '/javascript/links.js"></script>');
$updated_category_id = null;
if (!empty($_POST['updated_category_id'])) {
    $updated_category_id = $_POST['updated_category_id'];
}
$page->add_header_html('<script type="text/javascript" language="javascript">var cat_id = "' . $updated_category_id . '";</script>');
$message = NULL;
if (count($error_array) > 0) {
    for ($counter = 0; $counter < count($error_array); $counter++) {
        $message .= $error_array[$counter] . "<br>";
    }
}
uihelper_error_msg($message);
uihelper_set_user_heading($page);
echo $page->render();
            $data[$i]['file_name'] = $file;
            Storage::link($file, array("role" => "emblem"));
        } else {
            $data[$i]['file_name'] = $_POST['userimage_' . $i];
        }
    }
    $data = serialize($data);
    $id = 1;
    // stands for the Update for emblum data
    if (!$error) {
        ModuleData::update($data, $id);
        // call the ModuleData to update the data
    }
}
//render the page
$page = new PageRenderer("setup_module", PAGE_MANAGE_EMBLEM, "Manage Emblem", 'container_two_column.tpl', 'header.tpl', PRI, HOMEPAGE, PA::$network_info);
if (!empty($msg)) {
    $msg_tpl = new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
    $msg_tpl->set('message', $msg);
    $m = $msg_tpl->fetch();
    $page->add_module("middle", "top", $m);
}
$page->html_body_attributes = 'class="no_second_tier network_config"';
$page->add_header_html(js_includes('edit_profile.js'));
$page->add_header_html(js_includes('manage_data.js'));
$css_array = get_network_css();
if (is_array($css_array)) {
    foreach ($css_array as $key => $value) {
        $page->add_header_css($value);
    }
}
            break;
        case 'RecentPostModule':
            $obj->type = 'group';
            $obj->gid = $_REQUEST['gid'];
            break;
    }
}
function members_to_array($members)
{
    $out = array();
    foreach ($members as $member) {
        $out[] = $member['user_id'];
    }
    return $out;
}
function get_networks_users_id()
{
    $users = array();
    $users_ids = array();
    $users = Network::get_members(array('network_id' => PA::$network_info->network_id));
    if ($users['total_users']) {
        for ($i = 0; $i < $users['total_users']; $i++) {
            $users_ids[] = $users['users_data'][$i]['user_id'];
        }
    }
    return $users_ids;
}
$page = new PageRenderer("setup_module", PAGE_FORUM_HOME, "Forum Home", 'container_three_column.tpl', 'header_group.tpl', PRI, HOMEPAGE, PA::$network_info);
uihelper_error_msg($msg);
uihelper_get_group_style($gid);
echo $page->render();
    $networks_data = unserialize($networks_data);
    //TODO: display the error messages.
}
//end if
function setup_module($column, $module, $obj)
{
    global $featured_network, $info_boxes, $networks_data, $section, $perm;
    $obj->perm = $perm;
    switch ($module) {
        default:
            $obj->mode = $section;
            $obj->info_boxes = $info_boxes;
            $obj->networks_data = $networks_data;
    }
}
$page = new PageRenderer("setup_module", PAGE_CONFIGURE_SPLASH_PAGE, __("Configure Splash Page"), 'container_two_column.tpl', 'header.tpl', PRI, HOMEPAGE, PA::$network_info);
$page->html_body_attributes = 'class="no_second_tier network_config"';
$css_array = get_network_css();
if (is_array($css_array)) {
    foreach ($css_array as $key => $value) {
        $page->add_header_css($value);
    }
}
$css_data = inline_css_style();
if (!empty($css_data['newcss']['value'])) {
    $css_data = '<style type="text/css">' . $css_data['newcss']['value'] . '</style>';
    $page->add_header_html($css_data);
}
uihelper_error_msg($message);
echo $page->render();
?>
Ejemplo n.º 27
0
            } else {
                $access_type = ' Moderated';
            }
            $obj->group_details['access_type'] = $access_type;
            $obj->group_details['author_id'] = $group_data->author_id;
            $user = new User();
            $user->load((int) $group_data->author_id);
            $obj->group_details['author_picture'] = $user->picture;
            $obj->group_details['author_name'] = $user->login_name;
            break;
        case 'GroupsCategoryModule':
            $obj->total_groups = $total_groups;
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_GROUP_THEME, "Group Themes", 'container_three_column.tpl', 'header_group.tpl', PRI, HOMEPAGE, $network_info, '', $setting_data);
$page->add_header_html($parameter);
if ($type == 'style') {
    // adding some New Css files require for this page only
    $css_path = $current_theme_path . '/configurator.css';
    $page->add_header_css($css_path);
    $css_path = $current_theme_path . '/farbtastic.css';
    $page->add_header_css($css_path);
}
if ($type == 'module') {
    $parameter .= js_includes('messages.js');
    //added for checking and unchecking all the checkboxes for modules.
    $page->add_header_html($parameter);
}
uihelper_error_msg($msg_id);
uihelper_get_group_style($gid);
Ejemplo n.º 28
0
            $obj->mode = PRI;
            if ($moduleName != 'LogoModule') {
                $obj->block_type = HOMEPAGE;
            }
            break;
        case 'middle':
            break;
        case 'right':
            if (PA::$network_info->type == PRIVATE_NETWORK_TYPE) {
                return 'skip';
            }
            $obj->mode = PRI;
            break;
    }
}
$page = new PageRenderer("setup_module", PAGE_LOGIN, "Login page", "container_three_column.php", "header.php", PUB, HOMEPAGE, PA::$network_info);
// added by Zoran Hron: JQuery validation & AJAX file upload --
$page->add_header_html(js_includes('jquery.validate.js'));
$page->add_header_html(js_includes('jquery.metadata.js'));
$page->add_header_html(js_includes('ajaxfileupload.js'));
$page->add_header_html(js_includes('user_registration.js'));
// ------------------------------------------------------------
$page->add_header_html(js_includes('common.js'));
$page->add_header_html(js_includes('login.js'));
if (isset($_GET['msg_id'])) {
    $msg = MessagesHandler::get_message($_GET['msg_id']);
}
if (isset($msg)) {
    $msg_tpl = new Template(CURRENT_THEME_FSPATH . "/display_message.php");
    $msg_tpl->set('message', $msg);
    $page->add_module("middle", "top", $msg_tpl->fetch());
Ejemplo n.º 29
0
$query_count_on_page = 0;
function setup_module($column, $module, $obj)
{
    $user = get_login_user();
    switch ($module) {
        case 'EventCalendarModule':
            $obj->assoc_type = 'user';
            $obj->assoc_id = (int) $_SESSION['user']['id'];
            $obj->may_edit = true;
            // user may edit own events, right? ;)
            $obj->assoc_title = $user->login_name;
            break;
    }
    $obj->mode = PUB;
}
$page = new PageRenderer("setup_module", PAGE_CALENDAR, "Calendar - PeopleAggregator", "container_one_column.tpl", "header_user.tpl", NULL, PRI, $network_info);
$theme_details = get_user_theme($login_uid);
if (is_array($theme_details['css_files'])) {
    foreach ($theme_details['css_files'] as $key => $value) {
        $page->add_header_css($value);
    }
}
$css_path = $current_theme_path . '/calendar.css';
$page->add_header_css($css_path);
$page->add_header_html(js_includes('calendar.js'));
if (!empty($msg)) {
    $msg_tpl =& new Template(CURRENT_THEME_FSPATH . "/display_message.tpl");
    $msg_tpl->set('message', $msg);
    $page->add_module("middle", "top", $msg_tpl->fetch());
}
$page->add_header_html($parameter);
Ejemplo n.º 30
0
        $obj->options = $option;
        $obj->is_active = INACTIVE;
        $obj->save_poll();
        header("Location: " . PA::$url . "/poll.php?type=select");
    }
}
function setup_module($column, $moduleName, $obj)
{
    global $flag, $type;
    switch ($moduleName) {
        case 'NetworkLeftLinksModule':
            break;
        case 'SelectPollModule':
            $obj->mode = $type;
            break;
    }
}
$onload = '';
if ($type != 'select') {
    $onload = 'javascript: ajax_method_poll_options();';
}
$page = new PageRenderer("setup_module", PAGE_POLL, "Poll", "container_two_column.tpl", "header.tpl", PUB, HOMEPAGE, PA::$network_info, $onload);
uihelper_error_msg(@$message);
$page->html_body_attributes = 'class="no_second_tier" ';
$css_array = get_network_css();
if (is_array($css_array)) {
    foreach ($css_array as $key => $value) {
        $page->add_header_css($value);
    }
}
echo $page->render();