<?php
$downloads = new Downloads;
$downloads->perPage = 6;
foreach(array('app', 'game', 'music', 'movie') as $t):
$downloads->type = $t;
foreach($downloads->get() as $d):
?>
HTML and stuff here
like <tr><td><?php echo $d->title; ?></td></tr>
<?php
endforeach;
endforeach;
if ($sqlwhere=="")
$sqlWhere = " where type not in ('Xxx')";
else
$sqlWhere.= " and type not in ('Xxx')";
$sqlWhere = $this->processDataHook("fetchDownloadsSQLWhere",$sqlWhere);
$excludeIndexTypes = array(
"xxx"
);
function siteDownloads($where) {
global $core,$excludeIndexTypes;
$sid = mysql_query("SELECT id FROM wcddl_sites WHERE url = '".$core->siteSQL."'");
if(!mysql_num_rows($sid)) {
unset($core->siteSURL);
if(empty($excludeIndexTypes) || !empty($where)) {
return $where;
}
else
{
$notIn = array();
foreach($excludeIndexTypes as $eITK)
$notIn[] = "'".$eITK."'";
$notIn = implode(",",$notIn);
$where = " WHERE type NOT IN (".$notIn.")";
return $where;
}
} else {
$sid = mysql_result($sid,0);
if(empty($where))
$where = " WHERE sid = ".$sid;
else
$where = " AND sid = ".$sid;
return $where;
}
}
$core->attachDataHook("fetchDownloadsSQLWhere","siteDownloads");
Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.
Contact us