forked from MaxPovver/fl-ru-damp
/
iframe_100pct.php
51 lines (48 loc) · 2.4 KB
/
iframe_100pct.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
if (preg_match("/^\d+\|\d+$/", $_GET['p'], $matches))
$g_page_id = $matches[0];
require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/banners.php");
session_start();
if ($g_page_id) {
$banners = new banners;
$banner = $banners->ViewBanner($g_page_id, 5);
}
?><!DOCTYPE html>
<html>
<head>
<style>
body{margin: 0;padding: 0;}
div{height: 90px;vertical-align:top; padding:0; margin:0}
img{border: 0px; padding:0; margin:0;}
</style>
<script type="text/javascript" src="<?=WDCPREFIX?>/scripts/swfobject.js"></script> <? // äîëæåí áûòü ëèíê íà ïàïêó /scripts â ïàïêå âåáäàâà ?>
</head>
<body>
<div <?=($banner?'style="border-bottom:1px solid #ccc;"':'')?>>
<? if ($banner) { ?>
<? if ($banner['code']) echo $banner['code']; ?>
<? if (!$banner['code']) { ?>
<? if ($banner['type'] != 4 && $banner['type'] != 13) { ?>
<a href="/banners/click.php?id=<?= $banner['id'] ?>" target="_blank"><img src="<?= WDCPREFIX ?>/banners/<?= $banner['filename'] ?>" alt="" height="<?= $banner['height'] ?>" /></a>
<? } else { ?>
<script type="text/javascript">
swfobject.embedSWF("<?= WDCPREFIX ?>/banners/<?= $banner['filename'] ?>?link1=/banners/click.php?id=<?= $banner['id'] ?>", "TopBannerSwf", "100%", "<?= $banner['height'] ?>", "9.0.0", "/scripts/expressInstall.swf", false, {wmode:"opaque"});
</script>
<div id="TopBannerSwf" style="height:<?= $banner['height'] ?>px">
<? if ($banner['stat_fname']) { ?>
<img src="<?= WDCPREFIX ?>/banners/<?= $banner['stat_fname'] ?>" alt="" width="<?= $banner['width'] ?>" height="<?= $banner['height'] ?>" />
<? } ?>
</div>
<? } ?>
<? } ?>
<script>
try {
if (this.parent.document.getElement('div.b-banner_layout_horiz'))
this.parent.document.getElement('div.b-banner_layout_horiz').show();
} catch(e) {}
</script>
<? } ?>
<?=$banner['pixel']?>
</div>
</body>
</html>