ltsecurityinc安防产品在线商城代码
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package GeoIP Data for Magento 2 (System)
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
|
||||
<acl>
|
||||
<resources>
|
||||
<resource id="Magento_Backend::admin">
|
||||
<resource id="Magento_Backend::stores">
|
||||
<resource id="Magento_Backend::stores_settings">
|
||||
<resource id="Magento_Config::config">
|
||||
<resource id="Amasty_Geoip::amasty_geoip" title="Amasty Geoip Data" />
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
</acl>
|
||||
</config>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package GeoIP Data for Magento 2 (System)
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
|
||||
<event name="controller_action_predispatch_adminhtml_system_config_edit">
|
||||
<observer name="amasty_geoip_system_config" instance="Amasty\Geoip\Observer\Admin\SystemConfig" />
|
||||
</event>
|
||||
</config>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
|
||||
<router id="admin">
|
||||
<route id="amasty_geoip" frontName="amasty_geoip">
|
||||
<module name="Amasty_Geoip" />
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package GeoIP Data for Magento 2 (System)
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/system_file.xsd">
|
||||
<system>
|
||||
<section id="amgeoip" translate="label" type="text" sortOrder="70504" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Geo Ip Data</label>
|
||||
<tab>amasty</tab>
|
||||
<resource>Amasty_Geoip::amasty_geoip</resource>
|
||||
<group id="download_import" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Download and Import</label>
|
||||
<field id="download_import_button" translate="label comment" type="button" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<frontend_model>Amasty\Geoip\Block\Adminhtml\Settings\DownloadNImport</frontend_model>
|
||||
</field>
|
||||
</group>
|
||||
<group id="import" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Import</label>
|
||||
<field id="import_button" translate="label comment" type="button" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<frontend_model>Amasty\Geoip\Block\Adminhtml\Settings\Import</frontend_model>
|
||||
</field>
|
||||
</group>
|
||||
<group id="debug" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Debug</label>
|
||||
<field id="force_ip_enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Enable Force IP</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
</field>
|
||||
<field id="forced_ip" translate="label comment" sortOrder="20" type="text" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Force IP Address</label>
|
||||
<comment>You can set IP address for testing. Please be careful to avoid issues on production.</comment>
|
||||
<backend_model>Amasty\Geoip\Model\Config\BackendModel\IpValidation</backend_model>
|
||||
<validate>required-entry</validate>
|
||||
<depends>
|
||||
<field id="force_ip_enabled">1</field>
|
||||
</depends>
|
||||
</field>
|
||||
</group>
|
||||
</section>
|
||||
</system>
|
||||
</config>
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package GeoIP Data for Magento 2 (System)
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Store/etc/config.xsd">
|
||||
<default>
|
||||
<amgeoip>
|
||||
<general>
|
||||
<location_file_url>https://amasty.com/media/downloads/geoip/databases/GeoLite2-City-Locations-en.csv</location_file_url>
|
||||
<block_file_url>https://amasty.com/media/downloads/geoip/databases/GeoLite2-City-Blocks-IPv4.csv</block_file_url>
|
||||
<block_v6_file_url>https://amasty.com/media/downloads/geoip/databases/GeoLite2-City-Blocks-IPv6.csv</block_v6_file_url>
|
||||
<location_hash_url>https://amasty.com/media/downloads/geoip/databases/location_hash.md5</location_hash_url>
|
||||
<block_hash_url>https://amasty.com/media/downloads/geoip/databases/block_hash.md5</block_hash_url>
|
||||
<block_v6_hash_url>https://amasty.com/media/downloads/geoip/databases/block_hash_ipv6.md5</block_v6_hash_url>
|
||||
</general>
|
||||
</amgeoip>
|
||||
</default>
|
||||
</config>
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package GeoIP Data for Magento 2 (System)
|
||||
*/-->
|
||||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
|
||||
<table name="amasty_geoip_block" resource="default" engine="innodb" comment="Amasty Geoip Block Table">
|
||||
<column xsi:type="int" name="block_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Block Id"/>
|
||||
<column xsi:type="int" name="start_ip_num" padding="10" unsigned="true" nullable="false" identity="false" comment="Start Ip Num"/>
|
||||
<column xsi:type="int" name="end_ip_num" padding="10" unsigned="true" nullable="false" identity="false" comment="End Ip Num"/>
|
||||
<column xsi:type="int" name="geoip_loc_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Geoip Loc Id"/>
|
||||
<column xsi:type="text" name="postal_code" nullable="true" comment="Postal Code"/>
|
||||
<column xsi:type="float" name="latitude" scale="0" precision="10" unsigned="false" nullable="true" comment="Latitude"/>
|
||||
<column xsi:type="float" name="longitude" scale="0" precision="10" unsigned="false" nullable="true" comment="Longitude"/>
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="block_id"/>
|
||||
</constraint>
|
||||
<index referenceId="AMASTY_GEOIP_BLOCK_GEOIP_LOC_ID" indexType="btree">
|
||||
<column name="geoip_loc_id"/>
|
||||
</index>
|
||||
<index referenceId="AMASTY_GEOIP_BLOCK_START_IP_NUM_END_IP_NUM" indexType="btree">
|
||||
<column name="start_ip_num"/>
|
||||
<column name="end_ip_num"/>
|
||||
</index>
|
||||
</table>
|
||||
<table name="amasty_geoip_location" resource="default" engine="innodb" comment="Amasty Geoip Location Table">
|
||||
<column xsi:type="int" name="location_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Location Id"/>
|
||||
<column xsi:type="int" name="geoip_loc_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Geoip Loc Id"/>
|
||||
<column xsi:type="text" name="country" nullable="true" comment="Country"/>
|
||||
<column xsi:type="text" name="city" nullable="true" comment="City"/>
|
||||
<column xsi:type="text" name="region" nullable="true" comment="Region"/>
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="location_id"/>
|
||||
</constraint>
|
||||
<index referenceId="AMASTY_GEOIP_LOCATION_GEOIP_LOC_ID" indexType="btree">
|
||||
<column name="geoip_loc_id"/>
|
||||
</index>
|
||||
</table>
|
||||
<table name="amasty_geoip_block_v6" resource="default" engine="innodb" comment="Amasty Geoip Block Table IpV6">
|
||||
<column xsi:type="int" name="block_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Block Id"/>
|
||||
<column xsi:type="varchar" name="start_ip_num" nullable="false" length="40" comment="Start Ip Num"/>
|
||||
<column xsi:type="varchar" name="end_ip_num" nullable="false" length="40" comment="End Ip Num"/>
|
||||
<column xsi:type="int" name="geoip_loc_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Geoip Loc Id"/>
|
||||
<column xsi:type="text" name="postal_code" nullable="true" comment="Postal Code"/>
|
||||
<column xsi:type="float" name="latitude" scale="0" precision="10" unsigned="false" nullable="true" comment="Latitude"/>
|
||||
<column xsi:type="float" name="longitude" scale="0" precision="10" unsigned="false" nullable="true" comment="Longitude"/>
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="block_id"/>
|
||||
</constraint>
|
||||
<index referenceId="AMASTY_GEOIP_BLOCK_V6_GEOIP_LOC_ID" indexType="btree">
|
||||
<column name="geoip_loc_id"/>
|
||||
</index>
|
||||
<index referenceId="AMASTY_GEOIP_BLOCK_V6_START_IP_NUM_END_IP_NUM" indexType="btree">
|
||||
<column name="start_ip_num"/>
|
||||
<column name="end_ip_num"/>
|
||||
</index>
|
||||
</table>
|
||||
</schema>
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"amasty_geoip_block": {
|
||||
"column": {
|
||||
"block_id": true,
|
||||
"start_ip_num": true,
|
||||
"end_ip_num": true,
|
||||
"geoip_loc_id": true,
|
||||
"postal_code": true,
|
||||
"latitude": true,
|
||||
"longitude": true
|
||||
},
|
||||
"index": {
|
||||
"AMASTY_GEOIP_BLOCK_GEOIP_LOC_ID": true,
|
||||
"AMASTY_GEOIP_BLOCK_START_IP_NUM_END_IP_NUM": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true
|
||||
}
|
||||
},
|
||||
"amasty_geoip_location": {
|
||||
"column": {
|
||||
"location_id": true,
|
||||
"geoip_loc_id": true,
|
||||
"country": true,
|
||||
"city": true,
|
||||
"region": true
|
||||
},
|
||||
"index": {
|
||||
"AMASTY_GEOIP_LOCATION_GEOIP_LOC_ID": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true
|
||||
}
|
||||
},
|
||||
"amasty_geoip_block_v6": {
|
||||
"column": {
|
||||
"block_id": true,
|
||||
"start_ip_num": true,
|
||||
"end_ip_num": true,
|
||||
"geoip_loc_id": true,
|
||||
"postal_code": true,
|
||||
"latitude": true,
|
||||
"longitude": true
|
||||
},
|
||||
"index": {
|
||||
"AMASTY_GEOIP_BLOCK_V6_GEOIP_LOC_ID": true,
|
||||
"AMASTY_GEOIP_BLOCK_V6_START_IP_NUM_END_IP_NUM": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package GeoIP Data for Magento 2 (System)
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Amasty_Geoip">
|
||||
</module>
|
||||
</config>
|
||||
Reference in New Issue
Block a user