function Read()
 {
     $loadedKeys = array();
     foreach ($this->Fields as $key => $name) {
         $data = "";
         if (CacheManager::$Engine == "PSHM") {
             $Shmid = @shmop_open($this->BaseMemId . $key, "a", 0666, 0);
             if ($Shmid) {
                 $shm_size = @shmop_size($Shmid);
                 $data = @shmop_read($Shmid, 0, $shm_size);
             }
             @shmop_close($Shmid);
         } else {
             if (CacheManager::$Engine == "APC") {
                 $data = apc_fetch($this->BaseMemId . $key);
             } else {
                 if (CacheManager::$Engine == "MEMCACHED" || CacheManager::$Engine == "MEMCACHE") {
                     $data = $this->Provider->get($this->BaseMemId . $key);
                 } else {
                     if (CacheManager::$Engine == "MYSQL") {
                         if (empty($loadedKeys) && ($result = queryDB(true, "SELECT * FROM `" . DB_PREFIX . DATABASE_DATA_CACHE . "`;"))) {
                             while ($row = DBManager::FetchArray($result)) {
                                 $loadedKeys[$row["key"]] = $row["data"];
                             }
                         }
                         if (isset($loadedKeys[$key])) {
                             $data = $loadedKeys[$key];
                         }
                     }
                 }
             }
         }
         if (!empty($data)) {
             if ($this->Encryption) {
                 $upos = strpos($data, "_");
                 if ($upos !== false) {
                     $data = base64_decode(substr($data, $upos + 1, strlen($data) - ($upos + 1)));
                     $data = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->BaseId, $data, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND));
                 } else {
                     continue;
                 }
             }
             $arra = @unserialize($data);
             if (!empty($arra) && is_array($arra)) {
                 if (!(!empty($arra[3]) && getIdent() != "" && $arra[3] == getIdent())) {
                     if ($arra[0] > time() - $this->TTL || isset($this->Fields[$key][2]) && $arra[0] > time() - $this->Fields[$key][2]) {
                         $this->Data[$key] = $arra;
                         $this->Data[$key][2] = false;
                     }
                 }
             }
         }
     }
 }
Example #2
0
    $aResult = json_decode(file_get_contents($sMySqlConfigPath, true), true);
}
$iSleepTime = isset($aResult['sleep']) && !empty($aResult['sleep']) ? $aResult['sleep'] : 3;
$iLimit = isset($aResult['limit']) && !empty($aResult['limit']) ? $aResult['limit'] : 30;
$bIfComplete = isset($aResult['send']) && $aResult['send'] == true ? true : false;
$aConfig = getConfigFile();
$iBacktrace = $aConfig['filter']['backtrace'];
unset($aConfig);
if (!isset($_GET["checkid"]) || $_GET["checkid"] != '720a7d2b56c90e503d2589f8c565b02c' && !empty($sIdent)) {
    die('..');
} elseif ($_GET["start"] == true) {
    sleep($iSleepTime);
}
$bResult = false;
$oDb = oxDb::getDb(true);
$sIdent = $_SESSION['debugPHP'] ? $_SESSION['debugPHP'] : getIdent();
//$sSql = 'select id, sql1, timer,params, tracer, type from adodb_debugphp_logsql WHERE `check` is null  ORDER BY `id` ASC  LIMIT ' . $iLimit;
$sSql = 'select id, sql1, timer,params, tracer, type from adodb_debugphp_logsql WHERE `check` is null AND `ident` = ?  ORDER BY `id` ASC  LIMIT ?';
$rs = $oDb->execute($sSql, array($sIdent, $iLimit));
if ($rs != false && $rs->recordCount() > 0) {
    while (!$rs->EOF) {
        $bResult = true;
        if ($rs->fields['type'] == 'sql') {
            $sql = ltrim($rs->fields['sql1']);
            $iError = strtolower(substr(trim($rs->fields['tracer']), 0, 5)) == 'error' ? true : false;
            if ($iBacktrace) {
                $aResult = json_decode($rs->fields['params'], true);
                if ($iError) {
                    chromephp::getInstance(true)->group('Error! SQL type: ' . trim(current(explode(' ', $sSql))));
                    chromephp::getInstance(true)->error($sql);
                } else {
function blogtalkradio($atts)
{
    extract(shortcode_atts(array("username" => 'Default', "itemcount" => '10', "itunes" => 'false', "logo" => 'true'), $atts));
    // Retrieve the image url, and the URL, title, and description of each episode
    // from http://www.blogtalkradio/username.rss
    $description_array = getFeed('http://www.blogtalkradio.com/' . $username . '.rss');
    // Retrieve the itunes link, and the URL, show_id, and embed code for each episode from
    // http://www.blogtalkradio/username/playlist.xml
    $ident_array = getIdent('http://www.blogtalkradio.com/' . $username . '/play_list.xml?itemcount=' . $itemcount);
    // Retrieve the host_id from http://www.blogtalkradio/username/playlist.xml
    $host_id = getHostID('http://www.blogtalkradio.com/' . $username . '/play_list.xml');
    // Extract the image url
    $image_url = $description_array['image_url'];
    // Extract the itunes link
    $itunes_link = $ident_array[0]['itunes'];
    unset($description_array['image_url'], $ident_array[0]);
    // Combine the ident_array and description_array
    $show_array = array();
    foreach ($ident_array as $ident) {
        foreach ($description_array as $description) {
            if ($ident['url'] === $description['url']) {
                $show_array[] = array('id' => $ident['show_id'], 'url' => $ident['url'], 'title' => $description['title'], 'description' => $description['description'], 'embed_code' => $ident['embed_code']);
            }
        }
    }
    // Display the logo
    if ($logo == 'true') {
        echo '<div class="blogtalk-logo" style="display: inline-block; width: 100%; text-align: center;">
				<a href="http://www.blogtalkradio.com/' . $username . '">
					<img src="' . $image_url . '" width="400" height="400" style="display: inline-block;"/>
				</a>
			</div>';
    }
    // Display the itunes link
    if ($itunes == 'true') {
        echo '<div class="blogtalk-itunes" style="display: inline-block; width: 100%; text-align: center;">
					<br>
					<a href="' . $itunes_link . '" target="itunes_store">
						Check us out in iTunes!
					</a>
					<br>
					<br>
				</div>';
    }
    // Display the each episode
    echo '<div class="blogtalk-wrapper" style="width: 100%; text-align: center;">';
    foreach ($show_array as $show) {
        echo '<h2 style="text-align: left;">' . $show['title'] . '</h2>';
        echo '<div class="blogtalk-embed" style="min-width: 280px; width: 45%; margin: 10px 0px; display: inline-block; vertical-align: top;">
						<iframe width="280px" height="200px" 
								src="http://player.cinchcast.com/?platformId=1&assetType=single&assetId=' . $show['id'] . '" frameborder="0" allowfullscreen>
						</iframe>';
        echo '<div class="blogtalk-link" style="font-size: 10px;">' . $show['embed_code'] . '</div>
					  </div>
					  <div class="blogtalk-description" style="min-width: 300px; width: 51%; 
					  padding: 0px 10px; margin: 10px 0px;  display: inline-block; text-align: left; 
					  vertical-align: top;">
						<a href="' . $show['url'] . '">' . $show['title'] . '</a> - ' . $show['description'] . '
					  </div>
					  <div style="clear: both;"></div><br>';
    }
    echo '</div>';
}