<?php

/********************************************************************************
	- MemHT Portal -
	
	Copyright (C) 2007 by Miltenovik Manojlo
	http://www.memht.com
	
	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 opinion) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License along
	with this program; if not, see <http://www.gnu.org/licenses/> (GPLv2)
	or write to the Free Software Foundation, Inc., 51 Franklin Street,
	Fifth Floor, Boston, MA02110-1301, USA.
		
********************************************************************************/

function newsletter_template($nw_title,$nw_text,$nw_other) {
	global $siteConfig;
	
	$nw_template = "<table width=\"100%\" height=\"124\" border=\"0\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"#9FA7B1\">\n";
		$nw_template .= "<tr>\n";
			$nw_template .= "<td height=\"124\">\n";
				$nw_template .= "<table width=\"100%\" height=\"122\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\">\n";
					$nw_template .= "<tr>\n";
					$nw_template .= "<td width=\"525\" height=\"76\" align=\"center\" background=\"".$siteConfig['site_url']."/images/newsletter/head_bg.gif\"><a href=\"".$siteConfig['site_url']."\" target=\"_blank\"><img src=\"".$siteConfig['site_url']."/images/newsletter/logo.gif\" title=\"".$siteConfig['site_name']."\" width=\"287\" height=\"76\" border=\"0\"></a></td>\n";
					$nw_template .= "</tr>\n";
					$nw_template .= "<tr>\n";
					$nw_template .= "<td bgcolor=\"#9FA7B1\" align=\"center\"><font color=\"#E3E8EE\" size=\"3\" face=\"Geneva, Arial, Helvetica, sans-serif\"><b>$nw_title</b></font></td>\n";
					$nw_template .= "</tr>\n";
					if ($nw_text!="") {
						$nw_template .= "<tr>\n";
						$nw_template .= "<td bgcolor=\"#E3E8EE\"><font color=\"#000000\" size=\"2\" face=\"Geneva, Arial, Helvetica, sans-serif\"><div style=\"padding:4px;\">$nw_text</div></font></td>\n";
						$nw_template .= "</tr>\n";
					}
					if ($nw_other!="") {
						$nw_template .= "<tr>\n";
						$nw_template .= "<td><font color=\"#000000\" size=\"2\" face=\"Geneva, Arial, Helvetica, sans-serif\"><div style=\"padding:4px;\">$nw_other</div></font></td>\n";
						$nw_template .= "</tr>\n";
					}
					$nw_template .= "<tr>\n";
					$nw_template .= "<td height=\"19\" align=\"center\" bgcolor=\"#E3E8EE\"><font color=\"#000000\" size=\"1\" face=\"Geneva, Arial, Helvetica, sans-serif\">You\'re receiving this newsletter because you're subscribed on ".$siteConfig['site_name']."<br>If you don\'t want to receive it anymore you can unsubscribe  from  <a href=\"".$siteConfig['site_url']."/index.php?page=newsletter\" target=\"_blank\">here</a></font></td>\n";
					$nw_template .= "</tr>\n";
				$nw_template .= "</table>\n";
			$nw_template .= "</td>\n";
		$nw_template .= "</tr>\n";
	$nw_template .= "</table>\n";
	
	return $nw_template;
}


?>