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/menu.xml -text
copy_this/modules/d3/d3geoip/metadata.php -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.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_cur_geoip.php -text
copy_this/modules/d3/d3geoip/modules/components/d3_oxcmp_lang_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/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/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_cfg_geoipset_main.tpl -text
copy_this/modules/d3/d3geoip/views/admin/tpl/d3_country_geoip.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() public function getCurList()
{ {
$aCurrencies = array();
if ($this->getModCfgValue('blChangeShop') && $this->oCountry->getFieldData('d3geoipshop')) { if ($this->getModCfgValue('blChangeShop') && $this->oCountry->getFieldData('d3geoipshop')) {
$sShopId = $this->oCountry->getFieldData('d3geoipshop'); $sShopId = $this->oCountry->getFieldData('d3geoipshop');
} else { } else {
@ -173,8 +171,20 @@ class d3_country_geoip extends oxAdminView
$sCurs = oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getOne($sQ); $sCurs = oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getOne($sQ);
if ($sCurs) { return $this->d3ExtractCurList($sCurs);
foreach (unserialize($sCurs) as $sKey => $sValue) { }
/**
* @param $sCurrencies
*
* @return array
*/
public function d3ExtractCurList($sCurrencies)
{
$aCurrencies = array();
if ($sCurrencies) {
foreach (unserialize($sCurrencies) as $sKey => $sValue) {
$aFields = explode('@', $sValue); $aFields = explode('@', $sValue);
$aCurrencies[$sKey]->id = $sKey; $aCurrencies[$sKey]->id = $sKey;
$aCurrencies[$sKey]->name = $aFields[0]; $aCurrencies[$sKey]->name = $aFields[0];

View File

@ -30,7 +30,7 @@ $aModule = array(
'd3_cfg_geoipset_licence' => 'd3/d3geoip/controllers/admin/d3_cfg_geoipset_licence.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', 'd3_country_geoip' => 'd3/d3geoip/controllers/admin/d3_country_geoip.php',
'd3geoip' => 'd3/d3geoip/models/d3geoip.php', 'd3geoip' => 'd3/d3geoip/models/d3geoip.php',
'd3geoip_update' => 'd3/d3geoip/models/d3geoip_update.php', 'd3geoip_update' => 'd3/d3geoip/setup/d3geoip_update.php',
), ),
'templates' => array( 'templates' => array(
'd3_cfg_geoipset_main.tpl' => 'd3/d3geoip/views/admin/tpl/d3_cfg_geoipset_main.tpl', 'd3_cfg_geoipset_main.tpl' => 'd3/d3geoip/views/admin/tpl/d3_cfg_geoipset_main.tpl',
@ -41,4 +41,9 @@ $aModule = array(
), ),
'blocks' => array( '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'); $sIP = $this->_getModConfig()->getValue('sTestCountryIp');
} else { } else {
// ToDo: use $_SERVER['X-Forwared-For'] && Client-IP in case of proxy 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']; $sIP = $_SERVER['REMOTE_ADDR'];
} else {
$sIP = 'UNKNOWN';
}
} }
stopProfile(__METHOD__); stopProfile(__METHOD__);
@ -412,7 +429,7 @@ class d3GeoIP extends oxbase
$oShoplist->getList(); $oShoplist->getList();
$aShopUrls = array(); $aShopUrls = array();
foreach (array_keys($oShoplist) as $sId) { foreach ($oShoplist->arrayKeys() as $sId) {
$aShopUrls[$sId] = $this->getConfig()->getShopConfVar('sMallShopURL', $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(); $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(); $oLocation->setCountryLanguage();
} }
return parent::init(); parent::init();
} }
} }

View File

@ -40,6 +40,8 @@ zQ9';
'do' => 'fixGeoIpFields'), 'do' => 'fixGeoIpFields'),
array('check' => 'checkIndizes', array('check' => 'checkIndizes',
'do' => 'fixIndizes'), 'do' => 'fixIndizes'),
array('check' => 'hasUnregisteredFiles',
'do' => 'showUnregisteredFiles'),
array('check' => 'checkModCfgSameRevision', array('check' => 'checkModCfgSameRevision',
'do' => 'updateModCfgSameRevision'), 'do' => 'updateModCfgSameRevision'),
); );
@ -52,101 +54,101 @@ zQ9';
'sTableName' => 'oxcountry', 'sTableName' => 'oxcountry',
'sFieldName' => 'D3GEOIPSHOP', 'sFieldName' => 'D3GEOIPSHOP',
'sType' => 'VARCHAR(10)', 'sType' => 'VARCHAR(10)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => 'oxbaseshop', 'sDefault' => 'oxbaseshop',
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3GEOIPLANG' => array( 'D3GEOIPLANG' => array(
'sTableName' => 'oxcountry', 'sTableName' => 'oxcountry',
'sFieldName' => 'D3GEOIPLANG', 'sFieldName' => 'D3GEOIPLANG',
'sType' => 'TINYINT(2)', 'sType' => 'TINYINT(2)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => '-1', 'sDefault' => '-1',
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3GEOIPCUR' => array( 'D3GEOIPCUR' => array(
'sTableName' => 'oxcountry', 'sTableName' => 'oxcountry',
'sFieldName' => 'D3GEOIPCUR', 'sFieldName' => 'D3GEOIPCUR',
'sType' => 'TINYINT(2)', 'sType' => 'TINYINT(2)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => '-1', 'sDefault' => '-1',
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3GEOIPURL' => array( 'D3GEOIPURL' => array(
'sTableName' => 'oxcountry', 'sTableName' => 'oxcountry',
'sFieldName' => 'D3GEOIPURL', 'sFieldName' => 'D3GEOIPURL',
'sType' => 'VARCHAR(255)', 'sType' => 'VARCHAR(255)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => FALSE, 'sDefault' => false,
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3STARTIP' => array( 'D3STARTIP' => array(
'sTableName' => 'd3geoip', 'sTableName' => 'd3geoip',
'sFieldName' => 'D3STARTIP', 'sFieldName' => 'D3STARTIP',
'sType' => 'VARCHAR(39)', 'sType' => 'VARCHAR(39)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => FALSE, 'sDefault' => false,
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3ENDIP' => array( 'D3ENDIP' => array(
'sTableName' => 'd3geoip', 'sTableName' => 'd3geoip',
'sFieldName' => 'D3ENDIP', 'sFieldName' => 'D3ENDIP',
'sType' => 'VARCHAR(39)', 'sType' => 'VARCHAR(39)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => FALSE, 'sDefault' => false,
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3STARTIPNUM' => array( 'D3STARTIPNUM' => array(
'sTableName' => 'd3geoip', 'sTableName' => 'd3geoip',
'sFieldName' => 'D3STARTIPNUM', 'sFieldName' => 'D3STARTIPNUM',
'sType' => 'DECIMAL(38,0)', 'sType' => 'DECIMAL(38,0)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => FALSE, 'sDefault' => false,
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3ENDIPNUM' => array( 'D3ENDIPNUM' => array(
'sTableName' => 'd3geoip', 'sTableName' => 'd3geoip',
'sFieldName' => 'D3ENDIPNUM', 'sFieldName' => 'D3ENDIPNUM',
'sType' => 'DECIMAL(38,0)', 'sType' => 'DECIMAL(38,0)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => FALSE, 'sDefault' => false,
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3ISO' => array( 'D3ISO' => array(
'sTableName' => 'd3geoip', 'sTableName' => 'd3geoip',
'sFieldName' => 'D3ISO', 'sFieldName' => 'D3ISO',
'sType' => 'CHAR(2)', 'sType' => 'CHAR(2)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => FALSE, 'sDefault' => false,
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
'D3COUNTRYNAME' => array( 'D3COUNTRYNAME' => array(
'sTableName' => 'd3geoip', 'sTableName' => 'd3geoip',
'sFieldName' => 'D3COUNTRYNAME', 'sFieldName' => 'D3COUNTRYNAME',
'sType' => 'VARCHAR(50)', 'sType' => 'VARCHAR(50)',
'blNull' => FALSE, 'blNull' => false,
'sDefault' => FALSE, 'sDefault' => false,
'sComment' => '', 'sComment' => '',
'sExtra' => '', 'sExtra' => '',
'blMultilang' => FALSE, 'blMultilang' => false,
), ),
); );
@ -175,7 +177,7 @@ zQ9';
*/ */
public function checkGeoIpTableExist() public function checkGeoIpTableExist()
{ {
return $this->_checkTableExist('d3geoip'); return $this->_checkTableNotExist('d3geoip');
} }
/** /**
@ -183,13 +185,9 @@ zQ9';
*/ */
public function updateGeoIpTableExist() public function updateGeoIpTableExist()
{ {
$blRet = FALSE; $blRet = false;
if ($this->checkGeoIpTableExist()) if ($this->checkGeoIpTableExist()) {
{ $blRet = $this->_addTable2('d3geoip', $this->aFields, $this->aIndizes, 'GeoIP', 'MyISAM');
$aRet = $this->_addTable('d3geoip', $this->aFields, $this->aIndizes, 'GeoIP', 'MyISAM');
$blRet = $aRet['blRet'];
$this->_setActionLog('SQL', $aRet['sql'], __METHOD__);
$this->_setUpdateBreak(TRUE);
} }
return $blRet; return $blRet;
@ -223,9 +221,8 @@ zQ9';
*/ */
public function checkModCfgItemExist() public function checkModCfgItemExist()
{ {
$blRet = FALSE; $blRet = false;
foreach ($this->_getShopList() as $oShop) foreach ($this->getShopList() as $oShop) {
{
/** @var $oShop oxshop */ /** @var $oShop oxshop */
$aWhere = array( $aWhere = array(
'oxmodid' => $this->sModKey, 'oxmodid' => $this->sModKey,
@ -235,8 +232,7 @@ zQ9';
$blRet = $this->_checkTableItemNotExist('d3_cfg_mod', $aWhere); $blRet = $this->_checkTableItemNotExist('d3_cfg_mod', $aWhere);
if ($blRet) if ($blRet) {
{
return $blRet; return $blRet;
} }
} }
@ -249,12 +245,10 @@ zQ9';
*/ */
public function updateModCfgItemExist() public function updateModCfgItemExist()
{ {
$blRet = FALSE; $blRet = false;
if ($this->checkModCfgItemExist()) if ($this->checkModCfgItemExist()) {
{ foreach ($this->getShopList() as $oShop) {
foreach ($this->_getShopList() as $oShop)
{
/** @var $oShop oxshop */ /** @var $oShop oxshop */
$aWhere = array( $aWhere = array(
'oxmodid' => $this->sModKey, 'oxmodid' => $this->sModKey,
@ -262,8 +256,7 @@ zQ9';
'oxnewrevision' => $this->sModRevision, 'oxnewrevision' => $this->sModRevision,
); );
if ($this->_checkTableItemNotExist('d3_cfg_mod', $aWhere)) if ($this->_checkTableItemNotExist('d3_cfg_mod', $aWhere)) {
{
// update don't use this property // update don't use this property
unset($aWhere['oxnewrevision']); unset($aWhere['oxnewrevision']);
@ -271,103 +264,98 @@ zQ9';
array ( array (
'fieldname' => 'OXID', 'fieldname' => 'OXID',
'content' => "md5('" . $this->sModKey . " " . $oShop->getId() . " de')", 'content' => "md5('" . $this->sModKey . " " . $oShop->getId() . " de')",
'force_update' => TRUE, 'force_update' => true,
'use_quote' => FALSE, 'use_quote' => false,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXSHOPID', 'fieldname' => 'OXSHOPID',
'content' => $oShop->getId(), 'content' => $oShop->getId(),
'force_update' => TRUE, 'force_update' => true,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXMODID', 'fieldname' => 'OXMODID',
'content' => $this->sModKey, 'content' => $this->sModKey,
'force_update' => TRUE, 'force_update' => true,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXNAME', 'fieldname' => 'OXNAME',
'content' => $this->sModName, 'content' => $this->sModName,
'force_update' => TRUE, 'force_update' => true,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXACTIVE', 'fieldname' => 'OXACTIVE',
'content' => "0", 'content' => "0",
'force_update' => FALSE, 'force_update' => false,
'use_quote' => FALSE, 'use_quote' => false,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXBASECONFIG', 'fieldname' => 'OXBASECONFIG',
'content' => $this->sBaseConf, 'content' => $this->sBaseConf,
'force_update' => TRUE, 'force_update' => true,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXSERIAL', 'fieldname' => 'OXSERIAL',
'content' => "", 'content' => "",
'force_update' => FALSE, 'force_update' => false,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXINSTALLDATE', 'fieldname' => 'OXINSTALLDATE',
'content' => "NOW()", 'content' => "NOW()",
'force_update' => TRUE, 'force_update' => true,
'use_quote' => FALSE, 'use_quote' => false,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXVERSION', 'fieldname' => 'OXVERSION',
'content' => $this->sModVersion, 'content' => $this->sModVersion,
'force_update' => TRUE, 'force_update' => true,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXSHOPVERSION', 'fieldname' => 'OXSHOPVERSION',
'content' => oxRegistry::getConfig()->getEdition(), 'content' => oxRegistry::getConfig()->getEdition(),
'force_update' => TRUE, 'force_update' => true,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array ( array (
'fieldname' => 'OXREQUIREMENTS', 'fieldname' => 'OXREQUIREMENTS',
'content' => $this->sRequirements, 'content' => $this->sRequirements,
'force_update' => TRUE, 'force_update' => true,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array( array(
'fieldname' => 'OXVALUE', 'fieldname' => 'OXVALUE',
'content' => $this->sBaseValue, 'content' => $this->sBaseValue,
'force_update' => FALSE, 'force_update' => false,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
), ),
array( array(
'fieldname' => 'OXNEWREVISION', 'fieldname' => 'OXNEWREVISION',
'content' => $this->sModRevision, 'content' => $this->sModRevision,
'force_update' => TRUE, 'force_update' => true,
'use_quote' => TRUE, 'use_quote' => true,
'use_multilang' => FALSE, 'use_multilang' => false,
) )
); );
$aRet = $this->_updateTableItem('d3_cfg_mod', $aInsertFields, $aWhere); $blRet = $this->_updateTableItem2('d3_cfg_mod', $aInsertFields, $aWhere);
$blRet = $aRet['blRet'];
$this->_setActionLog('SQL', $aRet['sql'], __METHOD__); if ($this->getStepByStepMode()) {
$this->_setUpdateBreak(FALSE);
if ($this->getStepByStepMode())
{
break; break;
} }
} }
@ -383,7 +371,7 @@ zQ9';
public function checkGeoIpFields() public function checkGeoIpFields()
{ {
/** @var $oShop oxshop */ /** @var $oShop oxshop */
$oShop = $this->_getShopList()->current(); $oShop = $this->getShopList()->current();
$this->aFields['D3GEOIPSHOP']['sDefault'] = $oShop->getId(); $this->aFields['D3GEOIPSHOP']['sDefault'] = $oShop->getId();
return $this->checkFields(); return $this->checkFields();
@ -396,9 +384,25 @@ zQ9';
public function fixGeoIpFields() public function fixGeoIpFields()
{ {
/** @var $oShop oxshop */ /** @var $oShop oxshop */
$oShop = $this->_getShopList()->current(); $oShop = $this->getShopList()->current();
$this->aFields['D3GEOIPSHOP']['sDefault'] = $oShop->getId(); $this->aFields['D3GEOIPSHOP']['sDefault'] = $oShop->getId();
return $this->fixFields(); 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_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' => 'Optionen',
'D3_GEOIP_SET_OPTIONS_CHANGESHOP' => 'Mandant wechseln, wenn eingestellt (nur EE)', '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_CHANGECURR' => 'Währung wechseln, wenn eingestellt',
'D3_GEOIP_SET_OPTIONS_CHANGELANG' => 'Sprache 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_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' => 'IP-Einstellungen',
'D3_GEOIP_SET_IP_TESTIP' => 'statt Kunden-IP immer diese IP-Adresse verwenden', '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', '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_OR' => 'oder',
'D3_GEOIP_DISABLED' => '(deaktiviert)', 'D3_GEOIP_DISABLED' => '(deaktiviert)',
'D3_GEOIP_SELURL' => 'zu wechselnde URL', '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_TITLE' => 'D³ GeoIP Vorauswahl',
'D3_GEOIP_METADATA_DESC' => 'Begrüßen Sie Ihre Kunden in seiner Landessprache.', '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"> <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{ fieldset{
border: 1px inset black; border: 1px inset black;
background-color: #F0F0F0; background-color: #F0F0F0;
@ -146,56 +119,56 @@ td.edittext {
</a> </a>
<dl> <dl>
<dt> <dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP"}] <label for="blChangeShop">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP"}]</label>
</dt> </dt>
<dd> <dd>
<input type="hidden" name="value[blChangeShop]" value="0"> <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"}] [{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP_DESC"}]
</dd> </dd>
<div class="spacer"></div> <div class="spacer"></div>
</dl> </dl>
<dl> <dl>
<dt> <dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGECURR"}] <label for="blChangeCurr">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGECURR"}]</label>
</dt> </dt>
<dd> <dd>
<input type="hidden" name="value[blChangeCurr]" value="0"> <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"}] [{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGECURR_DESC"}]
</dd> </dd>
<div class="spacer"></div> <div class="spacer"></div>
</dl> </dl>
<dl> <dl>
<dt> <dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGELANG"}] <label for="blChangeLang">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGELANG"}]</label>
</dt> </dt>
<dd> <dd>
<input type="hidden" name="value[blChangeLang]" value="0"> <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"}] [{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGELANG_DESC"}]
</dd> </dd>
<div class="spacer"></div> <div class="spacer"></div>
</dl> </dl>
<dl> <dl>
<dt> <dt>
[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGEURL"}] <label for="blChangeURL">[{oxmultilang ident="D3_GEOIP_SET_OPTIONS_CHANGEURL"}]</label>
</dt> </dt>
<dd> <dd>
<input type="hidden" name="value[blChangeURL]" value="0"> <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"}] [{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGEURL_DESC"}]
</dd> </dd>
<div class="spacer"></div> <div class="spacer"></div>
</dl> </dl>
<dl> <dl>
<dt> <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 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> </dt>
<dd> <dd>
<select size="5" name="value[sFallbackCountryId]"> <select id="sFallbackCountryId" size="5" name="value[sFallbackCountryId]">
[{foreach from=$oView->getCountryList() item="oCountry"}] [{foreach from=$oView->getCountryList() item="oCountry"}]
<option value="[{$oCountry->getId()}]" [{if $edit->getValue('sFallbackCountryId') == $oCountry->getId()}] selected[{/if}]>[{$oCountry->oxcountry__oxtitle->value}]</option> <option value="[{$oCountry->getId()}]" [{if $edit->getValue('sFallbackCountryId') == $oCountry->getId()}] selected[{/if}]>[{$oCountry->oxcountry__oxtitle->value}]</option>
[{/foreach}] [{/foreach}]
@ -216,24 +189,24 @@ td.edittext {
</a> </a>
<dl> <dl>
<dt> <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 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> </dt>
<dd> <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"}] [{oxinputhelp ident="D3_GEOIP_SET_IP_TESTIP_DESC"}]
</dd> </dd>
<div class="spacer"></div> <div class="spacer"></div>
</dl> </dl>
<dl> <dl>
<dt> <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 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> </dt>
<dd> <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"}] [{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> <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}] [{/foreach}]
@ -244,10 +217,10 @@ td.edittext {
</dl> </dl>
<dl> <dl>
<dt> <dt>
[{oxmultilang ident="D3_GEOIP_SET_IP_CHECKIP"}] <label for="sCheckIp">[{oxmultilang ident="D3_GEOIP_SET_IP_CHECKIP"}]</label>
</dt> </dt>
<dd> <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"}] [{oxinputhelp ident="D3_GEOIP_SET_IP_CHECKIP_DESC"}]
[{if $edit->getValue('sCheckIp')}] [{if $edit->getValue('sCheckIp')}]
@ -264,7 +237,7 @@ td.edittext {
<td class="edittext ext_edittext" align="left"> <td class="edittext ext_edittext" align="left">
<span class="d3modcfg_btn icon status_ok"> <span class="d3modcfg_btn icon status_ok">
<input type="submit" name="save" value="[{oxmultilang ident="D3_GENERAL_GEOIP_SAVE"}]"> <input type="submit" name="save" value="[{oxmultilang ident="D3_GENERAL_GEOIP_SAVE"}]">
<div></div> <span></span>
</span> </span>
</td> </td>
</tr> </tr>

View File

@ -44,10 +44,10 @@
<table cellspacing="0" cellpadding="0" border="0"> <table cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td class="edittext" width="120"> <td class="edittext" width="120">
[{oxmultilang ident="D3_GEOIP_SELSHOP"}]: <label for="d3geoipshop">[{oxmultilang ident="D3_GEOIP_SELSHOP"}]:</label>
</td> </td>
<td class="edittext"> <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> <option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELSHOP"}]</option>
[{foreach from=$oView->getShopList() item=shop}] [{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> <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>
<tr> <tr>
<td class="edittext"> <td class="edittext">
[{oxmultilang ident="D3_GEOIP_SELLANG"}]: <label for="d3geoiplang">[{oxmultilang ident="D3_GEOIP_SELLANG"}]:</label>
</td> </td>
<td class="edittext"> <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> <option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELLANG"}]</option>
[{foreach from=$oView->getLangList() item=lang}] [{foreach from=$oView->getLangList() item=lang}]
<option value="[{$lang->id}]" [{if $edit->oxcountry__d3geoiplang->value == $lang->id}]selected[{/if}]>[{$lang->name}]</option> <option value="[{$lang->id}]" [{if $edit->oxcountry__d3geoiplang->value == $lang->id}]selected[{/if}]>[{$lang->name}]</option>
@ -70,10 +70,10 @@
</tr> </tr>
<tr> <tr>
<td class="edittext"> <td class="edittext">
[{oxmultilang ident="D3_GEOIP_SELCUR"}]: <label for="d3geoipcur">[{oxmultilang ident="D3_GEOIP_SELCUR"}]:</label>
</td> </td>
<td class="edittext"> <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> <option value="-1">[{oxmultilang ident="D3_GEOIP_CUSTSELCUR"}]</option>
[{foreach from=$oView->getCurList() item=cur}] [{foreach from=$oView->getCurList() item=cur}]
<option value="[{$cur->id}]" [{if $edit->oxcountry__d3geoipcur->value == $cur->id}]selected[{/if}]>[{$cur->name}] ([{$cur->sign}])</option> <option value="[{$cur->id}]" [{if $edit->oxcountry__d3geoipcur->value == $cur->id}]selected[{/if}]>[{$cur->name}] ([{$cur->sign}])</option>
@ -96,13 +96,12 @@
<!-- Anfang rechte Seite --> <!-- Anfang rechte Seite -->
<td valign="top" class="edittext" align="left" width="45%"> <td valign="top" class="edittext" align="left" width="45%">
<table cellspacing="0" cellpadding="0" border="0"> <table cellspacing="0" cellpadding="0" border="0">
<tr> <tr>
<td class="edittext" width="120"> <td class="edittext" width="120">
[{oxmultilang ident="D3_GEOIP_SELURL"}]: <label for="d3geoipurl">[{oxmultilang ident="D3_GEOIP_SELURL"}]:</label>
</td> </td>
<td class="edittext"> <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"}] [{oxinputhelp ident="D3_GEOIP_SELURL_DESC"}]
</td> </td>
</tr> </tr>
@ -112,7 +111,6 @@
</tr> </tr>
</table> </table>
</form> </form>
[{include file="bottomnaviitem.tpl"}] [{include file="bottomnaviitem.tpl"}]