<?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
*/
require_once('includes/config.php');
sessCtrl();
if (isset($_REQUEST["id"]) && is_numeric($_REQUEST["id"]) && $_REQUEST["id"] > 0){
$userInfo = NewsletterUsers::getUserInfo($_REQUEST["id"]);
}
$main .= "
<div class=page_heading>".SUBSCRIBER_INFO_TITLE."</div>
$msg
";
if ($userInfo){
if ($userInfo[0]['deleted'] == '1'){
$unsubInfo = SUBSCRIBER_INFO_UNSUBSCRIBED." (";
$unsubInfo .= $userInfo[0]['unsubscription_date'] != ''?$userInfo[0]['unsubscription_date']:SUBSCRIBER_INFO_NOAVAIL;
$unsubInfo .= ")";
}elseif(!$userInfo[0]['stato'] || $userInfo[0]['stato'] == '0'){
$unsubInfo = SUBSCRIBER_INFO_UNCORFIRMED;
}else{
$unsubInfo = SUBSCRIBER_INFO_STILL_SUBSCRIBED;
}
$main .= "<table style='width:95%;'>
<tr>
<td align=right>
<span ><a href=\"subscribers.php\">".IMPORT_USERS_SUBSCRIBERS_LINK."</a></span>
</td>
</tr>
</table><div class=message><strong>".SUBSCRIBER_INFO_USER."</strong> ".$userInfo[0]["email"].".<br /> <strong>".SUBSCRIBER_INFO_SUBSCRIPTION_DATE."</strong>".$userInfo[0]["subscription_date"]." | <strong>".SUBSCRIBER_INFO_UNSUBSCRIPTION_DATE."</strong> ".$unsubInfo."</div>";
$main .= "<div class='message' style='margin:3px;text-align:left;'>";
$main .= "<table width='100%'>";
$main .= "<tr><td width='40%' align='left'><strong>".SUBSCRIBER_INFO_NEWSLETTER."</strong></td><td width='30%' align='center'><strong>".SUBSCRIBER_INFO_SENT_ON."</strong></td><td align='center'><strong>".SUBSCRIBER_INFO_READ_ON."</strong></td></tr>";
foreach ($userInfo as $userLog){
if ($userLog['titolo']){
($userLog['data_invio'])?$stato = $userLog['data_invio']:$stato="<span style='color:red'>".SUBSCRIBER_INFO_NOT_SENT."</span>";
($userLog["data_lettura"] != '')?$receipt=$userLog["data_lettura"]:$receipt="<span style='color:red'>".SUBSCRIBER_INFO_READ_ON_NOT_AVAILABLE."</span>";
$main .= "<tr><td align='left'>".$userLog['titolo']."</td><td align='center'>".$stato."</td><td align='center'>".$receipt."</td></tr>";
}
}
$main .= "</table>";
$main .= "</div>";
}
$page = "subscribers";
require_once("includes/template.php");
?>