35 lines
1.2 KiB
PHP
35 lines
1.2 KiB
PHP
<?
|
|
$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>
|