<?php
//Copyright (c) Florian Grannemann
//Last change in version: 2.0 RC 2
/*
******************************************************************************
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!
include "$path_to_languagefolder/lang_admin_global_config.php.inc";
$Var_map=array();
$Var_map["URL"]=$MyCFG->get_config_value("URL");
$Var_map["Email"]=$MyCFG->get_config_value("Email");
$Var_map["SubscribeURL"]=$MyCFG->get_config_value("SubscribeURL");
$Var_map["RenewalURL"]=$MyCFG->get_config_value("RenewalURL");
$Var_map["ConfirmationURL"]=$MyCFG->get_config_value("ConfirmationURL");
$Var_map["Language"]=$MyCFG->get_config_value("Language");
$Var_map["EnableTinyMCE"]=$MyCFG->get_config_value("EnableTinyMCE");
$Var_map["ArchiveURL"]=$MyCFG->get_config_value("ArchiveURL");
if($_POST["GlobalCFoption"] =="GlobalCFGchange")
{
$error="";
foreach($Var_map as $key=>$val)
{
if($val != $_POST[$key])
{
$Var_map[$key]=$_POST[$key];
}
if(!$Var_map[$key])
{
$error=$error.$MSG_Map[$key]."<br>";
}
}
if(!$error)
{
$Var_map["Language"]=addslashes($_POST["Language"]);
$Var_map["Language"]=preg_replace("/\.\./", "",$Var_map["Language"]);
//saving configuration:
foreach($Var_map as $key=>$val)
{
$MyCFG->replace_setting($key,"$val");
}
print "<b>$MSG_Success</b><br>";
}
else
{
print $ErrorMSG."<br>".$error;
}
print "<br><br>";
}
print $MSG1."<br><br>";
print "<form action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">";
print "<table border=0>";
print "<tr><td>".$MSG_Map["URL"]."</td><td><input type=\"text\" name=\"URL\" value=\"".$Var_map["URL"]."\" size=\"40\"></td></tr>";
print "<tr><td>".$MSG_Map["Email"]."</td><td><input type=\"text\" name=\"Email\" value=\"".$Var_map["Email"]."\" size=\"40\"></td></tr>";
print "<tr><td>".$MSG_Map["SubscribeURL"]."</td><td><input type=\"text\" name=\"SubscribeURL\" value=\"".$Var_map["SubscribeURL"]."\" size=\"40\"></td></tr>";
print "<tr><td>".$MSG_Map["RenewalURL"]."</td><td><input type=\"text\" name=\"RenewalURL\" value=\"".$Var_map["RenewalURL"]."\" size=\"40\"></td></tr>";
print "<tr><td>".$MSG_Map["ConfirmationURL"]."</td><td><input type=\"text\" name=\"ConfirmationURL\" value=\"".$Var_map["ConfirmationURL"]."\" size=\"40\"></td></tr>";
print "<tr><td>".$MSG_Map["ArchiveURL"]."</td><td><input type=\"text\" name=\"ArchiveURL\" value=\"".$Var_map["ArchiveURL"]."\" size=\"40\"></td></tr>";
print "<tr><td>".$MSG_Map["EnableTinyMCE"]."</td><td>$MSG_yes <input type=\"radio\" name=\"EnableTinyMCE\" value=\"yes\"";
if($Var_map["EnableTinyMCE"]=="yes")
{
print " checked ";
}
print "> | $MSG_no <input type=\"radio\" name=\"EnableTinyMCE\" value=\"no\"";
if($Var_map["EnableTinyMCE"] !="yes")
{
print " checked ";
}
print "></td></tr>";
include "$path_to_protected/localisation/Language_Reg.php.inc";
print "<tr><td>".$MSG_Map["Language"]."</td><td><select name=\"Language\"><option value=\"\">$MSG_Language_Select</option>";
$i=0;
while($i <count($Lang_pack_name))
{
print "<option value=\"".$Lang_pack_dir[$i]."\"";
if($Lang_pack_dir[$i]==$Var_map["Language"])
{
print " selected ";
}
print ">".$Lang_pack_name[$i]."</option>";
$i++;
}
print "</select></td></tr>";
print "</table>";
print "<input type=\"hidden\" name=\"GlobalCFoption\" value=\"GlobalCFGchange\"><input type=\"submit\" value=\"$MSG_Submit\"></form>";
?>