• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP phpAds_sqlDie函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中phpAds_sqlDie函数的典型用法代码示例。如果您正苦于以下问题:PHP phpAds_sqlDie函数的具体用法?PHP phpAds_sqlDie怎么用?PHP phpAds_sqlDie使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了phpAds_sqlDie函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: Plugin_AffiliatehistoryExecute

function Plugin_AffiliatehistoryExecute($affiliateid, $delimiter = ",")
{
    global $phpAds_config, $date_format;
    global $strAffiliate, $strTotal, $strDay, $strViews, $strClicks, $strCTRShort;
    header("Content-type: application/csv\nContent-Disposition: \"inline; filename=affiliatehistory.csv\"");
    $idresult = phpAds_dbQuery("\n\t\tSELECT\n\t\t\tzoneid\n\t\tFROM\n\t\t\t" . $phpAds_config['tbl_zones'] . "\n\t\tWHERE\n\t\t\taffiliateid = '" . $affiliateid . "'\n\t");
    while ($row = phpAds_dbFetchArray($idresult)) {
        $zoneids[] = "zoneid = " . $row['zoneid'];
    }
    $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\tWHERE\n\t\t\t(" . implode(' OR ', $zoneids) . ")\n\t\tGROUP BY\n\t\t\tday\n\t";
    $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 $strAffiliate . ": " . strip_tags(phpAds_getAffiliateName($affiliateid)) . "\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";
}
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:35,代码来源:affiliatehistory.plugin.php


示例2: 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";
}
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:35,代码来源:globalhistory.plugin.php


示例3: phpAds_getCampaign

function phpAds_getCampaign($query)
{
    $campaigns = array();
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        $campaigns[$row['campaignid']] = $row;
    }
    return $campaigns;
}
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:9,代码来源:lib-data-campaigns.inc.php


示例4: Plugin_GlobalhistoryExecute

function Plugin_GlobalhistoryExecute($delimiter = 't', $quotes = '')
{
    global $phpAds_config, $date_format;
    global $strGlobalHistory, $strTotal, $strDay, $strViews, $strClicks, $strCTRShort;
    // Expand delimiter and quotes
    if ($delimiter == 't') {
        $delimiter = "\t";
    }
    if ($quotes == '1') {
        $quotes = "'";
    }
    if ($quotes == '2') {
        $quotes = '"';
    }
    header("Content-type: application/csv");
    header("Content-Disposition: inline; filename=\"publisherhistory.csv\"");
    if ($phpAds_config['compact_stats']) {
        $res_query = "\n\t\t\tSELECT\n\t\t\t\tDATE_FORMAT(day, '%Y%m%d') as date,\n\t\t\t\tDATE_FORMAT(day, '{$date_format}') as date_formatted,\n\t\t\t\tSUM(views) AS adviews,\n\t\t\t\tSUM(clicks) AS adclicks\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_adstats'] . "\n\t\t\tGROUP BY\n\t\t\t\tday\n\t\t\tORDER BY\n\t\t\t\tdate\n\t\t";
        $res_banners = phpAds_dbQuery($res_query) or phpAds_sqlDie();
        while ($row_banners = phpAds_dbFetchArray($res_banners)) {
            $stats[$row_banners['date_formatted']]['views'] = $row_banners['adviews'];
            $stats[$row_banners['date_formatted']]['clicks'] = $row_banners['adclicks'];
        }
    } else {
        $res_query = "\n\t\t\tSELECT\n\t\t\t\tDATE_FORMAT(t_stamp, '%Y%m%d') as date,\n\t\t\t\tDATE_FORMAT(t_stamp, '" . $date_format . "') as date_formatted,\n\t\t\t\tcount(bannerid) as adviews\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_adviews'] . "\n\t\t\tGROUP BY\n\t\t\t\tdate, date_formatted\n\t\t\tORDER BY\n\t\t\t\tdate\n\t\t";
        $res_banners = phpAds_dbQuery($res_query) or phpAds_sqlDie();
        while ($row_banners = phpAds_dbFetchArray($res_banners)) {
            $stats[$row_banners['date_formatted']]['views'] = $row_banners['adviews'];
            $stats[$row_banners['date_formatted']]['clicks'] = 0;
        }
        $res_query = "\n\t\t\tSELECT\n\t\t\t\tDATE_FORMAT(t_stamp, '%Y%m%d') as date,\n\t\t\t\tDATE_FORMAT(t_stamp, '" . $date_format . "') as date_formatted,\n\t\t\t\tcount(bannerid) as adclicks\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_adclicks'] . "\n\t\t\tGROUP BY\n\t\t\t\tdate, date_formatted\n\t\t\tORDER BY\n\t\t\t\tdate\n\t\t";
        $res_banners = phpAds_dbQuery($res_query) or phpAds_sqlDie();
        while ($row_banners = phpAds_dbFetchArray($res_banners)) {
            $stats[$row_banners['date_formatted']]['clicks'] = $row_banners['adclicks'];
        }
    }
    echo $quotes . $strGlobalHistory . $quotes . "\n\n";
    echo $quotes . $strDay . $quotes . $delimiter . $quotes . $strViews . $quotes . $delimiter;
    echo $quotes . $strClicks . $quotes . $delimiter . $quotes . $strCTRShort . $quotes . "\n";
    $totalclicks = 0;
    $totalviews = 0;
    if (isset($stats) && is_array($stats)) {
        foreach (array_keys($stats) as $key) {
            $row = array();
            $row[] = $quotes . $key . $quotes;
            $row[] = $quotes . $stats[$key]['views'] . $quotes;
            $row[] = $quotes . $stats[$key]['clicks'] . $quotes;
            $row[] = $quotes . phpAds_buildCTR($stats[$key]['views'], $stats[$key]['clicks']) . $quotes;
            echo implode($delimiter, $row) . "\n";
            $totalclicks += $stats[$key]['clicks'];
            $totalviews += $stats[$key]['views'];
        }
    }
    echo "\n";
    echo $quotes . $strTotal . $quotes . $delimiter . $quotes . $totalviews . $quotes . $delimiter;
    echo $quotes . $totalclicks . $quotes . $delimiter . $quotes . phpAds_buildCTR($totalviews, $totalclicks) . $quotes . "\n";
}
开发者ID:henryhe514,项目名称:ChineseCommercial,代码行数:57,代码来源:globalhistory.plugin.php


