#echo "oki"; #die; error_reporting(E_ERROR | E_WARNING | E_PARSE); require_once('Cache/Lite.php'); $toolId = "18"; $cache_config = array( 'cacheDir' => '/usr/www/cache/', 'caching' => true, 'lifetime' => 86400, 'fileLocking' => true, 'writeControl' => true, 'readControl' => true, 'readControlType' => 'crc32', 'memoryCaching' => false, 'onlyMemoryCaching' => false, 'memoryCachingLimit' => 1000, 'fileNameProtection' => true, 'automaticSerialization' => true, 'automaticCleaningFactor' => 1, 'hashedDirectoryLevel' => 2, 'hashedDirectoryUmask' => 0700 ); $cache = & new Cache_Lite($cache_config); // print_r($rss); $webid = ($_GET['w'] ? $_GET['w'] : $ourwebid); $program = $_GET['p']; $camp = $_GET['c']; $galstyle = $_GET['st']; $framewidth = ($_GET['fw']) ? $_GET['fw'] : 500; if ($framewidth < 120) $framewidth = 120; $frameheight = ($_GET['fh']) ? $_GET['fh'] : 500; $headHeight = 37; $footHeight = 15; $headWidth = $footWidth = $baWidth = $framewidth; $baHeight = $frameheight - $headHeight - $footHeight; if (strtolower($_GET['img']) == "off" || strtolower($_GET['img']) == "false" || strtolower($_GET['img']) == "no" || strtolower($_GET['img']) == "f" || strtolower($_GET['img']) == "n" || strtolower($_GET['img']) == "0") { $images = false; } else { $images = true; } $limit = ($_GET['lim'] ? $_GET['lim'] : 15); $target = ($_GET['tr'] ? $_GET['tr'] : "_blank"); $imageheight = ($_GET['height']) ? $_GET['height'] : 100; $imagewidth = ($_GET['width']) ? $_GET['width'] : 70; $quality = ($_GET['quality']) ? $_GET['quality'] : 90; $background = ($_GET['background']) ? $_GET['background'] : "E0D8C8"; if (!$webid <> "") { $webid = "100342"; } if (!$program <> "") { $program = "2"; } if (!$camp <> "") { $camp = "0"; } switch (strtolower($galtype)) { case "fhg": $galtype = "fhg"; break; case "va": $galtype = "va"; break; default: $galtype = "both"; } switch (strtolower($galstyle)) { case "random": $galstyle = "random"; break; default: $galstyle = "latest"; } $querystring = ($_SERVER['QUERY_STRING'] != '') ? $_SERVER['QUERY_STRING'] . '&' : ''; $rssurl = "https://secure.gunzblazingpromo.com/iframe/gaydvd/feed.php?" . $querystring . "w=$webid&p=$program&c=$camp&lim=$limit"; //print $rssurl; $cacheid = 'm'.$webid . $program . $camp . $limit . $background . $querystring; if ($data = getCache($cacheid)) { // if(false){ echo $data; exit; } else { //print 'ok'; // include lastRSS include './lastRSS.php'; include_once('simple_html_dom.php'); // Create lastRSS object $rss = new lastRSS; // Set cache dir and cache time limit (1200 seconds) // (don't forget to chmod cahce dir to 777 to allow writing) $rss->cache_dir = 'cache'; //$rss->cache_dir = ''; $rss->cache_time = 0; $rss->cp = 'US-ASCII'; $rss->date_format = 'l'; $rss->CDATA = 'content'; //print $rssurl; if ($rs = $rss->get($rssurl)) { //print_r($rs); $itemcount = count($rs['items']); //echo $itemcount; if ($limit > $itemcount) { $limit = $itemcount; } $blockhmargin = 1; $blockvmargin = 1; $blockheight = 63; $blockwidth = 100; $blockdheight = 80; if ($images) { $blockheight = $blockheight + $imageheight; } $fblockwidth = $blockwidth + ($blockhmargin * 2); $fblockheight = $blockheight + ($blockvmargin * 2) + $blockdheight; $hitems = floor($baWidth / $fblockwidth); $vitems = floor($baHeight / $fblockheight); if ($limit <= ($hitems)) { $vitems = 1; $hitems = $limit; } $tpages = ceil($limit / ($hitems * $vitems)); if ($tpages == 1) { $scroller = false; } else { $scroller = true; } $afblockwidth = ($baWidth / $hitems); $afblockheight = ($baHeight / $vitems); $blockhmargin = ($afblockwidth - $blockwidth) / 2; $blockdheight = ($afblockheight - $blockheight - ($blockvmargin * 2)); ob_start(); ?>