本文整理汇总了PHP中phpAds_isUser函数的典型用法代码示例。如果您正苦于以下问题:PHP phpAds_isUser函数的具体用法?PHP phpAds_isUser怎么用?PHP phpAds_isUser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了phpAds_isUser函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Plugin_GlobalhistoryExecute
function Plugin_GlobalhistoryExecute($delimiter = ",")
{
global $phpAds_config, $date_format;
global $strGlobalHistory, $strTotal, $strDay, $strViews, $strClicks, $strCTRShort;
header("Content-type: application/csv\nContent-Disposition: \"inline; filename=globalhistory.csv\"");
if (phpAds_isUser(phpAds_Admin)) {
$res_query = "\n\t\tSELECT\n\t\t\tDATE_FORMAT(day, '" . $date_format . "') as day,\n\t\t\tSUM(views) AS adviews,\n\t\t\tSUM(clicks) AS adclicks\n\t\tFROM\n\t\t\t" . $phpAds_config['tbl_adstats'] . "\n\t\tGROUP BY\n\t\t\tday\n\t";
} else {
$res_query = "SELECT\n\t\t\t\t\t\tDATE_FORMAT(s.day, '" . $date_format . "') as day,\n\t\t\t\t\t\tSUM(s.views) AS adviews,\n\t\t\t\t\t\tSUM(s.clicks) AS adclicks\n\t\t\t\t\tFROM\n\t\t\t\t\t\t" . $phpAds_config['tbl_adstats'] . " \tas s,\n\t\t\t\t\t\t" . $phpAds_config['tbl_banners'] . " \tas b,\n\t\t\t\t\t\t" . $phpAds_config['tbl_campaigns'] . " as m,\n\t\t\t\t\t\t" . $phpAds_config['tbl_clients'] . " \tas c\n\t\t\t\t\tWHERE\n\t\t\t\t\t\ts.bannerid \t\t= b.bannerid AND\n\t\t\t\t\t\tb.campaignid \t= m.campaignid AND\n\t\t\t\t\t\tm.clientid \t\t= c.clientid AND\n\t\t\t\t\t\tc.agencyid \t\t= " . phpAds_getUserID() . "\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\tday";
}
$res_banners = phpAds_dbQuery($res_query) or phpAds_sqlDie();
while ($row_banners = phpAds_dbFetchArray($res_banners)) {
$stats[$row_banners['day']]['views'] = $row_banners['adviews'];
$stats[$row_banners['day']]['clicks'] = $row_banners['adclicks'];
}
echo $strGlobalHistory . "\n\n";
echo $strDay . $delimiter . $strViews . $delimiter . $strClicks . $delimiter . $strCTRShort . "\n";
$totalclicks = 0;
$totalviews = 0;
if (isset($stats) && is_array($stats)) {
for (reset($stats); $key = key($stats); next($stats)) {
$row = array();
//$key = implode('/',array_reverse(split('[-]',$key)));
$row[] = $key;
$row[] = $stats[$key]['views'];
$row[] = $stats[$key]['clicks'];
$row[] = phpAds_buildCTR($stats[$key]['views'], $stats[$key]['clicks']);
echo implode($delimiter, $row) . "\n";
$totalclicks += $stats[$key]['clicks'];
$totalviews += $stats[$key]['views'];
}
}
echo "\n";
echo $strTotal . $delimiter . $totalviews . $delimiter . $totalclicks . $delimiter . phpAds_buildCTR($totalviews, $totalclicks) . "\n";
}
示例2: phpAds_getZoneArray
function phpAds_getZoneArray()
{
global $phpAds_config;
if (phpAds_isUser(phpAds_Affiliate)) {
$res = phpAds_dbQuery("\n\t\t\tSELECT\n\t\t\t\t*\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_zones'] . "\n\t\t\tWHERE\n\t\t\t\taffiliateid = " . phpAds_getUserID() . "\n\t\t");
} else {
$res = phpAds_dbQuery("\n\t\t\tSELECT\n\t\t\t\t*\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_zones'] . "\n\t\t");
}
while ($row = phpAds_dbFetchArray($res)) {
$zoneArray[$row['zoneid']] = phpAds_buildClientName($row['zoneid'], $row['zonename']);
}
return $zoneArray;
}
示例3: phpAds_SettingsWriteFlush
function phpAds_SettingsWriteFlush()
{
global $phpAds_config;
global $phpAds_settings_information, $phpAds_settings_write_cache;
$sql = array();
$config_inc = array();
while (list($k, $v) = each($phpAds_settings_write_cache)) {
$k_sql = $phpAds_settings_information[$k]['sql'];
$k_type = $phpAds_settings_information[$k]['type'];
if ($k_sql) {
if ($k_type == 'boolean') {
$v = $v ? 't' : 'f';
}
$sql[] = $k . " = '" . $v . "'";
} else {
if ($k_type == 'boolean') {
$v = $v ? true : false;
} elseif ($k_type != 'array') {
$v = stripslashes($v);
}
$config_inc[] = array($k, $v, $k_type);
}
}
if (count($sql)) {
if (phpAds_isUser(phpAds_Agency)) {
$agencyid = phpAds_getUserID();
} else {
$agencyid = 0;
}
$query = "UPDATE " . $phpAds_config['tbl_config'] . " SET " . join(", ", $sql) . " WHERE agencyid=" . $agencyid;
$res = @phpAds_dbQuery($query);
if (@phpAds_dbAffectedRows() < 1) {
$query = "INSERT INTO " . $phpAds_config['tbl_config'] . " SET " . join(", ", $sql) . ",agencyid=" . $agencyid;
@phpAds_dbQuery($query);
}
}
if (count($config_inc)) {
if (!phpAds_ConfigFilePrepare()) {
return false;
}
while (list(, $v) = each($config_inc)) {
phpAds_ConfigFileSet($v[0], $v[1], $v[2]);
}
return phpAds_ConfigFileFlush();
}
return true;
}
示例4: phpAds_SettingsSelection
function phpAds_SettingsSelection($section)
{
global $phpAds_TextDirection, $strHelp;
global $tabindex;
if (!isset($tabindex)) {
$tabindex = 1;
}
?>
<script language="JavaScript">
<!--
function settings_goto_section()
{
s = document.settings_selection.section.selectedIndex;
s = document.settings_selection.section.options[s].value;
document.location = 'settings-' + s + '.php';
}
// -->
</script>
<?php
echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";
echo "<tr><form name='settings_selection'><td height='35'><b>";
echo $GLOBALS['strChooseSection'] . ": </b>";
echo "<select name='section' onChange='settings_goto_section();' tabindex='" . $tabindex++ . "'>";
if (phpAds_isUser(phpAds_Admin)) {
echo "<option value='db'" . ($section == 'db' ? ' selected' : '') . ">" . $GLOBALS['strDatabaseSettings'] . "</option>";
}
echo "<option value='invocation'" . ($section == 'invocation' ? ' selected' : '') . ">" . $GLOBALS['strInvocationAndDelivery'] . "</option>";
echo "<option value='host'" . ($section == 'host' ? ' selected' : '') . ">" . $GLOBALS['strHostAndGeo'] . "</option>";
echo "<option value='stats'" . ($section == 'stats' ? ' selected' : '') . ">" . $GLOBALS['strStatisticsSettings'] . "</option>";
echo "<option value='banner'" . ($section == 'banner' ? ' selected' : '') . ">" . $GLOBALS['strBannerSettings'] . "</option>";
if (phpAds_isUser(phpAds_Admin)) {
echo "<option value='admin'" . ($section == 'admin' ? ' selected' : '') . ">" . $GLOBALS['strAdministratorSettings'] . "</option>";
}
echo "<option value='interface'" . ($section == 'interface' ? ' selected' : '') . ">" . $GLOBALS['strGuiSettings'] . "</option>";
echo "<option value='defaults'" . ($section == 'defaults' ? ' selected' : '') . ">" . $GLOBALS['strInterfaceDefaults'] . "</option>";
echo "</select> <a href='javascript:void(0)' onClick='settings_goto_section();'>";
echo "<img src='images/" . $phpAds_TextDirection . "/go_blue.gif' border='0'></a>";
echo "</td></form>";
echo "<td height='35' align='right'><b><a href=\"#\" onClick=\"javascript:toggleHelp(); return false;\">";
echo "<img src='images/help-book.gif' width='15' height='15' border='0' align='absmiddle'>";
echo " " . $strHelp . "</a></b></td></tr></table>";
phpAds_ShowBreak();
}
示例5: header
header("Location: upgrade.php");
exit;
}
// Check for SLL requirements
if ($phpAds_config['ui_forcessl'] && $_SERVER['SERVER_PORT'] != 443) {
header('Location: https://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']);
exit;
}
// Adjust url_prefix if SLL is used
if ($_SERVER['SERVER_PORT'] == 443) {
$phpAds_config['url_prefix'] = str_replace('http://', 'https://', $phpAds_config['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();
// 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('bannerid', 'campaignid', 'clientid', 'zoneid', 'affiliateid', 'userlogid', 'day');
// Check for missing required parameters
phpAds_checkIds();
// Setup navigation
$phpAds_nav = array("admin" => array("2" => array("stats-global-client.php" => $strStats), "2.1" => array("stats-global-client.php" => $strClientsAndCampaigns), "2.1.1" => array("stats-client-history.php?clientid={$clientid}" => $strClientHistory), "2.1.1.1" => array("stats-client-daily.php?clientid={$clientid}&day={$day}" => $strDailyStats), "2.1.1.2" => array("stats-client-daily-hosts.php?clientid={$clientid}&day={$day}" => $strHosts), "2.1.2" => array("stats-client-campaigns.php?clientid={$clientid}" => $strCampaignOverview), "2.1.2.1" => array("stats-campaign-history.php?clientid={$clientid}&campaignid={$campaignid}" => $strCampaignHistory), "2.1.2.1.1" => array("stats-campaign-daily.php?clientid={$clientid}&campaignid={$campaignid}&day={$day}" => $strDailyStats), "2.1.2.1.2" => array("stats-campaign-daily-hosts.php?clientid={$clientid}&campaignid={$campaignid}&day={$day}" => $strHosts), "2.1.2.2" => array("stats-campaign-banners.php?clientid={$clientid}&campaignid={$campaignid}" => $strBannerOverview), "2.1.2.2.1" => array("stats-banner-history.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strBannerHistory), "2.1.2.2.1.1" => array("stats-banner-daily.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}&day={$day}" => $strDailyStats), "2.1.2.2.1.2" => array("stats-banner-daily-hosts.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}&day={$day}" => $strHosts), "2.1.2.2.2" => array("stats-banner-affiliates.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strDistribution), "2.1.2.3" => array("stats-campaign-target.php?clientid={$clientid}&campaignid={$campaignid}" => $strTargetStats), "2.2" => array("stats-global-history.php" => $strGlobalHistory), "2.2.1" => array("stats-global-daily.php?day={$day}" => $strDailyStats), "2.2.2" => array("stats-global-daily-hosts.php?day={$day}" => $strHosts), "2.4" => array("stats-global-affiliates.php" => $strAffiliatesAndZones), "2.4.1" => array("stats-affiliate-history.php?affiliateid={$affiliateid}" => $strAffiliateHistory), "2.4.1.1" => array("stats-affiliate-daily.php?affiliateid={$affiliateid}&day={$day}" => $strDailyStats), "2.4.1.2" => array("stats-affiliate-daily-hosts.php?affiliateid={$affiliateid}&day={$day}" => $strHosts), "2.4.2" => array("stats-affiliate-zones.php?affiliateid={$affiliateid}" => $strZoneOverview), "2.4.2.1" => array("stats-zone-history.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strZoneHistory), "2.4.2.1.1" => array("stats-zone-daily.php?affiliateid={$affiliateid}&zoneid={$zoneid}&day={$day}" => $strDailyStats), "2.4.2.1.2" => array("stats-zone-daily-hosts.php?affiliateid={$affiliateid}&zoneid={$zoneid}&day={$day}" => $strHosts), "2.4.2.2" => array("stats-zone-linkedbanners.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strLinkedBannersOverview), "2.4.2.2.1" => array("stats-linkedbanner-history.php?affiliateid={$affiliateid}&zoneid={$zoneid}&bannerid={$bannerid}" => $strLinkedBannerHistory), "2.5" => array("stats-global-misc.php" => $strMiscellaneous), "3" => array("report-index.php" => $strReports), "4" => array("client-index.php" => $strAdminstration), "4.1" => array("client-index.php" => $strClientsAndCampaigns), "4.1.1" => array("client-edit.php" => $strAddClient), "4.1.2" => array("client-edit.php?clientid={$clientid}" => $strClientProperties), "4.1.3" => array("client-campaigns.php?clientid={$clientid}" => $strCampaignOverview), "4.1.3.1" => array("campaign-edit.php?clientid={$clientid}" => $strAddCampaign), "4.1.3.2" => array("campaign-edit.php?clientid={$clientid}&campaignid={$campaignid}" => $strCampaignProperties), "4.1.3.3" => array("campaign-zone.php?clientid={$clientid}&campaignid={$campaignid}" => $strLinkedZones), "4.1.3.4" => array("campaign-banners.php?clientid={$clientid}&campaignid={$campaignid}" => $strBannerOverview), "4.1.3.4.1" => array("banner-edit.php?clientid={$clientid}&campaignid={$campaignid}" => $strAddBanner), "4.1.3.4.2" => array("banner-edit.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strBannerProperties), "4.1.3.4.3" => array("banner-acl.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strModifyBannerAcl), "4.1.3.4.4" => array("banner-zone.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strLinkedZones), "4.1.3.4.5" => array("banner-swf.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strConvertSWFLinks), "4.1.3.4.6" => array("banner-append.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strAppendOthers), "4.2" => array("affiliate-index.php" => $strAffiliatesAndZones), "4.2.1" => array("affiliate-edit.php" => $strAddNewAffiliate), "4.2.2" => array("affiliate-edit.php?affiliateid={$affiliateid}" => $strAffiliateProperties), "4.2.3" => array("affiliate-zones.php?affiliateid={$affiliateid}" => $strZoneOverview), "4.2.3.1" => array("zone-edit.php?affiliateid={$affiliateid}" => $strAddNewZone), "4.2.3.2" => array("zone-edit.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strZoneProperties), "4.2.3.3" => array("zone-include.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strIncludedBanners), "4.2.3.4" => array("zone-probability.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strProbability), "4.2.3.5" => array("zone-invocation.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strInvocationcode), "4.2.3.6" => array("zone-advanced.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strAdvanced), "4.3" => array("admin-generate.php" => $strGenerateBannercode), "5" => array("settings-index.php" => $strSettings), "5.1" => array("settings-db.php" => $strMainSettings), "5.3" => array("maintenance-index.php" => $strMaintenance), "5.2" => array("userlog-index.php" => $strUserLog), "5.2.1" => array("userlog-details.php?userlogid={$userlogid}" => $strUserLogDetails), "5.4" => array("maintenance-updates.php" => $strProductUpdates)), "client" => array("1" => array("stats-client-history.php?clientid={$clientid}" => $strHome), "1.1" => array("stats-client-history.php?clientid={$clientid}" => $strClientHistory), "1.1.1" => array("stats-client-daily.php?clientid={$clientid}&day={$day}" => $strDailyStats), "1.1.2" => array("stats-client-daily-hosts.php?clientid={$clientid}&day={$day}" => $strHosts), "1.2" => array("stats-client-campaigns.php?clientid={$clientid}" => $strCampaignOverview), "1.2.1" => array("stats-campaign-history.php?clientid={$clientid}&campaignid={$campaignid}" => $strCampaignHistory), "1.2.1.1" => array("stats-campaign-daily.php?clientid={$clientid}&campaignid={$campaignid}&day={$day}" => $strDailyStats), "1.2.1.2" => array("stats-campaign-daily-hosts.php?clientid={$clientid}&campaignid={$campaignid}&day={$day}" => $strHosts), "1.2.2" => array("stats-campaign-banners.php?clientid={$clientid}&campaignid={$campaignid}" => $strBannerOverview), "1.2.2.1" => array("stats-banner-history.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strBannerHistory), "1.2.2.1.1" => array("stats-banner-daily.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}&day={$day}" => $strDailyStats), "1.2.2.1.2" => array("stats-banner-daily-hosts.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}&day={$day}" => $strHosts), "1.2.2.2" => array("banner-edit.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strBannerProperties), "1.2.2.3" => array("banner-swf.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}" => $strConvertSWFLinks), "1.2.3" => array("stats-campaign-target.php?clientid={$clientid}&campaignid={$campaignid}" => $strTargetStats), "3" => array("report-index.php" => $strReports)), "affiliate" => array("1" => array("stats-affiliate-zones.php?affiliateid={$affiliateid}" => $strHome), "1.1" => array("stats-affiliate-zones.php?affiliateid={$affiliateid}" => $strZones), "1.1.1" => array("stats-zone-history.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strZoneHistory), "1.1.1.1" => array("stats-zone-daily.php?affiliateid={$affiliateid}&zoneid={$zoneid}&day={$day}" => $strDailyStats), "1.1.1.2" => array("stats-zone-daily-hosts.php?affiliateid={$affiliateid}&zoneid={$zoneid}&day={$day}" => $strHosts), "1.1.2" => array("stats-zone-linkedbanners.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strLinkedBannersOverview), "1.1.2.1" => array("stats-linkedbanner-history.php?affiliateid={$affiliateid}&zoneid={$zoneid}&bannerid={$bannerid}" => $strLinkedBannerHistory), "1.2" => array("stats-affiliate-history.php?affiliateid={$affiliateid}" => $strAffiliateHistory), "1.2.1" => array("stats-affiliate-daily.php?affiliateid={$affiliateid}&day={$day}" => $strDailyStats), "1.2.2" => array("stats-affiliate-daily-hosts.php?affiliateid={$affiliateid}&day={$day}" => $strHosts), "3" => array("report-index.php" => $strReports), "2" => array("affiliate-zones.php?affiliateid={$affiliateid}" => $strAdminstration), "2.1" => array("affiliate-zones.php?affiliateid={$affiliateid}" => $strZones), "2.1.1" => array("zone-edit.php?affiliateid={$affiliateid}&zoneid=0" => $strAddZone), "2.1.2" => array("zone-edit.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strModifyZone), "2.1.3" => array("zone-include.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strIncludedBanners), "2.1.4" => array("zone-probability.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strProbability), "2.1.5" => array("zone-invocation.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strInvocationcode), "2.1.6" => array("zone-advanced.php?affiliateid={$affiliateid}&zoneid={$zoneid}" => $strChains), "2.2" => array("affiliate-edit.php?affiliateid={$affiliateid}" => $strPreferences)));
if (phpAds_isUser(phpAds_Client) && phpAds_isAllowed(phpAds_ModifyInfo)) {
$phpAds_nav["client"]["2"] = array("client-edit.php" => $strPreferences);
}
示例6:
echo $row_trackers['trackername'];
}
// echo " ";
echo "</td>\n";
// ID
echo "\t\t\t\t\t<td height='25'>" . $row_trackers['trackerid'] . "</td>\n";
// Button 1, 2 & 3
echo "\t\t\t\t\t<td height='25'>";
if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency) || phpAds_isAllowed(phpAds_LinkCampaigns)) {
echo "<a href='tracker-campaigns.php?clientid=" . $clientid . "&trackerid=" . $row_trackers['trackerid'] . "'><img src='images/icon-zone-linked.gif' border='0' align='absmiddle'> {$strLinkedCampaigns}</a>";
} else {
echo " ";
}
echo "</td>\n";
echo "\t\t\t\t\t<td height='25'>";
if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency) || phpAds_isAllowed(phpAds_DeleteTracker)) {
echo "<a href='tracker-delete.php?clientid=" . $clientid . "&trackerid=" . $row_trackers['trackerid'] . "&returnurl=advertiser-trackers.php'" . phpAds_DelConfirm($strConfirmDeleteTracker) . "><img src='images/icon-recycle.gif' border='0' align='absmiddle' alt='{$strDelete}'> {$strDelete}</a>";
} else {
echo " ";
}
echo "</td>\n";
echo "\t\t\t\t</tr>\n";
$i++;
}
if (phpAds_dbNumRows($res_trackers) > 0) {
// echo "\t\t\t\t<tr height='1'>\n";
// echo "\t\t\t\t\t<td colspan='4' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td>\n";
// echo "\t\t\t\t</tr>\n";
//}
//if (isset($campaigns) && count($campaigns))
//{
示例7: phpAds_checkIds
function phpAds_checkIds()
{
global $clientid, $campaignid, $bannerid, $affiliateid, $zoneid, $userlogid, $day;
// I also put it there to avoid problems during the check on client/affiliate interface
if (phpAds_isUser(phpAds_Client)) {
$clientid = phpAds_getUserID();
} elseif (phpAds_isUser(phpAds_Affiliate)) {
$affiliateid = phpAds_getUserID();
}
// Reset missing variables
if (!isset($clientid)) {
$clientid = '';
}
if (!isset($campaignid)) {
$campaignid = '';
}
if (!isset($bannerid)) {
$bannerid = '';
}
if (!isset($affiliateid)) {
$affiliateid = '';
}
if (!isset($zoneid)) {
$zoneid = '';
}
if (!isset($userlogid)) {
$userlogid = '';
}
if (!isset($day)) {
$day = '';
}
$part = explode('-', str_replace('.php', '-', basename($_SERVER['SCRIPT_NAME'])));
if ($stats = $part[0] == 'stats' ? 1 : 0) {
array_shift($part);
$redirects = array('client' => 'stats-global-client.php', 'campaign' => 'stats-client-campaigns.php', 'banner' => 'stats-campaign-banners.php', 'affiliate' => 'stats-global-affiliates.php', 'zone' => 'stats-affiliate-zones.php');
} else {
$redirects = array('client' => 'client-index.php', 'campaign' => 'client-campaigns.php', 'banner' => 'campaign-banners.php', 'affiliate' => 'affiliate-index.php', 'zone' => 'affiliate-zones.php');
}
// *-edit and *-index pages doesn't need ids when adding new item, lowering requirements
if (isset($part[1]) && ($part[1] == 'edit' || $part[1] == 'index')) {
if ($part[0] == 'client') {
$part[0] = '';
} elseif ($part[0] == 'campaign') {
$part[0] = 'client';
} elseif ($part[0] == 'banner') {
$part[0] = 'campaign';
} elseif ($part[0] == 'affiliate') {
$part[0] = '';
} elseif ($part[0] == 'zone') {
$part[0] = 'affiliate';
}
}
switch ($part[0]) {
case 'banner':
if (!is_numeric($bannerid)) {
if (is_numeric($clientid) && is_numeric($campaignid)) {
// Banner-activate and banner-delete are also allowed to use only the campaign id
if ($part[1] == 'activate' || $part[1] == 'delete') {
break;
}
header('Location: ' . $redirects['banner'] . '?clientid=' . $clientid . '&campaignid=' . $campaignid);
exit;
}
} elseif (isset($part[1]) && $part[1] == 'htmlpreview') {
break;
}
case 'campaign':
if (!is_numeric($campaignid)) {
if (is_numeric($clientid)) {
header('Location: ' . $redirects['campaign'] . '?clientid=' . $clientid);
exit;
}
}
case 'client':
if (!is_numeric($clientid)) {
header('Location: ' . $redirects['client']);
exit;
}
break;
case 'zone':
case 'linkedbanners':
if (!is_numeric($zoneid)) {
if (is_numeric($affiliateid)) {
header('Location: ' . $redirects['zone'] . '?affiliateid=' . $affiliateid);
exit;
}
}
case 'affiliate':
if (!is_numeric($affiliateid)) {
header('Location: ' . $redirects['affiliate']);
exit;
}
break;
}
}
示例8:
}
/*
Deactivated for now because of security reasons -- Niels
if (phpAds_isUser(phpAds_Admin) || (phpAds_isUser(phpAds_Client) && phpAds_isAllowed(phpAds_ModifyBanner))) // only for the admin
*/
if (phpAds_isUser(phpAds_Admin)) {
echo "<a href='banner-edit.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $row_banners['bannerid'] . "'>";
echo "<img src='images/icon-edit.gif' align='absmiddle' border='0'> " . $strBannerProperties . "</a>";
echo " ";
}
if (phpAds_isUser(phpAds_Client) && phpAds_isAllowed(phpAds_DisableBanner) && $row_banners['active'] == 't') {
echo "<a href='banner-activate.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $row_banners['bannerid'] . "&value=t'>";
echo "<img src='images/icon-deactivate.gif' align='absmiddle' border='0'> " . $strDeActivate . "</a>";
echo " ";
}
if (phpAds_isUser(phpAds_Client) && phpAds_isAllowed(phpAds_ActivateBanner) && $row_banners['active'] != 't') {
echo "<a href='banner-activate.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $row_banners['bannerid'] . "&value=f'>";
echo "<img src='images/icon-activate.gif' align='absmiddle' border='0'> " . $strActivate . "</a>";
echo " ";
}
echo "</tr><td>";
echo "</table>";
echo "</div>";
}
echo "</td></tr>";
}
}
echo "<tr><td height='1' colspan='6' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
echo "<tr>";
echo "<form action='stats-campaign-banners.php'>";
echo "<td colspan='6' height='35' align='right'>";
示例9: phpAds_registerGlobal
/* Copyright (c) 2000-2002 by the phpAdsNew developers */
/* For more information visit: http://www.phpadsnew.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "../libraries/lib-reports.inc.php";
// Register input variables
phpAds_registerGlobal('startday', 'startmonth', 'startyear', 'endday', 'endmonth', 'endyear');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency);
if (phpAds_isUser(phpAds_Agency)) {
$query = "SELECT clientid FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid=" . $clientid . " AND agencyid=" . phpAds_getUserID();
$res = phpAds_dbQuery($query) or phpAds_sqlDie();
if (phpAds_dbNumRows($res) == 0) {
phpAds_PageHeader("2");
phpAds_Die($strAccessDenied, $strNotAdmin);
}
}
/*********************************************************/
/* Main code */
/*********************************************************/
if (isset($clientid) && $clientid != '') {
if (isset($startyear) && isset($startmonth) && isset($startday) && $startyear != '' && $startmonth != '' && $startday != '') {
$first_unixtimestamp = mktime(0, 0, 0, $startmonth, $startday, $startyear);
} else {
$first_unixtimestamp = 0;
示例10: phpAds_dbFetchArray
$row = phpAds_dbFetchArray($result);
if ($row["affiliateid"] == '' || phpAds_getUserID() != $row["affiliateid"]) {
phpAds_PageHeader("1");
phpAds_Die($strAccessDenied, $strNotAdmin);
} else {
$affiliateid = phpAds_getUserID();
}
} else {
phpAds_PageHeader("1");
phpAds_Die($strAccessDenied, $strNotAdmin);
}
}
/*********************************************************/
/* HTML framework */
/*********************************************************/
if (phpAds_isUser(phpAds_Admin)) {
if ($phpAds_config['compact_stats']) {
$res = phpAds_dbQuery("\n\t\t\tSELECT\n\t\t\t\tDISTINCT bannerid\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_adstats'] . "\n\t\t\tWHERE\n\t\t\t\tzoneid = '" . $zoneid . "'\n\t\t") or phpAds_sqlDie();
} else {
$res = phpAds_dbQuery("\n\t\t\tSELECT\n\t\t\t\tDISTINCT bannerid\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_adviews'] . "\n\t\t\tWHERE\n\t\t\t\tzoneid = '" . $zoneid . "'\n\t\t") or phpAds_sqlDie();
}
while ($row = phpAds_dbFetchArray($res)) {
phpAds_PageContext(phpAds_getBannerName($row['bannerid']), "stats-linkedbanner-history.php?affiliateid=" . $affiliateid . "&zoneid=" . $zoneid . "&bannerid=" . $row['bannerid'], $bannerid == $row['bannerid']);
}
phpAds_PageShortcut($strAffiliateProperties, 'affiliate-edit.php?affiliateid=' . $affiliateid, 'images/icon-affiliate.gif');
phpAds_PageShortcut($strZoneProperties, 'zone-edit.php?affiliateid=' . $affiliateid . '&zoneid=' . $zoneid, 'images/icon-zone.gif');
phpAds_PageShortcut($strIncludedBanners, 'zone-include.php?affiliateid=' . $affiliateid . '&zoneid=' . $zoneid, 'images/icon-zone-linked.gif');
phpAds_PageHeader("2.4.2.2.1");
echo "<img src='images/icon-affiliate.gif' align='absmiddle'> " . phpAds_getAffiliateName($affiliateid);
echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> ";
echo "<img src='images/icon-zone.gif' align='absmiddle'> " . phpAds_getZoneName($zoneid);
示例11:
echo "</tr>";
echo "<tr height='1'>";
echo "<td " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . "><img src='images/spacer.gif' width='1' height='1'></td>";
echo "<td colspan='3' bgcolor='#888888'><img src='images/break-l.gif' height='1' width='100%'></td>";
echo "</tr>";
echo "<tr height='25' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">";
// Empty
echo "<td> </td>";
// Button 1, 2 & 3
echo "<td height='25' colspan='3'>";
if (phpAds_isUser(phpAds_Admin) || phpAds_isAllowed(phpAds_LinkBanners)) {
echo "<a href='zone-include.php?affiliateid=" . $affiliateid . "&zoneid=" . $row_zones['zoneid'] . "'><img src='images/icon-zone-linked.gif' border='0' align='absmiddle' alt='{$strIncludedBanners}'> {$strIncludedBanners}</a> ";
}
echo "<a href='zone-probability.php?affiliateid=" . $affiliateid . "&zoneid=" . $row_zones['zoneid'] . "'><img src='images/icon-zone-probability.gif' border='0' align='absmiddle' alt='{$strProbability}'> {$strProbability}</a> ";
echo "<a href='zone-invocation.php?affiliateid=" . $affiliateid . "&zoneid=" . $row_zones['zoneid'] . "'><img src='images/icon-generatecode.gif' border='0' align='absmiddle' alt='{$strInvocationcode}'> {$strInvocationcode}</a> ";
if (phpAds_isUser(phpAds_Admin) || phpAds_isAllowed(phpAds_DeleteZone)) {
echo "<a href='zone-delete.php?affiliateid=" . $affiliateid . "&zoneid=" . $row_zones['zoneid'] . "&returnurl=affiliate-zones.php'" . phpAds_DelConfirm($strConfirmDeleteZone) . "><img src='images/icon-recycle.gif' border='0' align='absmiddle' alt='{$strDelete}'> {$strDelete}</a> ";
}
echo "</td></tr>";
$i++;
}
if (phpAds_dbNumRows($res_zones) > 0) {
echo "<tr height='1'><td colspan='4' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
}
echo "</table>";
echo "<br><br>";
/*********************************************************/
/* Store preferences */
/*********************************************************/
$Session['prefs']['affiliate-zones.php']['listorder'] = $listorder;
$Session['prefs']['affiliate-zones.php']['orderdirection'] = $orderdirection;
示例12: rowPresenter
function rowPresenter($array, $i = 0, $level = 0, $parent = '', $isClient = false, $id = 0)
{
global $HTTP_SERVER_VARS, $phpAds_TextAlignRight, $phpAds_TextDirection, $hideinactive, $i;
if (is_array($array)) {
foreach ($array as $array) {
if ($array['kind'] == 'campaign' && $array['active'] == 'f' && $hideinactive == '1') {
continue;
}
// Define kind of row and id
$kind = $array['kind'];
$thisID = $array['id'];
// Inserts divider if NOT top level (level > 0)
if ($level > 0) {
echo "<tr " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . "height='1'><td><img src='images/spacer.gif' width='1' height='1'></td><td colspan='6' bgcolor='#888888'><img src='images/break-l.gif' height='1' width='100%'></td></tr>";
}
// Sets background color of the row
echo "<tr height='25' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">";
// Indents as necesseary
echo "<td height='25'>";
echo "<img src='images/spacer.gif' height='16' width='" . 4 . "'>";
echo "<img src='images/spacer.gif' height='16' width='" . $level * 20 . "'>";
// expanding arrows
if (isset($array['children']) && ($array['anonymous'] == 'f' || !phpAds_isUser(phpAds_Affiliate) && !phpAds_isUser(phpAds_Client))) {
if (isset($array['expand']) && $array['expand'] == '1') {
echo "<a href='" . $HTTP_SERVER_VARS['PHP_SELF'] . "?_id_=" . ($parent != '' ? $parent . "-" : '') . $thisID . "&collapse=1&" . ($isClient ? 'clientid=' . $id : 'affiliateid=' . $id) . "'><img src='images/triangle-d.gif' align='absmiddle' align='absmiddle' border='0'></a>";
} else {
echo "<a href='" . $HTTP_SERVER_VARS['PHP_SELF'] . "?_id_=" . ($parent != '' ? $parent . "-" : '') . $thisID . "&expand=1&" . ($isClient ? 'clientid=' . $id : 'affiliateid=' . $id) . "'><img src='images/" . $phpAds_TextDirection . "/triangle-l.gif' align='absmiddle' border='0'></a>";
}
} else {
echo "<img src='images/spacer.gif' height='16' width='" . 16 . "' align='absmiddle'>";
}
echo "<img src='images/spacer.gif' height='16' width='" . 4 . "'>";
// specific zone stuff
if ($kind == 'zone') {
// icon
if ($array['delivery'] == phpAds_ZoneBanner) {
echo "<img src='images/icon-zone.gif' align='absmiddle'>";
} elseif ($array['delivery'] == phpAds_ZoneInterstitial) {
echo "<img src='images/icon-interstitial.gif' align='absmiddle'>";
} elseif ($array['delivery'] == phpAds_ZonePopup) {
echo "<img src='images/icon-popup.gif' align='absmiddle'>";
} elseif ($array['delivery'] == phpAds_ZoneText) {
echo "<img src='images/icon-textzone.gif' align='absmiddle'>";
}
// spacer between icon and name
echo "<img src='images/spacer.gif' height='16' width='" . 4 . "' align='absmiddle'>";
// name and info
echo "<a href='stats-zone-history.php?affiliateid=" . $array['affiliateid'] . "&zoneid=" . $array['id'] . "'>" . $array['name'] . "</a>";
echo "</td>";
echo "<td height='25'>" . $array['id'] . "</td>";
} else {
if ($kind == 'campaign') {
// check whether the campaign is active
if ($array['active'] == 't') {
echo "<img src='images/icon-campaign.gif' align='absmiddle'>";
} else {
echo "<img src='images/icon-campaign-d.gif' align='absmiddle'>";
}
// spacer between icon and name
echo "<img src='images/spacer.gif' height='16' width='" . 4 . "' align='absmiddle'>";
// get campaign name
$name = '';
if (isset($array['alt']) && $array['alt'] != '') {
$name = $array['alt'];
}
if (isset($array['name']) && $array['name'] != '') {
$name = $array['name'];
}
// check whether we should show the name and id of this banner
if ($array['anonymous'] == 't' && (phpAds_isUser(phpAds_Affiliate) || phpAds_isUser(phpAds_Client))) {
echo "<a href='#'>" . $GLOBALS['strHiddenCampaign'] . "</a></td>";
echo "<td height='25'></td>";
} else {
echo $isClient ? "<a href='stats-campaign-history.php?clientid=" . $id . "&campaignid=" . $array['id'] . "'>" . $name . "</a>" : "<a href='stats-campaign-affiliates.php?clientid=" . $id . "&campaignid=" . $array['id'] . "'>" . $name . "</a>";
echo "</td><td height='25'>" . $array['id'] . "</td>";
}
} else {
if ($kind == 'banner') {
if (ereg('bannerid:' . $array['id'], $array['what'])) {
echo "<img src='images/icon-zone-linked.gif' align='absmiddle'>";
} else {
echo "<img src='images/icon-banner-stored.gif' align='absmiddle'>";
}
// spacer between icon and name
echo "<img src='images/spacer.gif' height='16' width='" . 4 . "' align='absmiddle'>";
if ($isClient) {
echo "<a href='stats-banner-history.php?clientid=" . $id . "&bannerid=" . $array['id'] . "&campaignid=" . phpAds_getBannerParentClientID($array['id']) . "'>" . ($array['anonymous'] == 't' ? "(Hidden Banner)" : phpAds_getBannerName($array['id'], 30, false)) . "</td>";
} else {
$thiszone = explode('-', $parent);
echo "<a href='stats-linkedbanner-history.php?affiliateid=" . $id . "&zoneid=" . $thiszone[0] . "&bannerid=" . $array['id'] . "'>" . ($array['anonymous'] == 't' ? "(Hidden Banner)" : phpAds_getBannerName($array['id'], 30, false)) . "</td>";
}
echo "</td>";
echo "<td height='25'>" . $array['id'] . "</td>";
}
}
}
echo "<td height='25' align='" . $phpAds_TextAlignRight . "'>" . phpAds_formatNumber($array['views']) . "</td>";
echo "<td height='25' align='" . $phpAds_TextAlignRight . "'>" . phpAds_formatNumber($array['clicks']) . "</td>";
echo "<td height='25' align='" . $phpAds_TextAlignRight . "'>" . phpAds_buildCTR($array['views'], $array['clicks']) . "</td>";
echo "<td height='25' align='" . $phpAds_TextAlignRight . "'>" . phpAds_formatNumber($array['conversions']) . "</td>";
//.........这里部分代码省略.........
示例13: phpAds_placeInvocationForm
//.........这里部分代码省略.........
echo "<tr bgcolor='#F6F6F6'><td width='30'> </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'> </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'> </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'> </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'> </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'> </td></tr>";
}
// BannerID
if (isset($show['bannerid']) && $show['bannerid'] == true) {
echo "<tr><td width='30'> </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'> </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
示例14: phpAds_PrepareHelp
phpAds_PrepareHelp();
phpAds_PageHeader("5.1");
if (phpAds_isUser(phpAds_Admin)) {
phpAds_ShowSections(array("5.1", "5.3", "5.4", "5.2", "5.5"));
} elseif (phpAds_isUser(phpAds_Agency)) {
phpAds_ShowSections(array("5.1"));
}
phpAds_SettingsSelection("banner");
/*********************************************************/
/* Cache settings fields and get help HTML Code */
/*********************************************************/
// Split FTP settings
if (!empty($phpAds_config['type_web_ftp'])) {
if ($ftpserver = @parse_url($phpAds_config['type_web_ftp'])) {
$ftpserver['path'] = ereg_replace('^/', '', $ftpserver['path']);
$ftpserver['path'] = ereg_replace('/$', '', $ftpserver['path']);
$phpAds_config['type_web_ftp_host'] = $ftpserver['host'] . (isset($ftpserver['port']) && $ftpserver['port'] != '' ? ':' . $ftpserver['port'] : '');
$phpAds_config['type_web_ftp_user'] = $ftpserver['user'];
$phpAds_config['type_web_ftp_password'] = $ftpserver['pass'];
$phpAds_config['type_web_ftp_path'] = $ftpserver['path'];
}
}
$settings = array(array('text' => $strDefaultBanners, 'items' => array(array('type' => 'text', 'name' => 'default_banner_url', 'text' => $strDefaultBannerUrl, 'size' => 35, 'check' => 'url'), array('type' => 'break'), array('type' => 'text', 'name' => 'default_banner_target', 'text' => $strDefaultBannerTarget, 'size' => 35, 'check' => 'url'))), array('text' => $strAllowedBannerTypes, 'items' => array(array('type' => 'checkbox', 'name' => 'type_sql_allow', 'text' => $strTypeSqlAllow), array('type' => 'checkbox', 'name' => 'type_web_allow', 'text' => $strTypeWebAllow), array('type' => 'checkbox', 'name' => 'type_url_allow', 'text' => $strTypeUrlAllow), array('type' => 'checkbox', 'name' => 'type_html_allow', 'text' => $strTypeHtmlAllow), array('type' => 'checkbox', 'name' => 'type_txt_allow', 'text' => $strTypeTxtAllow))), array('text' => $strTypeWebSettings, 'visible' => phpAds_isUser(phpAds_Admin), 'items' => array(array('type' => 'select', 'name' => 'type_web_mode', 'text' => $strTypeWebMode, 'items' => array($strTypeWebModeLocal, $strTypeWebModeFtp), 'depends' => 'type_web_allow==true'), array('type' => 'break'), array('type' => 'text', 'name' => 'type_web_url', 'text' => $strTypeWebUrl, 'size' => 35, 'check' => 'url', 'depends' => 'type_web_allow==true'), array('type' => 'break'), array('type' => 'text', 'name' => 'type_web_ssl_url', 'text' => $strTypeWebSslUrl, 'size' => 35, 'check' => 'url', 'depends' => 'type_web_allow==true'), array('type' => 'break', 'size' => 'full'), array('type' => 'text', 'name' => 'type_web_dir', 'text' => $strTypeWebDir, 'size' => 35, 'depends' => 'type_web_allow==true && type_web_mode==0'), array('type' => 'break', 'size' => 'full'), array('type' => 'text', 'name' => 'type_web_ftp_host', 'text' => $strTypeFTPHost, 'size' => 35, 'depends' => 'type_web_allow==true && type_web_mode==1'), array('type' => 'break'), array('type' => 'text', 'name' => 'type_web_ftp_path', 'text' => $strTypeFTPDirectory, 'size' => 35, 'depends' => 'type_web_allow==true && type_web_mode==1'), array('type' => 'break'), array('type' => 'text', 'name' => 'type_web_ftp_user', 'text' => $strTypeFTPUsername, 'size' => 35, 'depends' => 'type_web_allow==true && type_web_mode==1'), array('type' => 'break'), array('type' => 'password', 'name' => 'type_web_ftp_password', 'text' => $strTypeFTPPassword, 'size' => 35, 'depends' => 'type_web_allow==true && type_web_mode==1'))), array('text' => $strTypeHtmlSettings, 'items' => array(array('type' => 'checkbox', 'name' => 'type_html_auto', 'text' => $strTypeHtmlAuto, 'depends' => 'type_html_allow==true'), array('type' => 'checkbox', 'name' => 'type_html_php', 'text' => $strTypeHtmlPhp, 'depends' => 'type_html_allow==true'))));
/*********************************************************/
/* Main code */
/*********************************************************/
phpAds_ShowSettings($settings, $errormessage);
/*********************************************************/
/* HTML framework */
/*********************************************************/
phpAds_PageFooter();
示例15: phpAds_SettingsWriteAdd
phpAds_SettingsWriteAdd('insert_delayed', isset($insert_delayed));
phpAds_SettingsWriteAdd('compatibility_mode', isset($compatibility_mode));
if (!count($errormessage)) {
phpAds_SettingsWriteFlush();
header("Location: settings-invocation.php");
exit;
}
}
/*********************************************************/
/* HTML framework */
/*********************************************************/
phpAds_PrepareHelp();
phpAds_PageHeader("5.1");
if (phpAds_isUser(phpAds_Admin)) {
phpAds_ShowSections(array("5.1", "5.3", "5.4", "5.2", "5.5"));
} elseif (phpAds_isUser(phpAds_Agency)) {
phpAds_ShowSections(array("5.1"));
}
phpAds_SettingsSelection("db");
/*********************************************************/
/* Cache settings fields and get help HTML Code */
/*********************************************************/
$settings = array(array('text' => $strDatabaseServer, 'visible' => phpAds_isUser(phpAds_Admin), 'items' => array(array('type' => 'text', 'name' => 'dbhost', 'text' => $strDbHost, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'dbport', 'text' => $strDbPort, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'dbuser', 'text' => $strDbUser, 'req' => true), array('type' => 'break'), array('type' => 'password', 'name' => 'dbpassword', 'text' => $strDbPassword, 'req' => true), array('type' => 'break'), array('type' => 'text', 'name' => 'dbname', 'text' => $strDbName, 'req' => true))), array('text' => $strDatabaseOptimalisations, 'visible' => phpAds_isUser(phpAds_Admin), 'items' => array(array('type' => 'checkbox', 'name' => 'persistent_connections', 'text' => $strPersistentConnections), array('type' => 'checkbox', 'name' => 'insert_delayed', 'text' => $strInsertDelayed, 'visible' => $phpAds_productname == 'phpAdsNew' && $phpAds_config['table_type'] == 'MYISAM'), array('type' => 'checkbox', 'name' => 'compatibility_mode', 'text' => $strCompatibilityMode, 'visible' => $phpAds_productname == 'phpAdsNew'), array('type' => 'checkbox', 'name' => 'auto_clean_tables_vacuum', 'text' => $strAutoCleanVacuum, 'visible' => $phpAds_productname == 'phpPgAds'))));
/*********************************************************/
/* Main code */
/*********************************************************/
phpAds_ShowSettings($settings, $errormessage);
/*********************************************************/
/* HTML framework */
/*********************************************************/
phpAds_PageFooter();