示例5: phpAds_DeleteTracker

function phpAds_DeleteTracker($trackerid)
{
    global $phpAds_config;
    // Delete Campaign
    $res = phpAds_dbQuery("DELETE FROM " . $phpAds_config['tbl_trackers'] . " WHERE trackerid=" . $trackerid) or phpAds_sqlDie();
    // Delete Campaign/Tracker links
    $res = phpAds_dbQuery("DELETE FROM " . $phpAds_config['tbl_campaigns_trackers'] . " WHERE trackerid=" . $trackerid) or phpAds_sqlDie();
    // Delete Conversions Logged to this Tracker
    $res = phpAds_dbQuery("DELETE FROM " . $phpAds_config['tbl_conversionlog'] . " WHERE trackerid=" . $trackerid) or phpAds_sqlDie();
    // Delete stats for each banner
    phpAds_deleteStatsByTrackerID($trackerid);
}
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:12,代码来源:tracker-delete.php


示例6: phpAds_updateSources

function phpAds_updateSources($old_source, $new_source)
{
    global $phpAds_config;
    $old_source_len = strlen($old_source);
    echo "Converting: " . $old_source . " to " . $new_source . " ...";
    $query = "UPDATE " . $phpAds_config['tbl_adclicks'] . " SET source=CONCAT('" . $new_source . "',SUBSTRING(source," . ($old_source_len + 1) . ")) WHERE source LIKE '" . $old_source . "%'";
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    $query = "UPDATE " . $phpAds_config['tbl_conversionlog'] . " SET action_source=CONCAT('" . $new_source . "',SUBSTRING(action_source," . ($old_source_len + 1) . ")) WHERE action_source LIKE '" . $old_source . "%'";
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    $query = "UPDATE " . $phpAds_config['tbl_adviews'] . " SET source=CONCAT('" . $new_source . "',SUBSTRING(source," . ($old_source_len + 1) . "))" . " WHERE source='" . $old_source . "%'" . " OR source LIKE '" . $old_source . "/%'";
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    echo "Done.<br>";
}
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:13,代码来源:maintenance-source-edit.php


