Ejemplo n.º 1
0
phpAds_ShowBreak();
if (!isset($session['maint_update'])) {
    if (function_exists('xml_parser_create')) {
        // Show wait please text with rotating logo
        echo "<br />";
        echo "<table border='0' cellspacing='1' cellpadding='2'><tr><td>";
        echo "<img src='" . OX::assetPath() . "/images/install-busy.gif' width='16' height='16'>";
        echo "</td><td class='install'>" . $strSearchingUpdates . "</td></tr></table>";
        // Send the output to the browser
        if (false !== ob_get_contents()) {
            ob_flush();
        }
        flush();
        // Get updates info and store them into a session var
        $oSync = new RV_Sync();
        $res = $oSync->checkForUpdates();
        phpAds_SessionDataRegister('maint_update', $res);
        phpAds_SessionDataStore();
        echo "<script language='JavaScript'>\n";
        echo "<!--\n";
        echo "document.location.replace('updates-product.php');\n";
        echo "//-->\n";
        echo "</script>\n";
        exit;
    } else {
        echo "<br />" . $strNotAbleToCheck . "<br /><br />";
        echo "<br /><br />" . $strForUpdatesLookOnWebsite . "<br /><br />";
        echo "<b><img src='" . OX::assetPath() . "/images/caret-r.gif'>&nbsp;<a href='http://" . $phpAds_producturl . "' target='_blank'>" . $strClickToVisitWebsite . "</a></b>";
    }
} else {
    $maint_update = $session['maint_update'];
Ejemplo n.º 2
0
 /**
  * A private method to run Revive Adserver Sync.
  *
  * @access private
  */
 function _runReviveSync()
 {
     $delay = mt_rand(0, 30);
     // Delay up to 30 seconds
     OA::debug(sprintf('Delaying ' . PRODUCT_NAME . ' sync process by %d seconds.', $delay), PEAR_LOG_INFO);
     sleep($delay);
     require_once MAX_PATH . '/lib/RV/Sync.php';
     $oSync = new RV_Sync($this->aConf, $this->aPref);
     $oSync->checkForUpdates(0);
     OA::debug('Finished ' . PRODUCT_NAME . ' Sync process.', PEAR_LOG_INFO);
 }