add further ip sources, small syntax changes

This commit is contained in:
Daniel Seifert 2015-07-21 19:12:55 +00:00
parent 177b6ebce6
commit 8a8922e827
10 changed files with 195 additions and 180 deletions

2
.gitattributes vendored
View File

@ -10,10 +10,10 @@ copy_this/modules/d3/d3geoip/controllers/admin/d3_country_geoip.php -text
copy_this/modules/d3/d3geoip/menu.xml -text
copy_this/modules/d3/d3geoip/metadata.php -text
copy_this/modules/d3/d3geoip/models/d3geoip.php -text
copy_this/modules/d3/d3geoip/models/d3geoip_update.php -text
copy_this/modules/d3/d3geoip/modules/components/d3_oxcmp_cur_geoip.php -text
copy_this/modules/d3/d3geoip/modules/components/d3_oxcmp_lang_geoip.php -text
copy_this/modules/d3/d3geoip/picture.png -text
copy_this/modules/d3/d3geoip/setup/d3geoip_update.php -text
copy_this/modules/d3/d3geoip/views/admin/de/d3_geoip_lang.php -text
copy_this/modules/d3/d3geoip/views/admin/tpl/d3_cfg_geoipset_main.tpl -text
copy_this/modules/d3/d3geoip/views/admin/tpl/d3_country_geoip.tpl -text

View File

@ -160,8 +160,6 @@ class d3_country_geoip extends oxAdminView
*/
public function getCurList()
{
$aCurrencies = array();
if ($this->getModCfgValue('blChangeShop') && $this->oCountry->getFieldData('d3geoipshop')) {
$sShopId = $this->oCountry->getFieldData('d3geoipshop');
} else {
@ -173,8 +171,20 @@ class d3_country_geoip extends oxAdminView
$sCurs = oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getOne($sQ);
if ($sCurs) {
foreach (unserialize($sCurs) as $sKey => $sValue) {
return $this->d3ExtractCurList($sCurs);
}
/**
* @param $sCurrencies
*
* @return array
*/
public function d3ExtractCurList($sCurrencies)
{
$aCurrencies = array();
if ($sCurrencies) {
foreach (unserialize($sCurrencies) as $sKey => $sValue) {
$aFields = explode('@', $sValue);
$aCurrencies[$sKey]->id = $sKey;
$aCurrencies[$sKey]->name = $aFields[0];

View File

@ -24,21 +24,26 @@ $aModule = array(
'oxcmp_lang' => 'd3/d3geoip/modules/components/d3_oxcmp_lang_geoip',
),
'files' => array(
'd3_cfg_geoipset' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset.php',
'd3_cfg_geoipset_list' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_list.php',
'd3_cfg_geoipset_main' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_main.php',
'd3_cfg_geoipset' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset.php',
'd3_cfg_geoipset_list' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_list.php',
'd3_cfg_geoipset_main' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_main.php',
'd3_cfg_geoipset_licence' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_licence.php',
'd3_country_geoip' => 'd3/d3geoip/controllers/admin/d3_country_geoip.php',
'd3geoip' => 'd3/d3geoip/models/d3geoip.php',
'd3geoip_update' => 'd3/d3geoip/models/d3geoip_update.php',
'd3_country_geoip' => 'd3/d3geoip/controllers/admin/d3_country_geoip.php',
'd3geoip' => 'd3/d3geoip/models/d3geoip.php',
'd3geoip_update' => 'd3/d3geoip/setup/d3geoip_update.php',
),
'templates' => array(
'd3_cfg_geoipset_main.tpl' => 'd3/d3geoip/views/admin/tpl/d3_cfg_geoipset_main.tpl',
'd3_country_geoip.tpl' => 'd3/d3geoip/views/admin/tpl/d3_country_geoip.tpl',
'd3_cfg_geoipset_main.tpl' => 'd3/d3geoip/views/admin/tpl/d3_cfg_geoipset_main.tpl',
'd3_country_geoip.tpl' => 'd3/d3geoip/views/admin/tpl/d3_country_geoip.tpl',
),
'events' => array(
'onActivate' => 'd3install::checkUpdateStart',
),
'blocks' => array(
),
'd3FileRegister' => array(
'd3/d3geoip/IntelliSenseHelper.php',
'd3/d3geoip/metadata.php',
'd3/d3geoip/views/admin/de/d3_geoip_lang.php',
),
);

View File

@ -100,8 +100,25 @@ class d3GeoIP extends oxbase
) {
$sIP = $this->_getModConfig()->getValue('sTestCountryIp');
} else {
// ToDo: use $_SERVER['X-Forwared-For'] && Client-IP in case of proxy
$sIP = $_SERVER['REMOTE_ADDR'];
if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
$sIP = $_SERVER['HTTP_CF_CONNECTING_IP'];
} else if (isset($_SERVER['HTTP_X_REAL_IP'])) {
$sIP = $_SERVER['HTTP_X_REAL_IP'];
} else if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$sIP = $_SERVER['HTTP_CLIENT_IP'];
} else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$sIP = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else if(isset($_SERVER['HTTP_X_FORWARDED'])) {
$sIP = $_SERVER['HTTP_X_FORWARDED'];
} else if(isset($_SERVER['HTTP_FORWARDED_FOR'])) {
$sIP = $_SERVER['HTTP_FORWARDED_FOR'];
} else if(isset($_SERVER['HTTP_FORWARDED'])) {
$sIP = $_SERVER['HTTP_FORWARDED'];
} else if(isset($_SERVER['REMOTE_ADDR'])) {
$sIP = $_SERVER['REMOTE_ADDR'];
} else {
$sIP = 'UNKNOWN';
}
}
stopProfile(__METHOD__);
@ -412,7 +429,7 @@ class d3GeoIP extends oxbase
$oShoplist->getList();
$aShopUrls = array();
foreach (array_keys($oShoplist) as $sId) {
foreach ($oShoplist->arrayKeys() as $sId) {
$aShopUrls[$sId] = $this->getConfig()->getShopConfVar('sMallShopURL', $sId);
}

View File

@ -35,6 +35,6 @@ class d3_oxcmp_cur_geoip extends d3_oxcmp_cur_geoip_parent
$oLocation->setCountryCurrency();
}
return parent::init();
parent::init();
}
}

