本文整理汇总了PHP中phpAds_Die函数的典型用法代码示例。如果您正苦于以下问题:PHP phpAds_Die函数的具体用法?PHP phpAds_Die怎么用?PHP phpAds_Die使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了phpAds_Die函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: export
/**
* The method to generate a plugin-style report XLS from an already
* prepared statistics page OA_Admin_Statistics_Common object.
*/
function export()
{
// Prepare the report name
// Get system navigation
$oMenu = OA_Admin_Menu::singleton();
// Get section by pageId
$oCurrentSection = $oMenu->get($this->oStatsController->pageId);
if ($oCurrentSection == null) {
phpAds_Die($GLOBALS['strErrorOccurred'], 'Menu system error: <strong>' . OA_Permission::getAccountType(true) . '::' . htmlspecialchars($ID) . '</strong> not found for the current user');
}
// Get name
$reportName = $oCurrentSection->getName();
$this->_name = $reportName;
// Prepare the output writer for generation
$reportFileName = 'Exported Statistics - ' . $reportName;
if (!empty($this->oStatsController->aDates['day_begin'])) {
$oStartDate = new Date($this->oStatsController->aDates['day_begin']);
$reportFileName .= ' from ' . $oStartDate->format($GLOBALS['date_format']);
}
if (!empty($this->oStatsController->aDates['day_end'])) {
$oEndDate = new Date($this->oStatsController->aDates['day_end']);
$reportFileName .= ' to ' . $oEndDate->format($GLOBALS['date_format']);
}
$reportFileName .= '.xls';
$this->_oReportWriter->openWithFilename($reportFileName);
// Get the header and data arrays from the same statistics controllers
// that prepare stats for the user interface stats pages
list($aHeaders, $aData) = $this->getHeadersAndDataFromStatsController(null, $this->oStatsController);
// Add the worksheet
$name = ucfirst($this->oStatsController->entity) . ' ' . ucfirst($this->oStatsController->breakdown);
$this->createSubReport($reportName, $aHeaders, $aData);
// Close the report writer and send the report to the user
$this->_oReportWriter->closeAndSend();
}
示例2: phpAds_checkAccess
function phpAds_checkAccess($allowed)
{
global $Session;
global $strNotAdmin, $strAccessDenied;
if (!($allowed & $Session['usertype'])) {
// No permission to access this page!
phpAds_PageHeader(0);
phpAds_Die($strAccessDenied, $strNotAdmin);
}
}
示例3: parseDay
/**
* A method to parse the day paramer, check it's validity, and store it
* in the provided $aDates array.
*
* @param array $aDates A references to an array that will be set to
* contain the valid day as the "day_begin" and
* "day_end" values.
*/
function parseDay(&$aDates)
{
$day = MAX_getValue('day', '');
if (!preg_match('/^(\\d\\d\\d\\d)(\\d\\d)(\\d\\d)$/D', $day, $matches)) {
phpAds_PageHeader('2');
phpAds_Die($GLOBALS['strAccessDenied'], $GLOBALS['strNotAdmin']);
}
if (!checkdate($matches[2], $matches[3], $matches[1])) {
phpAds_PageHeader('2');
phpAds_Die($GLOBALS['strAccessDenied'], $GLOBALS['strNotAdmin']);
}
$aDates = array();
$aDates['day_begin'] = "{$matches[1]}-{$matches[2]}-{$matches[3]}";
$aDates['day_end'] = "{$matches[1]}-{$matches[2]}-{$matches[3]}";
}
示例4: displayLogin
/**
* A static method to display a login screen
*
* @static
*
* @param string $sMessage
* @param string $sessionID
* @param bool $inlineLogin
*/
function displayLogin($sMessage = '', $sessionID = 0, $inLineLogin = false)
{
global $strUsername, $strPassword, $strLogin, $strWelcomeTo, $strEnterUsername, $strNoAdminInteface, $strForgotPassword;
$aConf = $GLOBALS['_MAX']['CONF'];
$aPref = $GLOBALS['_MAX']['PREF'];
header('Cache-Control: max-age=0, no-cache, proxy-revalidate, must-revalidate');
if (!$inLineLogin) {
phpAds_PageHeader(phpAds_Login);
}
// Check environment settings
$oSystemMgr = new OA_Environment_Manager();
$aSysInfo = $oSystemMgr->checkSystem();
foreach ($aSysInfo as $env => $vals) {
$errDetails = '';
if (is_array($vals['error'])) {
$errDetails = '<ul>';
if ($env == 'PERMS') {
foreach ($vals['actual'] as $key => $val) {
if ($val['error']) {
$errDetails .= '<li>' . htmlspecialchars($val['file']) . ' ' . htmlspecialchars($val['result']) . '</li>';
}
}
} else {
foreach ($vals['actual'] as $key => $val) {
$errDetails .= '<li>' . htmlspecialchars($key) . ' => ' . htmlspecialchars($val) . '</li>';
}
}
$errDetails .= '</ul>';
foreach ($vals['error'] as $key => $err) {
phpAds_Die(' Error: ' . $err, $errDetails);
}
}
}
$oTpl = new OA_Admin_Template('login.html');
// we build the URL of the current page to use a redirect URL after login
// this code should work on all server configurations hence why it is a bit complicated
// inspired by http://dev.piwik.org/svn/trunk/core/Url.php getCurrentUrl()
$url = '';
if (!empty($_SERVER['PATH_INFO'])) {
$url = $_SERVER['PATH_INFO'];
} else {
if (!empty($_SERVER['REQUEST_URI'])) {
if (($pos = strpos($_SERVER['REQUEST_URI'], "?")) !== false) {
$url = substr($_SERVER['REQUEST_URI'], 0, $pos);
} else {
$url = $_SERVER['REQUEST_URI'];
}
}
}
if (empty($url)) {
$url = $_SERVER['SCRIPT_NAME'];
}
if (!empty($_SERVER['QUERY_STRING'])) {
$url .= '?' . $_SERVER['QUERY_STRING'];
}
if (!empty($url)) {
// remove any extra slashes that would confuse the browser (see OX-5234)
$url = '/' . ltrim($url, '/');
}
$appName = !empty($aConf['ui']['applicationName']) ? $aConf['ui']['applicationName'] : MAX_PRODUCT_NAME;
$oTpl->assign('uiEnabled', $aConf['ui']['enabled']);
$oTpl->assign('formAction', $url);
$oTpl->assign('sessionID', $sessionID);
$oTpl->assign('appName', $appName);
$oTpl->assign('message', $sMessage);
$oTpl->display();
phpAds_PageFooter();
exit;
}
示例5: phpAds_HandleUploadFile
function phpAds_HandleUploadFile(&$uploaded)
{
if (function_exists("is_uploaded_file")) {
$upload_valid = @is_uploaded_file($uploaded['tmp_name']);
} else {
if (!($tmp_file = get_cfg_var('upload_tmp_dir'))) {
$tmp_file = tempnam('', '');
@unlink($tmp_file);
$tmp_file = dirname($tmp_file);
}
$tmp_file .= '/' . basename($uploaded['tmp_name']);
$tmp_file = str_replace('\\', '/', $tmp_file);
$tmp_file = ereg_replace('/+', '/', $tmp_file);
$up_file = str_replace('\\', '/', $uploaded['tmp_name']);
$up_file = ereg_replace('/+', '/', $up_file);
$upload_valid = $tmp_file == $up_file;
}
if (!$upload_valid) {
// Don't use file in case of exploit
phpAds_PageHeader("1");
phpAds_Die('Error', $strErrorUploadSecurity);
} else {
if (@file_exists($uploaded['tmp_name'])) {
$upload_error = false;
// Read the contents of the file in a buffer
if ($fp = @fopen($uploaded['tmp_name'], "rb")) {
$uploaded['buffer'] = @fread($fp, @filesize($uploaded['tmp_name']));
@fclose($fp);
} else {
// Check if moving the file is possible
if (function_exists("move_uploaded_file")) {
$tmp_dir = phpAds_path . '/misc/tmp/' . basename($uploaded['tmp_name']);
// Try to move the file
if (@move_uploaded_file($uploaded['tmp_name'], $tmp_dir)) {
$uploaded['tmp_name'] = $tmp_dir;
// Try again if the file is readable
if ($fp = @fopen($uploaded['tmp_name'], "rb")) {
$uploaded['buffer'] = @fread($fp, @filesize($uploaded['tmp_name']));
@fclose($fp);
} else {
$upload_error = true;
}
} else {
$upload_error = true;
}
} else {
$upload_error = true;
}
}
if ($upload_error) {
phpAds_PageHeader("1");
phpAds_Die('Error', $strErrorUploadBasedir);
}
// Determine width and height
$size = @getimagesize($uploaded['tmp_name']);
$uploaded['width'] = $size[0];
$uploaded['height'] = $size[1];
} else {
phpAds_PageHeader("1");
phpAds_Die('Error', $strErrorUploadUnknown);
}
}
// Remove temporary file
if (@file_exists($uploaded['tmp_name'])) {
@unlink($uploaded['tmp_name']);
}
}
示例6: header
// Post configmanager, but not installed -> install
header('Location: install.php');
exit;
}
// Include required files
include "../libraries/lib-io.inc.php";
include "../libraries/lib-db.inc.php";
include "../libraries/lib-dbconfig.inc.php";
include "lib-gui.inc.php";
include "lib-permissions.inc.php";
include "../libraries/lib-userlog.inc.php";
// Open the database connection
$link = phpAds_dbConnect();
if (!$link) {
// This text isn't translated, because if it is shown the language files are not yet loaded
phpAds_Die("A fatal error occurred", $phpAds_productname . " can't connect to the database.\n\t\t\t\tBecause of this it isn't possible to use the administrator interface. The delivery\n\t\t\t\tof banners might also be affected. Possible reasons for the problem are:\n\t\t\t\t<ul><li>The database server isn't functioning at the moment</li>\n\t\t\t\t<li>The location of the database server has changed</li>\n\t\t\t\t<li>The username or password used to contact the database server are not correct</li>\n\t\t\t\t</ul>");
}
// Load settings from the database
phpAds_LoadDbConfig();
if (!isset($phpAds_config['config_version']) || $phpAds_version > $phpAds_config['config_version']) {
// Post configmanager, but not up to date -> update
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) {
示例7: array
$_REQUEST['listorder'] = $listorder;
$_REQUEST['orderdirection'] = $orderdirection;
// If displaying conversion statistics, hand over control to a different file
if ($entity == 'conversions') {
include_once MAX_PATH . '/www/admin/stats-conversions.php';
exit;
}
// Prepare the parameters for display or export to XLS
$aParams = null;
if (isset($plugin) && $plugin != '') {
$aParams = array('skipFormatting' => true, 'disablePager' => true);
}
// Prepare the stats controller, and populate with the stats
$oStatsController =& OA_Admin_Statistics_Factory::getController($entity . "-" . $breakdown, $aParams);
if (PEAR::isError($oStatsController)) {
phpAds_Die('Error occured', htmlspecialchars($oStatsController->getMessage()));
}
$oStatsController->start();
// Export to XLS...
if (isset($plugin) && $plugin != '') {
require_once MAX_PATH . '/lib/OA/Admin/Reports/Export.php';
$oModule = new OA_Admin_Reports_Export($oStatsController);
$oModule->export();
}
// ... otherwise, output in HTML
$oStatsController->output();
// Erase stats graph file
if (isset($GraphFile) && $GraphFile != '') {
$dirObject = dir($conf['store']['webDir'] . '/temp');
while (false !== ($entry = $dirObject->read())) {
if (filemtime($conf['store']['webDir'] . '/temp/' . $entry) + 60 < time()) {
示例8: _checkObjectsExist
/**
* Function check if advertiser or placement exists
* if not: display proper error message
* Error message contains link to:
* - advertiser summary statistics if campaign does not exists
* - stats.php if advertiser does not exists
*
* @param int $advertiserId Advertiser Id
* @param int $placementId Placement Id (Campaign Id)
*/
function _checkObjectsExist($advertiserId, $placementId)
{
// Check if placement (campaign) exist
if (0 == count(Admin_DA::getPlacements($this->coreParams + array('advertiser_id' => $advertiserId, 'placement_id' => $placementId)))) {
phpAds_PageHeader('2');
// Check if advertiser (clientid) exist
if (0 == count(Admin_DA::getPlacements($this->coreParams + array('advertiser_id' => $advertiserId)))) {
phpAds_Die($GLOBALS['strDeadLink'], str_replace('{link}', 'stats.php', $GLOBALS['strNoAdvertiser']));
} else {
$link = "stats.php?" . htmlspecialchars(preg_replace('#campaignid=[0-9]*&?#', '', $_SERVER['QUERY_STRING']), ENT_QUOTES);
phpAds_Die($GLOBALS['strDeadLink'], str_replace('{link}', $link, $GLOBALS['strNoPlacement']));
}
}
}
示例9: displayLogin
/**
* A static method to display a login screen
*
* @static
*
* @param string $sMessage
* @param string $sessionID
* @param bool $inlineLogin
*/
function displayLogin($sMessage = '', $sessionID = 0, $inLineLogin = false)
{
global $strUsername, $strPassword, $strLogin, $strWelcomeTo, $strEnterUsername, $strNoAdminInteface, $strForgotPassword;
$aConf = $GLOBALS['_MAX']['CONF'];
$aPref = $GLOBALS['_MAX']['PREF'];
@header('Cache-Control: max-age=0, no-cache, proxy-revalidate, must-revalidate');
if (!$inLineLogin) {
phpAds_PageHeader(phpAds_Login);
}
// Check environment settings
$oSystemMgr = new OA_Environment_Manager();
$aSysInfo = $oSystemMgr->checkSystem();
foreach ($aSysInfo as $env => $vals) {
$errDetails = '';
if (is_array($vals['error']) && !empty($vals['error'])) {
if ($env == 'PERMS') {
// Just note that some file/folders are unwritable and that more information can be found in the debug.log
OA_Admin_UI::queueMessage('Error: File permission errors detected.<br />These <em>may</em> impact the accurate delivery of your ads,<br />See the debug.log file for the list of unwritable files', 'global', 'error', 0);
} else {
foreach ($vals['error'] as $key => $val) {
$errDetails .= '<li>' . htmlspecialchars($key) . ' => ' . htmlspecialchars($val) . '</li>';
}
phpAds_Die(' Error: ' . $err, $errDetails);
}
}
}
$oTpl = new OA_Admin_Template('login.html');
$appName = !empty($aConf['ui']['applicationName']) ? $aConf['ui']['applicationName'] : PRODUCT_NAME;
$oTpl->assign('uiEnabled', $aConf['ui']['enabled']);
$oTpl->assign('sessionID', $sessionID);
$oTpl->assign('appName', $appName);
$oTpl->assign('message', $sMessage);
$oTpl->display();
phpAds_PageFooter();
exit;
}
示例10: phpAds_sqlDie
function phpAds_sqlDie()
{
global $phpAds_dbmsname, $phpAds_version_readable, $phpAds_version, $phpAds_productname;
global $phpAds_last_query;
$error = phpAds_dbError();
$corrupt = false;
if ($phpAds_dbmsname == 'MySQL') {
$errornumber = phpAds_dbErrorNo();
if ($errornumber == 1027 || $errornumber == 1039) {
$corrupt = true;
}
if ($errornumber == 1016 || $errornumber == 1030) {
// Probably corrupted table, do additional check
eregi("[0-9]+", $error, $matches);
if ($matches[0] == 126 || $matches[0] == 127 || $matches[0] == 132 || $matches[0] == 134 || $matches[0] == 135 || $matches[0] == 136 || $matches[0] == 141 || $matches[0] == 144 || $matches[0] == 145) {
$corrupt = true;
}
}
}
if ($corrupt) {
$title = $GLOBALS['strErrorDBSerious'];
$message = $GLOBALS['strErrorDBNoDataSerious'];
if (phpAds_isLoggedIn() && phpAds_isUser(phpAds_Admin)) {
$message .= " (" . $error . ").<br><br>" . $GLOBALS['strErrorDBCorrupt'];
} else {
$message .= ".<br>" . $GLOBALS['strErrorDBContact'];
}
} else {
$title = $GLOBALS['strErrorDBPlain'];
$message = $GLOBALS['strErrorDBNoDataPlain'];
if (phpAds_isLoggedIn() && phpAds_isUser(phpAds_Admin)) {
$message .= $GLOBALS['strErrorDBSubmitBug'];
$last_query = $phpAds_last_query;
$message .= "<br><br><table cellpadding='0' cellspacing='0' border='0'>";
$message .= "<tr><td valign='top' nowrap><b>Version:</b> </td><td>" . $phpAds_productname . " " . $phpAds_version_readable . " (" . $phpAds_version . ")</td></tr>";
$message .= "<tr><td> </td><td>PHP " . phpversion() . " / " . $phpAds_dbmsname . " " . phpAds_dbResult(phpAds_dbQuery('SELECT VERSION()'), 0, 0) . "</td></tr>";
$message .= "<tr><td valign='top' nowrap><b>Page:</b></td><td>" . $_SERVER['PHP_SELF'] . "</td></tr>";
$message .= "<tr><td valign='top' nowrap><b>Error:</b></td><td>" . $error . "</td></tr>";
$message .= "<tr><td valign='top' nowrap><b>Query:</b></td><td>" . $last_query . "</td></tr>";
$message .= "</table>";
}
}
phpAds_Die($title, $message);
}
示例11: phpAds_PageHeader
Language_Loader::load('default');
$oDbh = OA_DB::singleton();
if (PEAR::isError($oDbh)) {
// Check if UI is enabled
if (!$GLOBALS['_MAX']['CONF']['ui']['enabled']) {
phpAds_PageHeader(OA_Auth::login($checkRedirectFunc));
phpAds_ShowBreak();
echo "<br /><img src='" . OX::assetPath() . "/images/info.gif' align='absmiddle'> ";
echo $strNoAdminInterface;
phpAds_PageFooter();
exit;
}
$translation = new OX_Translation();
$translation->htmlSpecialChars = true;
$translated_message = $translation->translate($GLOBALS['strErrorCantConnectToDatabase'], array(PRODUCT_NAME));
phpAds_Die($GLOBALS['strErrorDatabaseConnetion'], $translated_message);
}
// First thing to do is clear the $session variable to
// prevent users from pretending to be logged in.
unset($session);
// Authorize the user
OA_Start();
// Load the account's preferences
OA_Preferences::loadPreferences();
$pref = $GLOBALS['_MAX']['PREF'];
// Set time zone to local
OA_setTimeZoneLocal();
// Load the required language files
Language_Loader::load('default');
// Register variables
phpAds_registerGlobalUnslashed('affiliateid', 'agencyid', 'bannerid', 'campaignid', 'channelid', 'clientid', 'day', 'trackerid', 'userlogid', 'zoneid');
示例12: _checkAccess
/**
* A private method that can be inherited and used by children classes
* to check if the user has the required access level to view the
* statistics page. If not, the method will display the error message
* to the user, and terminate execution of the program.
*
* @access private
* @param array $aParams An array, indexed by types, of the entity IDs
* the statistics page is using, that the user
* must have access to. For example:
* array(
* 'advertiser' => 5,
* 'placement' => 12
* )
*/
function _checkAccess($aParams)
{
$access = false;
if (count($aParams) == 1) {
if (array_key_exists('advertiser', $aParams)) {
$access = MAX_checkAdvertiser($aParams['advertiser'], $aParams + $this->coreParams);
} else {
if (array_key_exists('publisher', $aParams)) {
$access = MAX_checkPublisher($aParams['publisher']);
}
}
} else {
if (count($aParams) == 2) {
if (array_key_exists('advertiser', $aParams) && array_key_exists('placement', $aParams)) {
$access = MAX_checkPlacement($aParams['advertiser'], $aParams['placement'], $aParams + $this->coreParams);
} else {
if (array_key_exists('publisher', $aParams) && array_key_exists('zone', $aParams)) {
$access = MAX_checkZone($aParams['publisher'], $aParams['zone']);
}
}
} else {
if (count($aParams) == 3) {
if (array_key_exists('advertiser', $aParams) && array_key_exists('placement', $aParams) && array_key_exists('ad', $aParams)) {
$access = MAX_checkAd($aParams['advertiser'], $aParams['placement'], $aParams['ad']);
}
}
}
}
if (!$access) {
// Before blatting out an error, has the access failure come about from
// a manually generated account switch process?
if (OA_Permission::isManualAccountSwitch()) {
// Yup! Re-direct to the main stats page
OX_Admin_Redirect::redirect('stats.php', true);
}
// Not a manual account switch, just deny access for now...
if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
phpAds_PageHeader('2');
}
if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER) || OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
phpAds_PageHeader('1');
}
phpAds_Die($GLOBALS['strAccessDenied'], $GLOBALS['strNotAdmin']);
}
}
示例13: phpAds_sqlDie
function phpAds_sqlDie()
{
global $phpAds_last_query;
$corrupt = false;
$aConf = $GLOBALS['_MAX']['CONF'];
if (strcasecmp($aConf['database']['type'], 'mysql') === 0) {
$error = mysql_error();
$errornumber = mysql_errno();
if ($errornumber == 1027 || $errornumber == 1039) {
$corrupt = true;
}
if ($errornumber == 1016 || $errornumber == 1030) {
// Probably corrupted table, do additional check
preg_match("/[0-9]+/Di", $error, $matches);
if ($matches[0] == 126 || $matches[0] == 127 || $matches[0] == 132 || $matches[0] == 134 || $matches[0] == 135 || $matches[0] == 136 || $matches[0] == 141 || $matches[0] == 144 || $matches[0] == 145) {
$corrupt = true;
}
}
$dbmsName = 'MySQL';
} elseif (strcasecmp($aConf['database']['type'], 'pgsql') === 0) {
$error = pg_errormessage();
$dbmsName = 'PostgreSQL';
} else {
$error = '';
$dbmsName = 'Unknown';
}
if ($corrupt) {
$title = $GLOBALS['strErrorDBSerious'];
$message = sprintf($GLOBALS['strErrorDBNoDataSerious'], PRODUCT_NAME);
if (OA_Auth::isLoggedIn() && OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
$message .= " (" . $error . ").<br><br>" . $GLOBALS['strErrorDBCorrupt'];
} else {
$message .= ".<br>" . $GLOBALS['strErrorDBContact'];
}
} else {
$title = $GLOBALS['strErrorDBPlain'];
$message = sprintf($GLOBALS['strErrorDBNoDataPlain'], PRODUCT_NAME);
if (OA_Auth::isLoggedIn() && (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) || defined('phpAds_installing')) {
// Get the DB server version
$connection = DBC::getCurrentConnection();
$connectionId = $connection->getConnectionId();
$aVersion = $connectionId->getServerVersion();
$dbVersion = $aVersion['major'] . '.' . $aVersion['minor'] . '.' . $aVersion['patch'] . '-' . $aVersion['extra'];
$message .= sprintf($GLOBALS['strErrorDBSubmitBug'], PRODUCT_NAME);
$last_query = $phpAds_last_query;
$message .= "<br><br><table cellpadding='0' cellspacing='0' border='0'>";
$message .= "<tr><td valign='top' nowrap><b>Version:</b> </td><td>" . htmlspecialchars(PRODUCT_NAME) . " v" . htmlspecialchars(VERSION) . "</td></tr>";
$message .= "<tr><td valien='top' nowrap><b>PHP/DB:</b></td><td>PHP " . phpversion() . " / " . $dbmsName . " " . $dbVersion . "</td></tr>";
$message .= "<tr><td valign='top' nowrap><b>Page:</b></td><td>" . htmlspecialchars($_SERVER['PHP_SELF']) . "</td></tr>";
$message .= "<tr><td valign='top' nowrap><b>Error:</b></td><td>" . htmlspecialchars($error) . "</td></tr>";
$message .= "<tr><td valign='top' nowrap><b>Query:</b></td><td><pre>" . htmlspecialchars($last_query) . "</pre></td></tr>";
$message .= "<tr><td valign='top' nowrap><b>\$_POST:</b></td><td><pre>" . (empty($_POST) ? 'Empty' : htmlspecialchars(print_r($_POST, true))) . "</pre></td></tr>";
$message .= "<tr><td valign='top' nowrap><b>\$_GET:</b></td><td><pre>" . (empty($_GET) ? 'Empty' : htmlspecialchars(print_r($_GET, true))) . "</pre></td></tr>";
$message .= "</table>";
}
}
phpAds_Die($title, $message);
}
示例14: checkForErrorFileUploaded
function checkForErrorFileUploaded($oFile)
{
if (PEAR::isError($oFile)) {
phpAds_PageHeader(1);
phpAds_Die($GLOBALS['strErrorOccurred'], htmlspecialchars($oFile->getMessage()) . "<br>Please make sure you selected a valid file.");
}
}
示例15: phpAds_Die
if (!isset($entity)) {
$entity = 'global';
}
if (!isset($breakdown)) {
$breakdown = 'advertiser';
}
// Add all manipulated values to globals
$_REQUEST['zoneid'] = $zoneid;
$_REQUEST['affiliateid'] = $affiliateid;
$_REQUEST['bannerid'] = $bannerid;
$_REQUEST['campaignid'] = $campaignid;
$_REQUEST['clientid'] = $clientid;
// Overwirte file name to load right session data, see MAX_getStoredValue
$pgName = 'stats.php';
$oStats =& OA_Admin_Statistics_Factory::getController($entity . "-" . $breakdown);
if (PEAR::isError($oStats)) {
phpAds_Die('Error occurred', htmlspecialchars($oStats->getMessage()));
}
$oStats->noFormat = true;
$oStats->start();
// Output html code
$oStats->output(true);
// Erase stats graph file
if (isset($GraphFile) && $GraphFile != '') {
$dirObject = dir($conf['store']['webDir'] . '/temp');
while (false !== ($entry = $dirObject->read())) {
if (filemtime($conf['store']['webDir'] . '/temp/' . $entry) + 60 < time()) {
unlink($conf['store']['webDir'] . '/temp/' . $entry);
}
}
}