/***************************************************************************

    supportware
    Copyright (C) 2001-2008 by c.holzheuer
    c.holzheuer@sourceworx.org

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

***************************************************************************/


#ifndef SXPAGEMEMBERS_H
#define SXPAGEMEMBERS_H


#include <sxpage.h>
#include <ddwebsite.h>

/// sxpagemembers : show members
/**
*/

class sxpagemembers : public sxpage
{

public:

  sxpagemembers( const ddstring& name, ddwebsite* site );

	virtual dd_result member_main( dditem& item );
	virtual dd_result member_list( dditem& item );
	virtual dd_result member_search( dditem& item );
	
	virtual dd_result adm_member_search( dditem& item );
	virtual dd_result adm_member_list( dditem& item );
		
	virtual dd_result member_register( dditem& item );  
  virtual dd_result member_activate( dditem& item );
  virtual dd_result member_login( dditem& item );
  virtual dd_result member_logout( dditem& item );
	virtual dd_result member_welcome( dditem& item );  
	virtual dd_result member_show( dditem& item );
 	
 	virtual dd_result member_tab1_home( dditem& item );
  virtual dd_result member_tab2_content( dditem& item ); 
 	virtual dd_result member_tab3_config( dditem& item ); 
 	
  
  virtual dd_result member_passwd( dditem& item );
  virtual dd_result member_setup( dditem& item );
	virtual dd_result member_passmail( dditem& item );
	virtual dd_result member_sendpass( dditem& item );
	virtual dd_result member_block( dditem& item );

	// gästebuch
	virtual dd_result on_reply_create( dditem& item );
	virtual dd_result on_reply_preview( dditem& item );
	
	// freunde
	virtual dd_result on_friend_invite( dditem& item );
	virtual dd_result on_friend_accept( dditem& item );
	virtual dd_result on_friend_drop( dditem& item );
	
	// admin
	virtual dd_result on_alert( dditem& item ); 
	virtual dd_result on_edit( dditem& item );
	virtual dd_result on_update( dditem& item );
	virtual dd_result on_preview( dditem& item );
	virtual dd_result on_admin_edit( dditem& item );  
 	virtual dd_result on_save_settings( dditem& item );  
 	
 	// listen
 	virtual dd_result on_list_friends( dditem& item );  
 	virtual dd_result on_list_visitors( dditem& item );  
 	virtual dd_result on_list_invitations_sent( dditem& item );  
 	virtual dd_result on_list_invitations_received( dditem& item );  
 	
	virtual void prepare_page_header();
	
	// neue boxen	
	virtual dd_result create_box_friends( dditem& item );
	virtual dd_result create_box_invitations( dditem& item );
	
	
protected:
	
	dd_result render_table( dditem& list, const ddstring& query, const ddstring& condition, const ddstring& orderby, const ddstring& mode, const ddstring& linkval, int max=-1 );
	
	//ddstring 			_linkbase;
	int			 			_imax;
	set<ddstring> _badmails;
	ddstringmap   _titles;
	
};






#endif
