<?php
//Copyright (c) Florian Grannemann
//Last change in version: 2.1 Alpha 1
/*
******************************************************************************
ADbNewsSender 2
Copyright (C) 2010 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!
$NLConfOption=$MyRequestHandler->getNLModuleKeyValue("NLConfOption");
if($NLConfOption !="update")
{
$NLConf_map=array();
$NLConf_map["Limit_Confirmation_Attempts"]= $MyNL->get_NLconfig_setting("Limit_Confirmation_Attempts");
$NLConf_map["Max_no_of_eq_IP_Addr_on_PL"]= $MyNL->get_NLconfig_setting("Max_no_of_eq_IP_Addr_on_PL");
}
else
{
$NLConf_map=array();
$NLConf_map["Limit_Confirmation_Attempts"]= $MyRequestHandler->getNLModuleKeyValue("Limit_Confirmation_Attempts");
$NLConf_map["Max_no_of_eq_IP_Addr_on_PL"]= $MyRequestHandler->getNLModuleKeyValue("Max_no_of_eq_IP_Addr_on_PL");
if(intval($NLConf_map["Limit_Confirmation_Attempts"]) <1)
{
$NLConf_map["Limit_Confirmation_Attempts"]="0";
//0: unlimited
}
if(intval($NLConf_map["Limit_Confirmation_Attempts"]) >30)
{
$NLConf_map["Limit_Confirmation_Attempts"]="30";
}
if(intval($NLConf_map["Max_no_of_eq_IP_Addr_on_PL"]) <1)
{
$NLConf_map["Max_no_of_eq_IP_Addr_on_PL"]="0";
//0: unlimited
}
if(intval($NLConf_map["Max_no_of_eq_IP_Addr_on_PL"]) >100)
{
$NLConf_map["Max_no_of_eq_IP_Addr_on_PL"]="100";
}
$error="";
if(!$error)
{
foreach($NLConf_map as $key=>$val)
{
$MyNL->replace_setting($key,"$val");
}
print "<b>".$MSG_Success."</b><br>";
}
else
{
print $ErrorMSG_1."<br>".$error;
}
print "<br><br>";
}
print "<form action=\"".$_SERVER["PHP_SELF"]."\" method=post>";
print "<input type=\"hidden\" name=\"".$MyRequestHandler->getNLModuleKeyName("cur_NLcof_modul")."\" value=\"$cur_NLcof_modul\">";
//for security reasons, submiting current admin modul and newsletter
print "<input type=\"hidden\" name=\"modul\" value=\"".$MySessionHandler->getCurrentModule()."\">";
print "<input type=\"hidden\" name=\"SelectNL\" value=\"".$MySessionHandler->getNLID()."\">";
print $MSG1."<br>";
print "<br><br>";
print "<table border=0>";
//Limit confirmation attempts:
print "<tr><td>".$MSG_Map["Limit_Confirmation_Attempts"].":</td><td>";
print "<select name=\"".$MyRequestHandler->getNLModuleKeyName("Limit_Confirmation_Attempts")."\"><option value=\"0\">$MSG_option_unlimited</option>";
$i=1;
while ($i <=30)
{
print "<option value=\"$i\"";
if ($i == $NLConf_map["Limit_Confirmation_Attempts"])
{
print " selected";
}
print ">$i </option>";
$i++;
}
print "</select></td></tr>";
//Max_no_of_eq_IP_Addr_in_PL:
print "<tr><td>".$MSG_Map["Max_no_of_eq_IP_Addr_on_PL"].":</td><td>";
print "<select name=\"".$MyRequestHandler->getNLModuleKeyName("Max_no_of_eq_IP_Addr_on_PL")."\"><option value=\"0\">$MSG_option_unlimited</option>";
$i=1;
while ($i <=100)
{
print "<option value=\"$i\"";
if ($i == $NLConf_map["Max_no_of_eq_IP_Addr_on_PL"])
{
print " selected";
}
print ">$i </option>";
$i++;
}
print "</select></td></tr>";
print "<input type=\"hidden\" name=\"".$MyRequestHandler->getNLModuleKeyName("NLConfOption")."\" value=\"update\"></td><td><input type=\"Submit\" value=\"$MSG_Submit\"></form></td></tr></table>";
?>