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

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

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

/// sxpageasphelper : Hilfsklasse um substrings innerhalb einer Seite zu ersetzen


class sxpageasphelper : public ddstringmap
{

public:

	sxpageasphelper()
	{
	}

	virtual ~sxpageasphelper()
	{
	}
	
	void load_file( const ddstring& filename );
	void replace_all( ddstring& body );
	
};


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

    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.

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


/// sxpageasp : die statischen
/**
	Hier werden legacy-request aufgefangen und die statischen gerendert.
	Dabei wird allerlei search und replace veranstaltet um alte asp
	werbetags zu erstzen.
*/

class sxpageasp : public sxpage//ddwebpage
{

public:

	sxpageasp( const ddstring& name, ddwebsite* site );
	void replace_links( ddstring& body );
	virtual dd_result create_content( dditem& item );
	
protected:

	void prepare_adblock_fresh( ddstring& body );
	void prepare_adblock_stat( ddstring& body );
	
	ddstring _banner1;
	ddstring _banner2;
	ddstring _banner3;
	ddstring _banner4;
	ddstring _banner5;
	ddstring _banner6;
	ddstring _banner7;
	ddstring _banner8;
	ddstring _banner9;
	ddstring _banner10;
	ddstring _banner11;
	
	sxpageasphelper _replacer;

};


#endif
