<?php
include 'includes/config.php';
include 'header.php';
$check = '';
$TOTAL_FILE = 0;
$rowsPerPage=12;
$PATH = '';
if($parentid != 0)
{
$folddetail = $db->query("select * from category where id = ".$parentid, database::GET_ROW);
$seq = $folddetail['pathc'];//$db->query("select pathc from category where id = ". $parentid, database::GET_FIELD);
$PATH = '» <a href="'.BASE_PATH.'">Home</a> ';
$PATH .= $seq;
}
if($parentid == 0)
{
$update_list = $db->query('select * from `update` where home = 1 order by id desc');
?>
<div class='updates' align="left">
<h2>Latest Updates</h2>
<?php
foreach($update_list as $field => $value)
{
?>
<div align="left"><?=$value['name']?> <?php if($value['link'] != '') { ?><a href="<?=$value['link']?>" class="new2_text">[Click Here]</a><?php } ?></div>
<?php
} ?>
<div>
<a href="<?=BASE_PATH?>updates/update.html" class="new2_text">[More Updates...]</a>
</div>
</div>
<?php
$check = 'now';
}
else
{
$getfilecat = $folddetail['subcate'];//$db->query('select subcate from category where id = '.$parentid, database::GET_FIELD);
// get category detail
$FOLDER = $folddetail['folder'];
$DES = $folddetail['des'];
$NAME = $folddetail['name'];
$THUMB = $folddetail['thumb'];
?>
<div class="description">
<center>
<?php include 'j'.$agent_ext?>
</center>
</div>
<?php
if($getfilecat == 0)
{
// check this folder have a file or not
$checkfileor = $folddetail['totalitem'];// $db->query('select totalitem from category where id = '.$parentid, database::GET_FIELD);
if($checkfileor != 0)
{
$TOTAL_FILE = 1;
$sort = $_GET['sort'];
if($sort == 'download')
$getfilelist = 'select * from file where cid = '.$parentid.' order by download desc';
elseif($sort == 'az')
$getfilelist = 'select * from file where cid = '.$parentid.' order by name';
elseif($sort == 'recent')
$getfilelist = 'select * from file where cid = '.$parentid.' order by id desc';
else
$getfilelist = 'select * from file where cid = '.$parentid.' order by kram desc';
$rowsPerPage=8;
$pagingqry = $getfilelist;
$gets='?';
if($sort == '')
$sort = 'category';
$pagelink = BASE_PATH.'category/'.$sort.'/'.$parentid.'/';
//echo $sort;
$htmlpage = '/'.$nname.'.html';
include("includes/paging.php");
$FILE = $db->query($pagingqry.$limit);
?>
<h2>
<?php
if($nname != '')
echo $nname;
else
echo 'Select Categories';
?>
</h2>
<div class="dtype">
<small>
|
<a href="<?=BASE_PATH?>category/download/<?=$parentid?>/<?=$PAGE?>/<?=$NAME?>.html" class="dow_2">
sort by Download
</a>
|
<a href="<?=BASE_PATH?>category/az/<?=$parentid?>/<?=$PAGE?>/<?=$NAME?>.html" class="dow_2">
A to Z
</a>
|
<a href="<?=BASE_PATH?>category/recent/<?=$parentid?>/<?=$PAGE?>/<?=$NAME?>.html" class="dow_2">
Recent Added
</a>
|
</small>
</div>
<table cellspacing="0">
<tbody>
<tr>
<td colspan="2">
<?php include 'h'.$agent_ext?>
</td>
</tr>
<?php
$l = 1;
$file_tot = count($FILE);
for($i=0;$i<$file_tot;$i++)
{
if($l==1)
{
$l++;
$class = 'odd';
}
else
{
$l=1;
$class='even';
}
?>
<tr class="<?=$class?>">
<td class="tblimg">
<?php include 'ind_preview.php';
?>
</td>
<td align="left">
<a class="new_link" href="<?=BASE_PATH?>filedownload/<?=$parentid?>/<?=$FILE[$i]['id']?>/<?=$FILE[$i]['name']?>.html"><?=$FILE[$i]['name']?>.<?=$FILE[$i]['ext']?></a>
<?php
if($FILE[$i]['newtag'] == 1)
echo '<img alt="new" src="'.BASE_PATH.'image/new.gif">';
?>
<br />
<span class="text11">[<?=getSize($FILE[$i]['size'])?>] | <?=$FILE[$i]['download']?> Downloads</span>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">
<?php include 'i'.$agent_ext?>
</td>
</tr>
</tbody>
</table>
<?php
}
}
else
$check = 'now';
}
if($check == 'now' )
{
echo '<!--Sonugoyal48@gmail.com-->';
?>
<center>
<?=$DES?>
</center>
<div id='cateogry' align="left">
<h2>
<?php
if($nname != '')
echo $nname;
else
echo 'Select Categories';
?>
</h2>
<?php
if($LOGO == '')
include 'h'.$agent_ext;
// this will only for home page
// cat
//$gettotcat = 'select count(id) from category';
//$params['TOTCATE'] = $conn->singleval($gettotcat);
//file
//$gettotfile = 'select count(id) from file';
//$params['TOTFILE'] = $conn->singleval($gettotfile);
//mp4
//$gettotmp4 = 'select count(id) from file where ext = "mp4"';
//$params['TOTMP4'] = $conn->singleval($gettotmp4);
//3gp
//$gettot3gp = 'select count(id) from file where ext = "3gp"';
//$params['TOT3GP'] = $conn->singleval($gettot3gp);
$rowsPerPage=12;
$pagingqry = "select * from category where parentid = ".$parentid. ' order by kram desc';
$gets='?';
$pagelink = BASE_PATH.'category/'.$parentid.'/';
$htmlpage = '/'.$_GET['ht'].'.html';
include("includes/paging.php");
$CATEGORY = $db->query($pagingqry.$limit);
?>
<div class='catList' align="left">
<?php
$l = 1;
$totcat = count($CATEGORY);
for($i = 0 ; $i < $totcat ; $i++)
{
if($l==1)
{
$l++;
$class = 'odd';
}
else
{
$l=1;
$class='even';
}
echo '<div class="'.$class.'">';
if($CATEGORY[$i]['thumb'] == '')
{
if($CATEGORY[$i]['totalitem'] != 0)
echo "<img alt='»' src='".BASE_PATH."image/arrow.gif'> ";
else
echo "<img alt='»' src='".BASE_PATH."image/folder.png'> ";
}
else
echo "<img src='".BASE_PATH."folderthumb/".$CATEGORY[$i]['thumb']."' width='".THUMB_W."' height='".THUMB_H."' alt='".$CATEGORY[$i]['name']."' class='border_4'> ";
echo "<a href='".BASE_PATH."category/".$CATEGORY[$i]['id']."/".$CATEGORY[$i]['name'].".html' class='new_link'>";
echo $CATEGORY[$i]['name'];
if($CATEGORY[$i]['totalitem'] != 0)
{
//if($CATEGORY[$i]['subcate'] == 0)
echo '['. $CATEGORY[$i]['totalitem'] . ']';
}
if($CATEGORY[$i]['newitemtag'] == 1)
echo '<img alt="New" src="'.BASE_PATH.'image/new.gif">';
if($CATEGORY[$i]['updateitemtag'] == 1)
echo '<img alt="Updated" src="'.BASE_PATH.'image/updated.gif">';
echo '</a>';
echo '</div>';
}
if($LOGO != '')
{
echo '<div class="advertisement">';
include 'c'.$agent_ext;
echo '</div>';
}
else
include 'i'.$agent_ext;
?>
</div>
</div>
<?
}
?>
<center>
<?=$PAGE_CODE?>
</center>
<?php
if($TOTAL_FILE != 0)
{
echo '<center>';
include 'k'.$agent_ext;
echo '</center>';
}
?>
<div class="path">
<br /><?=$PATH?>
</div>
<?
include 'footer.php';
?>
surajdgiri 0 Newbie Poster
Squidge 101 Newbie Poster
TonyG_cyprus 36 Newbie Poster
pixelsoul 272 Red Pill Featured Poster
Webville312 14 Newbie Poster
phoenix_2000 30 Junior Poster in Training
Squidge 101 Newbie Poster
phoenix_2000 30 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.