-
Notifications
You must be signed in to change notification settings - Fork 8
/
js.php
28 lines (27 loc) · 869 Bytes
/
js.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
<?php
require './ads.php';
///////////////////////////////////////
// Don't Edit Anything Below This Line!
///////////////////////////////////////
if (!isset($_GET['id']) || !ereg('^[A-Za-z0-9 ]+$', $_GET['id'])) {
$_GET['id'] = null;
}
if (!isset($_GET['width']) || !ereg('^[0-9]+$', $_GET['width'])) {
$_GET['width'] = 0;
}
if (!isset($_GET['width']) || !isset($_GET['height']) || !ereg('^[0-9]+$', $_GET['height'])) {
$_GET['height'] = 0;
}
$buttons = new bannerAds($_GET['id'], 1, $_GET['width'], $_GET['height']);
header('Content-type: application/x-javascript');
if($buttons && strlen(trim($buttons->ad[0])) )
{
echo "<!--\n";
echo "document.write(\"" .addslashes($buttons->ad[0]). "\");\n";
echo "//-->";
} else {
echo "<!--\n";
echo "document.write(\"".addslashes($bannerAds['default_display'])."\");\n";
echo "//-->";
}
?>