-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpadsnew.inc.php
56 lines (43 loc) · 1.73 KB
/
phpadsnew.inc.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
52
53
54
55
56
<?php
/*
+---------------------------------------------------------------------------+
| Revive Adserver |
| http://www.revive-adserver.com |
| |
| Copyright: See the COPYRIGHT.txt file. |
| License: GPLv2 or later, see the LICENSE.txt file. |
+---------------------------------------------------------------------------+
*/
// Globalize context
// (just in case phpadsnew.inc.php is called from a function)
global $phpAds_context;
if (!defined('PHPADSNEW_INCLUDED'))
{
// Figure out our location
if (strlen(__FILE__) > strlen(basename(__FILE__)))
define ('MAX_PATH', substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) - 1));
else
define ('MAX_PATH', '.');
// Require the initialisation file
require MAX_PATH . '/init-delivery.php';
// Required files
require MAX_PATH . '/lib/max/Delivery/adSelect.php';
function view_raw($what, $clientid = 0, $target = '', $source = '', $withtext = 0, $context = 0, $richmedia = true)
{
$output = MAX_adSelect($what, $clientid, $target, $source, $withtext, '', $context, $richmedia, '', '', '');
return $output;
}
function view($what, $clientid = 0, $target = '', $source = '', $withtext = 0, $context = 0, $richmedia = true)
{
$output = view_raw($what, $clientid, "$target", "$source", $withtext, $context, $richmedia);
if (is_array($output))
{
echo $output['html'];
return $output['bannerid'];
}
return false;
}
// Prevent duplicate includes
define ('PHPADSNEW_INCLUDED', true);
}
?>