View File

@ -29,6 +29,6 @@ class d3_oxcmp_lang_geoip extends d3_oxcmp_lang_geoip_parent
$oLocation->setCountryLanguage();
}
return parent::init();
parent::init();
}
}

View File

@ -40,6 +40,8 @@ zQ9';
'do' => 'fixGeoIpFields'),
array('check' => 'checkIndizes',
'do' => 'fixIndizes'),
array('check' => 'hasUnregisteredFiles',
'do' => 'showUnregisteredFiles'),
array('check' => 'checkModCfgSameRevision',
'do' => 'updateModCfgSameRevision'),
);
@ -52,101 +54,101 @@ zQ9';
'sTableName' => 'oxcountry',
'sFieldName' => 'D3GEOIPSHOP',
'sType' => 'VARCHAR(10)',
'blNull' => FALSE,
'blNull' => false,
'sDefault' => 'oxbaseshop',
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3GEOIPLANG' => array(
'sTableName' => 'oxcountry',
'sFieldName' => 'D3GEOIPLANG',
'sType' => 'TINYINT(2)',
'blNull' => FALSE,
'blNull' => false,
'sDefault' => '-1',
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3GEOIPCUR' => array(
'sTableName' => 'oxcountry',
'sFieldName' => 'D3GEOIPCUR',
'sType' => 'TINYINT(2)',
'blNull' => FALSE,
'blNull' => false,
'sDefault' => '-1',
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3GEOIPURL' => array(
'sTableName' => 'oxcountry',
'sFieldName' => 'D3GEOIPURL',
'sType' => 'VARCHAR(255)',
'blNull' => FALSE,
'sDefault' => FALSE,
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3STARTIP' => array(
'sTableName' => 'd3geoip',
'sFieldName' => 'D3STARTIP',
'sType' => 'VARCHAR(39)',
'blNull' => FALSE,
'sDefault' => FALSE,
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3ENDIP' => array(
'sTableName' => 'd3geoip',
'sFieldName' => 'D3ENDIP',
'sType' => 'VARCHAR(39)',
'blNull' => FALSE,
'sDefault' => FALSE,
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3STARTIPNUM' => array(
'sTableName' => 'd3geoip',
'sFieldName' => 'D3STARTIPNUM',
'sType' => 'DECIMAL(38,0)',
'blNull' => FALSE,
'sDefault' => FALSE,
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3ENDIPNUM' => array(
'sTableName' => 'd3geoip',
'sFieldName' => 'D3ENDIPNUM',
'sType' => 'DECIMAL(38,0)',
'blNull' => FALSE,
'sDefault' => FALSE,
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3ISO' => array(
'sTableName' => 'd3geoip',
'sFieldName' => 'D3ISO',
'sType' => 'CHAR(2)',
'blNull' => FALSE,
'sDefault' => FALSE,
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
'D3COUNTRYNAME' => array(
'sTableName' => 'd3geoip',
'sFieldName' => 'D3COUNTRYNAME',
'sType' => 'VARCHAR(50)',
'blNull' => FALSE,
'sDefault' => FALSE,
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => FALSE,
'blMultilang' => false,
),
);
@ -175,7 +177,7 @@ zQ9';
*/
public function checkGeoIpTableExist()
{
return $this->_checkTableExist('d3geoip');
return $this->_checkTableNotExist('d3geoip');
}
/**
@ -183,13 +185,9 @@ zQ9';
*/
public function updateGeoIpTableExist()
{
$blRet = FALSE;
if ($this->checkGeoIpTableExist())
{
$aRet = $this->_addTable('d3geoip', $this->aFields, $this->aIndizes, 'GeoIP', 'MyISAM');
$blRet = $aRet['blRet'];
$this->_setActionLog('SQL', $aRet['sql'], __METHOD__);
$this->_setUpdateBreak(TRUE);
$blRet = false;
if ($this->checkGeoIpTableExist()) {
$blRet = $this->_addTable2('d3geoip', $this->aFields, $this->aIndizes, 'GeoIP', 'MyISAM');
}
return $blRet;
@ -223,9 +221,8 @@ zQ9';
*/
public function checkModCfgItemExist()
{
$blRet = FALSE;
foreach ($this->_getShopList() as $oShop)
{
$blRet = false;
foreach ($this->getShopList() as $oShop) {
/** @var $oShop oxshop */
$aWhere = array(
'oxmodid' => $this->sModKey,
@ -235,8 +232,7 @@ zQ9';
$blRet = $this->_checkTableItemNotExist('d3_cfg_mod', $aWhere);
if ($blRet)
{
if ($blRet) {
return $blRet;
}
}
@ -249,12 +245,10 @@ zQ9';
*/
public function updateModCfgItemExist()
{
$blRet = FALSE;
$blRet = false;
if ($this->checkModCfgItemExist())
{
foreach ($this->_getShopList() as $oShop)
{
if ($this->checkModCfgItemExist()) {
foreach ($this->getShopList() as $oShop) {
/** @var $oShop oxshop */
$aWhere = array(
'oxmodid' => $this->sModKey,
@ -262,8 +256,7 @@ zQ9';
'oxnewrevision' => $this->sModRevision,
);
if ($this->_checkTableItemNotExist('d3_cfg_mod', $aWhere))
{
if ($this->_checkTableItemNotExist('d3_cfg_mod', $aWhere)) {
// update don't use this property
unset($aWhere['oxnewrevision']);
@ -271,103 +264,98 @@ zQ9';
array (
'fieldname' => 'OXID',
'content' => "md5('" . $this->sModKey . " " . $oShop->getId() . " de')",
'force_update' => TRUE,
'use_quote' => FALSE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => false,
'use_multilang' => false,
),
array (
'fieldname' => 'OXSHOPID',
'content' => $oShop->getId(),
'force_update' => TRUE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => true,
'use_multilang' => false,
),
array (
'fieldname' => 'OXMODID',
'content' => $this->sModKey,
'force_update' => TRUE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => true,
'use_multilang' => false,
),
array (
'fieldname' => 'OXNAME',
'content' => $this->sModName,
'force_update' => TRUE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => true,
'use_multilang' => false,
),
array (
'fieldname' => 'OXACTIVE',
'content' => "0",
'force_update' => FALSE,
'use_quote' => FALSE,
'use_multilang' => FALSE,
'force_update' => false,
'use_quote' => false,
'use_multilang' => false,
),
array (
'fieldname' => 'OXBASECONFIG',
'content' => $this->sBaseConf,
'force_update' => TRUE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => true,
'use_multilang' => false,
),
array (
'fieldname' => 'OXSERIAL',
'content' => "",
'force_update' => FALSE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => false,
'use_quote' => true,
'use_multilang' => false,
),
array (
'fieldname' => 'OXINSTALLDATE',
'content' => "NOW()",
'force_update' => TRUE,
'use_quote' => FALSE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => false,
'use_multilang' => false,
),
array (
'fieldname' => 'OXVERSION',
'content' => $this->sModVersion,
'force_update' => TRUE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => true,
'use_multilang' => false,
),
array (
'fieldname' => 'OXSHOPVERSION',
'content' => oxRegistry::getConfig()->getEdition(),
'force_update' => TRUE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => true,
'use_multilang' => false,
),
array (
'fieldname' => 'OXREQUIREMENTS',
'content' => $this->sRequirements,
'force_update' => TRUE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => true,
'use_multilang' => false,
),
array(
'fieldname' => 'OXVALUE',
'content' => $this->sBaseValue,
'force_update' => FALSE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => false,
'use_quote' => true,
'use_multilang' => false,
),
array(
'fieldname' => 'OXNEWREVISION',
'content' => $this->sModRevision,
'force_update' => TRUE,
'use_quote' => TRUE,
'use_multilang' => FALSE,
'force_update' => true,
'use_quote' => true,
'use_multilang' => false,
)
);
$aRet = $this->_updateTableItem('d3_cfg_mod', $aInsertFields, $aWhere);
$blRet = $aRet['blRet'];
$blRet = $this->_updateTableItem2('d3_cfg_mod', $aInsertFields, $aWhere);
$this->_setActionLog('SQL', $aRet['sql'], __METHOD__);
$this->_setUpdateBreak(FALSE);
if ($this->getStepByStepMode())
{
if ($this->getStepByStepMode()) {
break;
}
}
@ -383,7 +371,7 @@ zQ9';
public function checkGeoIpFields()
{
/** @var $oShop oxshop */
$oShop = $this->_getShopList()->current();
$oShop = $this->getShopList()->current();
$this->aFields['D3GEOIPSHOP']['sDefault'] = $oShop->getId();
return $this->checkFields();
@ -396,9 +384,25 @@ zQ9';
public function fixGeoIpFields()
{
/** @var $oShop oxshop */
$oShop = $this->_getShopList()->current();
$oShop = $this->getShopList()->current();
$this->aFields['D3GEOIPSHOP']['sDefault'] = $oShop->getId();
return $this->fixFields();
}
}
/**
* @return bool
*/
public function hasUnregisteredFiles()
{
return $this->_hasUnregisteredFiles('d3geoip', array('d3FileRegister'));
}
/**
* @return bool
*/
public function showUnregisteredFiles()
{
return $this->_showUnregisteredFiles('d3geoip', array('d3FileRegister'));
}
}

View File

@ -28,13 +28,16 @@ $aLang = array(
'D3_GEOIP_TRANSL' => 'GeoIP-Kundenumleitungen',
'D3_GEOIP_SET_DEBUG_DESC' => 'Mit aktiviertem Debug-Modus wird im Frontend die aktuelle IP-Adresse des Shopbesuchers gezeigt. Beachten Sie, dass Umleitungen, die auf Weiterleitungen basieren, dann nicht ausgeführt werden können.',
'D3_GEOIP_SET_DEBUG_DESC' => 'Mit aktiviertem Debug-Modus wird im Frontend die aktuelle '.
'IP-Adresse des Shopbesuchers gezeigt. Beachten Sie, dass Umleitungen, die auf Weiterleitungen basieren, dann '.
'nicht ausgeführt werden können.',
'D3_GEOIP_SET_OPTIONS' => 'Optionen',
'D3_GEOIP_SET_OPTIONS_CHANGESHOP' => 'Mandant wechseln, wenn eingestellt (nur EE)',
'D3_GEOIP_SET_OPTIONS_CHANGECURR' => 'Währung wechseln, wenn eingestellt',
'D3_GEOIP_SET_OPTIONS_CHANGELANG' => 'Sprache wechseln, wenn eingestellt',
'D3_GEOIP_SET_OPTIONS_CHANGEURL' => 'URL wechseln, wenn eingestellt',
'D3_GEOIP_SET_OPTIONS_NOCOUNTRY' => 'Shop verwendet die Einstellung dieses Landes, wenn IP nicht zuzuordnen ist',
'D3_GEOIP_SET_OPTIONS_NOCOUNTRY' => 'Shop verwendet die Einstellung dieses Landes, wenn IP nicht '.
'zuzuordnen ist',
'D3_GEOIP_SET_IP' => 'IP-Einstellungen',
'D3_GEOIP_SET_IP_TESTIP' => 'statt Kunden-IP immer diese IP-Adresse verwenden',
'D3_GEOIP_SET_IP_TESTCOUNTRY' => 'statt Kunden-IP immer eine IP-Adresse dieses Landes verwenden',
@ -52,14 +55,19 @@ $aLang = array(
'D3_GEOIP_OR' => 'oder',
'D3_GEOIP_DISABLED' => '(deaktiviert)',
'D3_GEOIP_SELURL' => 'zu wechselnde URL',
'D3_GEOIP_SELURL_DESC' => 'Sobald im URL-Feld eine Eingabe vorhanden ist, wird bei passenden Kunden versucht, zur hinterlegten URL zu wechseln. Möchten Sie den Mandanten, die Währung und / oder die Sprache einstellen, entfernen Sie die URL.<br><br>Aktivieren / deaktivieren Sie den URL-Wechsel zusätzlich in den Modul-Grundeinstellungen.',
'D3_GEOIP_SELURL_DESC' => 'Sobald im URL-Feld eine Eingabe vorhanden ist, wird bei '.
'passenden Kunden versucht, zur hinterlegten URL zu wechseln. Möchten Sie den Mandanten, die Währung und / '.
'oder die Sprache einstellen, entfernen Sie die URL.<br><br>Aktivieren / deaktivieren Sie den URL-Wechsel '.
'zusätzlich in den Modul-Grundeinstellungen.',
'D3_GEOIP_METADATA_TITLE' => 'D³ GeoIP Vorauswahl',
'D3_GEOIP_METADATA_DESC' => 'Begrüßen Sie Ihre Kunden in seiner Landessprache.',
'D3_GEOIP_UPDATE_ITEMINSTALL' => 'Die umfangreiche IP-Liste kann leider nicht über die automatische Installation eingebunden werden. Bitte installieren Sie diese manuell. '.PHP_EOL.PHP_EOL.'Die erforderlichen Daten finden Sie im Installationspaket des Moduls unter "setup+doku/geoip-Data_IPv4_*.sql" ("setup+doku/geoip-Data_IPv6_*.sql" für IPv6-Adressen) oder als handlichere SQL-Dateien unter "setup+doku/geoip_data_parts/". '.PHP_EOL.PHP_EOL.'Sie benötigen entweder die Komplettdateien oder die Sammlung kleinerer Daten. Führen Sie die SQL-Datei(en) bitte in Ihrer Datenbank aus.',
'D3_GEOIP_UPDATE_ITEMINSTALL' => 'Die umfangreiche IP-Liste kann leider nicht über die '.
'automatische Installation eingebunden werden. Bitte installieren Sie diese manuell. '.PHP_EOL.PHP_EOL.
'Die erforderlichen Daten finden Sie im Installationspaket des Moduls unter '.
'"setup+doku/geoip-Data_IPv4_*.sql" ("setup+doku/geoip-Data_IPv6_*.sql" für IPv6-Adressen) oder als '.
'handlichere SQL-Dateien unter "setup+doku/geoip_data_parts/". '.PHP_EOL.PHP_EOL.
'Sie benötigen entweder die Komplettdateien oder die Sammlung kleinerer Daten. Führen Sie die SQL-Datei(en) '.
'bitte in Ihrer Datenbank aus.',
);
/*
[{ oxmultilang ident='ACTIONS_MAIN_YOUWANTTODELETE' }]
*/

View File

@ -59,33 +59,6 @@ function showFormatSettings(sElemId, visible, blUseOldElem)
<style type="text/css">
<!--
.questbox{
background-color: #07f;
color: white;
float: right;
position: relative;
display: block;
padding: 1px 4px;
font-weight: bold;
z-index: 98;
cursor: help;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 10px;
line-height: 12px;
}
.helptextbox{
background-color: white;
color: black;
border: 1px solid black;
position: absolute;
overflow: hidden;
padding: 5px;
margin-top: 15px;
width: 300px;
z-index: 99;
}
fieldset{
border: 1px inset black;
background-color: #F0F0F0;
@ -146,56 +119,56 @@ td.edittext {
</a>
<dl>
<dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP"}]
<label for="blChangeShop">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blChangeShop]" value="0">
<input class="edittext ext_edittext" type="checkbox" name="value[blChangeShop]" value='1' [{if $edit->getValue('blChangeShop') == 1}]checked[{/if}]>
<input id="blChangeShop" class="edittext ext_edittext" type="checkbox" name="value[blChangeShop]" value='1' [{if $edit->getValue('blChangeShop') == 1}]checked[{/if}]>
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP_DESC"}]
</dd>
<div class="spacer"></div>
</dl>
<dl>
<dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGECURR"}]
<label for="blChangeCurr">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGECURR"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blChangeCurr]" value="0">
<input class="edittext ext_edittext" type="checkbox" name="value[blChangeCurr]" value='1' [{if $edit->getValue('blChangeCurr') == 1}]checked[{/if}]>
<input id="blChangeCurr" class="edittext ext_edittext" type="checkbox" name="value[blChangeCurr]" value='1' [{if $edit->getValue('blChangeCurr') == 1}]checked[{/if}]>
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGECURR_DESC"}]
</dd>
<div class="spacer"></div>
</dl>
<dl>
<dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGELANG"}]
<label for="blChangeLang">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGELANG"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blChangeLang]" value="0">
<input class="edittext ext_edittext" type="checkbox" name="value[blChangeLang]" value='1' [{if $edit->getValue('blChangeLang') == 1}]checked[{/if}]>
<input id="blChangeLang" class="edittext ext_edittext" type="checkbox" name="value[blChangeLang]" value='1' [{if $edit->getValue('blChangeLang') == 1}]checked[{/if}]>
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGELANG_DESC"}]
</dd>
<div class="spacer"></div>
</dl>
<dl>
<dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGEURL"}]
<label for="blChangeURL">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGEURL"}]</label>
</dt>
<dd>
<input type="hidden" name="value[blChangeURL]" value="0">
<input class="edittext ext_edittext" type="checkbox" name="value[blChangeURL]" value='1' [{if $edit->getValue('blChangeURL') == 1}]checked[{/if}]>
<input id="blChangeURL" class="edittext ext_edittext" type="checkbox" name="value[blChangeURL]" value='1' [{if $edit->getValue('blChangeURL') == 1}]checked[{/if}]>
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGEURL_DESC"}]
</dd>
<div class="spacer"></div>
</dl>
<dl>
<dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_NOCOUNTRY"}]
<label for="blUseFallback">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_NOCOUNTRY"}]</label>
<input type="hidden" name="value[blUseFallback]" value="0">
<input class="edittext ext_edittext" type="checkbox" name="value[blUseFallback]" value='1' [{if $edit->getValue('blUseFallback') == 1}]checked[{/if}]>
<input id="blUseFallback" class="edittext ext_edittext" type="checkbox" name="value[blUseFallback]" value='1' [{if $edit->getValue('blUseFallback') == 1}]checked[{/if}]>
</dt>
<dd>
<select size="5" name="value[sFallbackCountryId]">
<select id="sFallbackCountryId" size="5" name="value[sFallbackCountryId]">
[{foreach from=$oView->getCountryList() item="oCountry"}]
<option value="[{$oCountry->getId()}]" [{if $edit->getValue('sFallbackCountryId') == $oCountry->getId()}] selected[{/if}]>[{$oCountry->oxcountry__oxtitle->value}]</option>
[{/foreach}]
@ -216,24 +189,24 @@ td.edittext {
</a>
<dl>
<dt>
[{oxmultilang ident="D3_GEOIP_SET_IP_TESTIP"}]
<label for="blUseTestIp">[{oxmultilang ident="D3_GEOIP_SET_IP_TESTIP"}]</label>
<input type="hidden" name="value[blUseTestIp]" value="0">
<input class="edittext ext_edittext" type="checkbox" name="value[blUseTestIp]" value='1' [{if $edit->getValue('blUseTestIp') == 1}]checked[{/if}]>
<input id="blUseTestIp" class="edittext ext_edittext" type="checkbox" name="value[blUseTestIp]" value='1' [{if $edit->getValue('blUseTestIp') == 1}]checked[{/if}]>
</dt>
<dd>
<input type="text" maxlength="39" size="17" name="value[sTestIp]" value="[{$edit->getValue('sTestIp')}]">
<input id="sTestIp" type="text" maxlength="39" size="17" name="value[sTestIp]" value="[{$edit->getValue('sTestIp')}]">
[{oxinputhelp ident="D3_GEOIP_SET_IP_TESTIP_DESC"}]
</dd>
<div class="spacer"></div>
</dl>
<dl>
<dt>
[{oxmultilang ident="D3_GEOIP_SET_IP_TESTCOUNTRY"}]
<label for="blUseTestCountry">[{oxmultilang ident="D3_GEOIP_SET_IP_TESTCOUNTRY"}]</label>
<input type="hidden" name="value[blUseTestCountry]" value="0">
<input class="edittext ext_edittext" type="checkbox" name="value[blUseTestCountry]" value='1' [{if $edit->getValue('blUseTestCountry') == 1}]checked[{/if}]>
<input id="blUseTestCountry" class="edittext ext_edittext" type="checkbox" name="value[blUseTestCountry]" value='1' [{if $edit->getValue('blUseTestCountry') == 1}]checked[{/if}]>
</dt>
<dd>
<select name="value[sTestCountryIp]" size="1" class="edittext ext_edittext">
<select id="sTestCountryIp" name="value[sTestCountryIp]" size="1" class="edittext ext_edittext">
[{foreach from=$oView->getIPCountryList() item="oCountry"}]
<option value="[{$oCountry->getFieldData('IP')}]" [{if $edit->getValue('sTestCountryIp') == $oCountry->getFieldData('IP')}] selected[{/if}]>[{$oCountry->getFieldData('oxtitle')}][{if !$oCountry->getFieldData('oxactive')}] [{oxmultilang ident="D3_GEOIP_SET_IP_TESTCOUNTRY_INACTIVE"}][{/if}]</option>
[{/foreach}]
@ -244,10 +217,10 @@ td.edittext {
</dl>
<dl>
<dt>
[{oxmultilang ident="D3_GEOIP_SET_IP_CHECKIP"}]
<label for="sCheckIp">[{oxmultilang ident="D3_GEOIP_SET_IP_CHECKIP"}]</label>
</dt>
<dd>
<input type="text" maxlength="39" size="17" name="value[sCheckIp]" value="[{$edit->getValue('sCheckIp')}]">
<input id="sCheckIp" type="text" maxlength="39" size="17" name="value[sCheckIp]" value="[{$edit->getValue('sCheckIp')}]">
[{oxinputhelp ident="D3_GEOIP_SET_IP_CHECKIP_DESC"}]
[{if $edit->getValue('sCheckIp')}]
@ -264,7 +237,7 @@ td.edittext {
<td class="edittext ext_edittext" align="left">
<span class="d3modcfg_btn icon status_ok">
<input type="submit" name="save" value="[{oxmultilang ident="D3_GENERAL_GEOIP_SAVE"}]">
<div></div>
<span></span>
</span>
</td>
</tr>

View File

@ -44,10 +44,10 @@
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="edittext" width="120">
[{oxmultilang ident="D3_GEOIP_SELSHOP"}]:
<label for="d3geoipshop">[{oxmultilang ident="D3_GEOIP_SELSHOP"}]:</label>
</td>
<td class="edittext">
<SELECT name="editval[oxcountry__d3geoipshop]" class="edittext" onchange="document.getElementById('myedit').fnc.value = 'saveshop'; document.getElementById('myedit').submit();" [{if !$oView->getModCfgValue('blChangeShop')}]disabled[{/if}]>
<SELECT id="d3geoipshop" name="editval[oxcountry__d3geoipshop]" class="edittext" onchange="document.getElementById('myedit').fnc.value = 'saveshop'; document.getElementById('myedit').submit();" [{if !$oView->getModCfgValue('blChangeShop')}]disabled[{/if}]>
<option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELSHOP"}]</option>
[{foreach from=$oView->getShopList() item=shop}]
<option value="[{$shop->oxshops__oxid->value}]" [{if $edit->oxcountry__d3geoipshop->value == $shop->oxshops__oxid->value}]selected[{/if}]>[{$shop->oxshops__oxname->value}]</option>
@ -57,10 +57,10 @@
</tr>
<tr>
<td class="edittext">
[{oxmultilang ident="D3_GEOIP_SELLANG"}]:
<label for="d3geoiplang">[{oxmultilang ident="D3_GEOIP_SELLANG"}]:</label>
</td>
<td class="edittext">
<SELECT name="editval[oxcountry__d3geoiplang]" class="edittext" [{if !$oView->getModCfgValue('blChangeLang')}]disabled[{/if}]>
<SELECT id="d3geoiplang" name="editval[oxcountry__d3geoiplang]" class="edittext" [{if !$oView->getModCfgValue('blChangeLang')}]disabled[{/if}]>
<option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELLANG"}]</option>
[{foreach from=$oView->getLangList() item=lang}]
<option value="[{$lang->id}]" [{if $edit->oxcountry__d3geoiplang->value == $lang->id}]selected[{/if}]>[{$lang->name}]</option>
@ -70,10 +70,10 @@
</tr>
<tr>
<td class="edittext">
[{oxmultilang ident="D3_GEOIP_SELCUR"}]:
<label for="d3geoipcur">[{oxmultilang ident="D3_GEOIP_SELCUR"}]:</label>
</td>
<td class="edittext">
<SELECT name="editval[oxcountry__d3geoipcur]" class="edittext" [{if !$oView->getModCfgValue('blChangeCurr')}]disabled[{/if}]>
<SELECT id="d3geoipcur" name="editval[oxcountry__d3geoipcur]" class="edittext" [{if !$oView->getModCfgValue('blChangeCurr')}]disabled[{/if}]>
<option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELCUR"}]</option>
[{foreach from=$oView->getCurList() item=cur}]
<option value="[{$cur->id}]" [{if $edit->oxcountry__d3geoipcur->value == $cur->id}]selected[{/if}]>[{$cur->name}] ([{$cur->sign}])</option>
@ -85,7 +85,7 @@
<td class="edittext"><br><br>
</td>
<td class="edittext"><br><br>
<input type="submit" class="edittext" id="oLockButton" name="saveArticle" value="[{oxmultilang ident="GENERAL_SAVE"}]" onClick="Javascript:document.myedit.fnc.value='save'"" [{$readonly}] [{if !$edit->oxcountry__oxtitle->value && !$oxparentid}]disabled[{/if}]><br>
<input type="submit" class="edittext" id="oLockButton" name="saveArticle" value="[{oxmultilang ident="GENERAL_SAVE"}]" onClick="Javascript:document.myedit.fnc.value='save'"" [{$readonly}] [{if !$edit->oxcountry__oxtitle->value && !$oxparentid}]disabled[{/if}]><br>
</td>
</tr>
</table>
@ -96,13 +96,12 @@
<!-- Anfang rechte Seite -->
<td valign="top" class="edittext" align="left" width="45%">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="edittext" width="120">
[{oxmultilang ident="D3_GEOIP_SELURL"}]:
<label for="d3geoipurl">[{oxmultilang ident="D3_GEOIP_SELURL"}]:</label>
</td>
<td class="edittext">
<input type="text" maxlength="255" size="50" name="editval[oxcountry__d3geoipurl]" value="[{$edit->oxcountry__d3geoipurl->value}]" [{if !$oView->getModCfgValue('blChangeURL')}]disabled[{/if}]> [{if !$oView->getModCfgValue('blChangeURL')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}]
<input id="d3geoipurl" type="text" maxlength="255" size="50" name="editval[oxcountry__d3geoipurl]" value="[{$edit->oxcountry__d3geoipurl->value}]" [{if !$oView->getModCfgValue('blChangeURL')}]disabled[{/if}]> [{if !$oView->getModCfgValue('blChangeURL')}] [{oxmultilang ident="D3_GEOIP_DISABLED"}][{/if}]
[{oxinputhelp ident="D3_GEOIP_SELURL_DESC"}]
</td>
</tr>
@ -112,7 +111,6 @@
</tr>
</table>
</form>
[{include file="bottomnaviitem.tpl"}]