I have website, and all users can download any file in download page. Just users who have accounts in my website can download; visitor cannot see the download page until login or registering on my website. I want now to do some changes; I want just download any file from a download page for active users who have more than 10 topics, any user who is less 10 topics cannot download any files. How can I do that?
Downloads
<?php
if(!$allcategories)
{
echo 'There are no downloads available!';
return;
}
foreach($allcategories as $category)
{
?>
<p><h2><strong><?php echo $category->name?></strong></h2></p>
<ul>
<?php
# This loops through every download available in the category
$alldownloads = DownloadData::GetDownloads($category->id);
if(!$alldownloads)
{
echo 'There are no downloads under this category';
$alldownloads = array();
}
foreach($alldownloads as $download)
{
?>
<li>
<a href="<?php echo url('/downloads/dl/'.$download->id);?>">
<?php echo $download->name?></a><br />
<?php echo $download->description?><br />
<em>Downloaded <?php echo $download->hits?> times</em></li>
<?php
}
?><br />
</ul>
<?php
}
?>
That is my download code .