include "/usr/www/users/mlindsay/thr5/archive/bloodforoil.org/assets/config.php"; $hrule = '
'; $imgLink .= $icn . ' '; if($ext == "ZIP") { $imgLink .= 'PDF in ZIP archive'; } else { $imgLink .= $ext; } $imgLink .= ' [ ' . $downloads . ' downloads ]
'."\n"; // Show iPosters links if ($imgid2 AND $type) { //$imgLink .= '
iPDF [ ' . $downloads2 . ' downloads ]
iPDF [ ' . $downloads2 . ' downloads, iPDF disabled ]
';
if($artist_nam) { $imgLink .= $artist_nam . "
\n"; }
if(($artist_frm)&&($artist_url)) { $imgLink .= ''.$artist_frm.'
'."\n"; }
if($artist_loc) { $imgLink .= $artist_loc . "
\n"; }
$imgLink .="
Posted ' . "$postDy$postMo$postYr
\n"; echo $imgLink; } // Action :: update count and getimage if ($img) { $xcnt = @mysql_query( "SELECT * FROM counts WHERE uid='$img'", $connection ) or die ( "Couldn't select img info." ); while ($row = mysql_fetch_array($xcnt)) { $url = $row['url']; $cnt = $row['cnt']+1; @mysql_query( "UPDATE counts SET cnt='$cnt' WHERE uid='$img'", $connection ) or die ( "Couldn't update download count." ); header ( "Location: $url" ); exit; } } $now = time(); $dt = date( 'd M Y', $now ); // Get Iraqi death total from iraqbodycount.org $Iraqi_deaths_source = "http://www.iraqbodycount.org/database/index.php"; $Iraqi_deaths_lastcount_file = "Iraqi_deaths_lastcount.txt"; $Iraqi_deaths_array = ''; @$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $Iraqi_deaths_source); curl_setopt($ch, CURLOPT_HEADER, 0); ob_start(); @curl_exec($ch); $errnum = curl_errno($ch); @curl_close($ch); // If COULD NOT connect to site if( $errnum != 0 ) { $Iraqi_deaths_fp = fopen($Iraqi_deaths_lastcount_file, "r"); $Iraqi_deaths = "Over ".fread($Iraqi_deaths_fp, 20); fclose($Iraqi_deaths_fp); // If COULD connect to site } else { // Locate total within webpage text array $Iraqi_deaths_array = ob_get_contents(); if(ereg("([0-9]+)", $Iraqi_deaths_array, $Iraqi_regs)) { $Iraqi_deaths = $Iraqi_regs[1]; $Iraqi_deaths_fp = fopen($Iraqi_deaths_lastcount_file, "w"); fwrite($Iraqi_deaths_fp, $Iraqi_deaths); fclose($Iraqi_deaths_fp); // If can't locate because webpage contents have changed, then use count from fall-back file } else { $Iraqi_deaths_fp = fopen($Iraqi_deaths_lastcount_file, "r"); $Iraqi_deaths = "Over ".fread($Iraqi_deaths_fp, 20); fclose($Iraqi_deaths_fp); } } ob_end_clean(); // Get US death total from iCasualties.org $US_deaths_source = "http://www.icasualties.org/oif/BY_DOD.aspx"; $US_deaths_lastcount_file = "US_deaths_lastcount.txt"; $US_deaths_array = ''; @$ch2 = curl_init(); curl_setopt($ch2, CURLOPT_URL, $US_deaths_source); curl_setopt($ch2, CURLOPT_HEADER, 0); ob_start(); @curl_exec($ch2); $errnum2 = curl_errno($ch2); @curl_close($ch2); // If COULD NOT connect to site if( $errnum2 != 0 ) { $US_deaths_fp = fopen($US_deaths_lastcount_file, "r"); $US_deaths = "And over ".fread($US_deaths_fp, 20); fclose($US_deaths_fp); // If COULD connect to site } else { // Locate total within webpage text array $US_deaths_array = ob_get_contents(); if(ereg("([0-9]+)", $US_deaths_array, $US_regs)) { $US_deaths = $US_regs[1]; $US_deaths_fp = fopen($US_deaths_lastcount_file, "w"); fwrite($US_deaths_fp, $US_deaths); fclose($US_deaths_fp); // If can't locate because webpage contents have changed, then use count from fall-back file } else { $US_deaths_fp = fopen($US_deaths_lastcount_file, "r"); $US_deaths = "And over ".fread($US_deaths_fp, 20); fclose($US_deaths_fp); } } ob_end_clean(); $iRaq_poster_text = $Iraqi_deaths." Iraqis killed. ".$US_deaths. " US soldiers dead as of ".$dt."."; ?>
|
include(SIDEBAR_VOTE) ?> | ||||||||||||||||||||||||||||||