Home > Panele > Pro download panel

Pro download panel

Dodane przez: piciu
opis:
phpfusionindonesia.besaba.com/images/pro.jpg
Kod:
  1. /*-------------------------------------------------------+
  2. | PHP-Fusion Content Management System
  3. | Copyright (C) 2002 - 2008 Nick Jones
  4. | http://www.php-fusion.co.uk/
  5. +--------------------------------------------------------+
  6. | Filename: ID_Pro download panel.php
  7. | Author: Hervan
  8. | Webs: http://www.phpfusionindonesia.besaba.com/
  9. +--------------------------------------------------------+
  10. | This program is released as free software under the
  11. | Affero GPL license. You can redistribute it and/or
  12. | modify it under the terms of this license which you
  13. | can read by viewing the included agpl.txt or online
  14. | at http://www.gnu.org/licenses/agpl.html. Removal of this
  15. | copyright header is strictly prohibited without
  16. | written permission from the original author(s).
  17. +--------------------------------------------------------*/
  18. if (!defined("IN_FUSION")) { die("Access Denied"); }
  19.  
  20.  
  21. // locale english
  22.  
  23. $locale['lu01']="Pro download panel ";
  24. $locale['lu02']="Title";
  25. $locale['lu03']="Author";
  26. $locale['lu04']="Comments";
  27. $locale['lu05']="Tanggal";
  28. $locale['lu06']="Categories";
  29. $locale['lu07']="Hits";
  30. $locale['lu08']="No empty";
  31. // End locale
  32.  
  33.  
  34. opentable($locale['lu01']);
  35. require_once(INFUSIONS.'pro_download_panel/include/core.php');
  36.  
  37. $res = dbquery("SELECT SQL_CALC_FOUND_ROWS
  38. dl_mtime, dl_count, dl_status, pd.download_id, dl_name, count_comments,
  39. pd.cat_id, tu.user_name, tu.user_status, pd.user_id, pdc.cat_name
  40. FROM ".DB_PREFIX."pdp_downloads AS pd
  41. LEFT JOIN ".DB_USERS." AS tu ON pd.user_id=tu.user_id
  42. LEFT JOIN ".DB_PREFIX."pdp_cats AS pdc ON pd.cat_id=pdc.cat_id
  43. ".(iSUPERADMIN ? "" : "WHERE ".groupaccess('cat_access'))." ORDER BY dl_mtime DESC LIMIT 0,7");
  44.  
  45.  
  46. $all_downloads = dbarray(dbquery("SELECT FOUND_ROWS()"));
  47. $all_downloads = array_shift($all_downloads);
  48.  
  49.  
  50.  
  51.  
  52. echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl' >\n";
  53. echo "<tr>\n<td align='center' width='1%' class='tbl'><img src='".BASEDIR."img/download_cat.png' border='0' /></td>";
  54. echo "<td class='tbl' width='30%' style='padding-left: 10px;'><strong>".$locale['lu02']."</strong>\n</td>\n";
  55. echo "<td class='tbl'><center><strong>".$locale['lu03']."</strong></center></td>\n";
  56. echo "<td class='tbl'><center><strong>".$locale['lu04']."</strong></center></td>";
  57. echo "<td class='tbl'><center><strong>".$locale['lu05']."</strong></center></td>";
  58. echo "<td class='tbl'><center><strong>".$locale['lu06']."</center></strong></td>";
  59. echo "<td class='tbl'><center><strong>".$locale['lu07']."</center></strong></td></tr>";
  60.  
  61. if(!dbrows($res)) {
  62. echo "<table width='100%' cellpadding='0' class='tbl' cellspacing='0'>";
  63. echo "<p><b>".$locale['lu08']."</b></p>";
  64. } else {
  65. echo "";
  66.  
  67. $count = 1;
  68. while($data = dbarray($res)) {
  69. $id = $data['download_id'];
  70. $row_color = ($i % 2 == 0 ? "tbl1" : "tbl2");
  71. $ebooks_title = trimlink($data['dl_name'], 36);
  72. if ($data['dl_mtime'] + 302400 > time() + ($settings['timeoffset'] * 3600)) {
  73. $new = " <img src='".BASEDIR."img/new.png' alt='[NEW]' title='[NEW]' style='border:0px; vertical-align:middle;' />";
  74. } else {
  75. $new = "";
  76. }
  77.  
  78. echo "<tr>\n<td class='$row_color' align='center' width='1%'><a title='Download ".$ebooks_title."' href='".INFUSIONS."/images/downl.png' alt='Download' border='0' /></a></td>";
  79. echo "<td class='$row_color' style='padding: 5px;' nowrap>";
  80. echo "<a href='".INFUSIONS."pro_download_panel/download.php?did=".$id."' title'".$data['dl_name']."'> ".$ebooks_title."</a> ".$new."";
  81. echo "</td>\n<td class='$row_color' width='10%' nowrap><center>".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</center></td>\n";
  82. echo "</td>\n<td class='$row_color' width='10%' nowrap><center>".$data['count_comments']."</center></td>\n";
  83. echo "<td class='$row_color' width='10%' nowrap><center>".date("d.m.Y", $data['dl_mtime'])."</center></td>\n";
  84. echo "<td class='$row_color' width='10%' nowrap>";
  85.  
  86. echo"<center>".$data['cat_name']."</center>";
  87.  
  88.  
  89.  
  90. echo"</td>\n";
  91. echo "<td class='$row_color' width='1%' nowrap><center>".$data['dl_count']."</center></td>";
  92.  
  93. $i++;
  94. }
  95. echo "</tr></table>\n";
  96.  
  97. }
  98. closetable();
  99.  

©