{
			try
			{
				switch($_REQUEST['action'])
				{
					case 'stop':
						$engine->stopBanners($campaign['XML_ID'], array_keys($bannersList));
						break;

					case 'resume':
						$engine->resumeBanners($campaign['XML_ID'], array_keys($bannersList));
						break;

					case 'moderate':
						$engine->moderateBanners($campaign['XML_ID'], array_keys($bannersList));
						$engine->updateCampaignManual($campaign['ID']);
						break;

					case 'archive':
						$engine->archiveBanners($campaign['XML_ID'], array_keys($bannersList));
						break;

					case 'unarchive':
						$engine->unArchiveBanners($campaign['XML_ID'], array_keys($bannersList));
						break;
				}

				$bannersListRemote = $engine->getBanners(array_keys($bannersList));
				$bannersListSorted = array();
				foreach($bannersListRemote as $key => $bannerInfo)
				{
示例#2
0
                 unset($_SESSION["SEO_FORECASTS"][$k]);
             }
         }
         if (!isset($_SESSION["SEO_FORECASTS"][$phraseHash])) {
             $reportId = $engine->createForecastReport($phraseList, $geoList);
             $_SESSION["SEO_FORECASTS"][$phraseHash] = array("REPORT_ID" => intval($reportId), "PHRASE" => $phraseList, "GEO" => $geoList, "TS" => time());
             $res = $_SESSION["SEO_FORECASTS"][$phraseHash];
         } else {
             $reportId = $_SESSION["SEO_FORECASTS"][$phraseHash]["REPORT_ID"];
             $res = $engine->getForecastReport($reportId);
         }
     }
     break;
 case 'campaign_update':
     $campaignId = intval($_REQUEST['campaign']);
     $res = $engine->updateCampaignManual($campaignId);
     break;
 case 'banner_update':
     $bannerId = intval($_REQUEST['banner']);
     $campaignId = intval($_REQUEST['campaign']);
     $res = $engine->updateBannersManual($campaignId, $bannerId);
     break;
 case 'link_delete':
 case 'link_create':
     $res = array('result' => false);
     $bannerId = intval($_REQUEST['banner']);
     $linkId = intval($_REQUEST['link']);
     $linkType = $_REQUEST['link_type'];
     if ($linkId > 0 & $bannerId > 0) {
         if ($_REQUEST['action'] == 'link_delete') {
             $result = Adv\LinkTable::delete(array('LINK_TYPE' => $linkType, 'LINK_ID' => $linkId, 'BANNER_ID' => $bannerId));