示例7: phpAds_getSourceStats

function phpAds_getSourceStats($query, $listorder, $orderdirection)
{
    $res_stats = phpAds_dbQuery($query) or phpAds_sqlDie();
    while ($row_stats = phpAds_dbFetchArray($res_stats)) {
        $source = $row_stats['source'];
        if (strlen($source) > 0) {
            $sources = phpAds_buildSourceArray($sources, $source, '', $row_stats);
        }
    }
    // Sort the array
    $ascending = !($orderdirection == 'down' || $orderdirection == '');
    phpAds_qsort($sources, $listorder, $ascending);
}
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:13,代码来源:lib-data.inc.php


示例8: RaiseErrorHandler

function RaiseErrorHandler($group, $id, $info = NULL)
{
    if (function_exists('phpAds_sqlDie')) {
        global $phpAds_last_query;
        $phpAds_last_query = $info['sql'];
        phpAds_sqlDie();
    } else {
        $oError =& new ErrorInfo();
        $oError->group = $group;
        $oError->id = $id;
        $oError->info = $info;
        $errorstr = sprintf('[%s: message="%s" group=%d id=%s]', strtolower(get_class($oError)), implode(', ', $oError->info), $oError->group, $oError->id);
        trigger_error($errorstr, E_USER_ERROR);
    }
}
开发者ID:villos,项目名称:tree_admin,代码行数:15,代码来源:error.inc.php


示例9: phpAds_DeleteBanner

function phpAds_DeleteBanner($bannerid)
{
    global $phpAds_config;
    // Cleanup webserver stored image
    $res = phpAds_dbQuery("\n\t\tSELECT\n\t\t\tstoragetype, filename\n\t\tFROM\n\t\t\t" . $phpAds_config['tbl_banners'] . "\n\t\tWHERE\n\t\t\tbannerid = '{$bannerid}'\n\t") or phpAds_sqlDie();
    if ($row = phpAds_dbFetchArray($res)) {
        if (($row['storagetype'] == 'web' || $row['storagetype'] == 'sql') && $row['filename'] != '') {
            phpAds_ImageDelete($row['storagetype'], $row['filename']);
        }
    }
    // Delete banner
    $res = phpAds_dbQuery("\n\t\tDELETE FROM\n\t\t\t" . $phpAds_config['tbl_banners'] . "\n\t\tWHERE\n\t\t\tbannerid = '{$bannerid}'\n\t\t") or phpAds_sqlDie();
    // Delete banner ACLs
    $res = phpAds_dbQuery("\n\t\tDELETE FROM\n\t\t\t" . $phpAds_config['tbl_acls'] . "\n\t\tWHERE\n\t\t\tbannerid = '{$bannerid}'\n\t\t") or phpAds_sqlDie();
    // Delete statistics for this banner
    phpAds_deleteStatsByBannerID($bannerid);
}
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:17,代码来源:banner-delete.php


示例10: phpAds_DeleteCampaign

function phpAds_DeleteCampaign($campaignid)
{
    global $phpAds_config;
    // Delete Campaign
    $res = phpAds_dbQuery("\n\t\tDELETE FROM\n\t\t\t" . $phpAds_config['tbl_clients'] . "\n\t\tWHERE\n\t\t\tclientid = '{$campaignid}'\n\t") or phpAds_sqlDie();
    // Loop through each banner
    $res_banners = phpAds_dbQuery("\n\t\tSELECT\n\t\t\tbannerid,\n\t\t\tstoragetype,\n\t\t\tfilename\n\t\tFROM\n\t\t\t" . $phpAds_config['tbl_banners'] . "\n\t\tWHERE\n\t\t\tclientid = '{$campaignid}'\n\t") or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res_banners)) {
        // Cleanup stored images for each banner
        if (($row['storagetype'] == 'web' || $row['storagetype'] == 'sql') && $row['filename'] != '') {
            phpAds_ImageDelete($row['storagetype'], $row['filename']);
        }
        // Delete Banner ACLs
        phpAds_dbQuery("\n\t\t\tDELETE FROM\n\t\t\t\t" . $phpAds_config['tbl_acls'] . "\n\t\t\tWHERE\n\t\t\t\tbannerid = " . $row['bannerid'] . "\n\t\t") or phpAds_sqlDie();
        // Delete stats for each banner
        phpAds_deleteStats($row['bannerid']);
    }
    // Delete Banners
    phpAds_dbQuery("\n\t\tDELETE FROM\n\t\t\t" . $phpAds_config['tbl_banners'] . "\n\t\tWHERE\n\t\t\tclientid = '{$campaignid}'\n\t") or phpAds_sqlDie();
}
开发者ID:henryhe514,项目名称:ChineseCommercial,代码行数:20,代码来源:campaign-delete.php


