<?php
/*
NmnNewsletter is a library that provides newsletter service
management for websites running php and mysql.
Copyright (C) 2006 Ivan Preziosi from netmeans.net - Rome.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
For more informations or to join the development of the library contact
the author at: hide@address.com
*/
session_start();
require_once("includes/config.php");
sessCtrl();
if(isset($_REQUEST["id_newsletter"]) && $_REQUEST["id_newsletter"] > 0){
$idNewsletter = $_REQUEST["id_newsletter"];
}else{
$idNewsletter = 0;
}
if(($_REQUEST["action"])== "send"){
if (isset($_REQUEST["mail"])){
if (NewsletterSender::preSend($idNewsletter,$_REQUEST["mail"])){
$msg = "<div style=\"width:80%; color:#4466BB; background-color:#DFE8FF; padding:5px; border:1px solid #4466BB; text-align:center;\">".PRESEND_OK."<br></div>";
}else{
$msg = "<div style=\"width:80%; color:#FF0000; background-color:#DFE8FF; padding:5px; border:1px solid #4466BB; text-align:center;\">".PRESEND_KO."<br></div>";
}
}
}
?>
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo CHARSET ?>">
<style>
body, td, th { color:#4466BB; font-family: Verdana; line-height:1.5; font-size:12px; }
a, a:visited { border-bottom:1px dotted #4466BB; text-decoration:none; color:#4466BB; }
a:hover { background-color:#DFE8FF; text-decoration:none; }
.menu_header { color: white; font-weight: bold; text-decoration: none; text-align: center; vertical-align: middle }
.menu_header a:link { color: white; background-color: #4466BB; display: block; padding: 3px; border:1px solid #5f81d7; }
.menu_header a:visited { color: white; background-color: #4466BB; display: block; padding: 3px; border:1px solid #5f81d7; }
.menu_header a:hover { color: white; background-color: #5f81d7; display: block; padding: 3px; border:1px solid #5f81d7; }
.menu_header a:active { color: white; background-color: #4466BB; display: block; padding: 3px; border:1px solid #5f81d7; }
a.menu2, a.menu2:visited{ color:#FFFFFF; background-color:#5f81d7; }
a.menu2:hover { color:#FFFFFF; background-color:#5f81d7; }
h1, h2, h3, h4 { font-weight:normal; }
hr { color:#eeeeee; height:1px; }
input, textarea, select { font-family:Verdana; font-size:12px; color:#4466BB; border:1px solid #4466BB; }
.textField { width:200px; }
.textField2 { width:620px; }
.button { background-image:url(images/bg_button.gif); width:91; height:22; color:#000000; border:0; padding-bottom:3px; font-weight:bold; }
.copyright { color:#5f81d7; font-size:11px; }
.heading { font-size:24px; }
.heading2 { font-size:16px; font-weight:bold; }
.page_heading { font-size:18px; width:100%; border-bottom:1px solid #DFE8FF; text-align:left; margin-bottom:10px; }
.message { width:80%; color:#4466BB; background-color:#DFE8FF; padding:5px; border:1px solid #4466BB; text-align:center; }
.error { width:80%; color:#4466BB; background-color:#DFE8FF; padding:5px; border:1px solid #4466BB; text-align:center; }
.error_text { color:#FF0000; }
</style>
<script language="JavaScript" type="text/javascript" src="includes/gen_validatorv2.js"></script>
<script language="JavaScript" type="text/javascript" src="includes/common.lib.js"></script>
</head>
<body style="color:#4466BB; font-family: Verdana; line-height:1.5; font-size:12px;">
<table width="100%" align="center">
<tr>
<td align="center"><div class=page_heading><?php echo PRESEND_TITLE; ?></div></td>
</tr>
<tr>
<td align="center"><?php echo $msg; ?></td>
</tr>
<tr>
<td align="center"><div class='' style='margin:3px;text-align:justify;'><?php echo PRESEND_MESSAGE; ?></div></td>
</tr>
<tr>
<td align="center"><form method="post" name="presend" action="?">
<input type="hidden" name="id_newsletter" value="<?php echo $idNewsletter ?>">
<input type="hidden" name="action" value="send">
<?php echo PRESEND_EMAIL_FIELD; ?> <input class="textField" type="text" id="mail" name="mail" title="<?php echo PRESEND_EMAIL_FIELD_TITLE; ?>"><br /><br />
<script language=javascript>
var validator = new Validator('presend');
validator.addValidation('mail','req','');
validator.addValidation('mail','email','');
</script>
<div class="error_text" name="label_mail" id="label_mail"></div><br />
<input type="submit" value="<?php echo PRESEND_EMAIL_BUTTON; ?>">
</form></td>
</tr>
</table>
</body>