<?php
//Copyright (c) Florian Grannemann
//Last change in version: 2.1 Alpha 2
/*
******************************************************************************
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!
include "$path_to_languagefolder/lang_admin_update.php.inc";
$Version=$MyCFG->get_config_value("Version");
if($MyRequestHandler->getModuleKeyValue("change_option")=="yes")
{
$NewUnstableOption=$MyRequestHandler->getModuleKeyValue("NewUnstableOption");
$NewFastupdateOption=$MyRequestHandler->getModuleKeyValue("NewFastupdateOption");
$NewMainversionOption=$MyRequestHandler->getModuleKeyValue("NewMainversionOption");
$MyCFG->replace_setting("Update_unstables",$NewUnstableOption);
$MyCFG->replace_setting("Update_fastupdates",$NewFastupdateOption);
$MyCFG->replace_setting("Update_onlyMV",$NewMainversionOption);
}
$mainVersion=@explode(" ",$Version);
$mainVersion1=@explode(".",$mainVersion[0]);
$MainVersion=$mainVersion1[0].".".$mainVersion1[1].".x";
$mv_options=$MyCFG->get_config_value("Update_onlyMV");
$fastupdateoption=$MyCFG->get_config_value("Update_fastupdates");
$lookforUnstables=$MyCFG->get_config_value("Update_unstables");
$lang=$MyCFG->get_config_value("Language");
print "<form action=\"".$_SERVER["PHP_SELF"]."\" method=post><input type=hidden name=\"".$MyRequestHandler->getModuleKeyName("change_option")."\" value=\"yes\">";
//fastupdate options:
print "$TXT_UpdateOptions <select name=\"".$MyRequestHandler->getModuleKeyName("NewFastupdateOption")."\">";
print "<Option value=\"YES\"";
if($fastupdateoption=="YES")
{
print " selected";
}
print ">$TXT_StableOption_Fastuptades</option>";
print "<Option value=\"NO\"";
if($fastupdateoption=="NO")
{
print " selected";
}
print ">$TXT_StableOption_FullUpdate</option></select> | ";
//---------------------------------
//Main version options:
print "<select name=\"".$MyRequestHandler->getModuleKeyName("NewMainversionOption")."\"><Option value=\"YES\"";
if($mv_options=="YES")
{
print " selected";
}
print ">".preg_replace("/<-MainVersion->/","$MainVersion",$TXT_StableOption_ShowOnlyMainVersion_yes)."</option>";
print "<Option value=\"NO\"";
if($mv_options=="NO")
{
print " selected";
}
print ">$TXT_StableOption_ShowOnlyMainVersion_no</option></select><br>";
//-----------------------------------------------------------------------
//Unstable options:
print $TXT_searchforUnstables;
print "<select name=\"".$MyRequestHandler->getModuleKeyName("NewUnstableOption")."\"><Option value=\"YES\"";
if($lookforUnstables=="YES")
{
print " selected";
}
print ">$MSG_CheckUnstablesYES</option>";
print "<Option value=\"NO\"";
if($lookforUnstables=="NO")
{
print " selected";
}
print ">$MSG_CheckUnstablesNO</option></select> ";
print "<input type=submit value=\"$MSG_Submit\"></form><br>";
print "<iframe src='http://adbnewssender.sourceforge.net/update2/update.php?lang=$lang&version=".preg_replace("/ /","-",$Version)."&showUnstables=$lookforUnstables&showfastupdates=$fastupdateoption&showOnlyCurrentMV=$mv_options' framespacing='0' frameborder='0' WIDTH=100% height=515 scrolling='auto'></iframe>";
?>