/** ---------------------------------------- /** Private Messages - Menu /** ----------------------------------------*/ function pm_menu() { global $SESS; if (($SESS->userdata['can_send_private_messages'] != 'y' && $SESS->userdata['group_id'] != '1') OR $SESS->userdata['accept_messages'] != 'y') { return; } if ( ! class_exists('Messages')) { require PATH_CORE.'core.messages'.EXT; } $MESS = new Messages; $MESS->base_url = $this->_member_path('messages'); $MESS->allegiance = 'user'; $MESS->theme_class = $this->theme_class; $MESS->create_menu(); return $MESS->menu; }
/** ------------------------------------------------ /** "My Account" main page wrapper /** -------------------------------------------------*/ function account_wrapper($title = '', $crumb = '', $content = '') { global $DSP, $DB, $IN, $SESS, $FNS, $LANG, $PREFS; if (FALSE === ($id = $this->auth_id())) { return $DSP->no_access_message(); } // Default page title if not supplied if ($title == '') { $title = $LANG->line('my_account'); } // Default bread crumb if not supplied if ($crumb == '') { if ($id != $SESS->userdata('member_id')) { $crumb = $LANG->line('user_account'); } else { $crumb = $LANG->line('my_account'); } } // Default content if not supplied if ($content == '') { $content .= $this->profile_homepage(); } // Set breadcrumb and title $DSP->title = $title; $DSP->crumb = $crumb; ob_start(); ?> <script type="text/javascript"> <!-- function showhide_menu(which) { head = which + '_h'; body = which + '_b'; if (document.getElementById(head).style.display == "block") { document.getElementById(head).style.display = "none"; document.getElementById(body).style.display = "block"; } else { document.getElementById(head).style.display = "block"; document.getElementById(body).style.display = "none"; } } //--> </script> <?php $buffer = ob_get_contents(); ob_end_clean(); $DSP->body = $buffer; // Build the output $expand = '<img src="' . PATH_CP_IMG . 'expand.gif" border="0" width="10" height="10" alt="Expand" /> '; $collapse = '<img src="' . PATH_CP_IMG . 'collapse.gif" border="0" width="10" height="10" alt="Collapse" /> '; $DSP->body .= $DSP->table('', '0', '', '100%') . $DSP->tr() . $DSP->td('', '240px', '', '', 'top'); $DSP->body .= $DSP->qdiv('tableHeading', $LANG->line('current_member') . NBS . NBS . $this->username); $prof_state = in_array($IN->GBL('M'), array('edit_profile', 'edit_signature', 'edit_avatar', 'browse_avatars', 'edit_photo', 'email_settings', 'unpw_form', 'localization', 'edit_preferences')) ? TRUE : FALSE; $DSP->body .= '<div id="menu_profile_h" style="display: ' . ($prof_state == TRUE ? 'none' : 'block') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_profile\');return false;" onmouseover="navTabOn(\'prof\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'prof\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='prof' " . $js . ">"; $DSP->body .= $expand . $LANG->line('personal_settings'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= '<div id="menu_profile_b" style="display: ' . ($prof_state == TRUE ? 'block' : 'none') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_profile\');return false;" onmouseover="navTabOn(\'prof2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'prof2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='prof2' " . $js . ">"; $DSP->body .= $collapse . $LANG->line('personal_settings'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div('profileMenuInner') . $this->nav('edit_profile' . AMP . 'id=' . $id, 'edit_profile') . $this->nav('edit_signature' . AMP . 'id=' . $id, 'edit_signature') . $this->nav('edit_avatar' . AMP . 'id=' . $id, 'edit_avatar') . $this->nav('edit_photo' . AMP . 'id=' . $id, 'edit_photo') . $this->nav('email_settings' . AMP . 'id=' . $id, 'email_settings') . $this->nav('unpw_form' . AMP . 'id=' . $id, 'username_and_password'); if ($PREFS->ini('allow_member_localization') == 'y' or $SESS->userdata('group_id') == 1) { $DSP->body .= $this->nav('localization' . AMP . 'id=' . $id, 'localization'); } $DSP->body .= $this->nav('edit_preferences' . AMP . 'id=' . $id, 'edit_preferences') . $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $sub_state = (in_array($IN->GBL('M'), array('subscriptions')) or in_array($IN->GBL('M'), array('ignore_list'))) ? TRUE : FALSE; $DSP->body .= '<div id="menu_sub_h" style="display: ' . ($sub_state == TRUE ? 'none' : 'block') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_sub\');return false;" onmouseover="navTabOn(\'sub\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'sub\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='sub' " . $js . ">"; $DSP->body .= $expand . $LANG->line('utilities'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= '<div id="menu_sub_b" style="display: ' . ($sub_state == TRUE ? 'block' : 'none') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_sub\');return false;" onmouseover="navTabOn(\'sub2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'sub2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='sub2' " . $js . ">"; $DSP->body .= $collapse . $LANG->line('utilities'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div('profileMenuInner'); $DSP->body .= $this->nav('subscriptions' . AMP . 'id=' . $id, 'edit_subscriptions'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div('profileMenuInner'); $DSP->body .= $this->nav('ignore_list' . AMP . 'id=' . $id, 'ignore_list'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); /** --------------------------------- /** Private Messaging /** ---------------------------------*/ if ($id == $SESS->userdata['member_id']) { if (!class_exists('Messages')) { require PATH_CORE . 'core.messages' . EXT; } $MESS = new Messages(); $MESS->create_menu(); $DSP->body .= $MESS->menu; } $cp_state = in_array($IN->GBL('M'), array('homepage', 'set_homepage_order', 'theme', 'tab_manager')) ? TRUE : FALSE; $DSP->body .= '<div id="menu_cp_h" style="display: ' . ($cp_state == TRUE ? 'none' : 'block') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_cp\');return false;" onmouseover="navTabOn(\'mcp\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'mcp\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='mcp' " . $js . ">"; $DSP->body .= $expand . $LANG->line('customize_cp'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= '<div id="menu_cp_b" style="display: ' . ($cp_state == TRUE ? 'block' : 'none') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_cp\');return false;" onmouseover="navTabOn(\'mcp2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'mcp2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='mcp2' " . $js . ">"; $DSP->body .= $collapse . $LANG->line('customize_cp'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div('profileMenuInner'); $DSP->body .= $this->nav('homepage' . AMP . 'id=' . $id, 'cp_homepage'); $DSP->body .= $this->nav('theme' . AMP . 'id=' . $id, 'cp_theme'); $DSP->body .= $this->nav('tab_manager' . AMP . 'id=' . $id, 'tab_manager'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); if ($DSP->allowed_group('can_access_publish') and count($FNS->fetch_assigned_weblogs()) > 0) { $blog_state = in_array($IN->GBL('M'), array('pingservers', 'htmlbuttons', 'bookmarklet', 'bookmarklet_fields', 'create_bookmarklet')) ? TRUE : FALSE; $DSP->body .= '<div id="menu_blog_h" style="display: ' . ($blog_state == TRUE ? 'none' : 'block') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_blog\');return false;" onmouseover="navTabOn(\'blog\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'blog\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='blog' " . $js . ">"; $DSP->body .= $expand . $LANG->line('weblog_preferences'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= '<div id="menu_blog_b" style="display: ' . ($blog_state == TRUE ? 'block' : 'none') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_blog\');return false;" onmouseover="navTabOn(\'blog2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'blog2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='blog2' " . $js . ">"; $DSP->body .= $collapse . $LANG->line('weblog_preferences'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div('profileMenuInner'); $DSP->body .= $this->nav('pingservers' . AMP . 'id=' . $id, 'your_ping_servers'); $DSP->body .= $this->nav('htmlbuttons' . AMP . 'id=' . $id, 'your_html_buttons'); $DSP->body .= $this->nav('bookmarklet' . AMP . 'id=' . $id, 'bookmarklet'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); } $ex_state = in_array($IN->GBL('M'), array('quicklinks', 'notepad')) ? TRUE : FALSE; $DSP->body .= '<div id="menu_ex_h" style="display: ' . ($ex_state == TRUE ? 'none' : 'block') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_ex\');return false;" onmouseover="navTabOn(\'exx\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'exx\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='exx' " . $js . ">"; $DSP->body .= $expand . $LANG->line('extras'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= '<div id="menu_ex_b" style="display: ' . ($ex_state == TRUE ? 'block' : 'none') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_ex\');return false;" onmouseover="navTabOn(\'exx2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'exx2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='exx2' " . $js . ">"; $DSP->body .= $collapse . $LANG->line('extras'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div('profileMenuInner'); $DSP->body .= $this->nav('quicklinks' . AMP . 'id=' . $id, 'quick_links'); $DSP->body .= $this->nav('notepad' . AMP . 'id=' . $id, 'notepad'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); if ($DSP->allowed_group('can_admin_members')) { $ad_state = in_array($IN->GBL('M'), array('administration')) ? TRUE : FALSE; $DSP->body .= '<div id="menu_ad_h" style="display: ' . ($ad_state == TRUE ? 'none' : 'block') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_ad\');return false;" onmouseover="navTabOn(\'adx\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'adx\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='adx' " . $js . ">"; $DSP->body .= $expand . $LANG->line('administrative_options'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= '<div id="menu_ad_b" style="display: ' . ($ad_state == TRUE ? 'block' : 'none') . '; padding:0; margin: 0;">'; $js = ' onclick="showhide_menu(\'menu_ad\');return false;" onmouseover="navTabOn(\'adx2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" onmouseout="navTabOff(\'adx2\', \'tableHeadingAlt\', \'tableHeadingAltHover\');" '; $DSP->body .= $DSP->div(); $DSP->body .= "<div class='tableHeadingAlt' id='adx2' " . $js . ">"; $DSP->body .= $collapse . $LANG->line('administrative_options'); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div('profileMenuInner'); $DSP->body .= $this->nav('administration' . AMP . 'id=' . $id, 'member_preferences'); if ($id != $SESS->userdata('member_id')) { $DSP->body .= $DSP->qdiv('navPad', $DSP->anchor(BASE . AMP . 'C=communicate' . AMP . 'M=email_mbr' . AMP . 'mid=' . $id, $LANG->line('member_email'))); } if ($id != $SESS->userdata('member_id') && $PREFS->ini('req_mbr_activation') == 'email' && $DSP->allowed_group('can_admin_members')) { $query = $DB->query("SELECT group_id FROM exp_members WHERE member_id = '" . $DB->escape_str($id) . "'"); if ($query->row['group_id'] == '4') { $LANG->fetch_language_file('members'); $DSP->body .= $DSP->qdiv('navPad', $DSP->anchor(BASE . AMP . 'C=admin' . AMP . 'M=members' . AMP . 'P=resend_act_email' . AMP . 'mid=' . $id, $LANG->line('resend_activation_email'))); } } if ($SESS->userdata['group_id'] == 1 && $id != $SESS->userdata('member_id')) { $DSP->body .= $DSP->qdiv('navPad', $DSP->anchor(BASE . AMP . 'C=admin' . AMP . 'M=members' . AMP . 'P=login_as_member' . AMP . 'mid=' . $id, $LANG->line('login_as_member'))); } if ($DSP->allowed_group('can_delete_members')) { $DSP->body .= $DSP->qdiv('navPad', $DSP->anchor(BASE . AMP . 'C=admin' . AMP . 'M=members' . AMP . 'P=mbr_del_conf' . AMP . 'mid=' . $id, $LANG->line('delete_member'))); } $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); } $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->div_c(); $DSP->body .= $DSP->td_c() . $DSP->td('', '8px', '', '', 'top') . NBS . $DSP->td_c() . $DSP->td('', '', '', '', 'top') . $content . $DSP->td_c() . $DSP->tr_c() . $DSP->table_c(); }