<?php

	include( dirname( dirname (__FILE__) ) . '/cjoverkill/in.php');
	include( '/home/www/quality-control-centre.com/promotool/www.gratispornofotos.nl-foto' );
	include( dirname( dirname (__FILE__) ) .'/some.inc.php');
	include( dirname (__FILE__) .'/categories.inc.php');

	$path = explode("/gratis/", $_SERVER['REQUEST_URI']);
	$path = explode("/", $path[1]);
	$path = str_replace(".html", "", $path);
	$path = array_reverse($path);
	$check_string = $categories[$path[0]];
	$primary = str_replace("_"," ", $path[0]);
	$secondary = $path[1];
	
	if( $categories[$path[0]] == '' ) {
		echo 'Archief Bestaat niet!';
		exit;
	}
	
	$primary = ucfirst($primary);
	
	$galsx = 0;
	$gals = file( dirname( dirname(__FILE__) ) . '/galleries/posted.txt' );
	shuffle($gals);
	
	foreach( $gals as $gal ) {
		$info = explode("|", $gal);
		if( $info[3] == $check_string ) {
			$new_galeries[] = Array($info[1],$info[2]);
		}
	}

	function galls($num) {
		global $galsx, $new_galeries, $primary, $secondary;
		for($i=0;$i<$num;$i++) {
			if( strlen($new_galeries[$galsx][1]) > 32 ) {
				$text = substr($new_galeries[$galsx][1], 0, 30).'...';
			} else {
				$text = $new_galeries[$galsx][1];
			}
			echo '<u>'.$primary.'</u>: <a href="g.php?to='.urlencode($new_galeries[$galsx][0]).'">'.$text.'</a><br>';
			$galsx++;
		}
	}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<base href="http://www.gratispornofotos.nl">
<title><? echo $primary; ?> - "gratis <? echo $primary; ?>" download <? echo $primary; ?> fotos en <? echo $primary; ?> films! lekkere geile <? echo $primary; ?>!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Revisit" content="2 days">
<meta name="REVISIT-AFTER" content="2 days">
<meta name="robots" content="all">
<meta name="description" content="Gratispornofotos.nl gratis <? echo $primary; ?>">
<meta name="keywords" content="<? echo $primary; ?>, gratis, gratis <? echo $primary; ?>">
<link href="style/gratispornofotos.css" rel="stylesheet" type="text/css">
<base target="_blank">
</head>

<body style="margin: 10px;">

<div class="gratis">
	
<h1><? echo $primary; ?></h1>
<h2>Gratispornofotos.nl geeft hier gratis <? echo $primary; ?> films en <? echo $primary; ?> fotos!</h2>

<?
	$num = count($new_galeries);
	$max = floor($num/2);
?>
<table width="99%" align="center" border="0" cellspacing="2" cellpadding="0">
	<tr>
		<td width="43%" valign="top"><b><u>GRATIS <? echo $primary; ?> SEX:</u></b></td>
		<td width="43%" valign="top"><b><u>GRATIS <? echo $primary; ?> SEX:</u></b></td>
		<td width="14%" valign="top"></td>
	</tr>
<tr>
	<td width="43%" valign="top">
<?
	galls($max);
?>
</td>
<td width="43%" valign="top">
<?
	galls($max);
?>
</td>
<td width="14%" align="center" valign="top">

<?php echo file_get_contents('http://overview.s69.nl/jsb/200_150/1/1/0/1_gratispornofotosnl.html?r=&java=0&rand=&up='); ?><br /><br />
<?php echo file_get_contents('http://overview.s69.nl/jsb/200_150/1/1/0/1_gratispornofotosnl.html?r=&java=0&rand=&up='); ?><br /><br />
<?php echo file_get_contents('http://overview.s69.nl/jsb/200_150/1/1/0/1_gratispornofotosnl.html?r=&java=0&rand=&up='); ?><br /><br />


</td></tr>
</table>
<br>
<h1 align="center"><a style="font-size: 24pt;" href="http://www.gratispornofotos.nl">Ga naar de hoofdpagina van gratispornofotos.nl!</a></h1>
<br>
<br>
<br>
<br>

<table width="99%" align="center" border="0" cellspacing="2" cellpadding="0" style="border: 1px solid #000;">
<tr> 
	<td width="100%" colspan="5" class="linkblok"><b>Gratispornofotos - Archieven:</b></td>
</tr>
<tr>
<?
	$t = 0;
	foreach( $categories as $k=>$v ) {
		if($t == 5) {
			$t = 0;
		}
		echo '<td width="20%"  class="linkblok"><b><a href="gratis/'.$k.'.html" target="_blank">'.ucwords(str_replace("_", " ", $k)) .'</a></b></td>';	
		if( $t == 4 ) {
			echo '</tr><tr>';
		}
		$t++;	
	}
	while( $t < 5 ) {
		echo '<td width="20%">&nbsp;</td>';
		$t++;
	}
?>
</tr>
</table>
<br>
<br>

<table width="90%" align="center" border="0" cellspacing="1" cellpadding="0" style="border: 2px solid #000;">
<tr> 
	<td width="100%" colspan="3" class="linkblok"><b>Meer gratis <? echo $primary; ?> op andere pagina's:</b></td>
</tr>
<tr>
<?
	$x=1;
	$t = 0;
	foreach( $partner_sites as $k=>$partner ) {
		if($t == 3) {
			$t = 0;
		}
		echo '<td width="33%" class="linkblok"><a href="'.$partner . strtolower($path[0]).'.html" target="_blank">Meer '. $primary .' op '. $k .'</a></td>';	
		$x++;
		if( $t == 2 ) {
			echo '</tr><tr>';
		}
		$t++;	
	}
	while( $t < 3 ) {
		echo '<td width="33%">&nbsp;</td>';
		$t++;
	}
	?>
</tr>
</table>
<br>
<br>

</div>

</body>
</html>