示例11: phpAds_getSources

function phpAds_getSources($name = '', $parent = '')
{
    global $phpAds_config;
    if (strlen($parent) > 0) {
        $n = substr_count($parent, '/') + 2;
        $query = "SELECT" . " SUBSTRING_INDEX(SUBSTRING_INDEX(source,'/'," . $n . "),'/',-1) AS source_part" . ",COUNT(*) AS sum_views" . " FROM " . $phpAds_config['tbl_adviews'] . " WHERE source LIKE '" . $parent . "/%'" . " AND t_stamp > DATE_SUB(NOW(), INTERVAL 7 DAY)" . " GROUP BY source_part" . " ORDER BY sum_views DESC";
    } else {
        $query = "SELECT" . " SUBSTRING_INDEX(source, '/', 1) AS source_part" . ",COUNT(*) AS sum_views" . " FROM " . $phpAds_config['tbl_adviews'] . " WHERE t_stamp > DATE_SUB(NOW(), INTERVAL 7 DAY)" . " GROUP BY source_part" . " ORDER BY sum_views DESC";
    }
    $source_arr = array();
    $res_sources = phpAds_dbQuery($query) or phpAds_sqlDie();
    while ($row_sources = phpAds_dbFetchArray($res_sources)) {
        $source_arr[] = $row_sources;
        //echo "filing source: ".$row_sources['source']."...<br>\n";
        //phpAds_buildSourceArrayChildren($source_arr, $row_sources['source']);
    }
    // Sort the array
    //$ascending = !( ($orderdirection == 'down') || ($orderdirection == '') );
    //phpAds_sortSources($source_arr, $listorder, $ascending);
    return $source_arr;
}
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:21,代码来源:lib-data-sources.inc.php


