merge rel_3.x changes to trunk

This commit is contained in:
Daniel Seifert 2015-12-21 14:38:34 +00:00
commit df4a861c6a
18 changed files with 1422 additions and 608 deletions

7
.gitattributes vendored
View File

@ -1,19 +1,18 @@
* text=auto !eol
/Doxyfile -text
copy_this/.noencode -text
copy_this/modules/d3/d3geoip/IntelliSenseHelper.php -text
copy_this/modules/d3/d3geoip/components/d3cmp_geoip.php -text
copy_this/modules/d3/d3geoip/controllers/admin/d3_cfg_geoipset.php -text
copy_this/modules/d3/d3geoip/controllers/admin/d3_cfg_geoipset_licence.php -text
copy_this/modules/d3/d3geoip/controllers/admin/d3_cfg_geoipset_list.php -text
copy_this/modules/d3/d3geoip/controllers/admin/d3_cfg_geoipset_main.php -text
copy_this/modules/d3/d3geoip/controllers/admin/d3_country_geoip.php -text
copy_this/modules/d3/d3geoip/d3_geoip_stub.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

@ -1 +1 @@
copyAsIsFiles = modules/d3/d3geoip/controllers, modules/d3/d3geoip/models/d3geoip_update.php, modules/d3/d3geoip/modules/components, modules/d3/d3geoip/views, modules/d3/d3geoip/d3_geoip_stub.php, modules/d3/d3geoip/metadata.php
copyAsIsFiles = modules/d3/d3geoip/components, modules/d3/d3geoip/controllers, modules/d3/d3geoip/models/d3geoip_update.php, modules/d3/d3geoip/views, modules/d3/d3geoip/IntelliSenseHelper.php, modules/d3/d3geoip/metadata.php

View File

@ -1,5 +1,4 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
@ -10,23 +9,29 @@
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <ds@shopmodule.com>
* @copyright © Data Development, Thomas Dartsch
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_oxcmp_cur_geoip extends d3_oxcmp_cur_geoip_parent
class d3cmp_geoip extends oxView
{
private $_sModId = 'd3_geoip';
/**
* Marking object as component
*
* @var bool
*/
protected $_blIsComponent = true;
private $_sModId = 'd3_geoip';
/**
* @return null
*/
public function init()
{
if (d3_cfg_mod::get($this->_sModId)->isActive())
{
if (d3_cfg_mod::get($this->_sModId)->hasDebugMode())
{
if (d3_cfg_mod::get($this->_sModId)->isActive()) {
if (d3_cfg_mod::get($this->_sModId)->hasDebugMode()) {
/** @var $oGeoIp d3geoip */
$oGeoIp = oxNew('d3geoip');
echo $oGeoIp->getIP();
@ -35,9 +40,9 @@ class d3_oxcmp_cur_geoip extends d3_oxcmp_cur_geoip_parent
/** @var $oLocation d3geoip */
$oLocation = oxNew('d3geoip');
$oLocation->setCountryCurrency();
}
$oLocation->setCountryLanguage();
}
return parent::init();
parent::init();
}
}

View File

@ -28,4 +28,4 @@ class d3_cfg_geoipset extends d3_cfg_mod_
return parent::render();
}
}
}

View File

@ -21,4 +21,4 @@ class d3_cfg_geoipset_licence extends d3_cfg_mod_licence
protected $_hasNewsletterForm = false;
protected $_sMenuItemTitle = 'd3mxgeoip';
protected $_sMenuSubItemTitle = 'd3mxgeoip_settings';
}
}

View File

@ -38,4 +38,4 @@ class d3_cfg_geoipset_list extends d3_cfg_mod_list
return $sRet;
}
}
}

View File

@ -18,7 +18,7 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
{
protected $_sModId = 'd3_geoip';
protected $_sThisTemplate = "d3_cfg_geoipset_main.tpl";
protected $_blHasDebugSwitch = TRUE;
protected $_blHasDebugSwitch = true;
protected $_sDebugHelpTextIdent = 'D3_GEOIP_SET_DEBUG_DESC';
/**
@ -33,12 +33,9 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
$oD3GeoIP = oxNew('d3geoip');
$oCountry = $oD3GeoIP->getUserLocationCountryObject($sIP);
if ($oCountry->getId())
{
if ($oCountry->getId()) {
$sTitle = $oCountry->getFieldData('oxtitle');
}
else
{
} else {
$sTitle = oxRegistry::getLang()->translateString('D3_GEOIP_SET_IP_CHECKIP_NOTSET');
}
@ -79,7 +76,9 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
$oCountryList = oxNew('oxcountrylist');
$oListObject = $oCountryList->getBaseObject();
$sFieldList = $oListObject->getSelectFields();
$sQ = "select (SELECT d3startip FROM ".$oGeoIp->getViewName()." WHERE D3ISO = " .$oListObject->getViewName(). ".oxisoalpha2 LIMIT 1) as IP, $sFieldList from " . $oListObject->getViewName();
$sQ = "select (SELECT d3startip FROM ".$oGeoIp->getViewName().
" WHERE D3ISO = " .$oListObject->getViewName(). ".
oxisoalpha2 LIMIT 1) as IP, $sFieldList from " . $oListObject->getViewName();
$oCountryList->selectString($sQ);
@ -87,4 +86,4 @@ class d3_cfg_geoipset_main extends d3_cfg_mod_main
return $oCountryList;
}
}
}

View File

@ -31,9 +31,8 @@ class d3_country_geoip extends oxAdminView
*/
public function render()
{
if ( !oxRegistry::getConfig()->getConfigParam( 'blAllowSharedEdit' ) )
{
$this->addTplParam('readonly', TRUE);
if (false == oxRegistry::getConfig()->getConfigParam('blAllowSharedEdit')) {
$this->addTplParam('readonly', true);
}
$ret = parent::render();
@ -41,59 +40,49 @@ class d3_country_geoip extends oxAdminView
$soxId = oxRegistry::getConfig()->getRequestParameter("oxid");
// check if we right now saved a new entry
$sSavedID = oxRegistry::getConfig()->getRequestParameter("saved_oxid");
if ( ($soxId == "-1" || !isset( $soxId)) && isset( $sSavedID) )
{
if (($soxId == "-1" || !isset($soxId)) && isset($sSavedID)) {
$soxId = $sSavedID;
oxRegistry::getSession()->deleteVariable("saved_oxid");
$this->addTplParam("oxid",$soxId);
$this->addTplParam("oxid", $soxId);
// for reloading upper frame
$this->addTplParam("updatelist", "1");
}
if ( $soxId != "-1" && isset( $soxId))
{
if ($soxId != "-1" && isset($soxId)) {
// load object
/** @var $oCountry oxcountry */
$oCountry = oxNew( "oxcountry" );
$oCountry->loadInLang( $this->_iEditLang, $soxId );
if ($oCountry->isForeignCountry())
{
$this->addTplParam("blForeignCountry", TRUE);
}
else
{
$this->addTplParam("blForeignCountry", FALSE);
$oCountry = oxNew("oxcountry");
$oCountry->loadInLang($this->_iEditLang, $soxId);
if ($oCountry->isForeignCountry()) {
$this->addTplParam("blForeignCountry", true);
} else {
$this->addTplParam("blForeignCountry", false);
}
$oOtherLang = $oCountry->getAvailableInLangs();
if (!isset($oOtherLang[$this->_iEditLang]))
{
$oCountry->loadInLang( key($oOtherLang), $soxId );
if (!isset($oOtherLang[$this->_iEditLang])) {
$oCountry->loadInLang(key($oOtherLang), $soxId);
}
$this->oCountry = $oCountry;
$this->addTplParam("edit", $oCountry);
// remove already created languages
$aLang = array_diff (oxRegistry::getLang()->getLanguageNames(), $oOtherLang );
$aLang = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
if ( count( $aLang))
{
if (count($aLang)) {
$this->addTplParam("posslang", $aLang);
}
foreach ( $oOtherLang as $id => $language)
{
foreach ($oOtherLang as $id => $language) {
$oLang= new stdClass();
$oLang->sLangDesc = $language;
$oLang->selected = ($id == $this->_iEditLang);
$this->_aViewData["otherlang"][$id] = clone $oLang;
}
}
else
{
$this->addTplParam("blForeignCountry", TRUE);
} else {
$this->addTplParam("blForeignCountry", true);
}
$this->oShopList = oxNew('oxshoplist');
@ -128,38 +117,33 @@ class d3_country_geoip extends oxAdminView
public function save()
{
//allow malladmin only to perform this action
if ( !oxRegistry::getConfig()->getConfigParam( 'blAllowSharedEdit' ) )
{
if (false == oxRegistry::getConfig()->getConfigParam('blAllowSharedEdit')) {
return;
}
$soxId = oxRegistry::getConfig()->getRequestParameter("oxid");
$aParams = oxRegistry::getConfig()->getRequestParameter("editval" );
$aParams = oxRegistry::getConfig()->getRequestParameter("editval");
/** @var $oCountry oxcountry */
$oCountry = oxNew( "oxcountry" );
$oCountry = oxNew("oxcountry");
if ( $soxId != "-1")
{
$oCountry->loadInLang( $this->_iEditLang, $soxId );
}
else
{
$aParams['oxcountry__oxid'] = NULL;
if ($soxId != "-1") {
$oCountry->loadInLang($this->_iEditLang, $soxId);
} else {
$aParams['oxcountry__oxid'] = null;
}
$oCountry->setLanguage(0);
$oCountry->assign( $aParams );
$oCountry->assign($aParams);
$oCountry->setLanguage($this->_iEditLang);
$oCountry = oxRegistry::get('oxUtilsFile')->processFiles( $oCountry );
$oCountry = oxRegistry::get('oxUtilsFile')->processFiles($oCountry);
$oCountry->save();
$this->addTplParam("updatelist", "1");
// set oxid if inserted
if ( $soxId == "-1")
{
oxRegistry::getSession()->setVariable( "saved_oxid", $oCountry->getId());
if ($soxId == "-1") {
oxRegistry::getSession()->setVariable("saved_oxid", $oCountry->getId());
}
}
@ -176,25 +160,31 @@ class d3_country_geoip extends oxAdminView
*/
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');
}
else
{
} else {
$sShopId = oxRegistry::getConfig()->getActiveView()->getViewConfig()->getActiveShopId();
}
$sQ = "select DECODE( oxvarvalue, '".$this->getConfig()->getConfigParam( 'sConfigKey' )."') as oxvarvalue from oxconfig where oxshopid = '".$sShopId."' AND oxvarname = 'aCurrencies'";
$sQ = "select DECODE( oxvarvalue, '".oxRegistry::getConfig()->getConfigParam('sConfigKey').
"') as oxvarvalue from oxconfig where oxshopid = '".$sShopId."' AND oxvarname = 'aCurrencies'";
$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];
@ -211,12 +201,9 @@ class d3_country_geoip extends oxAdminView
*/
public function getLangList()
{
if ($this->getModCfgValue('blChangeShop') && $this->oCountry->getFieldData('d3geoipshop'))
{
if ($this->getModCfgValue('blChangeShop') && $this->oCountry->getFieldData('d3geoipshop')) {
$sShopId = $this->oCountry->getFieldData('d3geoipshop');
}
else
{
} else {
$sShopId = oxRegistry::getConfig()->getActiveView()->getViewConfig()->getActiveShopId();
}
@ -224,60 +211,50 @@ class d3_country_geoip extends oxAdminView
$aLangParams = oxRegistry::getConfig()->getShopConfVar('aLanguageParams', $sShopId);
$aConfLanguages = oxRegistry::getConfig()->getShopConfVar('aLanguages', $sShopId);
if ( is_array( $aConfLanguages ) )
{
if (is_array($aConfLanguages)) {
$i = 0;
reset( $aConfLanguages );
while ( list( $key, $val ) = each( $aConfLanguages ) )
{
if (is_array($aLangParams) )
{
reset($aConfLanguages);
while ((list($key, $val) = each($aConfLanguages))) {
if (is_array($aLangParams)) {
//skipping non active languages
if ( !$aLangParams[$key]['active'] )
{
if (false == $aLangParams[$key]['active']) {
$i++;
continue;
continue;
}
}
if ( $val)
{
if ($val) {
$oLang = new stdClass();
if ( isset($aLangParams[$key]['baseId']) )
{
if (isset($aLangParams[$key]['baseId'])) {
$oLang->id = $aLangParams[$key]['baseId'];
}
else
{
} else {
$oLang->id = $i;
}
$oLang->oxid = $key;
$oLang->abbr = $key;
$oLang->name = $val;
if ( is_array($aLangParams) )
{
if (is_array($aLangParams)) {
$oLang->active = $aLangParams[$key]['active'];
$oLang->sort = $aLangParams[$key]['sort'];
}
if ( isset( $iLanguage ) && $oLang->id == $iLanguage )
{
if (isset($iLanguage) && $oLang->id == $iLanguage) {
$oLang->selected = 1;
}
else
{
} else {
$oLang->selected = 0;
}
if ($oLang->active)
if ($oLang->active) {
$aLanguages[$oLang->id] = $oLang;
}
}
++$i;
}
}
if (is_array($aLangParams) ) {
uasort( $aLanguages, array($this, '_sortLanguagesCallback') );
if (is_array($aLangParams)) {
uasort($aLanguages, array($this, '_sortLanguagesCallback'));
}
return $aLanguages;
@ -288,20 +265,16 @@ class d3_country_geoip extends oxAdminView
* @param $oLang2
* @return int
*/
protected function _sortLanguagesCallback( $oLang1, $oLang2 )
protected function _sortLanguagesCallback($oLang1, $oLang2)
{
$sSortParam = $this->_sDefSort;
$sVal1 = is_string($oLang1->$sSortParam) ? strtolower( $oLang1->$sSortParam ) : $oLang1->$sSortParam;
$sVal2 = is_string($oLang2->$sSortParam) ? strtolower( $oLang2->$sSortParam ) : $oLang2->$sSortParam;
$sVal1 = is_string($oLang1->$sSortParam) ? strtolower($oLang1->$sSortParam) : $oLang1->$sSortParam;
$sVal2 = is_string($oLang2->$sSortParam) ? strtolower($oLang2->$sSortParam) : $oLang2->$sSortParam;
if ( $this->_sDefSortOrder == 'asc' )
{
if ($this->_sDefSortOrder == 'asc') {
return ($sVal1 < $sVal2) ? -1 : 1;
}
else
{
} else {
return ($sVal1 > $sVal2) ? -1 : 1;
}
}
}
}

View File

@ -15,30 +15,33 @@ $aModule = array(
'en' => '',
),
'thumbnail' => 'picture.png',
'version' => '3.0.0.2',
'version' => '3.0.1.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
'oxcmp_cur' => 'd3/d3geoip/modules/components/d3_oxcmp_cur_geoip',
'oxcmp_lang' => 'd3/d3geoip/modules/components/d3_oxcmp_lang_geoip',
),
'extend' => array(),
'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',
'd3cmp_geoip' => 'd3/d3geoip/components/d3cmp_geoip.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

@ -1,35 +0,0 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_oxcmp_lang_geoip extends d3_oxcmp_lang_geoip_parent
{
private $_sModId = "d3_geoip";
/**
* @return null
*/
public function init()
{
if (d3_cfg_mod::get($this->_sModId)->isActive())
{
/** @var $oLocation d3geoip */
$oLocation = oxNew('d3geoip');
$oLocation->setCountryLanguage();
}
return parent::init();
}
}

View File

@ -18,14 +18,14 @@ class d3geoip_update extends d3install_updatebase
{
public $sModKey = 'd3_geoip';
public $sModName = 'GeoIP';
public $sModVersion = '3.0.0.2';
public $sModRevision = '52';
public $sBaseConf = 'DSdWUJnZzd3RTd4aStQNjFBVnBkK3NFUmwzY2tiNHllWmFjSUZZOS9USTAzbHpHb241YWZTNThRWnpCV
XBnQ2J0STVReGNTQmVJQ0h3aXVYWVBKcWFuVzM2WVNwdld0cXZ3bEYzTWJRMnJTN2ZYMGFNMkFxT2VQe
CsxNzVVaytabkRBbCtJWnE1Y3lKZWdmaC9XNDhkZzhhQXhHc2FaZHlyejlSMFE1ZUJjNzA1M1dzSEJPQ
0NBNGZJbEpZNFVuMG1STEtQRkx1WDZZZzRndXF2OW1oUGdGb2tJZW1lQ09waE5FK29PYmpML2pRVkNaS
EdaS3RXUW5NZzJhUUF5ZlNIZ1h3MUo3QVpIeFUwL0lmajRTbWw2cmNsckpJVnFYQjFKWTd3RXUrMlhHK
zQ9';
public $sModVersion = '3.0.1.0';
public $sModRevision = '67';
public $sBaseConf = '5FibjlIQlRvbWMzY29mVi85RXFxbkc5bFI3R24rNkd5Y0lEcXJFOGhtaGExRVcyaEF6a281cVhRUXFMU
0d6dnNDbCtLRVdObFh3bnVEdUNRTFJrVlE5VGtsRkF3Tyt4TU1Pd290WDliOTQ2SUE5Skk0eTcxTGdlT
XZna0dhS2ZOekJUSC94ZUd5YmxXZzRXcG5QSWcvZnFJa1l0N1MrdWRZaFU1VG5nUGFwNEF1WTh6azNja
Gs3SmtzQ05SVjROSGdSZ2N0S3Q1TTV1RGlCSU5RZnh1dGVNNVd6bTBzMU1FdHFiNytJQldBRjRTNmx3U
VVlRkhrRzYxYUtpaWNBOUUrLzZ2YjN5SDM1cllVMTIrYUFPRnRYcFpibHVBQytEQVFnNFV0RWpFZXAwd
FE9';
public $sRequirements = '';
public $sBaseValue = '';
@ -40,6 +40,10 @@ zQ9';
'do' => 'fixGeoIpFields'),
array('check' => 'checkIndizes',
'do' => 'fixIndizes'),
array('check' => 'hasUnregisteredFiles',
'do' => 'showUnregisteredFiles'),
array('check' => 'checkRegisteredComponent',
'do' => 'registerComponent'),
array('check' => 'checkModCfgSameRevision',
'do' => 'updateModCfgSameRevision'),
);
@ -52,101 +56,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 +179,7 @@ zQ9';
*/
public function checkGeoIpTableExist()
{
return $this->_checkTableExist('d3geoip');
return $this->_checkTableNotExist('d3geoip');
}
/**
@ -183,13 +187,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 +223,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 +234,7 @@ zQ9';
$blRet = $this->_checkTableItemNotExist('d3_cfg_mod', $aWhere);
if ($blRet)
{
if ($blRet) {
return $blRet;
}
}
@ -249,12 +247,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 +258,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 +266,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 +373,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 +386,73 @@ 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'));
}
/**
* @return bool
*/
public function checkRegisteredComponent()
{
$sVarName = 'aUserComponentNames';
$sModuleId = '';
/** @var $oShop oxshop */
foreach ($this->getShopListByActiveModule('d3geoip') as $oShop) {
/** @var array $aUserComponents */
$aUserComponents = oxRegistry::getConfig()->getShopConfVar($sVarName, $oShop->getId(), $sModuleId);
if (false == $aUserComponents
|| false == $aUserComponents['d3cmp_geoip']
) {
return true;
}
}
return false;
}
/**
* @return bool
*/
public function registerComponent()
{
$blRet = true;
$sVarName = 'aUserComponentNames';
$sModuleId = '';
/** @var $oShop oxshop */
foreach ($this->getShopList() as $oShop) {
$aUserComponents = oxRegistry::getConfig()->getShopConfVar($sVarName, $oShop->getId(), $sModuleId);
if (false == $aUserComponents) {
$aUserComponents = array();
}
if (false == $aUserComponents['d3cmp_geoip']) {
$blDontUseCache = 1;
$aUserComponents['d3cmp_geoip'] = $blDontUseCache;
$this->fixOxconfigVariable($sVarName, $oShop->getId(), '', $aUserComponents, 'arr');
}
}
return $blRet;
}
}

View File

@ -20,48 +20,54 @@ $iLangNr = 0;
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
'charset' => 'ISO-8859-15',
'd3mxgeoip' => 'GeoIP',
'd3mxgeoip_settings' => 'Einstellungen',
'd3tbclgeoip_settings_main' => 'Grundeinstellungen',
'tbclcountry_geoip' => 'GeoIP-Kundenumleitungen',
'charset' => 'ISO-8859-15',
'd3mxgeoip' => 'GeoIP',
'd3mxgeoip_settings' => 'Einstellungen',
'd3tbclgeoip_settings_main' => 'Grundeinstellungen',
'tbclcountry_geoip' => 'GeoIP-Kundenumleitungen',
'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_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_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',
'D3_GEOIP_SET_IP_TESTCOUNTRY_INACTIVE' => '(inaktiv)',
'D3_GEOIP_SET_IP_CHECKIP' => 'diese IP-Adresse prüfen',
'D3_GEOIP_SET_IP_CHECKIP_NOTSET' => 'IP nicht zugewiesen oder Land nicht aktiv',
'D3_GENERAL_GEOIP_SAVE' => 'Speichern',
'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_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',
'D3_GEOIP_SET_IP_TESTCOUNTRY_INACTIVE' => '(inaktiv)',
'D3_GEOIP_SET_IP_CHECKIP' => 'diese IP-Adresse prüfen',
'D3_GEOIP_SET_IP_CHECKIP_NOTSET' => 'IP nicht zugewiesen oder Land nicht aktiv',
'D3_GENERAL_GEOIP_SAVE' => 'Speichern',
'D3_GEOIP_SELSHOP' => 'zuständiger Shop',
'D3_GEOIP_SELLANG' => 'vorgewählte Sprache',
'D3_GEOIP_SELCUR' => 'vorgewählte Währung',
'D3_GEOIP_CUSTSELSHOP' => ' - vom Kunden gewählter Shop - ',
'D3_GEOIP_CUSTSELLANG' => ' - vom Kunden gewählte Sprache - ',
'D3_GEOIP_CUSTSELCUR' => ' - vom Kunden gewählte Währung - ',
'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_SELSHOP' => 'zuständiger Shop',
'D3_GEOIP_SELLANG' => 'vorgewählte Sprache',
'D3_GEOIP_SELCUR' => 'vorgewählte Währung',
'D3_GEOIP_CUSTSELSHOP' => ' - vom Kunden gewählter Shop - ',
'D3_GEOIP_CUSTSELLANG' => ' - vom Kunden gewählte Sprache - ',
'D3_GEOIP_CUSTSELCUR' => ' - vom Kunden gewählte Währung - ',
'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_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_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.',
);
/*
[{ oxmultilang ident='ACTIONS_MAIN_YOUWANTTODELETE' }]
*/

View File

@ -2,9 +2,9 @@
<script type="text/javascript">
<!--
[{ if $updatelist == 1}]
UpdateList('[{ $oxid }]');
[{ /if}]
[{if $updatelist == 1}]
UpdateList('[{$oxid}]');
[{/if}]
function UpdateList( sID)
{
@ -47,11 +47,11 @@ function showFormatSettings(sElemId, visible, blUseOldElem)
sOldSettingElem = sElemId;
}
if (visible == true)
if (visible == true) {
document.getElementById(sElemId).style.display = 'block';
else
} else {
document.getElementById(sElemId).style.display = 'none';
}
}
-->
@ -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;
@ -110,26 +83,26 @@ td.edittext {
-->
</style>
[{ if $readonly}]
[{if $readonly}]
[{assign var="readonly" value="readonly disabled"}]
[{else}]
[{assign var="readonly" value=""}]
[{/if}]
<form name="transfer" id="transfer" action="[{ $oViewConf->getSelfLink() }]" method="post">
[{ $oViewConf->getHiddenSid() }]
<input type="hidden" name="oxid" value="[{ $oxid }]">
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="actshop" value="[{ $shop->id }]">
<input type="hidden" name="editlanguage" value="[{ $editlanguage }]">
<input type="hidden" name="actshop" value="[{$shop->id}]">
<input type="hidden" name="editlanguage" value="[{$editlanguage}]">
</form>
<form name="myedit" id="myedit" action="[{ $oViewConf->getSelfLink() }]" method="post">
[{ $oViewConf->getHiddenSid() }]
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="save">
<input type="hidden" name="oxid" value="[{ $oxid }]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{ $oxid }]">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<table border="0" width="98%">
<tr>
@ -146,61 +119,61 @@ 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}]>
[{ oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGESHOP_DESC" }]
<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}]>
[{ oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGECURR_DESC" }]
<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}]>
[{ oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGELANG_DESC" }]
<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}]>
[{ oxinputhelp ident="D3_GEOIP_SET_OPTIONS_CHANGEURL_DESC" }]
<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}]
</select>
[{ oxinputhelp ident="D3_GEOIP_SET_OPTIONS_NOCOUNTRY_DESC" }]
[{oxinputhelp ident="D3_GEOIP_SET_OPTIONS_NOCOUNTRY_DESC"}]
</dd>
<div class="spacer"></div>
</dl>
@ -216,39 +189,39 @@ 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')}]">
[{ oxinputhelp ident="D3_GEOIP_SET_IP_TESTIP_DESC" }]
<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}]
</select>
[{ oxinputhelp ident="D3_GEOIP_SET_IP_TESTCOUNTRY_DESC" }]
[{oxinputhelp ident="D3_GEOIP_SET_IP_TESTCOUNTRY_DESC"}]
</dd>
<div class="spacer"></div>
</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')}]">
[{ oxinputhelp ident="D3_GEOIP_SET_IP_CHECKIP_DESC" }]
<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')}]
[{$oView->getIpCountry($edit->getValue('sCheckIp'))}]
@ -259,13 +232,12 @@ td.edittext {
</div>
</div>
<table width="100%">
<tr>
<td class="edittext ext_edittext" align="left">
<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>
<input type="submit" name="save" value="[{oxmultilang ident="D3_GENERAL_GEOIP_SAVE"}]">
<span></span>
</span>
</td>
</tr>

View File

@ -2,40 +2,40 @@
<script type="text/javascript">
<!--
window.onload = function ()
{
[{ if $updatelist == 1}]
top.oxid.admin.updateList('[{ $oxid }]');
[{ /if}]
var oField = top.oxid.admin.getLockTarget();
oField.onchange = oField.onkeyup = oField.onmouseout = top.oxid.admin.unlockSave;
}
window.onload = function ()
{
[{if $updatelist == 1}]
top.oxid.admin.updateList('[{$oxid}]');
[{/if}]
var oField = top.oxid.admin.getLockTarget();
oField.onchange = oField.onkeyup = oField.onmouseout = top.oxid.admin.unlockSave;
}
//-->
</script>
[{ if $readonly }]
[{if $readonly}]
[{assign var="readonly" value="readonly disabled"}]
[{else}]
[{assign var="readonly" value=""}]
[{/if}]
<form name="transfer" id="transfer" action="[{ $oViewConf->getSelfLink() }]" method="post">
[{ $oViewConf->getHiddenSid() }]
<input type="hidden" name="oxid" value="[{ $oxid }]">
<input type="hidden" name="oxidCopy" value="[{ $oxid }]">
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="oxidCopy" value="[{$oxid}]">
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="language" value="[{ $actlang }]">
<input type="hidden" name="language" value="[{$actlang}]">
</form>
<form name="myedit" id="myedit" action="[{ $oViewConf->getSelfLink() }]" method="post">
[{ $oViewConf->getHiddenSid() }]
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="">
<input type="hidden" name="oxid" value="[{ $oxid }]">
<input type="hidden" name="voxid" value="[{ $oxid }]">
<input type="hidden" name="oxparentid" value="[{ $oxparentid }]">
<input type="hidden" name="editval[oxcountry__oxid]" value="[{ $oxid }]">
<input type="hidden" name="language" value="[{ $actlang }]">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="voxid" value="[{$oxid}]">
<input type="hidden" name="oxparentid" value="[{$oxparentid}]">
<input type="hidden" name="editval[oxcountry__oxid]" value="[{$oxid}]">
<input type="hidden" name="language" value="[{$actlang}]">
<table cellspacing="0" cellpadding="0" border="0" width="98%">
<tr>
@ -44,10 +44,10 @@ window.onload = function ()
<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 @@ window.onload = function ()
</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 @@ window.onload = function ()
</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 @@ window.onload = function ()
<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 @@ window.onload = function ()
<!-- 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 @@ window.onload = function ()
</tr>
</table>
</form>
[{include file="bottomnaviitem.tpl"}]

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.