ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,76 @@
<?php
$_helper = $this->helper( 'Olegnax\Athlete2\Helper\CssFiles' );
$theme_helper = $this->helper( 'Olegnax\Athlete2\Helper\Helper' );
$at_settings = $theme_helper->getConfig( 'athlete2_settings/contacts_page' );
$firstBlock = $at_settings[ 'first_block_type' ];
$secondBlock = $theme_helper->getBlockTemplateProcessor( $at_settings[ 'second_block_content' ] );
$contactsLayout = $at_settings[ 'contacts_layout' ];
$secondBlockShow = $at_settings[ 'second_block_show' ];
$thirdBlockShow = $at_settings[ 'third_block_show' ];
$thirdBlock = $theme_helper->getBlockTemplateProcessor( $at_settings[ 'third_block_content' ] );
switch ( $firstBlock ) {
case 'google_map':
$firstBlock = $this->getChildHtml( 'google_map' );
break;
case 'image':
if ( $contactsLayout === 'left-right' ) {
$firstBlock = '<div style="min-height:500px;">&nbsp;</div>';
} else {
$firstBlock = '<img src="' . $_helper->getBaseMediaUrl( Olegnax\Athlete2\Model\Config\Backend\Image\Logo::UPLOAD_DIR ) . "/" . $at_settings[ 'contacts_page_image' ] . '" />';
}
break;
case 'content':
$firstBlock = '<div class="contacts-first-block-inner">' . $theme_helper->getBlockTemplateProcessor( $at_settings[ 'first_block_content' ] ) . '</div>';
break;
default:
$firstBlock = '';
}
if ( $contactsLayout === 'left-right' ) {
?>
<div class="contacts-wrapper">
<div class="row contacts-layout-split">
<?php if(!empty($firstBlock)) { ?>
<div class="col-md-6 contacts-first-block"><?= $firstBlock ?></div>
<?php } ?>
<div class="col-md-6 contacts-form-block">
<?php if ( $secondBlockShow ) {
echo '<div class="contacts-second-block">' . $secondBlock . '</div>';
} ?>
<?php echo $this->getChildHtml( 'contactForm' ) ?>
</div>
<?php if ( $thirdBlockShow ) {
echo '<div class="col-12 contacts-third-block">' . $thirdBlock . '</div>';
} ?>
</div>
</div>
<?php } else { ?>
<div class="row contacts-layout-default">
<?php if(!empty($firstBlock)) { ?>
<div class="col-md-12 contacts-first-block"><?= $firstBlock ?></div>
<?php } ?>
<div class="container">
<div class="row contacts-page-row">
<?php if ( $secondBlockShow ) { ?>
<div class="col-md-6 contacts-form-block">
<?php echo $this->getChildHtml( 'contactForm' ) ?>
</div>
<div class="col-md-6 contacts-second-block">
<?= $secondBlock ?>
</div>
<?php } else { ?>
<div class="col-md-12">
<?php echo $this->getChildHtml( 'contactForm' ) ?>
</div>
<?php } ?>
</div>
<div class="row">
<?php if ( $thirdBlockShow ) {
echo '<div class="col-12 contacts-third-block">' . $thirdBlock . '</div>';
} ?>
</div>
</div>
</div>
<?php } ?>
@@ -0,0 +1,52 @@
<?php
$theme_helper = $this->helper( 'Olegnax\Athlete2\Helper\Helper' );
$at_settings = $theme_helper->getConfig( 'athlete2_settings/contacts_page' );
if ( $at_settings[ 'first_block_type' ] === 'google_map' ) {
if ( $theme_helper->isActivePlugin( 'Olegnax_GoogleMap' ) && $at_settings[ 'google_map_module' ]) {
echo $this->getChildHtml( 'ox.google.map' );
} else {
$google_map_api_key = $at_settings[ 'google_map_api_key' ];
$google_map_latitude = $at_settings[ 'google_map_latitude' ];
$google_map_longitude = $at_settings[ 'google_map_longitude' ];
$google_map_zoom = $at_settings[ 'google_map_zoom' ] ?: 4;
$svgColor1 = $at_settings[ 'google_map_pin_color1' ] ?: '#000000';
$svgColor2 = $at_settings[ 'google_map_pin_color2' ] ?: '#f8e749';
?>
<div id="contact-page-gmap" ></div>
<script>
function initMap() {
// The location of Uluru
var uluru = { lat: <?= $google_map_latitude ?>, lng: <?= $google_map_longitude ?> };
// The map, centered at Uluru
var map = new google.maps.Map(
document.getElementById( 'contact-page-gmap' ), { zoom: <?= $google_map_zoom ?>, center: uluru, mapTypeControlOptions: { mapTypeIds: [] }, streetViewControl: false } );
// Marker SVG
var athleteMarkerSvg = [
'<svg id="athlete-marker" data-name="athlete-marker" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 48.4">',
'<circle fill="{{ color2 }}" cx="17" cy="17" r="17"/>',
'<circle fill="{{ color }}" cx="17" cy="17" r="6"/>',
'<polyline fill="{{ color3 }}" points="30.9 26.8 17.1 48.4 2.6 26"/>',
'</svg>'
].join('\n');
var athleteMarker = athleteMarkerSvg.replace('{{ color }}', '<?= $svgColor2 ?>').replace('{{ color2 }}', '<?= $svgColor1 ?>').replace('{{ color3 }}', '<?= $svgColor1 ?>');
// The marker, positioned at Uluru
var marker = new google.maps.Marker( {
position: uluru,
map: map,
icon: { url: 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(athleteMarker), scaledSize: new google.maps.Size(34, 48) }, optimized: false
/*icon: { url: 'data:image/svg+xml;charset=UTF-8,' + encodeURIComponent(athleteMarker), scaledSize: new google.maps.Size(34, 48) },*/
} );
}
</script>
<!--Load the API from the specified URL
* The async attribute allows the browser to render the page while the API loads
* The key parameter will contain your own API key (which is not needed for this tutorial)
* The callback parameter executes the initMap() function
-->
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=<?= $google_map_api_key ?>&callback=initMap">
</script>
<?php }
}