Example #1
0
    /** ----------------------------------------
    /**  Private Messages
    /** ----------------------------------------*/

	function messages()
	{
		global $SESS, $IN;
		
		if (($SESS->userdata['can_send_private_messages'] != 'y' && $SESS->userdata['group_id'] != '1') OR $SESS->userdata['accept_messages'] != 'y')
		{
			return $this->profile_main();
		}
        
        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->request = $this->cur_id;
		$MESS->cur_id = $this->uri_extra;
		$MESS->manager();
		
		$this->page_title = $MESS->title;
		$this->head_extra = $MESS->header_javascript;
		return $MESS->return_data;
	}
Example #2
0
 /** -----------------------------------
     /**  Private Messages Manager
     /** -----------------------------------*/
 function messages()
 {
     global $SESS, $IN;
     $id = !$IN->GBL('id', 'GP') ? $SESS->userdata['member_id'] : $IN->GBL('id', 'GP');
     if ($id != $SESS->userdata['member_id']) {
         return false;
     }
     if (!class_exists('Messages')) {
         require PATH_CORE . 'core.messages' . EXT;
     }
     $MESS = new Messages();
     $MESS->manager();
     // If both the title and the crumb variables are empty, then
     // we have something that does not need to be put in the member
     // wrapper, like a popup.  So, we just return the return_date
     // variable and be done with it.
     if ($MESS->title != '' && $MESS->crumb != '') {
         return $this->account_wrapper($MESS->title, $MESS->crumb, $MESS->return_data);
     }
     return $MESS->return_data;
 }