Guest User

Untitled

a guest
Dec 11th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.10 KB | None | 0 0
  1. <?php
  2.     include 'includes/config.php';
  3.     include 'header.php';
  4.     $check = '';
  5.     $TOTAL_FILE = 0;   
  6.     $rowsPerPage=12;
  7.    
  8.     $PATH = '';
  9.  
  10.     if($parentid != 0)
  11.     {
  12.         //from 41
  13.         $folddetail = $db->query("select * from category where id = ".$parentid, database::GET_ROW);
  14.         $seq =  $folddetail['pathc'];//$db->query("select pathc from category where id = ". $parentid, database::GET_FIELD);
  15.         $PATH = 'Β» <a href="'.BASE_PATH.'">Home</a> ';
  16.         $PATH .= $seq;
  17.     }
  18.    
  19.     if($parentid == 0)
  20.     {
  21.         $update_list = $db->query('select * from `update` where home = 1 order by id desc');
  22.         ?>
  23.             <div class='updates' align="left">
  24.                 <h2>Latest Updates</h2>
  25.                 <?php
  26.                 foreach($update_list as $field => $value)
  27.                 {
  28.                     ?>
  29.                         <div align="left"><?=$value['name']?> <?php if($value['link'] != '') { ?><a href="<?=$value['link']?>" class="new2_text">[Click Here]</a><?php } ?></div>
  30.                     <?php
  31.                 } ?>
  32.                 <div>
  33.                     <a href="<?=BASE_PATH?>updates/update.html" class="new2_text">[More Updates...]</a>
  34.                 </div>
  35.             </div>
  36.         <?php
  37.         $check = 'now';
  38.     }
  39.     else
  40.     {
  41.        
  42.         $getfilecat =  $folddetail['subcate'];//$db->query('select subcate from category where id = '.$parentid, database::GET_FIELD);
  43.        
  44.         // get category detail
  45.        
  46.         $FOLDER = $folddetail['folder'];
  47.         $DES =  $folddetail['des'];
  48.         $NAME = $folddetail['name'];
  49.         $THUMB = $folddetail['thumb'];
  50.         ?>
  51.             <div class="description">
  52.                 <center>
  53.                     <?php include 'j'.$agent_ext?>
  54.                 </center>
  55.  
  56.             </div>     
  57.         <?php
  58.  
  59.         if($getfilecat == 0)
  60.         {
  61.             // check this folder have a file or not
  62.             $checkfileor = $folddetail['totalitem'];// $db->query('select totalitem from category where id = '.$parentid, database::GET_FIELD);
  63.             if($checkfileor != 0)
  64.             {
  65.                 $TOTAL_FILE = 1;
  66.                 $sort = $_GET['sort'];
  67.                
  68.                 if($sort == 'download')
  69.                     $getfilelist = 'select * from file where cid = '.$parentid.' order by download desc';
  70.                 elseif($sort == 'az')
  71.                     $getfilelist = 'select * from file where cid = '.$parentid.' order by name';
  72.                 elseif($sort == 'recent')
  73.                     $getfilelist = 'select * from file where cid = '.$parentid.' order by id desc';
  74.                 else
  75.                     $getfilelist = 'select * from file where cid = '.$parentid.' order by kram desc';
  76.                
  77.                 $rowsPerPage=8;
  78.                 $pagingqry = $getfilelist;
  79.                 $gets='?';
  80.                
  81.                 if($sort == '')
  82.                     $sort = 'category';
  83.    
  84.                 $pagelink = BASE_PATH.'category/'.$sort.'/'.$parentid.'/';
  85.                 //echo $sort;
  86.                
  87.                 $htmlpage = '/'.$nname.'.html';
  88.                 include("includes/paging.php");
  89.                
  90.                 $FILE = $db->query($pagingqry.$limit);
  91.                 ?>             
  92.                 <h2>
  93.                     <?php
  94.                         if($nname != '')
  95.                             echo $nname;
  96.                         else
  97.                             echo 'Select Categories';
  98.                     ?>
  99.                 </h2>
  100.                 <div class="dtype">
  101.                     <small>
  102.                          |
  103.                         <a href="<?=BASE_PATH?>category/download/<?=$parentid?>/<?=$PAGE?>/<?=$NAME?>.html" class="dow_2">
  104.                             sort by Download
  105.                         </a>
  106.                          |
  107.                         <a href="<?=BASE_PATH?>category/az/<?=$parentid?>/<?=$PAGE?>/<?=$NAME?>.html" class="dow_2">
  108.                             A to Z
  109.                         </a>
  110.                          |
  111.                         <a href="<?=BASE_PATH?>category/recent/<?=$parentid?>/<?=$PAGE?>/<?=$NAME?>.html" class="dow_2">
  112.                             Recent Added
  113.                         </a>
  114.                          |
  115.                     </small>
  116.                 </div>
  117.  
  118.                 <table cellspacing="0">
  119.                     <tbody>
  120.                         <tr>
  121.                             <td colspan="2">
  122.                                 <?php include 'h'.$agent_ext?>
  123.                             </td>
  124.                         </tr>
  125.                         <?php
  126.                             $l = 1;
  127.                             $file_tot = count($FILE);
  128.                             for($i=0;$i<$file_tot;$i++)
  129.                             {
  130.                                 if($l==1)
  131.                                 {
  132.                                     $l++;
  133.                                     $class = 'odd';
  134.                                 }
  135.                                 else
  136.                                 {
  137.                                     $l=1;
  138.                                     $class='even';
  139.                                 }
  140.                    
  141.                                 ?>
  142.                                     <tr class="<?=$class?>">
  143.                                         <td class="tblimg">
  144.                                             <?php
  145.                                                 if($FILE[$i]['thumbext'] == '')
  146.                                                 {
  147.                                                     if($THUMB == '')
  148.                                                         echo '<img src="'.BASE_PATH.'image/'.$FILE[$i]['ext'].'.png" alt="'.$FILE[$i]['name'].'" width="'.THUMB_W.'" height="'.THUMB_H.'" class="border_4"> ';
  149.                                                     else
  150.                                                         echo '<img src="'.BASE_PATH.'folderthumb/'.$THUMB.'" alt="'.$FILE[$i]['name'].'" width="'.THUMB_W.'" height="'.THUMB_H.'" class="border_4"> ';
  151.                                                 }
  152.                                                 else
  153.                                                     echo '<img src="'.BASE_PATH.$FOLDER.'thumb-'.$FILE[$i]['dname'].'.'.$FILE[$i]['thumbext'].'" width="'.THUMB_W.'" height="'.THUMB_H.'" alt="'.$FILE[$i]['name'].'" class="border_4"> ';
  154.                                             ?> 
  155.                                         </td>
  156.                                         <td align="left">
  157.                                             <a class="new_link" href="<?=BASE_PATH?>filedownload/<?=$parentid?>/<?=$FILE[$i]['id']?>/<?=$FILE[$i]['name']?>.html"><?=$FILE[$i]['name']?>.<?=$FILE[$i]['ext']?></a>
  158.                                             <?php
  159.                                                 if($FILE[$i]['newtag'] == 1)
  160.                                                     echo '<img alt="new" src="'.BASE_PATH.'image/new.gif">';
  161.                                             ?>
  162.                                             <br />
  163.                                             <span class="text11">[<?=getSize($FILE[$i]['size'])?>]   |   <?=$FILE[$i]['download']?> Downloads</span>
  164.                                         </td>
  165.                                     </tr>
  166.                                 <?php
  167.                             }
  168.                         ?>
  169.                         <tr>
  170.                             <td colspan="2">
  171.                                 <?php include 'i'.$agent_ext?>
  172.                             </td>
  173.                         </tr>
  174.                     </tbody>
  175.                 </table>
  176.                 <?php  
  177.             }
  178.         }
  179.         else
  180.             $check = 'now';
  181.     }
  182.    
  183. if($check == 'now' )
  184. {
  185.  
  186.     echo '<!-- chintanhingrajiya@gmail.com :: Display category list -->';
  187.     ?>
  188.     <center>
  189.         <?=$DES?>
  190.     </center>
  191.     <div id='cateogry' align="left">
  192.         <h2>
  193.             <?php
  194.                 if($nname != '')
  195.                     echo $nname;
  196.                 else
  197.                     echo 'Select Categories';
  198.             ?>
  199.         </h2>
  200.         <?php
  201.             if($LOGO == '')
  202.                 include 'h'.$agent_ext;
  203.  
  204.             // this will only for home page
  205.             // cat
  206.            
  207.             //$gettotcat = 'select count(id) from category';
  208.             //$params['TOTCATE'] = $conn->singleval($gettotcat);
  209.             //file
  210.             //$gettotfile = 'select count(id) from file';
  211.             //$params['TOTFILE'] = $conn->singleval($gettotfile);
  212.             //mp4
  213.             //$gettotmp4 = 'select count(id) from file where ext = "mp4"';
  214.             //$params['TOTMP4'] = $conn->singleval($gettotmp4);
  215.             //3gp
  216.             //$gettot3gp = 'select count(id) from file where ext = "3gp"';
  217.             //$params['TOT3GP'] = $conn->singleval($gettot3gp);
  218.        
  219.             $rowsPerPage=12;
  220.             $pagingqry = "select * from category where parentid = ".$parentid. ' order by kram desc';
  221.            
  222.             $gets='?';
  223.    
  224.             $pagelink = BASE_PATH.'category/'.$parentid.'/';
  225.    
  226.             $htmlpage = '/'.$_GET['ht'].'.html';
  227.             include("includes/paging.php");
  228.            
  229.             $CATEGORY = $db->query($pagingqry.$limit);
  230.            
  231.            
  232.         ?>
  233.         <div class='catList' align="left">
  234.             <?php
  235.                 $l = 1;
  236.                 $totcat = count($CATEGORY);
  237.                 for($i = 0 ; $i < $totcat ; $i++)
  238.                 {  
  239.                     if($l==1)
  240.                     {
  241.                         $l++;
  242.                         $class = 'odd';
  243.                     }
  244.                     else
  245.                     {
  246.                         $l=1;
  247.                         $class='even';
  248.                     }
  249.                        
  250.                     echo '<div class="'.$class.'">';
  251.                         if($CATEGORY[$i]['thumb'] == '')
  252.                         {
  253.                             if($CATEGORY[$i]['totalitem'] != 0)
  254.                                 echo "<img alt='Arrow' src='".BASE_PATH."image/arrow.gif'> ";
  255.                             else
  256.                                 echo "<img alt='Arrow' src='".BASE_PATH."image/folder.png'> ";
  257.                         }
  258.                         else
  259.                             echo "<img src='".BASE_PATH."folderthumb/".$CATEGORY[$i]['thumb']."' width='".THUMB_W."' height='".THUMB_H."' alt='".$CATEGORY[$i]['name']."' class='border_4'> ";
  260.                
  261.                         echo "<a href='".BASE_PATH."category/".$CATEGORY[$i]['id']."/".$CATEGORY[$i]['name'].".html' class='new_link'>";
  262.                             echo $CATEGORY[$i]['name'];
  263.                                 if($CATEGORY[$i]['totalitem'] != 0)
  264.                                 {
  265.                                     //if($CATEGORY[$i]['subcate'] == 0)
  266.                                         echo '['. $CATEGORY[$i]['totalitem'] . ']';
  267.                                 }
  268.                                 if($CATEGORY[$i]['newitemtag'] == 1)
  269.                                     echo '<img alt="Arrow" src="'.BASE_PATH.'image/new.gif">';
  270.                                 if($CATEGORY[$i]['updateitemtag'] == 1)
  271.                                     echo '<img alt="Arrow" src="'.BASE_PATH.'image/updated.gif">';
  272.                         echo '</a>';
  273.                     echo '</div>';                         
  274.                 }
  275.                
  276.                 if($LOGO != '')
  277.                 {
  278.                     echo '<div class="advertisement">';
  279.                         include 'c'.$agent_ext;
  280.                     echo '</div>';
  281.                 }
  282.                 else
  283.                     include 'i'.$agent_ext;
  284.             ?>
  285.         </div>
  286.     </div>
  287.     <?
  288. }
  289. ?>
  290. <center>
  291.     <?=$PAGE_CODE?>
  292. </center>
  293. <?php
  294.  
  295.  
  296. if($TOTAL_FILE != 0)
  297. {
  298.     echo '<center>';
  299.     include 'k'.$agent_ext;
  300.     echo '</center>';
  301. }
  302. ?>
  303. <div class="path">
  304.     <br /><?=$PATH?>
  305. </div>
  306.  
  307. <?php
  308. include 'footer.php';
  309. ?>
Add Comment
Please, Sign In to add comment