本文整理汇总了PHP中phpAds_checkAccess函数的典型用法代码示例。如果您正苦于以下问题:PHP phpAds_checkAccess函数的具体用法?PHP phpAds_checkAccess怎么用?PHP phpAds_checkAccess使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了phpAds_checkAccess函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: phpAds_registerGlobal
/* =========== */
/* */
/* Copyright (c) 2000-2007 by the Openads developers */
/* For more information visit: http://www.openads.org */
/* */
/* 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";
// Register input variables
phpAds_registerGlobal('move', 'submit', 'clientname', 'views', 'clicks', 'unlimitedviews', 'unlimitedclicks', 'priority', 'targetviews', 'weight', 'expire', 'expireSet', 'expireDay', 'expireMonth', 'expireYear', 'activateSet', 'activateDay', 'activateMonth', 'activateYear', 'target_old', 'weight_old', 'active_old');
// Security check
phpAds_checkAccess(phpAds_Admin);
/*********************************************************/
/* Process submitted form */
/*********************************************************/
if (isset($submit)) {
// If ID is not set, it should be a null-value for the auto_increment
if (empty($campaignid)) {
$campaignid = "null";
}
// set expired
if ($views == '-') {
$views = 0;
}
if ($clicks == '-') {
$clicks = 0;
}
示例2: 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";
// Register input variables
phpAds_registerGlobal('action', 'trackerids', 'clickwindowday', 'clickwindowhour', 'clickwindowminute', 'clickwindows', 'clickwindowsecond', 'hideinactive', 'logids', 'submit', 'viewwindowday', 'viewwindowhour', 'viewwindowminute', 'viewwindows', 'viewwindowsecond');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency);
if (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();
}
$res = phpAds_dbQuery($query) or phpAds_sqlDie();
if (phpAds_dbNumRows($res) == 0) {
phpAds_PageHeader("2");
phpAds_Die($strAccessDenied, $strNotAdmin);
}
}
/*********************************************************/
/* Process submitted form */
/*********************************************************/
示例3: phpAds_checkAccess
/************************************************************************/
/* phpAdsNew 2 */
/* =========== */
/* */
/* 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";
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency + phpAds_Client);
/*********************************************************/
/* Client interface security */
/*********************************************************/
if (phpAds_isUser(phpAds_Client)) {
$clientid = phpAds_getUserID();
$query = "SELECT campaignid" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE clientid=" . $clientid . " AND campaignid=" . $campaignid;
$res = phpAds_dbQuery($query) or phpAds_sqlDie();
if (phpAds_dbNumRows($res) == 0) {
phpAds_PageHeader("1");
phpAds_Die($strAccessDenied, $strNotAdmin);
}
} elseif (phpAds_isUser(phpAds_Agency)) {
$clientid = phpAds_getUserID();
$query = "SELECT campaignid" . " FROM " . $phpAds_config['tbl_campaigns'] . "," . $phpAds_config['tbl_clients'] . " WHERE clientid=" . $clientid . " AND campaignid=" . $campaignid . " AND agencyid=" . phpAds_getUserID();
$res = phpAds_dbQuery($query) or phpAds_sqlDie();
示例4: phpAds_registerGlobal
/* */
/* Copyright (c) 2000-2007 by the Openads developers */
/* For more information visit: http://www.openads.org */
/* */
/* 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 "lib-expiration.inc.php";
// Register input variables
phpAds_registerGlobal('period', 'start', 'limit', 'source');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Affiliate);
/*********************************************************/
/* Affiliate interface security */
/*********************************************************/
if (phpAds_isUser(phpAds_Affiliate)) {
if (isset($zoneid) && $zoneid > 0) {
$result = phpAds_dbQuery("\n\t\t\tSELECT\n\t\t\t\taffiliateid\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_zones'] . "\n\t\t\tWHERE\n\t\t\t\tzoneid = '{$zoneid}'\n\t\t\t") or phpAds_sqlDie();
$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");
示例5: phpAds_registerGlobal
/* 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";
// Register input variables
phpAds_registerGlobal('plugin', 'delimiter', 'quotes');
if (isset($plugin) && $plugin != '') {
$filename = 'report-plugins/' . $plugin . '.plugin.php';
if (file_exists($filename)) {
include $filename;
$plugininfo = $plugin_info_function();
// Check security
phpAds_checkAccess($plugininfo["plugin-authorize"]);
$plugin_execute_function = $plugininfo["plugin-execute"];
$plugin_import = $plugininfo["plugin-import"];
$plugin_variables = array();
foreach (array_keys($plugin_import) as $key) {
// Register needed plugin variables
phpAds_registerGlobal($key);
if (isset(${$key}) && ${$key} != '') {
$plugin_variables[] = "'" . addslashes(${$key}) . "'";
} else {
$plugin_variables[] = "''";
}
}
$executestring = $plugin_execute_function . "(" . implode(",", $plugin_variables) . ");";
@eval($executestring);
}
示例6: phpAds_checkAccess
// $Revision: 2.2 $
/************************************************************************/
/* phpAdsNew 2 */
/* =========== */
/* */
/* 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";
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency + phpAds_Client + phpAds_Affiliate);
/*********************************************************/
/* Main code */
/*********************************************************/
if (phpAds_isUser(phpAds_Admin)) {
Header("Location: " . $phpAds_config['admin_url_prefix'] . "/admin/advertiser-index.php");
exit;
}
if (phpAds_isUser(phpAds_Agency)) {
Header("Location: " . $phpAds_config['admin_url_prefix'] . "/admin/advertiser-index.php");
exit;
}
if (phpAds_isUser(phpAds_Client)) {
Header("Location: " . $phpAds_config['admin_url_prefix'] . "/admin/stats-advertiser-history.php?clientid=" . phpAds_getUserID());
exit;
}