Commit 0adb7836 by LJM

Merge branch 'ysx-ip判断跳转页面-20231102' into dev/ver/1.0.0

parents ad432167 f56b11c3
Showing with 2413 additions and 282 deletions
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class InfoController extends Controller
{
//
public function info()
{
return view('info.index');
}
}
......@@ -38,6 +38,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\App\Http\Middleware\AddExtraDataToCookie::class,
\App\Http\Middleware\CheckIp::class,
],
'api' => [
......
<?php
namespace App\Http\Middleware;
use Closure;
class CheckIp
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
view()->share('is_disable_ip', 0);
//laravel get route name
$routeName = \Illuminate\Support\Facades\Route::currentRouteName();
if ($routeName == 'info') {
return $next($request);
}
$ip = $request->ip();
$result = geoip($ip);
if (in_array($result->iso_code, config('field.disable_ip_iso_code'))) {
view()->share('is_disable_ip', 1);
return redirect()->to('/info');
}
return $next($request);
}
}
......@@ -46,17 +46,27 @@ class BrandService
$letters = generate_letters();
$standardBrandList = [];
foreach ($standardBrandCache as $standardBrand) {
if (empty($standardBrand['brand_short_name_en'])) {
continue;
}
if ($standardBrand['status'] != 1) {
continue;
}
if ($standardBrand['is_show'] != 1) {
continue;
}
$matchLetter = false;
foreach ($letters as $letter) {
if (start_with(strtoupper($standardBrand['brand_name']), $letter)) {
if (empty($standardBrand['brand_name_en'])) {
//brand_short_name_en
if (start_with(strtoupper($standardBrand['brand_short_name_en']), $letter)) {
if (empty($standardBrand['brand_short_name_en'])) {
continue;
}
$standardBrandList[$letter][] = $standardBrand;
$matchLetter = true;
}
}
if (!$matchLetter && !empty($standardBrand['brand_name_en'])) {
if (!$matchLetter && !empty($standardBrand['brand_short_name_en'])) {
$standardBrandList['#'][] = $standardBrand;
}
}
......
......@@ -293,7 +293,7 @@ class CartService
$info["brand_name"] = $brandName;
}
$original_price = $info["original_price"];
$original_price = $info["ladder_price"];
usort($original_price, function ($current, $next) { //原始价格倒叙
return $current['purchases'] < $next['purchases'];
......
......@@ -10,6 +10,7 @@ class ClassService
public static function getClassificationForHome()
{
$cache = Redis::get('semour_classification_cache');
// $cache = [];
if ($cache) {
return json_decode($cache, true);
}
......
......@@ -47,7 +47,6 @@ class UserService
AutoAssignCustomerService::incAssignNumByDepartmentId($assign['department_id']);
}
$salesEmail = CmsUserModel::where('userId', $salesId)->value('email');
$salesEmail = 'zhy@ichunt.com';
try {
//发送提醒邮件
Mail::to($salesEmail)->send(new UserRegisterNotification());
......
......@@ -12,11 +12,13 @@
"ext-json": "*",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"geoip2/geoip2": "^2.13",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"laravel/framework": "^7.29",
"laravel/tinker": "^2.5",
"laravel/ui": "2.*",
"loilo/fuse": "^3.6"
"loilo/fuse": "^3.6",
"torann/geoip": "^1.2"
},
"require-dev": {
"facade/ignition": "^2.0",
......
......@@ -20,5 +20,13 @@ return [
'Actives' => 'https://img.ichunt.com/images/cms/202009/15/6714a6cee89c8a258a9b8ed2642131ba.png',
'Passives' => 'https://img.ichunt.com/images/cms/202009/15/2e95ec65caf11787fa13ac60f90bf2f2.png',
'Modules & Devices & Products' => 'https://img.ichunt.com/images/cms/202009/15/37b1c3bb9823c5303cc22962695d2e58.jpg',
],
'disable_ip_iso_code' => [
'US',
'CA',
'GB',
'AU',
'RU',
'IR',
]
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for when a location is not found
| for the IP provided.
|
*/
'log_failures' => true,
/*
|--------------------------------------------------------------------------
| Include Currency in Results
|--------------------------------------------------------------------------
|
| When enabled the system will do it's best in deciding the user's currency
| by matching their ISO code to a preset list of currencies.
|
*/
'include_currency' => true,
/*
|--------------------------------------------------------------------------
| Default Service
|--------------------------------------------------------------------------
|
| Here you may specify the default storage driver that should be used
| by the framework.
|
| Supported: "maxmind_database", "maxmind_api", "ipapi"
|
*/
'service' => 'maxmind_database',
/*
|--------------------------------------------------------------------------
| Storage Specific Configuration
|--------------------------------------------------------------------------
|
| Here you may configure as many storage drivers as you wish.
|
*/
'services' => [
'maxmind_database' => [
'class' => \Torann\GeoIP\Services\MaxMindDatabase::class,
'database_path' => storage_path('app/GeoLite2-Country.mmdb'),
//'update_url' => sprintf('https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=%s&suffix=tar.gz', env('MAXMIND_LICENSE_KEY')),
'locales' => ['en'],
],
'maxmind_api' => [
'class' => \Torann\GeoIP\Services\MaxMindWebService::class,
'user_id' => env('MAXMIND_USER_ID'),
'license_key' => env('MAXMIND_LICENSE_KEY'),
'locales' => ['en'],
],
'ipapi' => [
'class' => \Torann\GeoIP\Services\IPApi::class,
'secure' => true,
'key' => env('IPAPI_KEY'),
'continent_path' => storage_path('app/continents.json'),
'lang' => 'en',
],
'ipgeolocation' => [
'class' => \Torann\GeoIP\Services\IPGeoLocation::class,
'secure' => true,
'key' => env('IPGEOLOCATION_KEY'),
'continent_path' => storage_path('app/continents.json'),
'lang' => 'en',
],
'ipdata' => [
'class' => \Torann\GeoIP\Services\IPData::class,
'key' => env('IPDATA_API_KEY'),
'secure' => true,
],
'ipfinder' => [
'class' => \Torann\GeoIP\Services\IPFinder::class,
'key' => env('IPFINDER_API_KEY'),
'secure' => true,
'locales' => ['en'],
],
],
/*
|--------------------------------------------------------------------------
| Default Cache Driver
|--------------------------------------------------------------------------
|
| Here you may specify the type of caching that should be used
| by the package.
|
| Options:
|
| all - All location are cached
| some - Cache only the requesting user
| none - Disable cached
|
*/
'cache' => 'all',
/*
|--------------------------------------------------------------------------
| Cache Tags
|--------------------------------------------------------------------------
|
| Cache tags are not supported when using the file or database cache
| drivers in Laravel. This is done so that only locations can be cleared.
|
*/
'cache_tags' => [],
/*
|--------------------------------------------------------------------------
| Cache Expiration
|--------------------------------------------------------------------------
|
| Define how long cached location are valid.
|
*/
'cache_expires' => 30,
/*
|--------------------------------------------------------------------------
| Default Location
|--------------------------------------------------------------------------
|
| Return when a location is not found.
|
*/
'default_location' => [
'ip' => '127.0.0.0',
'iso_code' => 'CN',
'country' => 'United States',
'city' => 'New Haven',
'state' => 'CT',
'state_name' => 'Connecticut',
'postal_code' => '06510',
'lat' => 41.31,
'lon' => -72.92,
'timezone' => 'America/New_York',
'continent' => 'NA',
'default' => true,
'currency' => 'USD',
],
];
......@@ -12,11 +12,11 @@ body{background: #000;min-width: 1200px;}
p{font-size: 110px;font-weight: bold;color:#fff;width:1200px;margin:0 auto;}
}
.floor2{
height:1485px;
height:1142px;
background: url("../../images/about/companybg2.png") center top no-repeat;
.jscon{
width: 1200px;
height: 1243px;
height: 900px;
margin:0 auto;
background: rgba(40, 63, 235, 0.4);
font-size: 30px;
......
......@@ -63,7 +63,7 @@
margin:0 auto;
a.ghn-logo {
width : 463px;
width : 261px;
height : 44px;
position: relative;
top : 32px;
......@@ -450,7 +450,7 @@
.search-input-box {
width : 340px;
margin-left: 140px;
margin-left: 303px;
height : 48px;
line-height: 44px;
border : 2px solid #164D9A;
......@@ -543,6 +543,7 @@
box-shadow: 0px 0px 5px #ccc;
padding : 15px 0px;
display : none;
z-index: 2;
a {
box-sizing : border-box;
......
/**弹窗样式**/
//免责弹窗
.mzpops{
padding:15px;
.mzpopscons{
border:1px solid #f3f3f3;
height:260px;
padding:15px;
color:#fff;
overflow-y: auto;
overflow-x: hidden;
word-wrap:break-word;
&::-webkit-scrollbar {
width: 5px;
height: 106px;
}
&::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: #cccccc;
}
}
.mzbtnsxh{
display: block;
cursor: pointer;
width: 110px;
margin:0 auto;
margin-top:30px;
border-radius: 2px;
height: 34px;
line-height: 34px;
text-align: center;
background: #1969F9;
border-radius: 1px;
color: #fff;
box-sizing: border-box;
border: 1px solid #1969F9;
transition: all 0.4s;
cursor: pointer;
&:hover{
background: #387FFF;
color: #fff;
}
}
}
/**提示框**/
.pop-tip{
height:32px;
......
{"version":3,"sources":["pop.less"],"names":[],"mappings":";AAGA;EACI,aAAA;;AADJ,OAEI;EACI,yBAAA;EACA,aAAA;EACA,aAAA;EACA,WAAA;EACA,gBAAA;EACA,kBAAA;EACA,qBAAA;;AACA,OARJ,YAQK;EACG,UAAA;EACA,aAAA;;AAEJ,OAZJ,YAYK;EACG,kBAAA;EACA,kDAAA;EACA,yBAAA;;AAjBZ,OAoBI;EACI,cAAA;EAEA,YAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACI,YAAA;EACA,iBAAA;EACA,kBAAA;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,sBAAA;EACA,yBAAA;EACA,oBAAA;EACA,eAAA;;AACA,OAjBR,UAiBS;EACG,mBAAA;EACA,WAAA;;;AAMhB;EACI,YAAA;EACA,8BAAA;EACA,kBAAA;EACA,eAAA;EACA,iBAAA;EACA,iBAAA;EACA,eAAA;EACA,UAAA;EACA,WAAA;EACA,cAAA;EACA,cAAA;;AAXJ,QAYI;EAAS,kBAAA;EAAkB,mBAAA;EAAmB,eAAA;;;AAKlD;EACI,eAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,WAAA;EACA,eAAA;;AANJ,WAOI;EAAI,kBAAA;EAAmB,QAAA;EAAQ,SAAA;EAAS,kBAAA;EAAmB,iBAAA;;;AAG/D;EACI,YAAA;EAEA,aAAA;EACA,oBAAA;EACA,gCAAA;EACA,kBAAA;EACA,eAAA;EACA,cAAA;EACA,QAAA;EACA,SAAA;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;;AAbJ,YAcI;EACI,eAAA;EACA,iBAAA;;AAhBR,YAcI,OAGI;EAAE,eAAA;;AAjBV,YAoBI;EACI,eAAA;EACA,kBAAA;EACA,iBAAA;EACA,aAAA;EACA,iBAAA;;AAzBR,YA2BI,OACG;EACC,YAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;EACA,iBAAA;EACA,kBAAA;EACA,cAAA;EACA,eAAA;EACA,eAAA;;AACA,YAXJ,OACG,KAUE;EACG,cAAA;EACA,gBAAA;EACA,iBAAA;;AAEJ,YAhBJ,OACG,KAeE;EACG,WAAA;EACA,gBAAA;;;AAQZ;EACI,eAAA;EACA,aAAA;EACA,MAAA;EACA,OAAA;EACA,SAAA;EACA,QAAA;;AANJ,aAOI;EAEI,mBAAA;EAEA,mBAAA;EACA,cAAA;EACA,kBAAA;EACA,sBAAA;EACA,oBAAA;;AAfR,aAOI,cASI;EACI,YAAA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;EAUA,mBAAA;;AA9BZ,aAOI,cASI,UAKI;EAAK,kBAAA;EAAmB,SAAA;EAAS,UAAA;;AArB7C,aAOI,cASI,UAMI;EACI,WAAA;EACA,YAAA;EACA,eAAA;EACA,kBAAA;EACA,SAAA;EACA,WAAA;;AA5BhB,aAOI,cAyBI;EACI,eAAA;;AAIR,aAAC,mBACG;EACI,kBAAA;;AAFR,aAAC,mBAIG,cACG;EAAY,gBAAA;;;AASvB,UACI;EACI,gBAAA;EACA,kBAAA;EACA,WAAA;EACA,eAAA;EACA,mBAAA;;AANR,UACI,UAOI;EACI,eAAA;EASA,kBAAA;;AAlBZ,UACI,UAOI,aAGI;EACI,WAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;;AAKJ,UAnBR,UAOI,aAYK,IACG,EACI;EACI,cAAA;EACA,UAAA;EACA,WAAA;EACA,mBAAA;EACA,kBAAA;;AA3BxB,UACI,UAOI,aAwBI;EACI,gBAAA;EACA,kBAAA;EACA,SAAA;;AAnChB,UAwCI;EAAS,WAAA;EAAW,mBAAA;;AAxCxB,UAyCI;EACI,eAAA;;AA1CR,UAyCI,WAGI;EACI,mBAAA;;AA7CZ,UAyCI,WAGI,kBAGI,EAAC;EACG,eAAA;EACA,WAAA;EACA,kBAAA;;AAlDhB,UAyCI,WAGI,kBAGI,EAAC,OAKG;EACI,cAAA;;AArDpB,UAyCI,WAGI,kBAaI;AAzDZ,UAyCI,WAGI,kBAaU,CAAA;EACF,YAAA;;AA1DhB,UAyCI,WAGI,kBAgBI;EACI,YAAA;EACA,YAAA;EACA,iBAAA;;AAEJ,UAxBR,WAGI,kBAqBK,GACG;EACI,YAAA;;AAIR,UA9BR,WAGI,kBA2BK;EACG,iBAAA;;AAxEhB,UA8EI;EACI,YAAA;EACA,cAAA;EACA,gBAAA;;AAjFR,UAqFI;EAKI,YAAA;;AA1FR,UAqFI,QACI;EACI,kBAAA;EACA,WAAA;;AAxFZ,UAqFI,QAMI;EACI,kBAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,eAAA;;AAhGZ,UAqFI,QAMI,QAMI,IAAG;EACC,WAAA;EACA,YAAA;EACA,mBAAA;EACA,yBAAA;EACA,kBAAA;EACA,iBAAA;EACA,kBAAA;EACA,SAAA;;AAII,UAxBhB,QAMI,QAgBK,IACE,YACM;EACG,SAAS,EAAT;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,mBAAA;EACA,QAAA;EACA,SAAA;;AApHxB,UA0HI;EACI,eAAA;EACA,kBAAA;EACA,cAAA;EACA,YAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;;;AAOR;EACI,sBAAA;EACA,eAAA;;AAFJ,cAGI;EACI,YAAA;EASA,kBAAA;;AAbR,cAGI,mBAEI,IAAG;EACC,YAAA;EACA,sBAAA;EACA,kBAAA;EACA,eAAA;EACA,WAAA;;AAVZ,cAGI,mBAEI,IAAG,OAMC;EAAE,cAAA;;AAXd,cAeI;EACI,YAAA;EACA,YAAA;EACA,mBAAA;EACA,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,kBAAA;EACA,kBAAA;;AAvBR,cAeI,oBASI;EACI,kBAAA;EACA,aAAA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;;AA7BZ,cAeI,oBASI,kBAMI;EAAE,+BAAA;EAA4B,eAAA;;AA9B1C,cAeI,oBASI,kBAOI;EACI,cAAA;EACA,eAAA;EACA,eAAA;EACA,iBAAA;;AACA,cArBZ,oBASI,kBAOI,MAKK;EACG,cAAA;;AADJ,cArBZ,oBASI,kBAOI,MAKK,QAEG;EAAE,kBAAA;EAAmB,QAAA;;AAtCzC,cAeI,oBA2BI;EACI,kBAAA;EACA,WAAA;EACA,sBAAA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;EACA,iDAAA;;AAlDZ,cAqDI;EACI,gBAAA;;AAtDR,cAqDI,qBAEI;EACI,eAAA;EACA,WAAA;EACA,kBAAA;;AA1DZ,cAqDI,qBAOI;EACI,YAAA;EACA,YAAA;;AA9DZ,cAiEI;EACI,YAAA;EACA,YAAA;EACA,yBAAA;EACA,kBAAA;EACA,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,eAAA;EACA,cAAA;EACA,gBAAA","file":"pop.min.css"}
\ No newline at end of file
......@@ -9,8 +9,24 @@
margin-left: 1px;
width:700px;
height:384px;
background: url(../../images/mall/banner.png?v=20221124) no-repeat;
background-size: 100% 100%;
position: relative;
overflow: hidden;
.brlbox .hd {
position: relative;
top: -50px;
}
.brlbox .hd ul li {
margin-top: 20px;
width: 10px;
height: 10px;
background: #E1E1E1;
border-radius: 5px;
margin-right: 5px
}
.brlbox .hd ul li.on {
width: 40px
}
}
}
.floor2{
......
.mallindex .floor1{margin-top:7px}.mallindex .floor1 .f1left{width:498px;height:384px}.mallindex .floor1 .f1right{margin-left:1px;width:700px;height:384px;background:url(../../images/mall/banner.png?v=20221124) no-repeat;background-size:100% 100%}.mallindex .floor2{margin-top:12px}.mallindex .floor2 .item{width:392px;height:179px;background:rgba(2,11,51,0.75);transition:all .5s;margin-right:12px;padding-left:48px}.mallindex .floor2 .item:last-child{margin-right:0px}.mallindex .floor2 .item .qiu{width:70px;height:70px;background:#FFFFFF;border-radius:50%;text-align:center;line-height:70px}.mallindex .floor2 .item .qiu i{font-size:37px;color:#1F68F2}.mallindex .floor2 .item .cong{margin-left:41px}.mallindex .floor2 .item .cong p{font-size:20px;font-weight:bold;color:#fff;margin-bottom:14px}.mallindex .floor2 .item .cong i{color:#1F68F2}.mallindex .floor2 .item:hover{background:rgba(40,63,235,0.75)}.mallindex .floor2 .item:hover .qiu{background:none}.mallindex .floor2 .item:hover .qiu i{display:inline;color:#fff;font-size:60px}.mallindex .floor2 .item:hover .cong i{color:#F68332}.mallindex .floor3{height:480px;margin-top:12px;background:url(../../images/mall/video.png) no-repeat;background-size:100% 100%}.procon{display:block!important}
\ No newline at end of file
.mallindex .floor1{margin-top:7px}.mallindex .floor1 .f1left{width:498px;height:384px}.mallindex .floor1 .f1right{margin-left:1px;width:700px;height:384px;position:relative;overflow:hidden}.mallindex .floor1 .f1right .brlbox .hd{position:relative;top:-50px}.mallindex .floor1 .f1right .brlbox .hd ul li{margin-top:20px;width:10px;height:10px;background:#E1E1E1;border-radius:5px;margin-right:5px}.mallindex .floor1 .f1right .brlbox .hd ul li.on{width:40px}.mallindex .floor2{margin-top:12px}.mallindex .floor2 .item{width:392px;height:179px;background:rgba(2,11,51,0.75);transition:all .5s;margin-right:12px;padding-left:48px}.mallindex .floor2 .item:last-child{margin-right:0px}.mallindex .floor2 .item .qiu{width:70px;height:70px;background:#FFFFFF;border-radius:50%;text-align:center;line-height:70px}.mallindex .floor2 .item .qiu i{font-size:37px;color:#1F68F2}.mallindex .floor2 .item .cong{margin-left:41px}.mallindex .floor2 .item .cong p{font-size:20px;font-weight:bold;color:#fff;margin-bottom:14px}.mallindex .floor2 .item .cong i{color:#1F68F2}.mallindex .floor2 .item:hover{background:rgba(40,63,235,0.75)}.mallindex .floor2 .item:hover .qiu{background:none}.mallindex .floor2 .item:hover .qiu i{display:inline;color:#fff;font-size:60px}.mallindex .floor2 .item:hover .cong i{color:#F68332}.mallindex .floor3{height:480px;margin-top:12px;background:url(../../images/mall/video.png) no-repeat;background-size:100% 100%}.procon{display:block!important}
\ No newline at end of file

12.5 KB | W: | H:

3.88 KB | W: | H:

public/assets/images/common/logo.png
public/assets/images/common/logo.png
public/assets/images/common/logo.png
public/assets/images/common/logo.png
  • 2-up
  • Swipe
  • Onion skin

13.6 KB | W: | H:

4.45 KB | W: | H:

public/assets/images/home/top.png
public/assets/images/home/top.png
public/assets/images/home/top.png
public/assets/images/home/top.png
  • 2-up
  • Swipe
  • Onion skin
define('liexin_ajax', ['liexin_pop'], function (require, exports, module) {
define('liexin_ajax', ['liexin_pop','tool'], function (require, exports, module) {
var liexin_pop=require("liexin_pop")
var tool=require("tool")
/**免责弹窗***/
if (!tool.getCookie("mz_popsm")) {
liexin_pop.Open({
title: "Special Notice",
width: 970,
top: 100,
class: "mzpops",
ele: ".mzpops",
noclose:1,
success: function () {
}
})
}
$("body").on("click",".mzbtnsxh",function(){
tool.setCookie("mz_popsm", 1, 365);
$(".pop-show-box .pop-show-con").animate({
top: '-50%',
opacity: '0'
}, function () {
$(".mzpops").hide();
$(".pop-show-box").remove();
});
})
//挂载到 $ 上方便操作 直接预加载
jQuery.extend({
liexin_ajax: function (url, type, param, callback, isload) {
......
......@@ -84,7 +84,7 @@ define('liexin_pop', [], function (require, exports, module) {
var html_ = '<div class="pop-show-box ' + (opt.class || '') + '"><div class="pop-show-con" style="width:' + width_ + 'px;height:' + height_ + 'px"><div class="pop-head"><span>' + (opt.title || '') + '</span>'
html_ += '<p><i class="icon iconfont icon-guanbi closePopShow"></i></p>'
html_ += '<p style="'+(opt.noclose?'display:none;':'')+'"><i class="icon iconfont icon-guanbi closePopShow"></i></p>'
html_ += '</div><div class="pop-body" ></div></div></div>'
$("body").append(html_);
$(".pop-show-box .pop-body").append(eleHtml);
......@@ -124,7 +124,6 @@ define('liexin_pop', [], function (require, exports, module) {
});
}
}
//登陆弹出
module.exports.LoginPop = function (opt, callback) {
......
......@@ -9,6 +9,7 @@ define('mall', ['liexin_pop'], function (require, exports, module) {
// })
// })
jQuery(".brlbox").slide({ mainCell: ".brandroll", effect: "leftLoop", autoPlay: true, vis: 2, delayTime: 700, interTime: 5000 });
},
handle:function(){
......
No preview for this file type
@extends('layouts.app')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Certification - ')
@section('body')
@include('common.headerTop')
@include('common.headerNav')
@include('common.headerTop')
@if(!$is_disable_ip)
@include('common.headerNavDisabled')
@else
@include('common.headerNav')
@endif
<div class="certificationpage">
<div class="certificationpage">
<div class="floor1 row verCenter">
<p>CERTIFICATION</p>
</div>
......@@ -19,7 +23,7 @@
<div class="floor3">
<div class="fl3con row rowCenter">
<a class="item item1 boxsiz" href="{{$public}}/assets/images/home/D&B.pdf" target="_blank">
<a class="item item1 boxsiz" href="{{$public}}/assets/images/home/Semour Electronics Co., Limited.pdf" target="_blank">
<p>D-U-N-S® Number</p>
<div class="column verCenter rowCenter imgbox">
<img src="{{$public}}/assets/images/about/st1.png" class="st" alt="">
......@@ -50,14 +54,14 @@
<p>READY TO CONNECT?</p>
<div class="row rowCenter">
<a class="but" href="/mall">LOCATE PARTS ON SEMOUR STORE</a>
<div class="but but-lk frqbtnxs">SUBMIT REAL-TIME RFQ </div>
<div class="but but-lk frqbtnxs">SUBMIT REAL-TIME RFQ</div>
</div>
</div>
</div>
@include('common.footersm')
</div>
</div>
@endsection
......
......@@ -6,7 +6,11 @@
@section('title','Company - ')
@section('body')
@include('common.headerTop')
@include('common.headerNav')
@if(!$is_disable_ip)
@include('common.headerNavDisabled')
@else
@include('common.headerNav')
@endif
<div class="aboutpage">
<div class="floor1 row verCenter">
......@@ -14,15 +18,25 @@
</div>
<div class="floor2">
<div class="jscon boxsiz">
<p><b>S</b>emour Electronics Co., LTD, located in Hong Kong, is one of the subsidiaries of Shenzhen ICHUNT Technology Co., LTD. As a global electronic supply chain solution provider, Semour is committed to many EMS/OEM/ODM manufacturer clients with the comprehensive real-time stock goods and supporting services.
</p>
<p><b>W</b>ith rich industry experience, Semour Electronics provides customer-oriented one-stop electronic component services, including spot and related financial, warehousing and logistics services. So far, Semour online store has brought more than 1,000 categories of inventory to nearly 1,000 suppliers around the world. The online store allows customers to search for inventory and prices in real time and enjoy the one-on-one service of our professional sales team.
<p><b>S</b> emour Electronics Co., LTD located in Hong Kong. As a global electronic supply chain solution provider, Semour is committed to many EMS/OEM/ODM manufacturer clients with the comprehensive real-time stock goods and supporting services.
</p>
<p><b>T</b>hrough Semour Quality Inspection Center, Semour Electronics can prevent counterfeit components from entering your supply chain. Our well-established supply chain system can respond to any customer inquiry and meet the diverse market environment. Semour Electronics' goal is to increase the productivity of electronic trading services and to continuously bring intervention and innovation to the industry.
<p>
<b>W</b> ith rich industry experience, Semour Electronics provides customer-oriented one-stop electronic component services, including spot and related financial, warehousing and logistics services. So far, Semour online store has brought more than 1,000 categories of inventory to nearly 1,000 suppliers around the world. The online store allows customers to search for inventory and prices in real time and enjoy the one-on-one service of our professional sales team.
</p>
<p><b>T</b>he parent company of Semour Electronics is Shenzhen ICHUNT Technology CO., LTD, which headquarter located in Shenzhen, China. The company currently has more than 430 employees and the business network has covered most of the major cities of China including Hong Kong, Beijing, Shanghai, Suzhou, Nanjing, Hefei, Wuhan, Dalian, Qingdao. These branches can rapidly respond to the various requirements from the customers worldwide. Now ICHUNT has obtained several rounds of financial investment from well-known venture capital, including Matrix Partners China, Welight Capital, Hua Partners, JD. Capital, Haitong Securities.
<p>
<b>T</b> hrough Semour Quality Inspection Center, Semour Electronics can prevent counterfeit components from entering your supply chain. Our well-established supply chain system can respond to any customer inquiry and meet the diverse market environment. Semour Electronics' goal is to increase the productivity of electronic trading services and to continuously bring intervention and innovation to the industry.
</p>
</div>
@if(!$is_disable_ip)
<div class="readbox" style="display: none">
<p>READY TO CONNECT?</p>
<div class="row rowCenter">
<a class="but" href="/mall">LOCATE PARTS ON SEMOUR STORE</a>
<div class="but but-lk frqbtnxs">SUBMIT REAL-TIME RFQ </div>
</div>
</div>
@else
<div class="readbox">
<p>READY TO CONNECT?</p>
<div class="row rowCenter">
......@@ -30,6 +44,7 @@
<div class="but but-lk frqbtnxs">SUBMIT REAL-TIME RFQ </div>
</div>
</div>
@endif
</div>
@include('common.footersm')
......
@extends('layouts.app')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
<link rel="stylesheet" href="{{$public}}/assets/css/about/about.min.css?v={{time()}}">
@endsection
@section('title','Quality - ')
@section('body')
@include('common.headerTop')
@include('common.headerNav')
@include('common.headerTop')
@if(!$is_disable_ip)
@include('common.headerNavDisabled')
@else
@include('common.headerNav')
@endif
<div class="qualitypage">
<div class="qualitypage">
<div class="floor1 row verCenter">
<p>Quality Control System</p>
</div>
......@@ -28,17 +32,27 @@
<div class="itemf3 trr bgrp4"><span>Value-added Service</span></div>
</div>
</div>
@if(!$is_disable_ip)
<div class="readbox" style="display: none">
<p>READY TO CONNECT?</p>
<div class="row rowCenter">
<a class="but" href="/mall">LOCATE PARTS ON SEMOUR STORE</a>
<div class="but but-lk frqbtnxs">SUBMIT REAL-TIME RFQ</div>
</div>
</div>
@else
<div class="readbox">
<p>READY TO CONNECT?</p>
<div class="row rowCenter">
<a class="but" href="/mall">LOCATE PARTS ON SEMOUR STORE</a>
<div class="but but-lk frqbtnxs">SUBMIT REAL-TIME RFQ </div>
<div class="but but-lk frqbtnxs">SUBMIT REAL-TIME RFQ</div>
</div>
</div>
@endif
</div>
@include('common.footersm')
</div>
</div>
@endsection
......
......@@ -58,7 +58,7 @@
<div class="ttl">{{$key}}</div>
<div class="ttc row boxsiz">
@foreach ($item as $itemchild)
<a href="/brand/{{$itemchild['standard_brand_id']}}" >{{$itemchild['brand_name_en']}}</a>
<a href="/brand/{{$itemchild['standard_brand_id']}}" >{{$itemchild['brand_short_name_en']}}</a>
@endforeach
</div>
</div>
......
......@@ -87,7 +87,7 @@
@endif
<a href="javascript:void(0)" class="bannerc">
<img src="{{$public}}/assets/images/car/carbanner.png?v=20221124" alt="">
<img src="{{$public}}/assets/images/car/carbanner.jpg?v=20220410" alt="">
</a>
</div>
</div>
......
......@@ -10,8 +10,11 @@
</div>
<div class="itemftsm">
<p>Help and Information</p>
@if(!$is_disable_ip)
@else
<a href="javascript:void(0)" class="frqbtnxs">RFQ Form</a>
<!-- <a href="">BOM Tools</a> -->
@endif
<a href="/about/refund">Exchange & Refund</a>
</div>
<div class="itemftsm">
......@@ -21,7 +24,7 @@
<a href="/about/termuser">Terms of Use</a>
</div>
<div class="itemftsm">
<p class="row"><b>A member of</b><img src="/assets/images/home/lxlogo.png" alt="" class="logoftsm2"></p>
<!-- <p class="row"><b>A member of</b><img src="/assets/images/home/lxlogo.png" alt="" class="logoftsm2"></p> -->
<a href="javascript:void(0)" class="fz-14">Copyright © 2023 SEMOUR ELECTRONICS All rights reserved.</a>
</div>
......@@ -30,6 +33,7 @@
<i class="icon iconfont icon-youxiang"></i>
<span>INFO@SEMOUR.COM</span>
<i class="icon iconfont icon-dizhi dflt"></i>
<span>FLOOR 12, SUNBEAM CENTER, 27 SHING YIP STREET, KWUN TONG, KOWLOON, HONG KONG</span>
<span>FLOOR 9, SUNBEAM CENTER, 27 SHING YIP STREET, KWUN TONG, KOWLOON, HONG KONG</span>
</div>
</div>
\ No newline at end of file
<div class="gw-header-nav" style="<?php if (isset($_COOKIE['topclose'])) {
echo 'top:0px;';
} ?>">
<div class="gw-header-nav" style="<?php if (isset($_COOKIE['topclose'])) {echo 'top:0px;'; } ?>">
<div class="ghn-con clr">
<a class="fl ghn-logo" href="/"><img src="/assets/images/home/top.png" alt=""></a>
<a class="fl ghn-logo" href="/"><img src="/assets/images/home/top.png?v=20230222" alt=""></a>
<div class="fr clr ghn-right-box">
<div class="grb-top clr">
<a href="javascript:void(0)" class="fr clj gofooter">CONTACT US</a>
......@@ -27,14 +25,12 @@
</div>
@endif
<div class="fr searchenter">
<div class="searchtopbox" >
<input type="text" class="mallsearchvalx" />
<div class="searchtopbox">
<input type="text" class="mallsearchvalx"/>
<span class="mallsearchbtnx"><i class="icon iconfont icon-shouyesousuo"></i></span>
</div>
<a href="/search" class="iconbx"><i class="icon iconfont icon-shouyesousuo"></i></a>
</div>
<a href="/car" class="fr carbc iconbx"><i class="icon iconfont icon-gouwuche"></i><span class="carNum carNumxs">0</span></a>
</div>
......
<div class="gw-header-nav" style="<?php if (isset($_COOKIE['topclose'])) {echo 'top:0px;'; } ?>">
<div class="ghn-con clr">
<a class="fl ghn-logo" href="/"><img src="/assets/images/home/top.png?v=20230222" alt=""></a>
<div class="fr clr ghn-right-box">
<div class="grb-top clr">
<a href="javascript:void(0)" class="fr clj gofooter">CONTACT US</a>
@if(Auth::check())
<div class="login-head-box yesLogin fr clj">
<a href="/user/order" class="row">
<span><i class="icon iconfont icon-touxiang"></i></span>
<div class="username">{{Auth::user()->email??''}}</div>
</a>
<div class="userurl-box">
<a href="/user/order">My Orders</a>
<a href="/user/inquiry">My RFQ</a>
<a href="/user/account">My Account</a>
<a href="javascript:void(0)" class="logoutbtns">LOGOUT</a>
</div>
</div>
@else
<div class="login-head-box notLoginclj fr clj" style="display: none">
<a href="/login?referer={{\Illuminate\Support\Facades\URL::current()}}">Login</a>
<font>/</font>
<a href="/reg?referer={{\Illuminate\Support\Facades\URL::current()}}">Register</a>
</div>
@endif
<div class="fr searchenter" style="display: none">
<div class="searchtopbox">
<input type="text" class="mallsearchvalx"/>
<span class="mallsearchbtnx"><i class="icon iconfont icon-shouyesousuo"></i></span>
</div>
<a href="/search" class="iconbx"><i class="icon iconfont icon-shouyesousuo"></i></a>
</div>
<a href="/car" class="fr carbc iconbx" style="display: none"><i class="icon iconfont icon-gouwuche"></i><span class="carNum carNumxs">0</span></a>
</div>
<div class="grb-bottom clr">
<ul class="clr onenav">
<li class="oneli fr">
<a href="/about/quality" class="onea">Quality Inspection</a>
</li>
<li class="oneli fr" style="display: none"><a href="#" class="onea frqbtnxs">RFQ</a></li>
<li class="oneli fr" style="display: none"><a href="/mall" class="onea">STORE</a></li>
<li class="oneli fr">
<a href="/about/company" class="onea">Company</a>
<ul class="twonav">
<li class="twoli"><a href="/about/company" class="twoa">About Us</a></li>
<li class="twoli"><a href="/about/certification" class="twoa">Certification</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<div class="gw-header-top ta-c" >
<div>
<span><i class="icon iconfont icon-guanbi topclose"></i></span>
<a href="/mall">GRAND OPENING OF SEMOUR ELECTRONICS ONLINE STORE. CLICK TO VISIT.</a>
<a href="/mall">LOOKING FOR HARD-TO-FIND PARTS? CLICK TO VISIT SEMOUR ONLINE STORE!</a>
</div>
</div>
@endempty
@include('common.inquiryPop')
<script>
const URL_API="/";//ajax域名
const PUBLICXK="{{$public}}";//资源文件文件目录 js公用变量
const SO_URL="{{$so_url}}";//资源文件文件目录 js公用变量
const URL_API = "/";//ajax域名
const PUBLICXK = "{{$public}}";//资源文件文件目录 js公用变量
const SO_URL = "{{$so_url}}";//资源文件文件目录 js公用变量
</script>
<!--免责弹窗-->
<div class="mzpops" style="display:none">
<div class="mzpopscons">
It is SEMOUR ELECTRONICS’ (SEMOUR) policy to comply fully with all relevant laws and regulations administered by the countries in which SEMOUR conducts global trade. Under no circumstances will SEMOUR sell or ship product contrary to applicable export control laws and trade regulations.
<br/><br/>In view of the particularity of the goods SEMOUR sells, we make a special statement as follows:
<br/><br/>SEMOUR’s distributors, resellers, customers, and end-users are responsible for compliance with U.S. export control and import laws and regulations when exporting, re-exporting, importing, or otherwise transferring any SEMOUR products or technology, including products derived from or based on such technology (collectively, “SEMOUR’s Products”). These laws impose restrictions on the shipment or transfer of SEMOUR’s Products to certain countries and persons, and/or on the ultimate end-uses of such products. It is your responsibility to be aware of applicable export control and import restrictions and comply with them. SEMOUR assumes no responsibility or liability for your failure to comply. Failure to comply with U.S. and non-U.S. export control laws and trade regulations can result in civil and criminal penalties to individuals and businesses. If your behaviour cause losses to SEMOUR, we will claim compensation from you.
<br/><br/>By purchasing, selling, using, or otherwise transferring SEMOUR’s Products you agree to comply with all applicable export and reexport control laws and regulations, including the U.S. Export Administration Regulations (“EAR”), administered by the U.S. Department of Commerce’s Bureau of Industry and Security (“BIS”), the International Traffic in Arms Regulations administered by the U.S. State Department’s Directorate of Defence Trade Controls, and trade sanctions administered by the Treasury Department’s Office of Foreign Assets Control (“OFAC”). Specifically, you agree that you will not, directly or indirectly, without any required government authorization, sell, export, reexport, transfer, divert, or otherwise dispose of any SEMOUR’s Products to:
<br/><br/>1.any country or territory that is not authorized to receive the SEMOUR’s Products based on their applicable licensing jurisdiction and export control classification;
<br/><br/>2.any country or territory that is a designated state sponsor of terrorism or subject to comprehensive U.S. trade sanctions (including Entity List, Specially Designated National or any other sanction list, currently include Crimea, Cuba, Iran, North Korea, Sudan, Syria,Russia, Ukraine and any country added subsequently);
<br/><br/>3.any person or entity on a U.S. Government list of prohibited persons, including but not limited to the Specially Designated Nationals and Blocked Persons List, Sectoral Sanctions Identifications List, and Foreign Sanctions Evaders List, administered by OFAC; and the Denied Persons List, Entity List, and Unverified List, administered by BIS;
<br/><br/>4.any person or entity with knowledge or reason to know that SEMOUR’s Products will be used for a prohibited end use, including activities related to the research, development, design, manufacture, construction, operation or maintenance of nuclear, chemical, or biological weapons;
<br/><br/>5.any “MILITARY END USER” or any person or entity with knowledge or reason to know that SEMOUR’s Products will be used for a “military end use,” as defined and subject to the license requirements in Section 744.21 of the EAR; or
<br/><br/>6.any military-intelligence end user, as defined and subject to the license requirements in Section 744.22 of the EAR.
<br/><br/>Important announcement: SEMOUR reserves the right to terminate the Service and this agreement without prior notice in case the Client is in breach of any of the terms hereof.
</div>
<div class="mzbtnsxh">ACCEPT</div>
</div>
<input type="hidden" id="emailCookie" value="{{Auth::user()->email??''}}">
<script src="{{$public}}/assets/js/common/sea.js?v={{time()}}"></script>
<script src="{{$public}}/assets/js/common/jquery-1.8.3.min.js?v={{time()}}"></script>
......
<div class="mall-footer">
<div class="floor1 w1200">
<div class="floor1 w1200" style="display:none">
<div class="row">
<div class="itemf3 trl bgbts1"><b>30M+</b>SKU</div>
<div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div>
......@@ -11,24 +11,24 @@
</div>
<div class="floor2 w1200 bannerEle">
<div class="bannerScrollboxs">
<img src="{{$public}}/assets/images/brands/br1.jpg" >
<img src="{{$public}}/assets/images/brands/br2.jpg" >
<img src="{{$public}}/assets/images/brands/br3.jpg" >
<img src="{{$public}}/assets/images/brands/br4.jpg" >
<img src="{{$public}}/assets/images/brands/br5.jpg" >
<img src="{{$public}}/assets/images/brands/br6.jpg" >
<img src="{{$public}}/assets/images/brands/br7.jpg" >
<img src="{{$public}}/assets/images/brands/br8.jpg" >
<img src="{{$public}}/assets/images/brands/br9.jpg" >
<img src="{{$public}}/assets/images/brands/br10.jpg" >
<img src="{{$public}}/assets/images/brands/br11.jpg" >
<img src="{{$public}}/assets/images/brands/br12.jpg" >
<img src="{{$public}}/assets/images/brands/br13.jpg" >
<img src="{{$public}}/assets/images/brands/br14.jpg" >
<img src="{{$public}}/assets/images/brands/br15.jpg" >
<img src="{{$public}}/assets/images/brands/br16.jpg" >
<img src="{{$public}}/assets/images/brands/br17.jpg" >
<img src="{{$public}}/assets/images/brands/br18.jpg" >
<img src="{{$public}}/assets/images/brands/br1.jpg">
<img src="{{$public}}/assets/images/brands/br2.jpg">
<img src="{{$public}}/assets/images/brands/br3.jpg">
<img src="{{$public}}/assets/images/brands/br4.jpg">
<img src="{{$public}}/assets/images/brands/br5.jpg">
<img src="{{$public}}/assets/images/brands/br6.jpg">
<img src="{{$public}}/assets/images/brands/br7.jpg">
<img src="{{$public}}/assets/images/brands/br8.jpg">
<img src="{{$public}}/assets/images/brands/br9.jpg">
<img src="{{$public}}/assets/images/brands/br10.jpg">
<img src="{{$public}}/assets/images/brands/br11.jpg">
<img src="{{$public}}/assets/images/brands/br12.jpg">
<img src="{{$public}}/assets/images/brands/br13.jpg">
<img src="{{$public}}/assets/images/brands/br14.jpg">
<img src="{{$public}}/assets/images/brands/br15.jpg">
<img src="{{$public}}/assets/images/brands/br16.jpg">
<img src="{{$public}}/assets/images/brands/br17.jpg">
<img src="{{$public}}/assets/images/brands/br18.jpg">
</div>
</div>
......@@ -55,7 +55,7 @@
<a href="/about/termuser">Terms of Use</a>
</div>
<div class="itemftsp">
<p class="row"><span>A member of</span> <img src="/assets/images/home/lxlogo.png" alt="" class="logoftsm2"></p>
<!-- <p class="row"><span>A member of</span> <img src="/assets/images/home/lxlogo.png" alt="" class="logoftsm2"></p> -->
<span>Copyright © 2023 SEMOUR ELECTRONICS All rights reserved.</span>
</div>
......@@ -64,7 +64,7 @@
<i class="icon iconfont icon-youxiang"></i>
<span>INFO@SEMOUR.COM</span>
<i class="icon iconfont icon-dizhi dflt"></i>
<span>FLOOR 12, SUNBEAM CENTER, 27 SHING YIP STREET, KWUN TONG, KOWLOON, HONG KONG</span>
<span>FLOOR 9, SUNBEAM CENTER, 27 SHING YIP STREET, KWUN TONG, KOWLOON, HONG KONG</span>
</div>
</div>
......
<div class="mall-header-nav">
<div class="search-car w1200">
<div class="row cons verCenter">
<a href="/mall" class="logo"><img src="{{$public}}/assets/images/common/logo.png" alt=""></a>
<a href="/mall" class="logo"><img src="{{$public}}/assets/images/common/logo.png?v=20230222" alt=""></a>
<div class="search-input-box row boxsiz">
<input type="text" class="searchvalx mallsearchvalx" placeholder="Enter part #" value="{{request()->get('keyword')}}">
<input type="text" class="searchvalx mallsearchvalx" placeholder="Enter part #"
value="{{request()->get('keyword')}}">
<div class="searchbtnx boxsiz mallsearchbtnx"><i class="icon iconfont icon-sousuo-shangcheng"></i></div>
</div>
<a class="car-boxs" href="/car"><i class="icon iconfont icon-gouwuche"></i><span class="carNum carNumxs">0</span></a>
......@@ -42,22 +43,28 @@
<p>{{$item['class_name']}}</p>
</div>
<div class="conboxx row">
@if(!empty($item['children']))
@foreach ($item['children'] as $itemchild)
<a href="/class/{{$itemchild['class_id']}}" class="erji" title="{{$itemchild['class_name_en']}}" >{{$itemchild['class_name_en']}}</a>
<a href="/class/{{$itemchild['class_id']}}" class="erji"
title="{{$itemchild['class_name_en']}}">{{$itemchild['class_name_en']}}</a>
@endforeach
@endif
</div>
<div class="rightboxx boxsiz">
@if(!empty($item['children']))
@foreach ($item['children'] as $itemchild)
<div class="grouprightx">
<a class="p" title="{{$itemchild['class_name_en']}}" href="/class/{{$itemchild['class_id']}}">{{$itemchild['class_name_en']}}</a>
<a class="p" title="{{$itemchild['class_name_en']}}"
href="/class/{{$itemchild['class_id']}}">{{$itemchild['class_name_en']}}</a>
<div class="threeClass boxsiz row">
@foreach ($itemchild['children'] as $itemchild3)
<a href="/class/{{$itemchild3['class_id']??''}}" title="{{$itemchild3['class_name_en']??''}}">{{$itemchild3['class_name_en']??''}}<span>({{$itemchild3['sku_number']??''}})</span></a>
<a href="/class/{{$itemchild3['class_id']??''}}"
title="{{$itemchild3['class_name_en']??''}}">{{$itemchild3['class_name_en']??''}}<span>({{$itemchild3['sku_number']??''}})</span></a>
@endforeach
</div>
</div>
@endforeach
@endif
</div>
</div>
@endforeach
......
@empty($_COOKIE['topclose'])
<!-- @empty($_COOKIE['topclose'])
<div class="mall-header-top ta-c" >
<div>
<span><i class="icon iconfont icon-guanbi topclose"></i></span>
<a href="/mall">GRAND OPENING OF SEMOUR ELECTRONICS ONLINE STORE. CLICK TO VISIT.</a>
</div>
</div>
@endempty
@endempty -->
......@@ -12,8 +12,8 @@
<div class="floor1">
<div class="fl1-con">
<div class="rtdes">
<p>BE THE BEST PART</p>
<p>OF YOURS</p>
<p>STOCK AS A SERVICE</p>
<p class="p24">WHY CHOOSE SEMOUR?</p>
<img src="{{$public}}/assets/images/home/mallgif.gif" alt="">
</div>
......@@ -45,7 +45,7 @@
<div class="floor2">
<video src="{{$public}}/assets/images/home/mallvadeo.mp4" width="1200" autoplay loop controls muted></video>
</div>
<div class="floor3">
<div class="floor3" style="display: none">
<div class="row">
<div class="itemf3 trl bgbts1"><b>30M+</b>SKU</div>
<div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div>
......
@extends('layouts.app')
@section('css')
<link rel="stylesheet" href="{{$public}}/assets/css/home/home.min.css?v={{time()}}">
@endsection
@section('title','Semour: The Global ')
@section('body')
@include('common.headerTop')
@if(!$is_disable_ip)
@include('common.headerNavDisabled')
@endif
<div class="homepage">
<div class="floor1">
<div class="fl1-con">
<div class="rtdes">
<p>STOCK AS A SERVICE</p>
<p class="p24">WHY CHOOSE SEMOUR?</p>
<img src="{{$public}}/assets/images/home/mallgif.gif" alt="">
</div>
<div class="fl1botbox row rowCenter">
<a class="ftitem">
<div>
<i class="icon iconfont icon-PROCUREMENT-shuangse"></i>
</div>
<p>PROCUREMENT</p>
<i class="icon iconfont icon-lansejiantou ijt"></i>
</a>
<a class="ftitem">
<div>
<i class="icon iconfont icon-a-QUALITYCONTROL-shuangse"></i>
</div>
<p>QUALITY CONTROL</p>
<i class="icon iconfont icon-lansejiantou ijt"></i>
</a>
<a class="ftitem ftlast">
<div>
<i class="icon iconfont icon-a-SUPPLYCHAIN-danse"></i>
</div>
<p>SUPPLY CHAIN</p>
<i class="icon iconfont icon-lansejiantou ijt"></i>
</a>
</div>
</div>
</div>
<div class="floor2">
<video src="{{$public}}/assets/images/home/mallvadeo.mp4" width="1200" autoplay loop controls muted></video>
</div>
<div class="floor3" style="display: none">
<div class="row">
<div class="itemf3 trl bgbts1"><b>30M+</b>SKU</div>
<div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div>
</div>
<div class="row">
<div class="itemf3 trl bgbts3"><b>3000+</b> Manufacturers</div>
<div class="itemf3 trr bgbts4"><b>1000+</b>Catalogs</div>
</div>
</div>
<div class="floor4" style="display: none">
<p>READY TO CONNECT?</p>
<div class="row rowCenter">
<a class="but" href="/mall">LOCATE PARTS ON SEMOUR STORE</a>
<a class="but but-lk frqbtnxs">SUBMIT REAL-TIME RFQ </a>
</div>
</div>
@empty($_COOKIE['closehometips'])
<div class="footfixedcor">
<div class="confotfix row rowCenter">
<div class="textt">We’ve updated our privacy policy. Please take a moment to review these changes. By clicking Accept Terms, you agree to Semour Electronics Privacy Policy and Terms of Use.</div>
<a class="but but-lk" href="/about/privacy">READ MORE</a>
<div class="but closehometips">ACCEPT TERMS</div>
</div>
</div>
@endempty
@include('common.footersm')
</div>
@endsection
@section('js')
<script src="{{$public}}/assets/js/home/home.js?v={{time()}}"></script>
@endsection
......@@ -11,32 +11,25 @@
@yield('css')
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FEW2RM8MTJ"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FEW2RM8MTJ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FEW2RM8MTJ');
</script>
<!-- Google tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-251026219-1">
</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FEW2RM8MTJ');
</script>
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '492184879780601');
fbq('track', 'PageView');
gtag('config', 'UA-251026219-1');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=492184879780601&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->
</head>
<body>
......
......@@ -13,29 +13,23 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FEW2RM8MTJ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FEW2RM8MTJ');
</script>
<!-- Google tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-251026219-1">
</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FEW2RM8MTJ');
gtag('config', 'UA-251026219-1');
</script>
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '492184879780601');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=492184879780601&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->
</head>
<body>
<div id="app">
......
@extends('layouts.appMall')
@section('css')
@section('title',' Online Store - ')
<link rel="stylesheet" href="{{$public}}/assets/css/mall/mall.min.css?v={{time()}}">
@section('title',' Online Store - ')
<link rel="stylesheet" href="{{$public}}/assets/css/mall/mall.min.css?v={{time()}}">
@endsection
@section('body')
<div class="mallpage">
<div class="mallpage">
@include('common.mallHeaderTop')
@include('common.mallHeaderNav')
<div class="w1200 mallindex">
<div class="floor1 row">
<div class="f1left boxsiz"></div>
<div class="f1right"></div>
<div class="f1right">
<div class="brlbox">
<div class="brandroll">
<a class="brandrollitem" href="javascript:void(0)">
<img src="{{$public}}/assets/images/mall/banner-1.jpg" alt="">
</a>
<a class="brandrollitem" href="javascript:void(0)">
<img src="{{$public}}/assets/images/mall/banner-2.jpg" alt="">
</a>
<a class="brandrollitem" href="javascript:void(0)">
<img src="{{$public}}/assets/images/mall/banner-3.jpg" alt="">
</a>
</div>
<div class="hd">
<ul class="row rowCenter">
<li class="on"></li>
<li class="on"></li>
<li class="on"></li>
</ul>
</div>
</div>
</div>
</div>
<div class="floor2 row ">
<a class="item boxsiz row verCenter">
......@@ -46,10 +67,82 @@
<video src="{{$public}}/assets/images/home/mallvadeo.mp4" width="1200" autoplay loop controls muted></video>
</div>
</div>
@include('common.mallFooter')
</div>
<div class="mall-footer">
<div class="floor1 w1200" style="display: none;">
<div class="row">
<div class="itemf3 trl bgbts1"><b>30M+</b>SKU</div>
<div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div>
</div>
<div class="row">
<div class="itemf3 trl bgbts3"><b>3000+</b> Manufacturers</div>
<div class="itemf3 trr bgbts4"><b>1000+</b>Catalogs</div>
</div>
</div>
<div class="floor2 w1200 bannerEle">
<div class="bannerScrollboxs">
<img src="{{$public}}/assets/images/brands/br1.jpg">
<img src="{{$public}}/assets/images/brands/br2.jpg">
<img src="{{$public}}/assets/images/brands/br3.jpg">
<img src="{{$public}}/assets/images/brands/br4.jpg">
<img src="{{$public}}/assets/images/brands/br5.jpg">
<img src="{{$public}}/assets/images/brands/br6.jpg">
<img src="{{$public}}/assets/images/brands/br7.jpg">
<img src="{{$public}}/assets/images/brands/br8.jpg">
<img src="{{$public}}/assets/images/brands/br9.jpg">
<img src="{{$public}}/assets/images/brands/br10.jpg">
<img src="{{$public}}/assets/images/brands/br11.jpg">
<img src="{{$public}}/assets/images/brands/br12.jpg">
<img src="{{$public}}/assets/images/brands/br13.jpg">
<img src="{{$public}}/assets/images/brands/br14.jpg">
<img src="{{$public}}/assets/images/brands/br15.jpg">
<img src="{{$public}}/assets/images/brands/br16.jpg">
<img src="{{$public}}/assets/images/brands/br17.jpg">
<img src="{{$public}}/assets/images/brands/br18.jpg">
</div>
</div>
<div class="floor3 ">
<div class="conh w1200">
<div class="row rowCenter">
<img src="/assets/images/home/smlogo.png" alt="" class="logoftsm">
<div class="itemftsm">
<p>Company</p>
<a href="/about/company">About US</a>
<a href="/about/certification">Certifications</a>
<a href="/about/quality">IQC Center</a>
</div>
<div class="itemftsm">
<p class="w150">Help and Information</p>
<a href="javascript:void(0)" class="frqbtnxs">RFQ Form</a>
<!-- <a href="">BOM Tools</a> -->
<a href="/about/refund">Exchange & Refund</a>
</div>
<div class="itemftsm lastitem">
<p>Legal</p>
<a href="/about/term">Terms and Conditions</a>
<a href="/about/privacy">Privacy Policy</a>
<a href="/about/termuser">Terms of Use</a>
</div>
<div class="itemftsp">
<!-- <p class="row"><span>A member of</span> <img src="/assets/images/home/lxlogo.png" alt="" class="logoftsm2"></p> -->
<span>Copyright © 2023 SEMOUR ELECTRONICS All rights reserved.</span>
</div>
</div>
<div class="row rowCenter dpbto">
<i class="icon iconfont icon-youxiang"></i>
<span>INFO@SEMOUR.COM</span>
<i class="icon iconfont icon-dizhi dflt"></i>
<span>FLOOR 9, SUNBEAM CENTER, 27 SHING YIP STREET, KWUN TONG, KOWLOON, HONG KONG</span>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('js')
<script src="{{$public}}/assets/js/mall/mall.js?v={{time()}}"></script>
<script src="https://sz.ichunt.com/v3/dist/res/home/js/global/jquery.SuperSlide.2.1.3.js"></script>
<script src="{{$public}}/assets/js/mall/mall.js?v={{time()}}"></script>
@endsection
......@@ -27,6 +27,9 @@ Route::middleware(['auth'])->group(function () {
Route::get('/', 'HomeController@index')->name('home');
//简版网站
Route::get('/info','InfoController@info')->name('info');
Route::get('/login', 'AuthController@login')->name('login');
Route::get('/forget', 'AuthController@forget')->name('forget');
Route::get('/reg', 'AuthController@register')->name('register');
......
......@@ -37,130 +37,57 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-var array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
......@@ -176,10 +103,8 @@ class ClassLoader
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
......@@ -223,12 +148,10 @@ class ClassLoader
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
......@@ -273,9 +196,7 @@ class ClassLoader
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
......@@ -291,11 +212,9 @@ class ClassLoader
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
......@@ -315,8 +234,6 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
......@@ -339,8 +256,6 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
......@@ -361,8 +276,6 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
......@@ -383,44 +296,25 @@ class ClassLoader
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
......@@ -429,8 +323,6 @@ class ClassLoader
return true;
}
return null;
}
/**
......@@ -475,21 +367,6 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
......@@ -561,10 +438,6 @@ class ClassLoader
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
......
......@@ -21,11 +21,26 @@ use Composer\Semver\VersionParser;
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
......@@ -83,7 +98,7 @@ class InstalledVersions
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
......@@ -104,7 +119,7 @@ class InstalledVersions
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
......@@ -228,7 +243,7 @@ class InstalledVersions
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
......@@ -242,7 +257,7 @@ class InstalledVersions
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
......@@ -265,7 +280,7 @@ class InstalledVersions
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
......@@ -288,7 +303,7 @@ class InstalledVersions
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
......@@ -298,7 +313,7 @@ class InstalledVersions
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
......@@ -313,7 +328,9 @@ class InstalledVersions
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
......@@ -325,12 +342,17 @@ class InstalledVersions
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
return $installed;
}
......
......@@ -40,5 +40,6 @@ return array(
'ae18f0d7f1399203de0fc444e860fdd9' => $vendorDir . '/loilo/fuse/src/Helpers/deep_value.php',
'ea2171ac7e455f713fa8445ea3919da7' => $vendorDir . '/loilo/fuse/src/Helpers/get.php',
'59ff57762b50378bb54688b7561c609b' => $vendorDir . '/loilo/fuse/src/Helpers/is_list.php',
'1e298922c3e2134d42dcdb03e6d5f55a' => $vendorDir . '/torann/geoip/src/helpers.php',
'b4e3f29b106af37a2bb239f73cdf68c7' => $baseDir . '/app/helpers.php',
);
......@@ -8,6 +8,7 @@ $baseDir = dirname($vendorDir);
return array(
'voku\\' => array($vendorDir . '/voku/portable-ascii/src/voku'),
'Whoops\\' => array($vendorDir . '/filp/whoops/src/Whoops'),
'Torann\\GeoIP\\' => array($vendorDir . '/torann/geoip/src'),
'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'),
'Tests\\' => array($baseDir . '/tests'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
......@@ -49,6 +50,9 @@ return array(
'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'),
'NunoMaduro\\Collision\\' => array($vendorDir . '/nunomaduro/collision/src'),
'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'MaxMind\\WebService\\' => array($vendorDir . '/maxmind/web-service-common/src/WebService'),
'MaxMind\\Exception\\' => array($vendorDir . '/maxmind/web-service-common/src/Exception'),
'MaxMind\\Db\\' => array($vendorDir . '/maxmind-db/reader/src/MaxMind/Db'),
'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'),
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
'League\\CommonMark\\' => array($vendorDir . '/league/commonmark/src'),
......@@ -59,6 +63,7 @@ return array(
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
'GeoIp2\\' => array($vendorDir . '/geoip2/geoip2/src'),
'Fuse\\' => array($vendorDir . '/loilo/fuse/src'),
'Fruitcake\\Cors\\' => array($vendorDir . '/fruitcake/laravel-cors/src'),
'Fideloper\\Proxy\\' => array($vendorDir . '/fideloper/proxy/src'),
......@@ -73,6 +78,7 @@ return array(
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'),
'Composer\\CaBundle\\' => array($vendorDir . '/composer/ca-bundle/src'),
'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
'Brick\\Math\\' => array($vendorDir . '/brick/math/src'),
'Asm89\\Stack\\' => array($vendorDir . '/asm89/stack-cors/src'),
......
......@@ -13,24 +13,19 @@ class ComposerAutoloaderInit98d517a41e74f308f2c33f0bb882c41a
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit98d517a41e74f308f2c33f0bb882c41a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit98d517a41e74f308f2c33f0bb882c41a', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit98d517a41e74f308f2c33f0bb882c41a::getInitializer($loader));
} else {
......
Copyright (C) 2016 Composer
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
composer/ca-bundle
==================
Small utility library that lets you find a path to the system CA bundle,
and includes a fallback to the Mozilla CA bundle.
Originally written as part of [composer/composer](https://github.com/composer/composer),
now extracted and made available as a stand-alone library.
Installation
------------
Install the latest version with:
```bash
$ composer require composer/ca-bundle
```
Requirements
------------
* PHP 5.3.2 is required but using the latest version of PHP is highly recommended.
Basic usage
-----------
### `Composer\CaBundle\CaBundle`
- `CaBundle::getSystemCaRootBundlePath()`: Returns the system CA bundle path, or a path to the bundled one as fallback
- `CaBundle::getBundledCaBundlePath()`: Returns the path to the bundled CA file
- `CaBundle::validateCaFile($filename)`: Validates a CA file using openssl_x509_parse only if it is safe to use
- `CaBundle::isOpensslParseSafe()`: Test if it is safe to use the PHP function openssl_x509_parse()
- `CaBundle::reset()`: Resets the static caches
#### To use with curl
```php
$curl = curl_init("https://example.org/");
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile)) {
curl_setopt($curl, CURLOPT_CAPATH, $caPathOrFile);
} else {
curl_setopt($curl, CURLOPT_CAINFO, $caPathOrFile);
}
$result = curl_exec($curl);
```
#### To use with php streams
```php
$opts = array(
'http' => array(
'method' => "GET"
)
);
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile)) {
$opts['ssl']['capath'] = $caPathOrFile;
} else {
$opts['ssl']['cafile'] = $caPathOrFile;
}
$context = stream_context_create($opts);
$result = file_get_contents('https://example.com', false, $context);
```
#### To use with Guzzle
```php
$client = new \GuzzleHttp\Client([
\GuzzleHttp\RequestOptions::VERIFY => \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath()
]);
```
License
-------
composer/ca-bundle is licensed under the MIT License, see the LICENSE file for details.
{
"name": "composer/ca-bundle",
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"type": "library",
"license": "MIT",
"keywords": [
"cabundle",
"cacert",
"certificate",
"ssl",
"tls"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/ca-bundle/issues"
},
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^4.2 || ^5",
"phpstan/phpstan": "^0.12.55",
"psr/log": "^1.0",
"symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0"
},
"autoload": {
"psr-4": {
"Composer\\CaBundle\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Composer\\CaBundle\\": "tests"
}
},
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
}
},
"scripts": {
"test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit",
"phpstan": "vendor/bin/phpstan analyse"
}
}
This diff could not be displayed because it is too large.
{
"name": "geoip2/geoip2",
"description": "MaxMind GeoIP2 PHP API",
"keywords": ["geoip", "geoip2", "geolocation", "ip", "maxmind"],
"homepage": "https://github.com/maxmind/GeoIP2-php",
"type": "library",
"license": "Apache-2.0",
"authors": [
{
"name": "Gregory J. Oschwald",
"email": "goschwald@maxmind.com",
"homepage": "https://www.maxmind.com/"
}
],
"require": {
"maxmind-db/reader": "~1.8",
"maxmind/web-service-common": "~0.8",
"php": ">=7.2",
"ext-json": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.*",
"phpunit/phpunit": "^8.0 || ^9.0",
"squizlabs/php_codesniffer": "3.*",
"phpstan/phpstan": "*"
},
"autoload": {
"psr-4": {
"GeoIp2\\": "src"
}
}
}
<?php
require __DIR__ . '/../vendor/autoload.php';
use GeoIp2\Database\Reader;
srand(0);
$reader = new Reader('GeoIP2-City.mmdb');
$count = 500000;
$startTime = microtime(true);
for ($i = 0; $i < $count; ++$i) {
$ip = long2ip(rand(0, 2 ** 32 - 1));
try {
$t = $reader->city($ip);
} catch (\GeoIp2\Exception\AddressNotFoundException $e) {
}
if ($i % 10000 === 0) {
echo $i . ' ' . $ip . "\n";
}
}
$endTime = microtime(true);
$duration = $endTime - $startTime;
echo 'Requests per second: ' . $count / $duration . "\n";
<?php
declare(strict_types=1);
namespace GeoIp2\Exception;
/**
* This class represents a generic error.
*/
class AddressNotFoundException extends GeoIp2Exception
{
}
<?php
declare(strict_types=1);
namespace GeoIp2\Exception;
/**
* This class represents a generic error.
*/
class AuthenticationException extends GeoIp2Exception
{
}
<?php
declare(strict_types=1);
namespace GeoIp2\Exception;
/**
* This class represents a generic error.
*/
class GeoIp2Exception extends \Exception
{
}
<?php
declare(strict_types=1);
namespace GeoIp2\Exception;
/**
* This class represents an HTTP transport error.
*/
class HttpException extends GeoIp2Exception
{
/**
* The URI queried.
*
* @var string
*/
public $uri;
public function __construct(
string $message,
int $httpStatus,
string $uri,
\Exception $previous = null
) {
$this->uri = $uri;
parent::__construct($message, $httpStatus, $previous);
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Exception;
/**
* This class represents an error returned by MaxMind's GeoIP2
* web service.
*/
class InvalidRequestException extends HttpException
{
/**
* The code returned by the MaxMind web service.
*
* @var string
*/
public $error;
public function __construct(
string $message,
string $error,
int $httpStatus,
string $uri,
\Exception $previous = null
) {
$this->error = $error;
parent::__construct($message, $httpStatus, $uri, $previous);
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Exception;
/**
* This class represents a generic error.
*/
class OutOfQueriesException extends GeoIp2Exception
{
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
/**
* @ignore
*/
abstract class AbstractModel implements \JsonSerializable
{
/**
* @var array<string, mixed>
*/
protected $raw;
/**
* @ignore
*/
public function __construct(array $raw)
{
$this->raw = $raw;
}
/**
* @ignore
*
* @return mixed
*/
protected function get(string $field)
{
if (isset($this->raw[$field])) {
return $this->raw[$field];
}
if (preg_match('/^is_/', $field)) {
return false;
}
return null;
}
/**
* @ignore
*
* @return mixed
*/
public function __get(string $attr)
{
if ($attr !== 'instance' && property_exists($this, $attr)) {
return $this->{$attr};
}
throw new \RuntimeException("Unknown attribute: $attr");
}
/**
* @ignore
*/
public function __isset(string $attr): bool
{
return $attr !== 'instance' && isset($this->{$attr});
}
public function jsonSerialize(): array
{
return $this->raw;
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
use GeoIp2\Util;
/**
* This class provides the GeoIP2 Anonymous IP model.
*
* @property-read bool $isAnonymous This is true if the IP address belongs to
* any sort of anonymous network.
* @property-read bool $isAnonymousVpn This is true if the IP address is
* registered to an anonymous VPN provider. If a VPN provider does not
* register subnets under names associated with them, we will likely only
* flag their IP ranges using the isHostingProvider property.
* @property-read bool $isHostingProvider This is true if the IP address belongs
* to a hosting or VPN provider (see description of isAnonymousVpn property).
* @property-read bool $isPublicProxy This is true if the IP address belongs to
* a public proxy.
* @property-read bool $isResidentialProxy This is true if the IP address is
* on a suspected anonymizing network and belongs to a residential ISP.
* @property-read bool $isTorExitNode This is true if the IP address is a Tor
* exit node.
* @property-read string $ipAddress The IP address that the data in the model is
* for.
* @property-read string $network The network in CIDR notation associated with
* the record. In particular, this is the largest network where all of the
* fields besides $ipAddress have the same value.
*/
class AnonymousIp extends AbstractModel
{
/**
* @var bool
*/
protected $isAnonymous;
/**
* @var bool
*/
protected $isAnonymousVpn;
/**
* @var bool
*/
protected $isHostingProvider;
/**
* @var bool
*/
protected $isPublicProxy;
/**
* @var bool
*/
protected $isResidentialProxy;
/**
* @var bool
*/
protected $isTorExitNode;
/**
* @var string
*/
protected $ipAddress;
/**
* @var string
*/
protected $network;
/**
* @ignore
*/
public function __construct(array $raw)
{
parent::__construct($raw);
$this->isAnonymous = $this->get('is_anonymous');
$this->isAnonymousVpn = $this->get('is_anonymous_vpn');
$this->isHostingProvider = $this->get('is_hosting_provider');
$this->isPublicProxy = $this->get('is_public_proxy');
$this->isResidentialProxy = $this->get('is_residential_proxy');
$this->isTorExitNode = $this->get('is_tor_exit_node');
$ipAddress = $this->get('ip_address');
$this->ipAddress = $ipAddress;
$this->network = Util::cidr($ipAddress, $this->get('prefix_len'));
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
use GeoIp2\Util;
/**
* This class provides the GeoLite2 ASN model.
*
* @property-read int|null $autonomousSystemNumber The autonomous system number
* associated with the IP address.
* @property-read string|null $autonomousSystemOrganization The organization
* associated with the registered autonomous system number for the IP
* address.
* @property-read string $ipAddress The IP address that the data in the model is
* for.
* @property-read string $network The network in CIDR notation associated with
* the record. In particular, this is the largest network where all of the
* fields besides $ipAddress have the same value.
*/
class Asn extends AbstractModel
{
/**
* @var int|null
*/
protected $autonomousSystemNumber;
/**
* @var string|null
*/
protected $autonomousSystemOrganization;
/**
* @var string
*/
protected $ipAddress;
/**
* @var string
*/
protected $network;
/**
* @ignore
*/
public function __construct(array $raw)
{
parent::__construct($raw);
$this->autonomousSystemNumber = $this->get('autonomous_system_number');
$this->autonomousSystemOrganization =
$this->get('autonomous_system_organization');
$ipAddress = $this->get('ip_address');
$this->ipAddress = $ipAddress;
$this->network = Util::cidr($ipAddress, $this->get('prefix_len'));
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
/**
* Model class for the data returned by City Plus web service and City
* database.
*
* See https://dev.maxmind.com/geoip/docs/web-services?lang=en for more
* details.
*
* @property-read \GeoIp2\Record\City $city City data for the requested IP
* address.
* @property-read \GeoIp2\Record\Location $location Location data for the
* requested IP address.
* @property-read \GeoIp2\Record\Postal $postal Postal data for the
* requested IP address.
* @property-read array $subdivisions An array \GeoIp2\Record\Subdivision
* objects representing the country subdivisions for the requested IP
* address. The number and type of subdivisions varies by country, but a
* subdivision is typically a state, province, county, etc. Subdivisions
* are ordered from most general (largest) to most specific (smallest).
* If the response did not contain any subdivisions, this method returns
* an empty array.
* @property-read \GeoIp2\Record\Subdivision $mostSpecificSubdivision An object
* representing the most specific subdivision returned. If the response
* did not contain any subdivisions, this method returns an empty
* \GeoIp2\Record\Subdivision object.
*/
class City extends Country
{
/**
* @ignore
*
* @var \GeoIp2\Record\City
*/
protected $city;
/**
* @ignore
*
* @var \GeoIp2\Record\Location
*/
protected $location;
/**
* @ignore
*
* @var \GeoIp2\Record\Postal
*/
protected $postal;
/**
* @ignore
*
* @var array<\GeoIp2\Record\Subdivision>
*/
protected $subdivisions = [];
/**
* @ignore
*/
public function __construct(array $raw, array $locales = ['en'])
{
parent::__construct($raw, $locales);
$this->city = new \GeoIp2\Record\City($this->get('city'), $locales);
$this->location = new \GeoIp2\Record\Location($this->get('location'));
$this->postal = new \GeoIp2\Record\Postal($this->get('postal'));
$this->createSubdivisions($raw, $locales);
}
private function createSubdivisions(array $raw, array $locales): void
{
if (!isset($raw['subdivisions'])) {
return;
}
foreach ($raw['subdivisions'] as $sub) {
$this->subdivisions[] =
new \GeoIp2\Record\Subdivision($sub, $locales)
;
}
}
/**
* @ignore
*
* @return mixed
*/
public function __get(string $attr)
{
if ($attr === 'mostSpecificSubdivision') {
return $this->{$attr}();
}
return parent::__get($attr);
}
/**
* @ignore
*/
public function __isset(string $attr): bool
{
if ($attr === 'mostSpecificSubdivision') {
// We always return a mostSpecificSubdivision, even if it is the
// empty subdivision
return true;
}
return parent::__isset($attr);
}
private function mostSpecificSubdivision(): \GeoIp2\Record\Subdivision
{
return empty($this->subdivisions) ?
new \GeoIp2\Record\Subdivision([], $this->locales) :
end($this->subdivisions);
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
use GeoIp2\Util;
/**
* This class provides the GeoIP2 Connection-Type model.
*
* @property-read string|null $connectionType The connection type may take the
* following values: "Dialup", "Cable/DSL", "Corporate", "Cellular".
* Additional values may be added in the future.
* @property-read string $ipAddress The IP address that the data in the model is
* for.
* @property-read string $network The network in CIDR notation associated with
* the record. In particular, this is the largest network where all of the
* fields besides $ipAddress have the same value.
*/
class ConnectionType extends AbstractModel
{
/**
* @var string|null
*/
protected $connectionType;
/**
* @var string
*/
protected $ipAddress;
/**
* @var string
*/
protected $network;
/**
* @ignore
*/
public function __construct(array $raw)
{
parent::__construct($raw);
$this->connectionType = $this->get('connection_type');
$ipAddress = $this->get('ip_address');
$this->ipAddress = $ipAddress;
$this->network = Util::cidr($ipAddress, $this->get('prefix_len'));
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
/**
* Model class for the data returned by GeoIP2 Country web service and database.
*
* See https://dev.maxmind.com/geoip/docs/web-services?lang=en for more details.
*
* @property-read \GeoIp2\Record\Continent $continent Continent data for the
* requested IP address.
* @property-read \GeoIp2\Record\Country $country Country data for the requested
* IP address. This object represents the country where MaxMind believes the
* end user is located.
* @property-read \GeoIp2\Record\MaxMind $maxmind Data related to your MaxMind
* account.
* @property-read \GeoIp2\Record\Country $registeredCountry Registered country
* data for the requested IP address. This record represents the country
* where the ISP has registered a given IP block and may differ from the
* user's country.
* @property-read \GeoIp2\Record\RepresentedCountry $representedCountry
* Represented country data for the requested IP address. The represented
* country is used for things like military bases. It is only present when
* the represented country differs from the country.
* @property-read \GeoIp2\Record\Traits $traits Data for the traits of the
* requested IP address.
* @property-read array $raw The raw data from the web service.
*/
class Country extends AbstractModel
{
/**
* @var \GeoIp2\Record\Continent
*/
protected $continent;
/**
* @var \GeoIp2\Record\Country
*/
protected $country;
/**
* @var array<string>
*/
protected $locales;
/**
* @var \GeoIp2\Record\MaxMind
*/
protected $maxmind;
/**
* @var \GeoIp2\Record\Country
*/
protected $registeredCountry;
/**
* @var \GeoIp2\Record\RepresentedCountry
*/
protected $representedCountry;
/**
* @var \GeoIp2\Record\Traits
*/
protected $traits;
/**
* @ignore
*/
public function __construct(array $raw, array $locales = ['en'])
{
parent::__construct($raw);
$this->continent = new \GeoIp2\Record\Continent(
$this->get('continent'),
$locales
);
$this->country = new \GeoIp2\Record\Country(
$this->get('country'),
$locales
);
$this->maxmind = new \GeoIp2\Record\MaxMind($this->get('maxmind'));
$this->registeredCountry = new \GeoIp2\Record\Country(
$this->get('registered_country'),
$locales
);
$this->representedCountry = new \GeoIp2\Record\RepresentedCountry(
$this->get('represented_country'),
$locales
);
$this->traits = new \GeoIp2\Record\Traits($this->get('traits'));
$this->locales = $locales;
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
use GeoIp2\Util;
/**
* This class provides the GeoIP2 Domain model.
*
* @property-read string|null $domain The second level domain associated with the
* IP address. This will be something like "example.com" or
* "example.co.uk", not "foo.example.com".
* @property-read string $ipAddress The IP address that the data in the model is
* for.
* @property-read string $network The network in CIDR notation associated with
* the record. In particular, this is the largest network where all of the
* fields besides $ipAddress have the same value.
*/
class Domain extends AbstractModel
{
/**
* @var string|null
*/
protected $domain;
/**
* @var string
*/
protected $ipAddress;
/**
* @var string
*/
protected $network;
/**
* @ignore
*/
public function __construct(array $raw)
{
parent::__construct($raw);
$this->domain = $this->get('domain');
$ipAddress = $this->get('ip_address');
$this->ipAddress = $ipAddress;
$this->network = Util::cidr($ipAddress, $this->get('prefix_len'));
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
/**
* Model class for the data returned by GeoIP2 Enterprise database lookups.
*
* See https://dev.maxmind.com/geoip/docs/web-services?lang=en for more
* details.
*/
class Enterprise extends City
{
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
/**
* Model class for the data returned by GeoIP2 Insights web service.
*
* See https://dev.maxmind.com/geoip/docs/web-services?lang=en for
* more details.
*/
class Insights extends City
{
}
<?php
declare(strict_types=1);
namespace GeoIp2\Model;
use GeoIp2\Util;
/**
* This class provides the GeoIP2 ISP model.
*
* @property-read int|null $autonomousSystemNumber The autonomous system number
* associated with the IP address.
* @property-read string|null $autonomousSystemOrganization The organization
* associated with the registered autonomous system number for the IP
* address.
* @property-read string|null $isp The name of the ISP associated with the IP
* address.
* @property-read string|null $mobileCountryCode The [mobile country code
* (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with
* the IP address and ISP.
* @property-read string|null $mobileNetworkCode The [mobile network code
* (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with
* the IP address and ISP.
* @property-read string|null $organization The name of the organization associated
* with the IP address.
* @property-read string $ipAddress The IP address that the data in the model is
* for.
* @property-read string $network The network in CIDR notation associated with
* the record. In particular, this is the largest network where all of the
* fields besides $ipAddress have the same value.
*/
class Isp extends AbstractModel
{
/**
* @var int|null
*/
protected $autonomousSystemNumber;
/**
* @var string|null
*/
protected $autonomousSystemOrganization;
/**
* @var string|null
*/
protected $isp;
/**
* @var string|null
*/
protected $mobileCountryCode;
/**
* @var string|null
*/
protected $mobileNetworkCode;
/**
* @var string|null
*/
protected $organization;
/**
* @var string
*/
protected $ipAddress;
/**
* @var string
*/
protected $network;
/**
* @ignore
*/
public function __construct(array $raw)
{
parent::__construct($raw);
$this->autonomousSystemNumber = $this->get('autonomous_system_number');
$this->autonomousSystemOrganization =
$this->get('autonomous_system_organization');
$this->isp = $this->get('isp');
$this->mobileCountryCode = $this->get('mobile_country_code');
$this->mobileNetworkCode = $this->get('mobile_network_code');
$this->organization = $this->get('organization');
$ipAddress = $this->get('ip_address');
$this->ipAddress = $ipAddress;
$this->network = Util::cidr($ipAddress, $this->get('prefix_len'));
}
}
<?php
declare(strict_types=1);
namespace GeoIp2;
interface ProviderInterface
{
/**
* @param string $ipAddress an IPv4 or IPv6 address to lookup
*
* @return \GeoIp2\Model\Country a Country model for the requested IP address
*/
public function country(string $ipAddress): Model\Country;
/**
* @param string $ipAddress an IPv4 or IPv6 address to lookup
*
* @return \GeoIp2\Model\City a City model for the requested IP address
*/
public function city(string $ipAddress): Model\City;
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
abstract class AbstractPlaceRecord extends AbstractRecord
{
/**
* @var array<string>
*/
private $locales;
/**
* @ignore
*/
public function __construct(?array $record, array $locales = ['en'])
{
$this->locales = $locales;
parent::__construct($record);
}
/**
* @ignore
*
* @return mixed
*/
public function __get(string $attr)
{
if ($attr === 'name') {
return $this->name();
}
return parent::__get($attr);
}
/**
* @ignore
*/
public function __isset(string $attr): bool
{
if ($attr === 'name') {
return $this->firstSetNameLocale() !== null;
}
return parent::__isset($attr);
}
private function name(): ?string
{
$locale = $this->firstSetNameLocale();
// @phpstan-ignore-next-line
return $locale === null ? null : $this->names[$locale];
}
private function firstSetNameLocale(): ?string
{
foreach ($this->locales as $locale) {
if (isset($this->names[$locale])) {
return $locale;
}
}
return null;
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
abstract class AbstractRecord implements \JsonSerializable
{
/**
* @var array<string, mixed>
*/
private $record;
/**
* @ignore
*/
public function __construct(?array $record)
{
$this->record = isset($record) ? $record : [];
}
/**
* @ignore
*
* @return mixed
*/
public function __get(string $attr)
{
// XXX - kind of ugly but greatly reduces boilerplate code
$key = $this->attributeToKey($attr);
if ($this->__isset($attr)) {
return $this->record[$key];
}
if ($this->validAttribute($attr)) {
if (preg_match('/^is_/', $key)) {
return false;
}
return null;
}
throw new \RuntimeException("Unknown attribute: $attr");
}
public function __isset(string $attr): bool
{
return $this->validAttribute($attr)
&& isset($this->record[$this->attributeToKey($attr)]);
}
private function attributeToKey(string $attr): string
{
return strtolower(preg_replace('/([A-Z])/', '_\1', $attr));
}
private function validAttribute(string $attr): bool
{
// @phpstan-ignore-next-line
return \in_array($attr, $this->validAttributes, true);
}
public function jsonSerialize(): ?array
{
return $this->record;
}
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
/**
* City-level data associated with an IP address.
*
* This record is returned by all location services and databases besides
* Country.
*
* @property-read int|null $confidence A value from 0-100 indicating MaxMind's
* confidence that the city is correct. This attribute is only available
* from the Insights service and the GeoIP2 Enterprise database.
* @property-read int|null $geonameId The GeoName ID for the city. This attribute
* is returned by all location services and databases.
* @property-read string|null $name The name of the city based on the locales list
* passed to the constructor. This attribute is returned by all location
* services and databases.
* @property-read array|null $names An array map where the keys are locale codes
* and the values are names. This attribute is returned by all location
* services and databases.
*/
class City extends AbstractPlaceRecord
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = ['confidence', 'geonameId', 'names'];
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
/**
* Contains data for the continent record associated with an IP address.
*
* This record is returned by all location services and databases.
*
* @property-read string|null $code A two character continent code like "NA" (North
* America) or "OC" (Oceania). This attribute is returned by all location
* services and databases.
* @property-read int|null $geonameId The GeoName ID for the continent. This
* attribute is returned by all location services and databases.
* @property-read string|null $name Returns the name of the continent based on the
* locales list passed to the constructor. This attribute is returned by all location
* services and databases.
* @property-read array|null $names An array map where the keys are locale codes
* and the values are names. This attribute is returned by all location
* services and databases.
*/
class Continent extends AbstractPlaceRecord
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = [
'code',
'geonameId',
'names',
];
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
/**
* Contains data for the country record associated with an IP address.
*
* This record is returned by all location services and databases.
*
* @property-read int|null $confidence A value from 0-100 indicating MaxMind's
* confidence that the country is correct. This attribute is only available
* from the Insights service and the GeoIP2 Enterprise database.
* @property-read int|null $geonameId The GeoName ID for the country. This
* attribute is returned by all location services and databases.
* @property-read bool $isInEuropeanUnion This is true if the country is a
* member state of the European Union. This attribute is returned by all
* location services and databases.
* @property-read string|null $isoCode The two-character ISO 3166-1 alpha code
* for the country. See https://en.wikipedia.org/wiki/ISO_3166-1. This
* attribute is returned by all location services and databases.
* @property-read string|null $name The name of the country based on the locales
* list passed to the constructor. This attribute is returned by all location
* services and databases.
* @property-read array|null $names An array map where the keys are locale codes
* and the values are names. This attribute is returned by all location
* services and databases.
*/
class Country extends AbstractPlaceRecord
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = [
'confidence',
'geonameId',
'isInEuropeanUnion',
'isoCode',
'names',
];
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
/**
* Contains data for the location record associated with an IP address.
*
* This record is returned by all location services and databases besides
* Country.
*
* @property-read int|null $averageIncome The average income in US dollars
* associated with the requested IP address. This attribute is only available
* from the Insights service.
* @property-read int|null $accuracyRadius The approximate accuracy radius in
* kilometers around the latitude and longitude for the IP address. This is
* the radius where we have a 67% confidence that the device using the IP
* address resides within the circle centered at the latitude and longitude
* with the provided radius.
* @property-read float|null $latitude The approximate latitude of the location
* associated with the IP address. This value is not precise and should not be
* used to identify a particular address or household.
* @property-read float|null $longitude The approximate longitude of the location
* associated with the IP address. This value is not precise and should not be
* used to identify a particular address or household.
* @property-read int|null $populationDensity The estimated population per square
* kilometer associated with the IP address. This attribute is only available
* from the Insights service.
* @property-read int|null $metroCode The metro code of the location if the location
* is in the US. MaxMind returns the same metro codes as the
* Google AdWords API. See
* https://developers.google.com/adwords/api/docs/appendix/cities-DMAregions.
* @property-read string|null $timeZone The time zone associated with location, as
* specified by the IANA Time Zone Database, e.g., "America/New_York". See
* https://www.iana.org/time-zones.
*/
class Location extends AbstractRecord
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = [
'averageIncome',
'accuracyRadius',
'latitude',
'longitude',
'metroCode',
'populationDensity',
'postalCode',
'postalConfidence',
'timeZone',
];
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
/**
* Contains data about your account.
*
* This record is returned by all location services and databases.
*
* @property-read int|null $queriesRemaining The number of remaining queries you
* have for the service you are calling.
*/
class MaxMind extends AbstractRecord
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = ['queriesRemaining'];
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
/**
* Contains data for the postal record associated with an IP address.
*
* This record is returned by all location databases and services besides
* Country.
*
* @property-read string|null $code The postal code of the location. Postal codes
* are not available for all countries. In some countries, this will only
* contain part of the postal code. This attribute is returned by all location
* databases and services besides Country.
* @property-read int|null $confidence A value from 0-100 indicating MaxMind's
* confidence that the postal code is correct. This attribute is only
* available from the Insights service and the GeoIP2 Enterprise
* database.
*/
class Postal extends AbstractRecord
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = ['code', 'confidence'];
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
/**
* Contains data for the represented country associated with an IP address.
*
* This class contains the country-level data associated with an IP address
* for the IP's represented country. The represented country is the country
* represented by something like a military base.
*
* @property-read string|null $type A string indicating the type of entity that is
* representing the country. Currently we only return <code>military</code>
* but this could expand to include other types in the future.
*/
class RepresentedCountry extends Country
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = [
'confidence',
'geonameId',
'isInEuropeanUnion',
'isoCode',
'names',
'type',
];
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
/**
* Contains data for the subdivisions associated with an IP address.
*
* This record is returned by all location databases and services besides
* Country.
*
* @property-read int|null $confidence This is a value from 0-100 indicating
* MaxMind's confidence that the subdivision is correct. This attribute is
* only available from the Insights service and the GeoIP2 Enterprise
* database.
* @property-read int|null $geonameId This is a GeoName ID for the subdivision.
* This attribute is returned by all location databases and services besides
* Country.
* @property-read string|null $isoCode This is a string up to three characters long
* contain the subdivision portion of the ISO 3166-2 code. See
* https://en.wikipedia.org/wiki/ISO_3166-2. This attribute is returned by all
* location databases and services except Country.
* @property-read string|null $name The name of the subdivision based on the
* locales list passed to the constructor. This attribute is returned by all
* location databases and services besides Country.
* @property-read array|null $names An array map where the keys are locale codes
* and the values are names. This attribute is returned by all location
* databases and services besides Country.
*/
class Subdivision extends AbstractPlaceRecord
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = [
'confidence',
'geonameId',
'isoCode',
'names',
];
}
<?php
declare(strict_types=1);
namespace GeoIp2\Record;
use GeoIp2\Util;
/**
* Contains data for the traits record associated with an IP address.
*
* This record is returned by all location services and databases.
*
* @property-read int|null $autonomousSystemNumber The autonomous system number
* associated with the IP address. See
* https://en.wikipedia.org/wiki/Autonomous_system_(Internet%29. This attribute
* is only available from the City Plus and Insights web services and the
* GeoIP2 Enterprise database.
* @property-read string|null $autonomousSystemOrganization The organization
* associated with the registered autonomous system number for the IP address.
* See https://en.wikipedia.org/wiki/Autonomous_system_(Internet%29. This
* attribute is only available from the City Plus and Insights web services and
* the GeoIP2 Enterprise database.
* @property-read string|null $connectionType The connection type may take the
* following values: "Dialup", "Cable/DSL", "Corporate", "Cellular".
* Additional values may be added in the future. This attribute is only
* available in the GeoIP2 Enterprise database.
* @property-read string|null $domain The second level domain associated with the
* IP address. This will be something like "example.com" or "example.co.uk",
* not "foo.example.com". This attribute is only available from the
* City Plus and Insights web services and the GeoIP2 Enterprise
* database.
* @property-read string $ipAddress The IP address that the data in the model
* is for. If you performed a "me" lookup against the web service, this
* will be the externally routable IP address for the system the code is
* running on. If the system is behind a NAT, this may differ from the IP
* address locally assigned to it. This attribute is returned by all end
* points.
* @property-read bool $isAnonymous This is true if the IP address belongs to
* any sort of anonymous network. This property is only available from GeoIP2
* Insights.
* @property-read bool $isAnonymousProxy *Deprecated.* Please see our GeoIP2
* Anonymous IP database
* (https://www.maxmind.com/en/geoip2-anonymous-ip-database) to determine
* whether the IP address is used by an anonymizing service.
* @property-read bool $isAnonymousVpn This is true if the IP address is
* registered to an anonymous VPN provider. If a VPN provider does not register
* subnets under names associated with them, we will likely only flag their IP
* ranges using the isHostingProvider property. This property is only available
* from GeoIP2 Insights.
* @property-read bool $isHostingProvider This is true if the IP address belongs
* to a hosting or VPN provider (see description of isAnonymousVpn property).
* This property is only available from GeoIP2 Insights.
* @property-read bool $isLegitimateProxy This attribute is true if MaxMind
* believes this IP address to be a legitimate proxy, such as an internal
* VPN used by a corporation. This attribute is only available in the GeoIP2
* Enterprise database.
* @property-read bool $isPublicProxy This is true if the IP address belongs to
* a public proxy. This property is only available from GeoIP2 Insights.
* @property-read bool $isResidentialProxy This is true if the IP address is
* on a suspected anonymizing network and belongs to a residential ISP. This
* property is only available from GeoIP2 Insights.
* @property-read bool $isSatelliteProvider *Deprecated.* Due to the
* increased coverage by mobile carriers, very few satellite providers now
* serve multiple countries. As a result, the output does not provide
* sufficiently relevant data for us to maintain it.
* @property-read bool $isTorExitNode This is true if the IP address is a Tor
* exit node. This property is only available from GeoIP2 Insights.
* @property-read string|null $isp The name of the ISP associated with the IP
* address. This attribute is only available from the City Plus and Insights
* web services and the GeoIP2 Enterprise database.
* @property-read string $network The network in CIDR notation associated with
* the record. In particular, this is the largest network where all of the
* fields besides $ipAddress have the same value.
* @property-read string|null $organization The name of the organization
* associated with the IP address. This attribute is only available from the
* City Plus and Insights web services and the GeoIP2 Enterprise database.
* @property-read string|null $mobileCountryCode The [mobile country code
* (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with
* the IP address and ISP. This property is available from the City Plus and
* Insights web services and the GeoIP2 Enterprise database.
* @property-read string|null $mobileNetworkCode The [mobile network code
* (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with
* the IP address and ISP. This property is available from the City Plus and
* Insights web services and the GeoIP2 Enterprise database.
* @property-read float|null $staticIpScore An indicator of how static or
* dynamic an IP address is. This property is only available from GeoIP2
* Insights.
* @property-read int|null $userCount The estimated number of users sharing
* the IP/network during the past 24 hours. For IPv4, the count is for the
* individual IP. For IPv6, the count is for the /64 network. This property is
* only available from GeoIP2 Insights.
* @property-read string|null $userType <p>The user type associated with the IP
* address. This can be one of the following values:</p>
* <ul>
* <li>business
* <li>cafe
* <li>cellular
* <li>college
* <li>consumer_privacy_network
* <li>content_delivery_network
* <li>dialup
* <li>government
* <li>hosting
* <li>library
* <li>military
* <li>residential
* <li>router
* <li>school
* <li>search_engine_spider
* <li>traveler
* </ul>
* <p>
* This attribute is only available from the Insights web service and the
* GeoIP2 Enterprise database.
* </p>
*/
class Traits extends AbstractRecord
{
/**
* @ignore
*
* @var array<string>
*/
protected $validAttributes = [
'autonomousSystemNumber',
'autonomousSystemOrganization',
'connectionType',
'domain',
'ipAddress',
'isAnonymous',
'isAnonymousProxy',
'isAnonymousVpn',
'isHostingProvider',
'isLegitimateProxy',
'isp',
'isPublicProxy',
'isResidentialProxy',
'isSatelliteProvider',
'isTorExitNode',
'mobileCountryCode',
'mobileNetworkCode',
'network',
'organization',
'staticIpScore',
'userCount',
'userType',
];
public function __construct(?array $record)
{
if (!isset($record['network']) && isset($record['ip_address'], $record['prefix_len'])) {
$record['network'] = Util::cidr($record['ip_address'], $record['prefix_len']);
}
parent::__construct($record);
}
}
<?php
declare(strict_types=1);
namespace GeoIp2;
class Util
{
/**
* This returns the network in CIDR notation for the given IP and prefix
* length. This is for internal use only.
*
* @internal
* @ignore
*/
public static function cidr(string $ipAddress, int $prefixLen): string
{
$ipBytes = inet_pton($ipAddress);
$networkBytes = str_repeat("\0", \strlen($ipBytes));
$curPrefix = $prefixLen;
for ($i = 0; $i < \strlen($ipBytes) && $curPrefix > 0; $i++) {
$b = $ipBytes[$i];
if ($curPrefix < 8) {
$shiftN = 8 - $curPrefix;
$b = \chr(0xFF & (\ord($b) >> $shiftN) << $shiftN);
}
$networkBytes[$i] = $b;
$curPrefix -= 8;
}
$network = inet_ntop($networkBytes);
return "$network/$prefixLen";
}
}
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment