Esempio n. 1
0
$extra .= "<input type='hidden' name='campaignid' value='{$campaignid}'>";
$extra .= "<input type='hidden' name='bannerid' value='{$bannerid}'>";
$extra .= "<input type='hidden' name='returnurl' value='banner-acl.php'>";
$extra .= "<br><br>";
$extra .= "<b>{$strModifyBanner}</b><br>";
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
$extra .= "<img src='images/icon-duplicate-banner.gif' align='absmiddle'>&nbsp;<a href='banner-modify.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $bannerid . "&duplicate=true&returnurl=banner-acl.php'>{$strDuplicate}</a><br>";
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
$extra .= "<img src='images/icon-move-banner.gif' align='absmiddle'>&nbsp;{$strMoveTo}<br>";
$extra .= "<img src='images/spacer.gif' height='1' width='160' vspace='2'><br>";
$extra .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$extra .= "<select name='moveto' style='width: 110;'>";
if (phpAds_isUser(phpAds_Admin)) {
    $query = "SELECT campaignid,campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE campaignid!=" . $campaignid;
} elseif (phpAds_isUser(phpAds_Agency)) {
    $query = "SELECT m.campaignid AS campaignid" . ",m.campaignname AS campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND m.campaignid!=" . $campaignid . " AND c.agencyid=" . phpAds_getAgencyID();
}
$res = phpAds_dbQuery($query) or phpAds_sqlDie();
while ($row = phpAds_dbFetchArray($res)) {
    $extra .= "<option value='" . $row['campaignid'] . "'>" . phpAds_buildName($row['campaignid'], $row['campaignname']) . "</option>";
}
$extra .= "</select>&nbsp;<input type='image' name='moveto' src='images/" . $phpAds_TextDirection . "/go_blue.gif'><br>";
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
$extra .= "<img src='images/icon-duplicate-acl.gif' align='absmiddle'>&nbsp;{$strApplyLimitationsTo}<br>";
$extra .= "<img src='images/spacer.gif' height='1' width='160' vspace='2'><br>";
$extra .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$extra .= "<select name='applyto' style='width: 110;'>";
$res = phpAds_dbQuery("SELECT * FROM " . $phpAds_config['tbl_banners'] . " WHERE bannerid != '" . $bannerid . "' AND campaignid = '" . $campaignid . "'") or phpAds_sqlDie();
while ($row = phpAds_dbFetchArray($res)) {
    $extra .= "<option value='" . $row['bannerid'] . "'>" . phpAds_buildBannerName($row['bannerid'], $row['description'], $row['alt']) . "</option>";
}
Esempio n. 2
0
require "lib-install-db.inc.php";
require "lib-statistics.inc.php";
require "lib-storage.inc.php";
require "lib-banner.inc.php";
require "lib-zones.inc.php";
// Turn off database compatibility mode
$phpAds_config['compatibility_mode'] = false;
// Open the database connection
$link = phpAds_dbConnect();
if (!$link) {
    phpAds_PageHeader('');
    phpAds_Die("A fatal error occurred", "phpAdsNew can't connect to the database, \n\t\t\t\t\t\t\t\t\t\t   please make sure the database is working \n\t\t\t\t\t\t\t\t\t\t   and phpAdsNew is configured correctly");
} else {
    // Load settings from the database
    // in case settings are stored in the database
    phpAds_LoadDbConfig(phpAds_getAgencyID());
}
// Disable GZIP compression
$phpAds_config['content_gzip_compression'] = false;
// First thing to do is clear the $Session variable to
// prevent users from pretending to be logged in.
unset($Session);
// Authorize the user
phpAds_Start();
// Load language strings
@(include phpAds_path . '/language/english/default.lang.php');
if ($phpAds_config['language'] != 'english' && file_exists(phpAds_path . '/language/' . $phpAds_config['language'] . '/default.lang.php')) {
    @(include phpAds_path . '/language/' . $phpAds_config['language'] . '/default.lang.php');
} else {
    $phpAds_config['language'] = 'english';
}
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-expiration.inc.php";
// Register input variables
phpAds_registerGlobal('period', 'start', 'limit');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency + phpAds_Client);
// Check so that user doesnt access page through URL
if (phpAds_isUser(phpAds_Client)) {
    if (phpAds_isAllowed(phpAds_ViewTargetingStats)) {
        $clientid = phpAds_getUserID();
        if (isset($campaignid) && $campaignid != '') {
            $query = "SELECT c.clientid" . " FROM " . $phpAds_config['tbl_clients'] . " AS c" . "," . $phpAds_config['tbl_campaigns'] . " AS m" . " WHERE c.clientid=m.clientid" . " AND c.clientid=" . $clientid . " AND m.campaignid=" . $campaignid . " AND agencyid=" . phpAds_getAgencyID();
        } else {
            $query = "SELECT c.clientid" . " FROM " . $phpAds_config['tbl_clients'] . " AS c" . " WHERE c.clientid=" . $clientid . " AND agencyid=" . phpAds_getAgencyID();
        }
        $res = phpAds_dbQuery($query) or phpAds_sqlDie();
        if (phpAds_dbNumRows($res) == 0) {
            phpAds_PageHeader("2");
            phpAds_Die($strAccessDenied, $strNotAdmin);
        }
    } else {
        phpAds_PageHeader("2");
        phpAds_Die($strAccessDenied, $strNotAdmin);
    }
} elseif (phpAds_isUser(phpAds_Agency)) {
    if (isset($campaignid) && $campaignid != '') {
        $query = "SELECT c.clientid" . " FROM " . $phpAds_config['tbl_clients'] . " AS c" . "," . $phpAds_config['tbl_campaigns'] . " AS m" . " WHERE c.clientid=m.clientid" . " AND c.clientid=" . $clientid . " AND m.campaignid=" . $campaignid . " AND agencyid=" . phpAds_getUserID();
    } else {
        $query = "SELECT c.clientid" . " FROM " . $phpAds_config['tbl_clients'] . " AS c" . " WHERE c.clientid=" . $clientid . " AND agencyid=" . phpAds_getUserID();
Esempio n. 4
0
// Check for SLL requirements
if ($phpAds_config['ui_forcessl'] && $HTTP_SERVER_VARS['SERVER_PORT'] != 443) {
    header('Location: ' . $phpAds_config['ssl_url_prefix'] . $HTTP_SERVER_VARS['PHP_SELF']);
    exit;
}
// Adjust url_prefix if SLL is used
if ($HTTP_SERVER_VARS['SERVER_PORT'] == 443) {
    $phpAds_config['url_prefix'] = $phpAds_config['ssl_url_prefix'];
}
// First thing to do is clear the $Session variable to
// prevent users from pretending to be logged in.
unset($Session);
// Authorize the user
phpAds_Start();
// Reload settings from the database because we are using agency settings.
$agencyid = phpAds_getAgencyID();
if ($agencyid > 0) {
    phpAds_LoadDbConfig($agencyid);
}
// Load language strings
@(include phpAds_path . '/language/english/default.lang.php');
if ($phpAds_config['language'] != 'english' && file_exists(phpAds_path . '/language/' . $phpAds_config['language'] . '/default.lang.php')) {
    @(include phpAds_path . '/language/' . $phpAds_config['language'] . '/default.lang.php');
}
// Register variables
phpAds_registerGlobal('affiliateid', 'agencyid', 'bannerid', 'campaignid', 'clientid', 'day', 'trackerid', 'userlogid', 'zoneid');
if (!isset($affiliateid)) {
    $affiliateid = '';
}
if (!isset($agencyid)) {
    $agencyid = '';
} elseif (phpAds_isUser(phpAds_Client)) {
    $query = "SELECT affiliateid" . ",name" . " FROM " . $phpAds_config['tbl_affiliates'] . " WHERE agencyid=" . phpAds_getAgencyID() . phpAds_getAffiliateListOrder($listorder, $orderdirection);
}
$res_affiliates = phpAds_dbQuery($query) or phpAds_sqlDie();
while ($row_affiliates = phpAds_dbFetchArray($res_affiliates)) {
    $affiliates[$row_affiliates['affiliateid']] = $row_affiliates;
    $affiliates[$row_affiliates['affiliateid']]['expand'] = 0;
    $affiliates[$row_affiliates['affiliateid']]['count'] = 0;
}
// Get the zones for each affiliate
if (phpAds_isUser(phpAds_Admin)) {
    $query = "SELECT zoneid" . ",affiliateid" . ",zonename" . ",delivery" . ",what" . " FROM " . $phpAds_config['tbl_zones'] . phpAds_getZoneListOrder($listorder, $orderdirection);
} elseif (phpAds_isUser(phpAds_Agency)) {
    $query = "SELECT z.zoneid AS zoneid" . ",z.affiliateid AS affiliateid" . ",z.zonename AS zonename" . ",z.delivery AS delivery" . ",z.what AS what" . " FROM " . $phpAds_config['tbl_zones'] . " AS z" . "," . $phpAds_config['tbl_affiliates'] . " AS a" . " WHERE z.affiliateid=a.affiliateid" . " AND a.agencyid=" . phpAds_getAgencyID() . phpAds_getZoneListOrder($listorder, $orderdirection);
} elseif (phpAds_isUser(phpAds_Client)) {
    $query = "SELECT z.zoneid AS zoneid" . ",z.affiliateid AS affiliateid" . ",z.zonename AS zonename" . ",z.delivery AS delivery" . ",z.what AS what" . " FROM " . $phpAds_config['tbl_zones'] . " AS z" . "," . $phpAds_config['tbl_affiliates'] . " AS a" . " WHERE z.affiliateid=a.affiliateid" . " AND a.agencyid=" . phpAds_getAgencyID() . phpAds_getZoneListOrder($listorder, $orderdirection);
}
$res_zones = phpAds_dbQuery($query) or phpAds_sqlDie();
while ($row_zones = phpAds_dbFetchArray($res_zones)) {
    if (isset($affiliates[$row_zones['affiliateid']])) {
        $zones[$row_zones['zoneid']] = $row_zones;
        $affiliates[$row_zones['affiliateid']]['count']++;
        $zones[$row_zones['zoneid']]['clicks'] = 0;
        $zones[$row_zones['zoneid']]['conversions'] = 0;
        $zones[$row_zones['zoneid']]['views'] = 0;
    }
}
// Check to see if this campaign is anonymous
$anonymous = false;
$res_campaign = phpAds_dbQuery("SELECT anonymous" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE campaignid=" . $campaignid);
if ($row_campaign = phpAds_dbFetchArray($res_campaign)) {
echo "</td>\n";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t\t</table>\n";
// total number of clients
if (phpAds_isUser(phpAds_Admin)) {
    $query_clients = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_clients'];
    $query_campaigns = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_campaigns'];
    $query_active_campaigns = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE active='t'";
    $query_total_banners = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_banners'];
    $query_active_banners = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_banners'] . " AS b" . "," . $phpAds_config['tbl_campaigns'] . " AS m" . " WHERE b.campaignid=m.campaignid" . " AND m.active='t'" . " AND b.active='t'";
} elseif (phpAds_isUser(phpAds_Agency)) {
    $query_clients = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE agencyid=" . phpAds_getAgencyID();
    $query_campaigns = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND c.agencyid=" . phpAds_getAgencyID();
    $query_active_campaigns = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND c.agencyid=" . phpAds_getAgencyID() . " AND m.active='t'";
    $query_total_banners = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_banners'] . " AS b" . "," . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND b.campaignid=m.campaignid" . " AND c.agencyid=" . phpAds_getAgencyID();
    $query_active_banners = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_banners'] . " AS b" . "," . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND b.campaignid=m.campaignid" . " AND c.agencyid=" . phpAds_getAgencyID() . " AND m.active='t'" . " AND b.active='t'";
} elseif (phpAds_isUser(phpAds_Client)) {
    $query_clients = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid=" . phpAds_getUserID();
    $query_campaigns = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE clientid=" . phpAds_getUserID();
    $query_active_campaigns = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE active='t'" . " AND clientid=" . phpAds_getUserID();
    $query_total_banners = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_banners'] . " AS b" . "," . $phpAds_config['tbl_campaigns'] . " AS m" . " WHERE b.campaignid=m.campaignid" . " AND m.clientid=" . phpAds_getUserID();
    $query_active_banners = "SELECT count(*) AS count" . " FROM " . $phpAds_config['tbl_banners'] . " AS b" . "," . $phpAds_config['tbl_campaigns'] . " AS m" . " WHERE b.campaignid=m.campaignid" . " AND m.clientid=" . phpAds_getUserID() . " AND m.active='t'" . " AND b.active='t'";
}
$res_clients = phpAds_dbQuery($query_clients) or phpAds_sqlDie();
$res_campaigns = phpAds_dbQuery($query_campaigns) or phpAds_sqlDie();
$res_active_campaigns = phpAds_dbQuery($query_active_campaigns) or phpAds_sqlDie();
$res_total_banners = phpAds_dbQuery($query_total_banners) or phpAds_sqlDie();
$res_active_banners = phpAds_dbQuery($query_active_banners) or phpAds_sqlDie();
echo "\t\t\t\t<br><br><br><br>\n";
echo "\t\t\t\t<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>\n";
echo "\t\t\t\t<tr>\n";
function phpAds_placeInvocationForm($extra = '', $zone_invocation = false)
{
    global $HTTP_SERVER_VARS, $block, $blockcampaign, $campaignid, $clientid, $codetype, $delay, $delay_type, $generate, $height, $hostlanguage, $ilayer, $layerstyle, $left, $location, $menubar, $phpAds_config, $phpAds_TextDirection, $popunder, $raw, $refresh, $resizable, $resize, $scrollbars, $source, $status, $submitbutton, $tabindex, $target, $template, $timeout, $toolbars, $top, $transparent, $uniqueid, $what, $width, $withtext, $bannerid;
    // Check if affiliate is on the same server
    if ($extra != '' && isset($extra['website']) && $extra['website']) {
        $server_phpads = parse_url($phpAds_config['url_prefix']);
        $server_affilate = parse_url($extra['website']);
        $server_same = @gethostbyname($server_phpads['host']) == @gethostbyname($server_affilate['host']);
    } else {
        $server_same = true;
    }
    // Hide when integrated in zone-advanced.php
    if (!is_array($extra) || !isset($extra['zoneadvanced']) || !$extra['zoneadvanced']) {
        echo "<form name='generate' action='" . $HTTP_SERVER_VARS['PHP_SELF'] . "' method='POST'>\n";
    }
    // Invocation type selection
    if (!is_array($extra) || isset($extra['delivery']) && $extra['delivery'] != phpAds_ZoneInterstitial && $extra['delivery'] != phpAds_ZonePopup) {
        $allowed['adlayer'] = $phpAds_config['allow_invocation_interstitial'];
        $allowed['popup'] = $phpAds_config['allow_invocation_popup'];
        $allowed['xmlrpc'] = $phpAds_config['allow_invocation_xmlrpc'];
        $allowed['adframe'] = $phpAds_config['allow_invocation_frame'];
        $allowed['adjs'] = $phpAds_config['allow_invocation_js'];
        $allowed['adview'] = $phpAds_config['allow_invocation_plain'];
        $allowed['adviewnocookies'] = $phpAds_config['allow_invocation_plain_nocookies'];
        $allowed['local'] = $phpAds_config['allow_invocation_local'];
        if (is_array($extra)) {
            $allowed['popup'] = false;
        }
        if (is_array($extra)) {
            $allowed['adlayer'] = false;
        }
        if (is_array($extra) && $server_same == false) {
            $allowed['local'] = false;
        }
        if (is_array($extra) && $server_same == false && ($extra['width'] == '-1' || $extra['height'] == '-1')) {
            $allowed['adframe'] = false;
        }
        if (is_array($extra) && $extra['delivery'] == phpAds_ZoneText) {
            // Only allow Javascript and Localmode
            // when using text ads
            $allowed['adlayer'] = $allowed['popup'] = $allowed['adframe'] = $allowed['adview'] = false;
            $allowed['adviewnocookies'] = false;
        }
        if (!isset($codetype) || $allowed[$codetype] == false) {
            while (list($k, $v) = each($allowed)) {
                if ($v) {
                    $codetype = $k;
                }
            }
        }
        if (!isset($codetype)) {
            $codetype = '';
        }
        echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";
        echo "<tr><td height='25' colspan='3'><b>" . $GLOBALS['strChooseInvocationType'] . "</b></td></tr>";
        echo "<tr><td height='35'>";
        echo "<select name='codetype' onChange=\"this.form.submit()\" accesskey=" . $GLOBALS['keyList'] . " tabindex='" . $tabindex++ . "'>";
        if ($allowed['adview']) {
            echo "<option value='adview'" . ($codetype == 'adview' ? ' selected' : '') . ">" . $GLOBALS['strInvocationRemote'] . "</option>";
        }
        if ($allowed['adviewnocookies']) {
            echo "<option value='adviewnocookies'" . ($codetype == 'adviewnocookies' ? ' selected' : '') . ">" . $GLOBALS['strInvocationRemoteNoCookies'] . "</option>";
        }
        if ($allowed['adjs']) {
            echo "<option value='adjs'" . ($codetype == 'adjs' ? ' selected' : '') . ">" . $GLOBALS['strInvocationJS'] . "</option>";
        }
        if ($allowed['adframe']) {
            echo "<option value='adframe'" . ($codetype == 'adframe' ? ' selected' : '') . ">" . $GLOBALS['strInvocationIframes'] . "</option>";
        }
        if ($allowed['xmlrpc']) {
            echo "<option value='xmlrpc'" . ($codetype == 'xmlrpc' ? ' selected' : '') . ">" . $GLOBALS['strInvocationXmlRpc'] . "</option>";
        }
        if ($allowed['popup']) {
            echo "<option value='popup'" . ($codetype == 'popup' ? ' selected' : '') . ">" . $GLOBALS['strInvocationPopUp'] . "</option>";
        }
        if ($allowed['adlayer']) {
            echo "<option value='adlayer'" . ($codetype == 'adlayer' ? ' selected' : '') . ">" . $GLOBALS['strInvocationAdLayer'] . "</option>";
        }
        if ($allowed['local']) {
            echo "<option value='local'" . ($codetype == 'local' ? ' selected' : '') . ">" . $GLOBALS['strInvocationLocal'] . "</option>";
        }
        echo "</select>";
        echo "&nbsp;<input type='image' src='images/" . $phpAds_TextDirection . "/go_blue.gif' border='0'>";
        echo "</td></tr></table>";
        phpAds_ShowBreak();
        echo "<br>";
    } else {
        if ($extra['delivery'] == phpAds_ZoneInterstitial) {
            $codetype = 'adlayer';
        }
        if ($extra['delivery'] == phpAds_ZonePopup) {
            $codetype = 'popup';
        }
        if (!isset($codetype)) {
            $codetype = '';
        }
    }
    if ($codetype == 'adlayer') {
        if (!isset($layerstyle)) {
            $layerstyle = 'geocities';
        }
        include '../libraries/layerstyles/' . $layerstyle . '/invocation.inc.php';
    }
    //
    if ($codetype != '') {
        // Code
        if (isset($submitbutton) || isset($generate) && $generate) {
            echo "<table border='0' width='550' cellpadding='0' cellspacing='0'>";
            echo "<tr><td height='25'><img src='images/icon-generatecode.gif' align='absmiddle'>&nbsp;<b>" . $GLOBALS['strBannercode'] . "</b></td>";
            // Show clipboard button only on IE
            if (strpos($HTTP_SERVER_VARS['HTTP_USER_AGENT'], 'MSIE') > 0 && strpos($HTTP_SERVER_VARS['HTTP_USER_AGENT'], 'Opera') < 1) {
                echo "<td height='25' align='right'><img src='images/icon-clipboard.gif' align='absmiddle'>&nbsp;";
                echo "<a href='javascript:phpAds_CopyClipboard(\"bannercode\");'>" . $GLOBALS['strCopyToClipboard'] . "</a></td></tr>";
            } else {
                echo "<td>&nbsp;</td>";
            }
            echo "<tr height='1'><td colspan='2' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
            echo "<tr><td colspan='2'><textarea name='bannercode' class='code-gray' rows='6' cols='55' style='width:550;' readonly>" . htmlspecialchars(phpAds_GenerateInvocationCode()) . "</textarea></td></tr>";
            echo "</table><br>";
            phpAds_ShowBreak();
            echo "<br>";
            $generated = true;
        } else {
            $generated = false;
        }
        // Hide when integrated in zone-advanced.php
        if (!(is_array($extra) && isset($extra['zoneadvanced']) && $extra['zoneadvanced'])) {
            // Header
            //Parameters Section
            echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";
            echo "<tr><td height='25' colspan='3'><img src='images/icon-overview.gif' align='absmiddle'>&nbsp;<b>" . $GLOBALS['strParameters'] . "</b></td></tr>";
            echo "<tr height='1'><td width='30'><img src='images/break.gif' height='1' width='30'></td>";
            echo "<td width='200'><img src='images/break.gif' height='1' width='200'></td>";
            echo "<td width='100%'><img src='images/break.gif' height='1' width='100%'></td></tr>";
            echo "<tr" . ($zone_invocation || $codetype == 'adviewnocookies' ? '' : " bgcolor='#F6F6F6'") . "><td height='10' colspan='3'>&nbsp;</td></tr>";
            //echo "<tr><td height='10' colspan='3'>&nbsp;</td></tr>";
        }
        if ($codetype == 'adview') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true);
        }
        if ($codetype == 'adviewnocookies') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true, 'bannerid' => true);
        }
        if ($codetype == 'adjs') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'block' => true, 'target' => true, 'source' => true, 'withtext' => true, 'blockcampaign' => true);
        }
        if ($codetype == 'adframe') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true, 'refresh' => true, 'size' => true, 'resize' => true, 'transparent' => true, 'ilayer' => true);
        }
        if ($codetype == 'ad') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true, 'withtext' => true, 'size' => true, 'resize' => true, 'transparent' => true);
        }
        if ($codetype == 'popup') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true, 'absolute' => true, 'popunder' => true, 'timeout' => true, 'delay' => true, 'windowoptions' => true);
        }
        if ($codetype == 'adlayer') {
            $show = phpAds_getLayerShowVar();
        }
        if ($codetype == 'xmlrpc') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true, 'withtext' => true, 'template' => true, 'hostlanguage' => true);
        }
        if ($codetype == 'local') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true, 'withtext' => true, 'block' => true, 'blockcampaign' => true, 'raw' => true);
        }
        // What
        if (!$zone_invocation && isset($show['what']) && $show['what'] == true && $codetype != 'adviewnocookies') {
            echo "<tr bgcolor='#F6F6F6'><td width='30'>&nbsp;</td>";
            echo "<td width='200' valign='top'>" . $GLOBALS['strInvocationWhat'] . "</td><td width='370'>";
            echo "<textarea class='flat' name='what' rows='3' cols='50' style='width:350px;' tabindex='" . $tabindex++ . "'>" . (isset($what) ? stripslashes($what) : '') . "</textarea></td></tr>";
            echo "<tr bgcolor='#F6F6F6'><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
            echo "<td bgcolor='#F6F6F6' colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
        }
        /* Remove advetiser from direct invocation - not needed
        		// ClientID
        		if (!$zone_invocation && isset($show['clientid']) && $show['clientid'] == true)
        		{
        			// Display available advertisers...
        			echo "<tr bgcolor='#F6F6F6'><td width='30'>&nbsp;</td>\n";
        			echo "<td width='200'>".$GLOBALS['strInvocationClientID']."</td><td width='370'>\n";
        			echo "<select name='clientid' style='width:350px;' tabindex='".($tabindex++)."'>\n";
        				echo "<option value='0'>-</option>\n";
        			
        			$res = phpAds_dbQuery(
        				"SELECT clientid, clientname".
        				" FROM ".$phpAds_config['tbl_clients']
        			) or phpAds_sqlDie();
        				
        			while ($row = phpAds_dbFetchArray($res))
        			{
        				echo "<option value='".$row['clientid']."'".($clientid == $row['clientid'] ? ' selected' : '').">";
        				echo phpAds_buildName ($row['clientid'], $row['clientname']);
        				echo "</option>\n";
        			}
        			
        			echo "</select>\n";
        			echo "</td></tr>";
        //			echo "<tr bgcolor='#F6F6F6'><td height='10' colspan='3'>&nbsp;</td></tr>";
        //			echo "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
        //			echo "<tr><td height='10' colspan='3'>&nbsp;</td></tr>";
        			echo "<tr bgcolor='#F6F6F6'><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        			echo "<td bgcolor='#F6F6F6' colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
        		}
        		*/
        // CampaignID
        if (!$zone_invocation && isset($show['campaignid']) && $show['campaignid'] == true && $codetype != 'adviewnocookies') {
            // Display available campaigns...
            echo "<tr bgcolor='#F6F6F6'><td width='30'>&nbsp;</td>\n";
            echo "<td width='200'>" . $GLOBALS['strInvocationCampaignID'] . "</td><td width='370'>\n";
            echo "<select name='campaignid' style='width:350px;' tabindex='" . $tabindex++ . "'>\n";
            echo "<option value='0'>-</option>\n";
            if (phpAds_isUser(phpAds_Admin)) {
                $query = "SELECT campaignid,campaignname" . " FROM " . $phpAds_config['tbl_campaigns'];
            } elseif (phpAds_isUser(phpAds_Agency)) {
                $query = "SELECT m.campaignid AS campaignid" . ",m.campaignname AS campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND c.agencyid=" . phpAds_getAgencyID();
            }
            $res = phpAds_dbQuery($query) or phpAds_sqlDie();
            while ($row = phpAds_dbFetchArray($res)) {
                echo "<option value='" . $row['campaignid'] . "'" . ($campaignid == $row['campaignid'] ? ' selected' : '') . ">";
                echo phpAds_buildName($row['campaignid'], $row['campaignname']);
                echo "</option>\n";
            }
            echo "</select>\n";
            echo "</td></tr>";
            echo "<tr bgcolor='#F6F6F6'><td height='10' colspan='3'>&nbsp;</td></tr>";
            echo "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
            echo "<tr><td height='10' colspan='3'>&nbsp;</td></tr>";
        }
        // BannerID
        if (isset($show['bannerid']) && $show['bannerid'] == true) {
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strInvocationBannerID'] . "</td><td width='370'>";
            echo "<input class='flat' type='text' name='bannerid' size='' value='" . (isset($bannerid) ? $bannerid : '') . "' style='width:175px;' tabindex='" . $tabindex++ . "'></td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
        }
        // Target
        if (isset($show['target']) && $show['target'] == true) {
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strInvocationTarget'] . "</td><td width='370'>";
            echo "<input class='flat' type='text' name='target' size='' value='" . (isset($target) ? $target : '') . "' style='width:175px;' tabindex='" . $tabindex++ . "'></td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // Source
        if (isset($show['source']) && $show['source'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strInvocationSource'] . "</td><td width='370'>";
            echo "<input class='flat' type='text' name='source' size='' value='" . (isset($source) ? $source : '') . "' style='width:175px;' tabindex='" . $tabindex++ . "'></td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // WithText
        if (isset($show['withtext']) && $show['withtext'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strInvocationWithText'] . "</td>";
            echo "<td width='370'><input type='radio' name='withtext' value='1'" . (isset($withtext) && $withtext != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "<input type='radio' name='withtext' value='0'" . (!isset($withtext) || $withtext == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "</td>";
            echo "</tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // refresh
        if (isset($show['refresh']) && $show['refresh'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strIFrameRefreshAfter'] . "</td><td width='370'>";
            echo "<input class='flat' type='text' name='refresh' size='' value='" . (isset($refresh) ? $refresh : '') . "' style='width:175px;' tabindex='" . $tabindex++ . "'> " . $GLOBALS['strAbbrSeconds'] . "</td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // size
        if (!$zone_invocation && isset($show['size']) && $show['size'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strFrameSize'] . "</td><td width='370'>";
            echo $GLOBALS['strWidth'] . ": <input class='flat' type='text' name='width' size='3' value='" . (isset($width) ? $width : '') . "' tabindex='" . $tabindex++ . "'>&nbsp;&nbsp;&nbsp;";
            echo $GLOBALS['strHeight'] . ": <input class='flat' type='text' name='height' size='3' value='" . (isset($height) ? $height : '') . "' tabindex='" . $tabindex++ . "'>";
            echo "</td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // Resize
        if (isset($show['resize']) && $show['resize'] == true) {
            // Only show this if affiliate is on the same server
            if ($server_same) {
                echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
                echo "<tr><td width='30'>&nbsp;</td>";
                echo "<td width='200'>" . $GLOBALS['strIframeResizeToBanner'] . "</td>";
                echo "<td width='370'><input type='radio' name='resize' value='1'" . (isset($resize) && $resize == 1 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
                echo "<input type='radio' name='resize' value='0'" . (!isset($resize) || $resize == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "</td>";
                echo "</tr>";
                echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
            } else {
                echo "<input type='hidden' name='resize' value='0'>";
            }
        }
        // Transparent
        if (isset($show['transparent']) && $show['transparent'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strIframeMakeTransparent'] . "</td>";
            echo "<td width='370'><input type='radio' name='transparent' value='1'" . (isset($transparent) && $transparent == 1 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "<input type='radio' name='transparent' value='0'" . (!isset($transparent) || $transparent == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "</td>";
            echo "</tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // Netscape 4 ilayer
        if (isset($show['ilayer']) && $show['ilayer'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strIframeIncludeNetscape4'] . "</td>";
            echo "<td width='370'><input type='radio' name='ilayer' value='1'" . (isset($ilayer) && $ilayer == 1 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "<input type='radio' name='ilayer' value='0'" . (!isset($ilayer) || $ilayer == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "</td>";
            echo "</tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // Block
        if (isset($show['block']) && $show['block'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strInvocationDontShowAgain'] . "</td>";
            echo "<td width='370'><input type='radio' name='block' value='1'" . (isset($block) && $block != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "<input type='radio' name='block' value='0'" . (!isset($block) || $block == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "</td>";
            echo "</tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // Blockcampaign
        if (isset($show['blockcampaign']) && $show['blockcampaign'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strInvocationDontShowAgainCampaign'] . "</td>";
            echo "<td width='370'><input type='radio' name='blockcampaign' value='1'" . (isset($blockcampaign) && $blockcampaign != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "<input type='radio' name='blockcampaign' value='0'" . (!isset($blockcampaign) || $blockcampaign == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "</td>";
            echo "</tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // Raw
        if (isset($show['raw']) && $show['raw'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strInvocationTemplate'] . "</td>";
            echo "<td width='370'><input type='radio' name='raw' value='1'" . (isset($raw) && $raw != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "<input type='radio' name='raw' value='0'" . (!isset($raw) || $raw == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "</td>";
            echo "</tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // AdLayer style
        if (isset($show['layerstyle']) && $show['layerstyle'] == true) {
            $layerstyles = array();
            $stylesdir = opendir('../libraries/layerstyles');
            while ($stylefile = readdir($stylesdir)) {
                if (is_dir('../libraries/layerstyles/' . $stylefile) && file_exists('../libraries/layerstyles/' . $stylefile . '/invocation.inc.php')) {
                    if (ereg('^[^.]', $stylefile)) {
                        $layerstyles[$stylefile] = isset($GLOBALS['strAdLayerStyleName'][$stylefile]) ? $GLOBALS['strAdLayerStyleName'][$stylefile] : str_replace("- ", "-", ucwords(str_replace("-", "- ", $stylefile)));
                    }
                }
            }
            closedir($stylesdir);
            asort($layerstyles, SORT_STRING);
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strAdLayerStyle'] . "</td><td width='370'>";
            echo "<select name='layerstyle' onChange='this.form.submit()' style='width:175px;' tabindex='" . $tabindex++ . "'>";
            while (list($k, $v) = each($layerstyles)) {
                echo "<option value='{$k}'" . ($layerstyle == $k ? ' selected' : '') . ">{$v}</option>";
            }
            echo "</select>";
            echo "</td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // popunder
        if (isset($show['popunder']) && $show['popunder'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strPopUpStyle'] . "</td>";
            echo "<td width='370'><input type='radio' name='popunder' value='0'" . (!isset($popunder) || $popunder != '1' ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . "<img src='images/icon-popup-over.gif' align='absmiddle'>&nbsp;" . $GLOBALS['strPopUpStylePopUp'] . "<br>";
            echo "<input type='radio' name='popunder' value='1'" . (isset($popunder) && $popunder == '1' ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . "<img src='images/icon-popup-under.gif' align='absmiddle'>&nbsp;" . $GLOBALS['strPopUpStylePopUnder'] . "</td>";
            echo "</tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // delay
        if (isset($show['delay']) && $show['delay'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strPopUpCreateInstance'] . "</td>";
            echo "<td width='370'><input type='radio' name='delay_type' value='none'" . (!isset($delay_type) || $delay_type != 'exit' && $delay_type != 'seconds' ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strPopUpImmediately'] . "<br>";
            echo "<input type='radio' name='delay_type' value='exit'" . (isset($delay_type) && $delay_type == 'exit' ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strPopUpOnClose'] . "<br>";
            echo "<input type='radio' name='delay_type' value='seconds'" . (isset($delay_type) && $delay_type == 'seconds' ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strPopUpAfterSec'] . "&nbsp;" . "<input class='flat' type='text' name='delay' size='' value='" . (isset($delay) ? $delay : '-') . "' style='width:50px;' tabindex='" . $tabindex++ . "'> " . $GLOBALS['strAbbrSeconds'] . "</td>";
            echo "</tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // absolute
        if (isset($show['absolute']) && $show['absolute'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strPopUpTop'] . "</td><td width='370'>";
            echo "<input class='flat' type='text' name='top' size='' value='" . (isset($top) ? $top : '-') . "' style='width:50px;' tabindex='" . $tabindex++ . "'> " . $GLOBALS['strAbbrPixels'] . "</td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strPopUpLeft'] . "</td><td width='370'>";
            echo "<input class='flat' type='text' name='left' size='' value='" . (isset($left) ? $left : '-') . "' style='width:50px;' tabindex='" . $tabindex++ . "'> " . $GLOBALS['strAbbrPixels'] . "</td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // timeout
        if (isset($show['timeout']) && $show['timeout'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strAutoCloseAfter'] . "</td><td width='370'>";
            echo "<input class='flat' type='text' name='timeout' size='' value='" . (isset($timeout) ? $timeout : '-') . "' style='width:50px;' tabindex='" . $tabindex++ . "'> " . $GLOBALS['strAbbrSeconds'] . "</td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // Window options
        if (isset($show['windowoptions']) && $show['windowoptions'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td><td width='200' valign='top'>" . $GLOBALS['strWindowOptions'] . "</td><td width='370'>";
            echo "<table cellpadding='0' cellspacing='0' border='0'>";
            echo "<tr><td>" . $GLOBALS['strShowToolbars'] . "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='toolbars' value='1'" . (isset($toolbars) && $toolbars != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='toolbars' value='0'" . (!isset($toolbars) || $toolbars == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "";
            echo "</td></tr><tr><td colspan='5'><img src='images/break-l.gif' height='1' width='200' vspace='2'></td></tr>";
            echo "<tr><td>" . $GLOBALS['strShowLocation'] . "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='location' value='1'" . (isset($location) && $location != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='location' value='0'" . (!isset($location) || $location == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "";
            echo "</td></tr><tr><td colspan='5'><img src='images/break-l.gif' height='1' width='200' vspace='2'></td></tr>";
            echo "<tr><td>" . $GLOBALS['strShowMenubar'] . "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='menubar' value='1'" . (isset($menubar) && $menubar != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='menubar' value='0'" . (!isset($menubar) || $menubar == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "";
            echo "</td></tr><tr><td colspan='5'><img src='images/break-l.gif' height='1' width='200' vspace='2'></td></tr>";
            echo "<tr><td>" . $GLOBALS['strShowStatus'] . "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='status' value='1'" . (isset($status) && $status != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='status' value='0'" . (!isset($status) || $status == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "";
            echo "</td></tr><tr><td colspan='5'><img src='images/break-l.gif' height='1' width='200' vspace='2'></td></tr>";
            echo "<tr><td>" . $GLOBALS['strWindowResizable'] . "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='resizable' value='1'" . (isset($resizable) && $resizable != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='resizable' value='0'" . (!isset($resizable) || $resizable == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "";
            echo "</td></tr><tr><td colspan='5'><img src='images/break-l.gif' height='1' width='200' vspace='2'></td></tr>";
            echo "<tr><td>" . $GLOBALS['strShowScrollbars'] . "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='scrollbars' value='1'" . (isset($scrollbars) && $scrollbars != 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strYes'] . "<br>";
            echo "</td><td>&nbsp;&nbsp;&nbsp;</td><td>";
            echo "<input type='radio' name='scrollbars' value='0'" . (!isset($scrollbars) || $scrollbars == 0 ? ' checked' : '') . " tabindex='" . $tabindex++ . "'>&nbsp;" . $GLOBALS['strNo'] . "";
            echo "</td></tr>";
            echo "</table>";
            echo "</td></tr><tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // AdLayer custom code
        if (isset($show['layercustom']) && $show['layercustom'] == true) {
            phpAds_placeLayerSettings();
        }
        // Host Language
        if (isset($show['hostlanguage']) && $show['hostlanguage'] == true) {
            echo "<td colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
            echo "<tr><td width='30'>&nbsp;</td>";
            echo "<td width='200'>" . $GLOBALS['strXmlRpcLanguage'] . "</td><td width='370'>";
            echo "<select name='hostlanguage' tabindex='" . $tabindex++ . "'>";
            echo "<option value='php'" . ($hostlanguage == 'php' ? ' selected' : '') . ">PHP</option>";
            //		echo "<option value='php-xmlrpc'".($hostlanguage == 'php-xmlrpc' ? ' selected' : '').">PHP with built in XML-RPC extension</option>";
            //		echo "<option value='asp'".($hostlanguage == 'asp' ? ' selected' : '').">ASP</option>";
            //		echo "<option value='jsp'".($hostlanguage == 'jsp' ? ' selected' : '').">JSP</option>";
            echo "</select>";
            echo "</td></tr>";
            echo "<tr><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        }
        // Hide when integrated in zone-advanced.php
        if (!(is_array($extra) && isset($extra['zoneadvanced']) && $extra['zoneadvanced'])) {
            // Footer
            echo "<tr><td height='10' colspan='3'>&nbsp;</td></tr>";
            echo "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
            echo "</table>";
            echo "<br><br>";
            echo "<input type='hidden' value='" . ($generated ? 1 : 0) . "' name='generate'>";
            if ($generated) {
                echo "<input type='submit' value='" . $GLOBALS['strRefresh'] . "' name='submitbutton' tabindex='" . $tabindex++ . "'>";
            } else {
                echo "<input type='submit' value='" . $GLOBALS['strGenerate'] . "' name='submitbutton' tabindex='" . $tabindex++ . "'>";
            }
        }
    }
    // Put extra hidden fields
    if (is_array($extra)) {
        while (list($k, $v) = each($extra)) {
            echo "<input type='hidden' value='{$v}' name='{$k}'>";
        }
    }
    // Hide when integrated in zone-advanced.php
    if (!is_array($extra) || !isset($extra['zoneadvanced']) || !$extra['zoneadvanced']) {
        echo "</form><br><br>";
    }
}
 $extra .= "\t\t\t\t<input type='hidden' name='trackerid' value='{$trackerid}'>" . "\n";
 $extra .= "\t\t\t\t<input type='hidden' name='clientid' value='{$clientid}'>" . "\n";
 $extra .= "\t\t\t\t<input type='hidden' name='returnurl' value='tracker-invocation.php'>" . "\n";
 $extra .= "\t\t\t\t<br><br>" . "\n";
 $extra .= "\t\t\t\t<b>{$strModifyTracker}</b><br>" . "\n";
 $extra .= "\t\t\t\t<img src='images/break.gif' height='1' width='160' vspace='4'><br>" . "\n";
 $extra .= "\t\t\t\t<img src='images/icon-duplicate-tracker.gif' align='absmiddle'>&nbsp;<a href='tracker-modify.php?clientid=" . $clientid . "&trackerid=" . $trackerid . "&duplicate=true&returnurl=tracker-invocation.php'>{$strDuplicate}</a><br>" . "\n";
 $extra .= "\t\t\t\t<img src='images/break.gif' height='1' width='160' vspace='4'><br>" . "\n";
 $extra .= "\t\t\t\t<img src='images/icon-move-tracker.gif' align='absmiddle'>&nbsp;{$strMoveTo}<br>" . "\n";
 $extra .= "\t\t\t\t<img src='images/spacer.gif' height='1' width='160' vspace='2'><br>" . "\n";
 $extra .= "\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . "\n";
 $extra .= "\t\t\t\t<select name='moveto' style='width: 110;'>" . "\n";
 if (phpAds_isUser(phpAds_Admin)) {
     $query = "SELECT clientid,clientname" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid!=" . $clientid;
 } elseif (phpAds_isUser(phpAds_Agency)) {
     $query = "SELECT clientid,clientname" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid!=" . $clientid . " AND agencyid=" . phpAds_getAgencyID();
 }
 $res = phpAds_dbQuery($query) or phpAds_sqlDie();
 while ($row = phpAds_dbFetchArray($res)) {
     $extra .= "\t\t\t\t\t<option value='" . $row['clientid'] . "'>" . phpAds_buildName($row['clientid'], $row['clientname']) . "</option>\n";
 }
 $extra .= "\t\t\t\t</select>&nbsp;\n";
 $extra .= "\t\t\t\t<input type='image' src='images/" . $phpAds_TextDirection . "/go_blue.gif'><br>\n";
 $extra .= "\t\t\t\t<img src='images/break.gif' height='1' width='160' vspace='4'><br>\n";
 $extra .= "\t\t\t\t<img src='images/icon-recycle.gif' align='absmiddle'>\n";
 $extra .= "\t\t\t\t<a href='tracker-delete.php?clientid={$clientid}&trackerid={$trackerid}&returnurl=advertiser-trackers.php'" . phpAds_DelConfirm($strConfirmDeleteTracker) . ">{$strDelete}</a><br>\n";
 $extra .= "\t\t\t\t</form>\n";
 phpAds_PageHeader("4.1.4.4", $extra);
 echo "<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;" . phpAds_getClientName(phpAds_getTrackerParentClientID($trackerid));
 echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
 echo "<img src='images/icon-tracker.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getTrackerName($trackerid) . "</b><br><br><br>";