示例12: OX_Translation

 if (!empty($duplicate)) {
     // Duplicate the campaign
     $doCampaigns = OA_Dal::factoryDO('campaigns');
     $doCampaigns->get($campaignid);
     $oldName = $doCampaigns->campaignname;
     $newCampaignId = $doCampaigns->duplicate();
     if ($newCampaignId) {
         // Queue confirmation message
         $newName = $doCampaigns->campaignname;
         $translation = new OX_Translation();
         $translated_message = $translation->translate($GLOBALS['strCampaignHasBeenDuplicated'], array(MAX::constructURL(MAX_URL_ADMIN, "campaign-edit.php?clientid={$clientid}&campaignid={$campaignid}"), htmlspecialchars($oldName), MAX::constructURL(MAX_URL_ADMIN, "campaign-edit.php?clientid={$clientid}&campaignid={$newCampaignId}"), htmlspecialchars($newName)));
         OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0);
         Header("Location: {$returnurl}?clientid={$clientid}&campaignid={$newCampaignId}");
         exit;
     } else {
         phpAds_sqlDie();
     }
 } else {
     if (!empty($newclientid)) {
         /*-------------------------------------------------------*/
         /* Restore cache of $node_array, if it exists            */
         /*-------------------------------------------------------*/
         if (isset($session['prefs']['advertiser-index.php']['nodes'])) {
             $node_array = $session['prefs']['advertiser-index.php']['nodes'];
         }
         /*-------------------------------------------------------*/
         // Delete any campaign-tracker links
         $doCampaign_trackers = OA_Dal::factoryDO('campaigns_trackers');
         $doCampaign_trackers->campaignid = $campaignid;
         $doCampaign_trackers->delete();
         // Move the campaign
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:campaign-modify.php


示例13: phpAds_deleteStats

    // Delete stats for this banner
    phpAds_deleteStats($bannerid);
    // Return to campaign statistics
    Header("Location: stats-campaign-banners.php?clientid=" . $clientid . "&campaignid=" . $campaignid);
} elseif (isset($campaignid) && $campaignid != '') {
    // Get all banners for this client
    $idresult = phpAds_dbQuery(" SELECT\n\t\t\t\t\t\t\t\tbannerid\n\t\t\t\t\t\t\t  FROM\n\t\t\t\t\t\t\t  \t" . $phpAds_config['tbl_banners'] . "\n\t\t\t\t\t\t\t  WHERE\n\t\t\t\t\t\t\t\tclientid = '{$campaignid}'\n\t\t  \t\t\t\t ");
    // Loop to all banners for this client
    while ($row = phpAds_dbFetchArray($idresult)) {
        // Delete stats for the banner
        phpAds_deleteStats($row['bannerid']);
    }
    // Return to campaign statistics
    Header("Location: stats-client-campaigns.php?clientid=" . $clientid);
} elseif (isset($clientid) && $clientid != '') {
    // Get all banners for this client
    $idresult = phpAds_dbQuery("\n\t\tSELECT\n\t\t\tb.bannerid\n\t\tFROM\n\t\t\t" . $phpAds_config['tbl_banners'] . " AS b,\n\t\t\t" . $phpAds_config['tbl_clients'] . " AS c\n\t\tWHERE\n\t\t\tc.parent = {$clientid} AND\n\t\t\tc.clientid = b.clientid\n\t");
    // Loop to all banners for this client
    while ($row = phpAds_dbFetchArray($idresult)) {
        // Delete stats for the banner
        phpAds_deleteStats($row['bannerid']);
    }
    // Return to campaign statistics
    Header("Location: stats-global-client.php");
} elseif (isset($all) && $all == 'tr' . 'ue') {
    phpAds_dbQuery("DELETE FROM " . $phpAds_config['tbl_adviews']) or phpAds_sqlDie();
    phpAds_dbQuery("DELETE FROM " . $phpAds_config['tbl_adclicks']) or phpAds_sqlDie();
    phpAds_dbQuery("DELETE FROM " . $phpAds_config['tbl_adstats']) or phpAds_sqlDie();
    // Return to campaign statistics
    Header("Location: stats-global-client.php");
}
开发者ID:henryhe514,项目名称:ChineseCommercial,代码行数:31,代码来源:stats-reset.php


示例14: 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";
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;
    }
    if (isset($endyear) && isset($endmonth) && isset($endday)) {
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:advertiser-mailreport.php


示例15: 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();
    if (phpAds_dbNumRows($res) == 0) {
        phpAds_PageHeader("1");
        phpAds_Die($strAccessDenied, $strNotAdmin);
    }
}
/*********************************************************/
/* HTML framework                                        */
/*********************************************************/
$bannerids = array();
$idresult = phpAds_dbQuery("\n\tSELECT\n\t\tbannerid\n\tFROM\n\t\t" . $phpAds_config['tbl_banners'] . "\n\tWHERE\n\t\tcampaignid = '{$campaignid}'\n");
while ($row = phpAds_dbFetchArray($idresult)) {
    $bannerids[] = "bannerid = " . $row['bannerid'];
}
$res = phpAds_dbQuery("\n\tSELECT\n\t\tDATE_FORMAT(day, '%Y%m%d') as date,\n\t\tDATE_FORMAT(day, '{$date_format}') as date_formatted\n\tFROM\n\t\t" . $phpAds_config['tbl_adstats'] . "\n\tWHERE\n\t\t(" . implode(' OR ', $bannerids) . ")\n\tGROUP BY\n\t\tday\n\tORDER BY\n\t\tday DESC\n\tLIMIT 7\n") or phpAds_sqlDie();
while ($row = phpAds_dbFetchArray($res)) {
    phpAds_PageContext($row['date_formatted'], "stats-campaign-daily-hosts.php?day=" . $row['date'] . "&clientid=" . $clientid . "&campaignid=" . $campaignid, $day == $row['date']);
}
if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency)) {
    phpAds_PageShortcut($strClientProperties, 'advertiser-edit.php?clientid=' . $clientid, 'images/icon-advertiser.gif');
    phpAds_PageShortcut($strCampaignProperties, 'campaign-edit.php?clientid=' . $clientid . '&campaignid=' . $campaignid, 'images/icon-campaign.gif');
    phpAds_PageHeader("2.1.2.1.2");
    echo "<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;" . phpAds_getClientName($clientid);
    echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
    echo "<img src='images/icon-campaign.gif' align='absmiddle'>&nbsp;" . phpAds_getCampaignName($campaignid);
    echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
    echo "<img src='images/icon-date.gif' align='absmiddle'>&nbsp;<b>" . date(str_replace('%', '', $date_format), mktime(0, 0, 0, substr($day, 4, 2), substr($day, 6, 2), substr($day, 0, 4))) . "</b><br><br><br>";
    phpAds_ShowSections(array("2.1.2.1.1", "2.1.2.1.2"));
}
if (phpAds_isUser(phpAds_Client)) {
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:stats-campaign-daily-hosts.php


示例16: phpAds_dbQuery

        } else {
            $manual['clicks'] += $row_stats['clicks'];
            $manual['views'] += $row_stats['views'];
        }
    }
} else {
    $res_stats = phpAds_dbQuery("\n\t\tSELECT\n\t\t\tzoneid,\n\t\t\tcount(*) as views\n\t\tFROM \n\t\t\t" . $phpAds_config['tbl_adviews'] . "\n\t\tWHERE\n\t\t\tbannerid = '" . $bannerid . "'\n\t\tGROUP BY\n\t\t\tzoneid\n\t\t") or phpAds_sqlDie();
    while ($row_stats = phpAds_dbFetchArray($res_stats)) {
        if (isset($zones[$row_stats['zoneid']])) {
            $zones[$row_stats['zoneid']]['views'] = $row_stats['views'];
            $zones[$row_stats['zoneid']]['clicks'] = 0;
        } else {
            $manual['views'] += $row_stats['views'];
        }
    }
    $res_stats = phpAds_dbQuery("\n\t\tSELECT\n\t\t\tzoneid,\n\t\t\tcount(*) as clicks\n\t\tFROM \n\t\t\t" . $phpAds_config['tbl_adclicks'] . "\n\t\tWHERE\n\t\t\tbannerid = '" . $bannerid . "'\n\t\tGROUP BY\n\t\t\tzoneid\n\t\t") or phpAds_sqlDie();
    while ($row_stats = phpAds_dbFetchArray($res_stats)) {
        if (isset($zones[$row_stats['zoneid']])) {
            $zones[$row_stats['zoneid']]['clicks'] = $row_stats['clicks'];
        } else {
            $manual['clicks'] += $row_stats['clicks'];
        }
    }
}
// Add ID found in expand to expanded nodes
if (isset($expand) && $expand != '') {
    $node_array[] = $expand;
}
for ($i = 0; $i < sizeof($node_array); $i++) {
    if (isset($collapse) && $collapse == $node_array[$i]) {
        unset($node_array[$i]);
开发者ID:henryhe514,项目名称:ChineseCommercial,代码行数:31,代码来源:stats-banner-affiliates.php


示例17: phpAds_dbQuery

}
/*********************************************************/
/* HTML framework                                        */
/*********************************************************/
if (phpAds_isUser(phpAds_Admin)) {
    if (isset($Session['prefs']['stats-global-client.php']['listorder'])) {
        $navorder = $Session['prefs']['stats-global-client.php']['listorder'];
    } else {
        $navorder = '';
    }
    if (isset($Session['prefs']['stats-global-client.php']['orderdirection'])) {
        $navdirection = $Session['prefs']['stats-global-client.php']['orderdirection'];
    } else {
        $navdirection = '';
    }
    $res = phpAds_dbQuery("\n\t\tSELECT\n\t\t\t*\n\t\tFROM\n\t\t\t" . $phpAds_config['tbl_clients'] . "\n\t\tWHERE\n\t\t\tparent = 0\n\t\t" . phpAds_getListOrder($navorder, $navdirection) . "\n\t") or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        phpAds_PageContext(phpAds_buildClientName($row['clientid'], $row['clientname']), "stats-client-history.php?clientid=" . $row['clientid'], $clientid == $row['clientid']);
    }
    phpAds_PageShortcut($strClientProperties, 'client-edit.php?clientid=' . $clientid, 'images/icon-client.gif');
    $extra = "<br><br><br>";
    $extra .= "<b>{$strMaintenance}</b><br>";
    $extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
    $extra .= "<a href='stats-reset.php?clientid={$clientid}'" . phpAds_DelConfirm($strConfirmResetClientStats) . ">";
    $extra .= "<img src='images/" . $phpAds_TextDirection . "/icon-undo.gif' align='absmiddle' border='0'>&nbsp;{$strResetStats}</a>";
    $extra .= "<br><br>";
    phpAds_PageHeader("2.1.1", $extra);
    echo "<img src='images/icon-client.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getClientName($clientid) . "</b><br><br><br>";
    phpAds_ShowSections(array("2.1.1", "2.1.2"));
}
if (phpAds_isUser(phpAds_Client)) {
开发者ID:henryhe514,项目名称:ChineseCommercial,代码行数:31,代码来源:stats-client-history.php


示例18: phpAds_DelConfirm

$extra .= "<img src='images/icon-recycle.gif' align='absmiddle'>&nbsp;<a href='banner-delete.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $bannerid . "&returnurl=campaign-banners.php'" . phpAds_DelConfirm($strConfirmDeleteBanner) . ">{$strDelete}</a><br>";
$extra .= "</form>";
phpAds_PageHeader("4.1.3.3.3", $extra);
echo "<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;" . phpAds_getParentClientName($campaignid);
echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
echo "<img src='images/icon-campaign.gif' align='absmiddle'>&nbsp;" . phpAds_getCampaignName($campaignid);
echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
echo "<img src='images/icon-banner-stored.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getBannerName($bannerid) . "</b><br><br>";
echo phpAds_buildBannerCode($bannerid) . "<br><br><br><br>";
phpAds_ShowSections(array("4.1.3.3.2", "4.1.3.3.3", "4.1.3.3.6", "4.1.3.3.4"));
/*********************************************************/
/* Main code                                             */
/*********************************************************/
if (!isset($acl) && $phpAds_config['acl']) {
    // Fetch all ACLs from the database
    $res = phpAds_dbQuery("\n\t\tSELECT\n\t\t\t*\n\t\tFROM\n\t\t\t" . $phpAds_config['tbl_acls'] . "\n\t\tWHERE\n\t\t\tbannerid = '" . $bannerid . "'\n\t\tORDER BY\n\t\t\texecutionorder\n\t") or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        $acl[$row['executionorder']]['logical'] = $row['logical'];
        $acl[$row['executionorder']]['type'] = $row['type'];
        $acl[$row['executionorder']]['comparison'] = $row['comparison'];
        // Misc lists
        if ($row['type'] == 'time' || $row['type'] == 'weekday' || $row['type'] == 'country' || $row['type'] == 'continent' || $row['type'] == 'region') {
            $acl[$row['executionorder']]['data'] = explode(',', $row['data']);
        } elseif ($row['type'] == 'language') {
            if (ereg("^\\(.*\\)\$", $row['data'])) {
                $row['data'] = substr($row['data'], 1, strlen($row['data']) - 2);
            }
            $acl[$row['executionorder']]['data'] = explode(')|(', $row['data']);
        } elseif ($row['type'] == 'browser') {
            if (ereg("^\\(.*\\)\$", $row['data'])) {
                $row['data'] = substr($row['data'], 1, strlen($row['data']) - 2);
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:banner-acl.php


示例19: phpAds_dbQuery

    }
}
/*********************************************************/
/* HTML framework                                        */
/*********************************************************/
if (isset($Session['prefs']['stats-campaign-banners.php']['listorder'])) {
    $navorder = $Session['prefs']['stats-campaign-banners.php']['listorder'];
} else {
    $navorder = '';
}
if (isset($Session['prefs']['stats-campaign-banners.php']['orderdirection'])) {
    $navdirection = $Session['prefs']['stats-campaign-banners.php']['orderdirection'];
} else {
    $navdirection = '';
}
$res = phpAds_dbQuery("\n\tSELECT\n\t\t*\n\tFROM\n\t\t" . $phpAds_config['tbl_banners'] . "\n\tWHERE\n\t\tcampaignid = '{$campaignid}'\n\t" . phpAds_getBannerListOrder($navorder, $navdirection) . "\n") or phpAds_sqlDie();
while ($row = phpAds_dbFetchArray($res)) {
    phpAds_PageContext(phpAds_buildBannerName($row['bannerid'], $row['description'], $row['alt']), "stats-banner-history.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $row['bannerid'], $bannerid == $row['bannerid']);
}
if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency)) {
    phpAds_PageShortcut($strClientProperties, 'advertiser-edit.php?clientid=' . $clientid, 'images/icon-advertiser.gif');
    phpAds_PageShortcut($strCampaignProperties, 'campaign-edit.php?clientid=' . $clientid . '&campaignid=' . $campaignid, 'images/icon-campaign.gif');
    phpAds_PageShortcut($strBannerProperties, 'banner-edit.php?clientid=' . $clientid . '&campaignid=' . $campaignid . '&bannerid=' . $bannerid, 'images/icon-banner-stored.gif');
    phpAds_PageShortcut($strModifyBannerAcl, 'banner-acl.php?clientid=' . $clientid . '&campaignid=' . $campaignid . '&bannerid=' . $bannerid, 'images/icon-acl.gif');
    if (phpAds_isUser(phpAds_Admin)) {
        $extra = "<br><br><br>";
        $extra .= "<b>{$strMaintenance}</b><br>";
        $extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
        $extra .= "<a href='stats-reset.php?clientid={$clientid}&campaignid={$campaignid}&bannerid={$bannerid}'" . phpAds_DelConfirm($strConfirmResetBannerStats) . ">";
        $extra .= "<img src='images/" . $phpAds_TextDirection . "/icon-undo.gif' align='absmiddle' border='0'>&nbsp;{$strResetStats}</a>";
        $extra .= "<br><br>";
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:stats-banner-history.php


示例20: phpAds_getAffiliateName

    echo "<img src='images/icon-affiliate.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getAffiliateName($affiliateid) . "</b><br><br><br>";
    phpAds_ShowSections(array("4.2.2", "4.2.3"));
} else {
    $sections[] = "2.1";
    if (phpAds_isAllowed(phpAds_ModifyInfo)) {
        $sections[] = "2.2";
    }
    phpAds_PageHeader("2.1");
    echo "<img src='images/icon-affiliate.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getAffiliateName($affiliateid) . "</b><br><br><br>";
    phpAds_ShowSections($sections);
}
/*********************************************************/
/* Main code                                             */
/*********************************************************/
// Get clients & campaign and build the tree
$res_zones = phpAds_dbQuery("\n\t\tSELECT \n\t\t\t*\n\t\tFROM \n\t\t\t" . $phpAds_config['tbl_zones'] . "\n\t\tWHERE\n\t\t\taffiliateid = '" . $affiliateid . "'\n\t\t" . phpAds_getZoneListOrder($listorder, $orderdirection) . "\n\t\t") or phpAds_sqlDie();
if (phpAds_isUser(phpAds_Admin) || phpAds_isAllowed(phpAds_AddZone)) {
    echo "<img src='images/icon-zone-new.gif' border='0' align='absmiddle'>&nbsp;";
    echo "<a href='zone-edit.php?affiliateid=" . $affiliateid . "' accesskey='" . $keyAddNew . "'>" . $strAddNewZone_Key . "</a>&nbsp;&nbsp;";
    phpAds_ShowBreak();
}
echo "<br><br>";
echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";
echo "<tr height='25'>";
echo '<td height="25"><b>&nbsp;&nbsp;<a href="affiliate-zones.php?affiliateid=' . $affiliateid . '&listorder=name">' . $GLOBALS['strName'] . '</a>';
if ($listorder == "name" || $listorder == "") {
    if ($orderdirection == "" || $orderdirection == "down") {
        echo ' <a href="affiliate-zones.php?affiliateid=' . $affiliateid . '&orderdirection=up">';
        echo '<img src="images/caret-ds.gif" border="0" alt="" title="">';
    } else {
        echo ' <a href="affiliate-zones.php?affiliateid=' . $affiliateid . '&orderdirection=down">';
开发者ID:henryhe514,项目名称:ChineseCommercial,代码行数:31,代码来源:affiliate-zones.php



注:本文中的phpAds_sqlDie函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP phpDocumentor_parse_ini_file函数代码示例发布时间:2022-05-15
下一篇:
PHP phpAds_registerGlobalUnslashed函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap