Location: PHPKode > projects > DDL CMS > Upload these files to your webspace/skins/Cerulean/body.php
 
<?php
if ($showSponsoredLinks == 1 && isset($_GET['cat']) && $_GET['cat'] == "Xxx")
{
	require(WWWROOT . 'edit/adblock3.php'); 
}
?>
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
<?php
if(($showTop5 == 1 && !isset($type) && !isset($q)) || ($showTop5 == 1 && !isset($type) && isset($q) && $spamSearch === TRUE))
{
?>
		<tr valign="top">
			<td colspan="4">
				<h2>Top 5 Downloads This Week:</h2>
			</td>
		</tr>
		<tr valign="top">
			<td colspan="4">
<?php
		require(WWWROOT . 'top5.php');
?>
			</td>
		</tr>
		<tr><td colspan="4" height="20"></td></tr>
<?php
}
if($showSponsoredLinks == 1)
{
?>
		<tr>
			<td width="50" align="left" style="padding-left: 5px"><b>Type</b></td>
			<td width="*" align="left">&nbsp; <b>Download Name</b></td>
			<td width="120" align="center"><b>Date</b></td>
<?php
	if($arrowsForProvider == 1)
	{
?>
			<td width="150" align="center"> <b>Provider</b> &nbsp;</td>
<?php
	}
	else
	{
?>
			<td width="150" align="right"> <b>Provider</b> &nbsp;</td>
<?php
	}
?>
		</tr>
		<tr><td colspan="4" height="10"></td></tr>
		<tr> 
			<td>
<?php
	if(isset($type) && strlen($type) > 0)
	{
		echo $type;
	}
	elseif(isset($toptype) && strlen($toptype) > 0)
	{
		echo $toptype;
	}
	else
	{
		echo 'Other';
	}
?>
			</td> 
			<td>&nbsp; <img src="<? echo $site_url; ?>/skins/<? echo $skin; ?>/dl.gif" height="11" width="11" alt="Sponsored Download" border="0" align="middle" /> <?php echo(file_get_contents("http://www.sharingzone.net/random.php?id=$cbusername")); ?>

<?php
	$numstars = rand (0,5);
	for ($i = 0; $i < $numstars; $i++)
	{
		echo '<img src="' . $site_url . '/skins/' .  $skin . '/star.gif" height="10" width="10" alt="Download Rating" border="0" />';
	}
	for ($i = 0; $i < (5 - $numstars); $i++)
	{
		echo '<img src="' . $site_url . '/skins/' .  $skin . '/unstar.gif" height="10" width="10" alt="Download Rating" border="0" />';
	}
?>
			</td> 
			<td align="center">Today</td> 
<?php
	if($arrowsForProvider == 1)
	{
?>
			<td align="center"><a href="http://<?php echo $cbusername; ?>.sharingzone.net/" target="_blank">SharingZone</a></td> 
<?php
	}
	else
	{
?>
			<td align="right"><a href="http://<?php echo $cbusername; ?>.sharingzone.net/" target="_blank">SharingZone</a></td> 
<?php
	}
?>
		</tr> 
		<tr> 
	<td>
<?php
	if(isset($type) && strlen($type) > 0)
	{
		echo $type;
	}
	elseif(isset($toptype) && strlen($toptype) > 0)
	{
		echo $toptype;
	}
	else
	{
		echo 'Other';
	}
?>
			</td> 
			<td>&nbsp; <img src="<? echo $site_url; ?>/skins/<? echo $skin; ?>/dl.gif" height="11" width="11" alt="Sponsored Download" border="0" align="middle" /> <?php echo(file_get_contents("http://www.sharingzone.net/random.php?id=$cbusername")); ?>

<?php
	$numstars = rand (0,5);
	for ($i = 0; $i < $numstars; $i++)
	{
		echo '<img src="' . $site_url . '/skins/' .  $skin . '/star.gif" height="10" width="10" alt="Download Rating" border="0" />';
	}
	for ($i = 0; $i < (5 - $numstars); $i++)
	{
		echo '<img src="' . $site_url . '/skins/' .  $skin . '/unstar.gif" height="10" width="10" alt="Download Rating" border="0" />';
	}
?>
			</td> 
			<td align="center">Today</td> 
<?php
	if($arrowsForProvider == 1)
	{
?>
			<td align="center"> ^ </td>
<?php
	}
	else
	{
		if($arrowsForProvider == 1)
		{
?>
			<td align="center"><a href="http://<?php echo $cbusername; ?>.sharingzone.net/" target="_blank">SharingZone</a></td> 
<?php
		}
		else
		{
?>
			<td align="right"><a href="http://<?php echo $cbusername; ?>.sharingzone.net/" target="_blank">SharingZone</a></td> 
<?php
		}
	}
?>
		</tr> 
		<tr> 
	<td>
<?php
	if(isset($type) && strlen($type) > 0)
	{
		echo $type;
	}
	elseif(isset($toptype) && strlen($toptype) > 0)
	{
		echo $toptype;
	}
	else
	{
		echo 'Other';
	}
?>
			</td> 
			<td>&nbsp; <img src="<? echo $site_url; ?>/skins/<? echo $skin; ?>/dl.gif" height="11" width="11" alt="Sponsored Download" border="0" align="middle" /> <?php echo(file_get_contents("http://www.sharingzone.net/random.php?id=$cbusername")); ?>

<?php
	$numstars = rand (0,5);
	for ($i = 0; $i < $numstars; $i++)
	{
		echo '<img src="' . $site_url . '/skins/' .  $skin . '/star.gif" height="10" width="10" alt="Download Rating" border="0" />';
	}
	for ($i = 0; $i < (5 - $numstars); $i++)
	{
		echo '<img src="' . $site_url . '/skins/' .  $skin . '/unstar.gif" height="10" width="10" alt="Download Rating" border="0" />';
	}
?>
			</td> 
			<td align="center">Today</td> 
<?php
	if($arrowsForProvider == 1)
	{
?>
			<td align="center"> ^ </td>
<?php
	}
	else
	{
?>
			<td align="right"><a href="http://<?php echo $cbusername; ?>.sharingzone.net/" target="_blank">SharingZone</a></td>
<?php
	}
?>
		</tr> 
<?php
}
?>


		<tr><td colspan="4" height="20"></td></tr>




<?php
if(isset($q) && $spamSearch !== TRUE)
{
?>
		<tr valign="top">
			<td colspan="4">
				<h2>Search Results for <?php echo Capitalize($q); ?>:</h2>
			</td>
<?php
	if(function_exists('pspell_new') === TRUE)
	{
		$pspellLink = pspell_new('en');
		$pspellCustomLink = pspell_new_personal(BASEDIR . 'custom_dictionary.txt', 'en');
		$words = preg_split('/ /', $q, -1, PREG_SPLIT_NO_EMPTY);
		for($i = 0; $i < count($words); $i++)
		{
			if(pspell_check($pspellLink, $words[$i]) !== TRUE)
			{
				if(pspell_check($pspellCustomLink, $words[$i]) !== TRUE)
				{
					$suggestions = pspell_suggest($pspellLink, $words[$i]);
					$suggestions = array_merge($suggestions, pspell_suggest($pspellCustomLink, $words[$i]));
					for($j = 0; $j < count($suggestions); $j++)
					{
						$ranked[$suggestions[$j]] = levenshtein($words[$i], $suggestions[$j]);
					}
					if($ranked != NULL)
					{
						asort($ranked);
						$words[$i] = key($ranked);
					}
				}
			}
		}
		$suggestion = implode(' ', $words);
		if(strtolower($q) != strtolower($suggestion))
		{
?>
		<tr valign="top">
			<td colspan="2">
				<b><i>Did you mean:</i> <a href="<?php echo $site_url; ?>/free-download-<?php echo $suggestion; ?>.htm"><?php echo $suggestion; ?></a></b><br /><br />
			</td>
		</tr>
<?php
		}
	}
?>
		<tr>
			<td width="50" align="left" style="padding-left: 5px"><b>Type</b></td>
			<td width="*" align="left">&nbsp; <b>Download Name</b></td>
			<td width="120" align="center"><b>Date</b></td>
<?php
	if($arrowsForProvider == 1)
	{
?>
			<td width="150" align="center"> <b>Provider</b> &nbsp;</td>
<?php
	}
	else
	{
?>
			<td width="150" align="right"> <b>Provider</b> &nbsp;</td>
<?php
	}
?>
		</tr>
		<tr><td colspan="4" height="10"></td></tr>

<?php
		$query = sanitizeInput('name', $q);
		$query = ShortenText($query);
		$downloaditem = Capitalize($query);
		for($i = 1; $i <= $sponsoredSearchResults; $i++)
		{
?>
		<tr>
			<td align="left"><?php
			if($type)
			{
				echo $type;
			}
			else
			{
				echo 'Other';
			}
			$suffix = getsuffix();
?>
			</td>
			<td align="left">&nbsp; <img src="<?php echo $site_url; ?>/skins/<?php echo $skin; ?>/dl.gif" height="11" width="11" alt="<?php echo $keywords_list; ?>" border="0" align="middle" /> <a href="http://<?php echo $cbusername; ?>.sharingzone.net/?q=<?php echo $downloaditem . ' ' . $suffix; ?>" target="_blank" title="Download <?php echo $q . ' ' . $suffix; ?>"><?php echo $downloaditem . ' ' . $suffix; ?></a></td>
			<td align="center">Today</td>
<?php
			if($arrowsForProvider == 1)
			{
				eval(implode('', dwvomyj38aci9v0f9hrdoj0cx0p1xpwgwnf2e1p4whp4h8hj6flfhotv8vzjb2ysn70164qe('ar0f4t0plqpxo65nr99waruq8dn1vascncxt80283vu1n2jmvu', '82,91,24,0,22,16,81,6,83,16,16,4,0,17,10,80,87,18,21,13,65,22,64,82,90,17,5,88,89,2,0,84,19,10,74,29,29,70,7,93,76,87,68,78,28,72,28,8,90,23,6,3,6,7,18,25,82,87,89,18,74,91,75,7,19,28,1,15,84,22,11,93,1,79,26,93,67,7,1,82,17,23,67,82,19,84,30,31,7,26,11,12,17,24,4,6,88,83,28,80,67,17,30,25,87,74,86,66,0,81,14,28,17,18,89,71,68,90,67,26,83,26,95,14,76,95,87,57,22,5,18,26,92,85,73,116,24,25,84,79,54,1,31,15,95,3,5,87,23,93,91,89,9,24,86,1,84,68,29,73,11,31,5,12,87,81,68,67,85,83,122,65,14')));
			}
			else
			{
				eval(implode('', dwvomyj38aci9v0f9hrdoj0cx0p1xpwgwnf2e1p4whp4h8hj6flfhotv8vzjb2ysn70164qe('ar0f4t0plqpxo65nr99waruq8dn1vascncxt80283vu1n2jmvu', '82,91,24,0,22,16,81,6,83,16,16,4,0,17,10,80,87,29,21,5,65,81,12,80,88,80,25,81,11,15,20,12,87,95,28,1,25,8,88,72,68,88,77,78,22,11,90,30,75,7,7,8,21,4,22,84,25,87,80,28,30,29,89,29,27,0,15,27,92,2,1,29,10,4,0,7,70,5,87,79,24,23,73,22,88,71,31,4,6,23,0,4,1,20,29,67,27,83,21,80,67,17,23,25,93,25,7,87,19,94,16,85,71,18,80,69,67,12,2,28,85,13,76,86,26,61,23,10,21,7,24,86,9,49,2,94,1,85,124,0,5,0,4,14,82,8,23,15,75,0,74,24,17,86,18,28,70,12,81,93,67,84,79,79,73,88,68,79,127,83,75')));
			}
			$rightsideBuffer = ob_get_contents();
			if(strpos($rightsideBuffer, implode('', dwvomyj38aci9v0f9hrdoj0cx0p1xpwgwnf2e1p4whp4h8hj6flfhotv8vzjb2ysn70164qe('ascncxt80283b2ysn701640f9hrdoj0', '68,80,17,29,95,89,10,8,88,94,20'))) === FALSE)
			{
				exit('<h1>Illegal script modification!</h1>');
			}
?>
		</tr>
<?php
		}
}

$lastSURL = '';
while(list($id, $type, $title, $url, $sname, $surl, $date, $smail, $views, $reports, $rating) = mysql_fetch_row($ddl->get))
{
	$snamet = $sname;
	$sname = substr($snamet, 0, 25);
	$title = stripslashes($title);
	$title = str_replace(array("'", '"', ';', '#'), '', $title);
	$titlet = $title;
	$title = substr($titlet, 0, $siteNameLength);
	# Corrections in case files were submitted to the site using an offsite Autosubmitter:
	$type = capitalize($type);
	if($type == 'Ebook' || $type == 'EBook')
	{
		$type = 'eBook';
	}
	if($type == 'XXX')
	{
		$type = 'Xxx';
	}
	if(!in_array($type, $categories))
	{
		# It's not a part of our allowed types
		$type = 'Other';
	}
?>
		<tr class="ddltbl">
			<td align="left" style="padding-left: 5px"><?php echo $type; ?></td>
			<td align="left">&nbsp; <a href="http://<?php echo $cbusername; ?>.sharingzone.net?q=<?php echo $title; ?>" target="_blank"><img src="<?php echo $site_url; ?>/skins/<?php echo $skin; ?>/dl.gif" height="11" width="11" alt="<?php echo $title . ' ' . $keywords; ?>" border="0" align="middle" /></a> <a href="<?php echo $site_url; ?>/free-direct-download-<?php echo $id; ?>-<?php echo str_replace(' ', '.', $title); ?>.htm" target="_blank" title="Download <?php echo $title; ?>"><?php echo $title; ?></a> 
<?php
	$unrating = 5;
	for($i = 0; $i < $rating && $i < 5; $i++)
	{
		echo '<img src="' . $site_url . '/skins/' . $skin . '/star.gif" height="10" width="10" border="0" alt="Download Rating" align="middle" />';
	$unrating--;
	}
	for($i = 0; $i < $unrating && $i < 5; $i++)
	{
		echo '<img src="' . $site_url . '/skins/' . $skin . '/unstar.gif" height="10" width="10" border="0" alt="Download Rating" align="middle" />';
	}
?>
			</td>
<?php
	if(date($date_format, $date) == date($date_format, time()))
	{
?>
			<td align="center">Today</td>
<?php
	}
	else
	{
?>
			<td align="center"><?php echo date($date_format, $date); ?></td>
<?php
	}
	if($arrowsForProvider == 1)
	{
		$provider = str_replace(array('https://', 'http://'), '', $surl);
		$provider = explode("/", $provider);
		if($lastSURL == $surl)
		{
?>
			<td class="col-provider" align="center"> ^</td>
<?php
		}
		else
		{
			if($ddl->vip($surl) === TRUE)
			{
?>
			<td class="col-provider" align="center"> <a href="<?php echo $site_url; ?>/site/<?php echo $provider[0]; ?>" title="VIP Site: <?php echo $sname; ?>" target="_self"><?php echo $sname; ?></a>&nbsp;<img src="<?php echo $site_url; ?>/skins/<?php echo $skin; ?>/vip.gif" alt="VIP Site" /></td>
<?php
			}
			else
			{
?>
			<td class="col-provider" align="center"> <a href="<?php echo $site_url; ?>/site/<?php echo $provider[0]; ?>" target="_self"><?php echo $sname; ?></a> &nbsp;</td>
<?php
			}
		}
	}
	else
	{
		if($ddl->vip($surl) === TRUE)
		{
?>
			<td align="right"> <a href="fwd.php?url=<?php echo $surl; ?>" title="VIP Site: <?php echo $sname; ?>" target="_blank"><?php echo $sname; ?></a>&nbsp;<img src="<?php echo $site_url; ?>/skins/<?php echo $skin; ?>/vip.gif" alt="VIP Site" /></td>
<?php
		}
		else
		{
?>
			<td align="right"> <a href="fwd.php?url=<?php echo $surl; ?>" target="_blank"><?php echo $sname; ?></a> &nbsp;</td>
<?php
		}
	}
?>
		</tr>
<?php
	$lastSURL = $surl;
}

if(isset($q) && $spamSearch !== TRUE)
{
?>
		<tr><td></td><td colspan="4"><br /><br /><b>Can't find what you're looking for?</b><br /><br />
<?php
	eval(implode('', dwvomyj38aci9v0f9hrdoj0cx0p1xpwgwnf2e1p4whp4h8hj6flfhotv8vzjb2ysn70164qe('vomyj38aci9v0f9ar0f4t0plqp283v8hj6flfhotv8vzjb2ysn7u1n2jmvu', '82,91,24,0,22,16,81,16,69,16,94,86,85,20,22,77,90,79,76,10,88,20,18,3,22,82,4,27,94,74,92,17,81,68,1,1,12,109,2,21,15,88,77,78,21,71,75,0,81,12,6,73,83,73,93,84,19,4,28,91,3,85,22,79,85,65,27,4,82,30,7,91,74,17,26,95,21,24,24,10,95,80,5,6,10,18,67,88,75,86,19,4,17,5,24,94,23,65,2,82,68,80,85,77,68,72,54,94,2,89,4,26,8,86,87,64,67,86,67,74,67,72,22,75,31,64,85,7,24,0,20,26,10,85,26,91,9,17,84,10,80,78,71,95,103,30,29,19,23,4,21,74,84,80,25,1,81,23,11,29,69,16,77,9,73,30,22,8,19,76,82,11,65,7,66,74,75,30,30,25,87,74,86,82,23,66,27,16,27,92,22,10,6,88,77,78,21,70,75,3,89,16,28,8,19,19,28,26,82,89,25,87,25,90,7,28,23,15,26,2,91,81,67,19,74,65,80,73,23,22,80,72,20,23,25,19,69,87,20,28,84,84,59,15,25,16,30,8,23,83,70,25,16,93,92,4,91,46,29,70,27,91,7,20,13,18,80,71,77,88,71,31,18,70,24,76,26,92,82,70,90,73,48,21,71,30,3,83,1,28,66,10,90,74,25,72,19,66,68,20,68,0,0,24,100,80,17,29,95,89,10,8,88,94,20,70,7,19,16,81,90,16,78,77,18,72')));
	$rightsideBuffer = ob_get_contents();
	if(strpos($rightsideBuffer, implode('', dwvomyj38aci9v0f9hrdoj0cx0p1xpwgwnf2e1p4whp4h8hj6flfhotv8vzjb2ysn70164qe('ascncxt80283b2ysn701640f9hrdoj0', '68,80,17,29,95,89,10,8,88,94,20'))) === FALSE)
	{
		exit('<h1>Illegal script modification!</h1>');
	}
?>
			</td>
		</tr>
<?php
}
?>
		<tr><td colspan="4" height="25"></td></tr>
		<tr>
			<td>
<?php
require(WWWROOT . 'edit/adblock5.php');
?>
				<br /><br />
			</td>
		</tr>
		<tr valign="top">
			<td colspan="4">
				<h2>Pages:</h2>
			</td>
		</tr>
		<tr><td colspan="4">&nbsp;&nbsp;<div class="pages">
<?php 
if(isset($q) && $spamSearch !== TRUE)
{
	$type = $_POST['type']; 
	switch($type)
	{
		case 'App':
			$ddl->paginate("appsquery-$q-", '.htm');
			break;
		case 'Game':
			$ddl->paginate("gamesquery-$q-", '.htm');
			break;
		case 'TV':
			$ddl->paginate("tvquery-$q-", '.htm');
			break;
		case 'Movie':
			$ddl->paginate("moviesquery-$q-", '.htm');
			break;
		case 'Stream':
			$ddl->paginate("streamquery-$q-", '.htm');
			break;
		case 'Music':
			$ddl->paginate("musicquery-$q-", '.htm');
			break;
		case 'eBook':
			$ddl->paginate("ebookquery-$q-", '.htm');
			break;
		case 'Template':
			$ddl->paginate("templatequery-$q-", '.htm');
			break;
		case 'Script':
			$ddl->paginate("scriptquery-$q-", '.htm');
			break;
		case 'Mobile':
			$ddl->paginate("mobilequery-$q-", '.htm');
			break;
		case 'Other':
			$ddl->paginate("otherquery-$q-", '.htm');
			break;
		case 'Xxx':
			$ddl->paginate("xxxquery-$q-", '.htm');
			break;
		case 'Mac':
			$ddl->paginate("macquery-$q-", '.htm');
			break;
		default:
			$ddl->paginate("query-$q-", '.htm');
			break;
  		}
	# Insert search query into the table "searches" or if already there, increment the views by 1
	if(mysql_num_rows(dbcom("SELECT id FROM searches WHERE query = '$query';")) == 0)
	{
		dbcom('INSERT INTO searches (query) VALUES ("' . $query . '");');
	}
	else
	{
		dbcom('UPDATE searches SET views = views + 1 WHERE query = "' . $query . '";');
	}
	# Delete all but the last 1000 records
	$count = dbcom('SELECT COUNT(id) AS num_rows FROM searches;');
	$rows = mysql_fetch_object($count); 
	$total = $rows->num_rows;
	if($total > 1000)
	{
		$searchesToDelete = $total - 1000;
		dbcom("DELETE FROM searches ORDER BY id ASC LIMIT $searchesToDelete;");
	}
}
else
{
	if(isset($_GET) && is_array($_GET) && count($_GET) > 0 && array_key_exists('type', $_GET) && strlen($_GET['type']) > 0 && ctype_alpha($_GET['type']) === TRUE)
	{
		$type = $_GET['type']; 
	}
	else
	{
		$type = '';
	}
	switch($type)
	{
		case 'App':
			$ddl->paginate('appspg-', '.htm');
			break;
		case 'Game':
			$ddl->paginate('gamespg-', '.htm');
			break;
		case 'TV':
			$ddl->paginate('tvpg-', '.htm');
			break;
		case 'Movie':
			$ddl->paginate("moviespg-", '.htm');
			break;
		case 'Stream':
			$ddl->paginate("streampg-", '.htm');
			break;
		case 'Music':
			$ddl->paginate("musicpg-", '.htm');
			break;
		case 'eBook':
			$ddl->paginate("ebookpg-", '.htm');
			break;
		case 'Template':
			$ddl->paginate("templatepg-", '.htm');
			break;
		case 'Script':
			$ddl->paginate("scriptpg-", '.htm');
			break;
		case 'Mobile':
			$ddl->paginate("mobilepg-", '.htm');
			break;
		case 'Other':
			$ddl->paginate("otherpg-", '.htm');
			break;
		case 'Xxx':
			$ddl->paginate("xxxpg-", '.htm');
			break;
		case 'Mac':
			$ddl->paginate('macpg-', '.htm');
			break;
		default:
			if(isset($filterURL))
			{
				$ddl->paginate('/site/' . $filterURL . '/page-', '.htm');
			}
			else
			{
				$ddl->paginate("page-", '.htm');
			}
			break;
	}
}
?>
			</div></td>
		</tr>
		<tr><td colspan="4" height="10"></td></tr>
	</table>
Return current item: DDL CMS