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

    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 SXPAGESEARCH_H
#define SXPAGESEARCH_H

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


#include <sxpage.h>
#include <ddwebsearchkey.h>

/// sxpagesearchbase: Basisklasse für die Suchseiten, neue Version.
/**
	SuchSeiten, neue Version
*/

class sxpagesearchbase : public sxpage
{

public:

	sxpagesearchbase( const ddstring& name, ddwebsite* site ); 
 	
	virtual dd_result on_search( dditem& item ); 
	 
protected:

 	virtual bool prepare_query();
	
	ddwebsearchkey 	_keygen;
	ddstring				_searchphrase;
	
};


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

    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.

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


/// sxpagesearch : Die SuchSeiten rendern.
/**
	SuchSeiten, neue Version
*/

class sxpagesearch : public sxpagesearchbase
{

public:

	sxpagesearch( const ddstring& name, ddwebsite* site ); 
	
	dd_result on_link_not_found( dditem& item );
	dd_result on_redirect( dditem& item );

  dd_result on_search_watch( dditem& item );

};


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

    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.

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


/// sxpagensearchadmin : Die neue adminsuche.
/**
	adminsuche, neue Version
*/

class sxpagesearchadmin : public sxpagesearchbase
{

public:

	sxpagesearchadmin( const ddstring& name, ddwebsite* site, const ddstring& title="" );
	
	dd_result on_kill_multi( dditem& item );		
	dd_result on_show_user_content( dditem& item );
	dd_result on_show_user_images( dditem& item );
	dd_result on_show_user_image_votes( dditem& item );
	dd_result on_search( dditem& item ); 
	
protected:
	
	bool prepare_query();
 
};


#endif
