<?php
//Copyright (c) Florian Grannemann
//Last change in version: 2.0 Alpha 1
/*
******************************************************************************
ADbNewsSender 2
Copyright (C) 2009 Florian Grannemann (hide@address.com)
Website: http://adbnewssender.sf.net
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 3 of the License, or
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/
******************************************************************************
*/
//Do not edit anything unless you realy REALY know what you are doing!
print "<b>$txt_newsletter_options</b><br><br>";
$newsletters=array();
$newsletters=$MyCFG->get_all_newsletters();
if(count($newsletters)==0)
{
//if no newsletter available
print "<a href=\"".$_SERVER['PHP_SELF']."?modul=global|2&Suboption=NL_mgtm_create_NL\">$txt_No_Newsletter_available</a>";
}
else
{
//printing select form to choose a newsletter:
print "<form action=\"".$_SERVER['PHP_SELF']."\" name=\"changeNL\"method=\"post\">$txt_current_newsletter:<br><select name=\"SelectNL\" onchange=\"this.form.submit()\";>";
print "<option value=\"0\">$no_newsletter_selected</option>";
$i=0;
while($i <count($newsletters))
{
print "<option value=\"".$newsletters[$i]."\"";
if($newsletters[$i] == $_SESSION["CurrentNL"])
{
print " selected";
}
print ">";
print $MyCFG->get_NL_name($newsletters[$i]);
print "</option>";
$i++;
}
print "</select>";
print "<input type=\"submit\" value=\"$txt_select_nl_submit\"></form><br>";
$curModulNr=-1;
if($_SESSION["currentModulType"] =="nl")
{
$curModulNr=$_SESSION["currentModulNr"];
}
//printing NL menue if a newsletter has been selected
if(isset($_SESSION["CurrentNL"]) &&$_SESSION["CurrentNL"]!=0 && $MyCFG->NL_exists($_SESSION["CurrentNL"]))
{
print "<b>".preg_replace("/<-NLname->/",$MyCFG->get_NL_name($_SESSION["CurrentNL"]),$txt_NLmenu)."</b>";
$i=0;
print "<ul>";
while($i <count ($admin_modules["nl"]))
{
print "<li><a href=\"".$_SERVER['PHP_SELF']."?modul=nl|$i\" title=\"".$admin_modules["nl"][$i]["tooltip"]."\">";
if($i == $curModulNr)
{
print "<b>".$admin_modules["nl"][$i]["menuname"]."</b>";
}
else
{
print $admin_modules["nl"][$i]["menuname"];
}
print "</a></li>";
$i++;
}
print "</ul>";
print "<small>";
print "<b>".preg_replace("/<-NLname->/",$MyCFG->get_NL_name($_SESSION["CurrentNL"]),$txt_quick_sumary)."</b><br><ul>";
print "<li>$txt_no_of_subscriptions: ".$MyNL->number_of_ML_entries()."</li>";
print "<li>$txt_expiring_subscriptions: ".$MyNL->number_of_expiring_entries()."</li>";
print "<li>$txt_subscriptionstoday: ".$MyNL->number_of_ML_entries_today()."</li>";
print "<li>$txt_pendinglistentrys: ".$MyNL->number_of_PL_entries()."</li></ul>";
}
}
print "<br><br><a href=\"".$_SERVER['PHP_SELF']."\">$txt_refresh_nl_options</a></small>";
?>