first commit
This commit is contained in:
35
templates/banner/main-banner.php
Normal file
35
templates/banner/main-banner.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?
|
||||
$image = getimagesize( substr( $this -> banner['languages']['src'], 1, strlen( $this -> banner['languages']['src'] ) ) );
|
||||
?>
|
||||
<div id="banner-bg" onClick="banner_close(); return false;">
|
||||
<div id="banner"
|
||||
<? if ( $this -> banner['languages']['url'] ):?>onClick="document.location.href='<?= $this -> banner['languages']['url'];?>'; return false;"<? endif;?>
|
||||
style="
|
||||
<? if ( $this -> banner['languages']['src'] ):?>background-image: url( '<?= $this -> banner['languages']['src'];?>' );<? endif;?>
|
||||
<? if ( $image[0] ):?> width: <?= $image[0];?>px;<? endif;?>
|
||||
<? if ( $image[1] ):?> height: <?= $image[1];?>px;<? endif;?>
|
||||
"
|
||||
>
|
||||
<? if ( $this -> banner['languages']['html'] ): echo $this -> banner['languages']['html']; endif;?>
|
||||
<? if ( $this -> banner['languages']['text'] ): echo $this -> banner['languages']['text']; endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function banner_close()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: 'ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'banner_close'
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
jQuery( "#banner-bg" ).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user