[problem] download top5
|
darek308 |
Dodany dnia 02.05.2006 12:43:46
|
Przedszkolak
Postów: 7
Data rejestracji: 29.04.2006 21:48
|
Mam PHP-Fusion v6.00.110 + extreme pack i mam problemy z dodaniem panelu top5 downlaod. Znalazłem w labolatorium takie cos :
//Last Downloads by Daniel Rynduch (Divine JazOOn)
include FUSION_LANGUAGES.FUSION_LAN."downloads.php";
//Top Downloads
$result=dbquery("SELECT * FROM ".$fusion_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,6");
if(dbrows($result)!=0){
openside("Ostatnio dodane pliki");
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">";
while($data=dbarray($result)){
echo "<tr>\n<td class=\"small\"><a href=\"http://www.TWOJASTRONA.pl/downloads.php?cat_id=$data[download_cat]\" class=\"slink\">";
echo trimlink($data[download_title], 20)."</a></td>\n<td class=\"small\" align=\"right\">";
}
echo "</table>";
closeside();
}
To mam wkleic do panelu ale wyskakuje mi bład:
Warning: Unknown(FUSION_LANGUAGESFUSION_LANdownloads.php): failed to open stream: No such file or directory in /home/karqs/domains/karqs.twojhost.com.pl/public_html/side_left.php(26) : eval()'d code on line 2
Warning: Unknown(FUSION_LANGUAGESFUSION_LANdownloads.php): failed to open stream: No such file or directory in /home/karqs/domains/karqs.twojhost.com.pl/public_html/side_left.php(26) : eval()'d code on line 2
Warning: (null)(): Failed opening 'FUSION_LANGUAGESFUSION_LANdownloads.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/karqs/domains/karqs.twojhost.com.pl/public_html/side_left.php(26) : eval()'d code on line 2
Table 'karqs_soft.downloads' doesn't exist
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/karqs/domains/karqs.twojhost.com.pl/public_html/maincore.php on line 127
Table 'karqs_soft.downloads' doesn't existTable 'karqs_soft.downloads' doesn't exist
Emotki tez by sie zdalo wylaczyc/Pieka
Edytowane przez Pieka dnia 02.05.2006 13:14:34
|
|
|
|
Wścibski Gość |
Dodany dnia 25.11.2024 12:21:58
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
Pieka |
Dodany dnia 02.05.2006 12:47:33
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Poprawiasz ten temat (jego zawartosc i nazwe tematu), albo znowu zrobie DELETE!
Jestem jaki jestem
|
|
|
|
darek308 |
Dodany dnia 02.05.2006 13:09:51
|
Przedszkolak
Postów: 7
Data rejestracji: 29.04.2006 21:48
|
Teraz jest dobrze?? Pomozecie? |
|
|
|
Pieka |
Dodany dnia 02.05.2006 13:15:33
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
darek308 napisał/a:
Teraz jest dobrze?? Pomozecie?
Jasne :)
Sciagnij wersje dla v6, to bedzie dobrze ;)
=======================
Ponizej poprawione dla v6.00
=======================
//Last Downloads
include LOCALE.LOCALESET."downloads.php";
//Top Downloads
$result=dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,6");
if(dbrows($result)!=0){
openside("Ostatnio dodane pliki");
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">";
while($data=dbarray($result)){
echo "<tr>\n<td class=\"small\"><a href=\"http://[color=red]adres_Twojej_strony[/color]/downloads.php?cat_id=$data[download_cat]\" class=\"slink\">";
echo trimlink($data[download_title], 20)."</a></td>\n<td class=\"small\" align=\"right\">";
}
echo "</table>";
closeside();
}
==============================
Jak nie ma jak jest?!!
-------------------------
MOD-Ostatnio Dodane Pliki - 9.89 Kb
Panel wyświetlający ostatnio dodane pliki.
Licencja: GNU/GPL | Autor: | Wersja: v1.10
Data dodania: 03.09.05 | Pobrano: 529
==============================
Edytowane przez Pieka dnia 02.05.2006 13:34:06
Jestem jaki jestem
|
|
|
|
darek308 |
Dodany dnia 02.05.2006 13:41:48
|
Przedszkolak
Postów: 7
Data rejestracji: 29.04.2006 21:48
|
To top 5 download działa A jest cos takiego do mojej wersji download dla zarejestrowanych znalazłem i działa ale jest jeden mankament ktory mnie troche denerwuje tzn w extreme pack downlaod wyglada tak :
a po instalacji tego moda wyglada tak:
W załaczniku dodaje tego moda.
darek308 dodał/a następującą plik:
|
|
|
|
darek308 |
Dodany dnia 02.05.2006 16:22:47
|
Przedszkolak
Postów: 7
Data rejestracji: 29.04.2006 21:48
|
moj pliki download.php wyglada tak:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
include LOCALE.LOCALESET."downloads.php";
if (!isset($cat_id)) {
$meta_title = " : ".$locale['400'];
}
if (isset($cat_id)) {
$result = dbquery("SELECT download_cat_name,download_cat_up FROM ".$db_prefix."download_cats WHERE download_cat_id='$cat_id'");
$cdata = dbarray($result);
$ddata = dbarray(dbquery("SELECT download_cat_name from ".$db_prefix."download_cats WHERE download_cat_id='".$cdata['download_cat_up']."'"));
$meta_title = " : ".$locale['400']." : ".$ddata['download_cat_name']." : ".$cdata['download_cat_name'];
}
require_once "subheader.php";
$panels="panels_download";
require_once "side_left.php";
if (isset($download_id) && !isNum($download_id)) fallback("index.php");
if (!isset($cat_level)) $cat_level=0;
if (!isset($cat_up)) $cat_up=0;
if (isset($download_id)) {
$res = 0;
if ($data = dbarray(dbquery("SELECT download_url,download_cat FROM ".$db_prefix."downloads WHERE download_id='$download_id'"))) {
$cdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='".$data['download_cat']."'"));
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
$result = dbquery("UPDATE ".$db_prefix."downloads SET download_count=download_count+1 WHERE download_id='$download_id'");
redirect($data['download_url']);
}
}
if ($res == 0) redirect("downloads.php");
}
if (!isset($cat_id)) {
$action_id = 12;
$param1 = 0;
$param2 = 0;
$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
$result = dbquery("SELECT * FROM ".$db_prefix."users_actions WHERE online_user=".$cond."");
if (dbrows($result) != 0) {
$result = dbquery("UPDATE ".$db_prefix."users_actions SET online_lastactive='".time()."', action_id='".$action_id."', param1='".$param1."', param2='".$param2."' WHERE online_user=".$cond."");
} else {
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
$result = dbquery("INSERT INTO ".$db_prefix."users_actions VALUES('$name', '".USER_IP."', '".time()."', '".$action_id."', '".$param1."', '".$param2."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."users_actions WHERE online_lastactive<".(time()-300)."");
opentable($locale['400']);
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_up='-1' ORDER BY download_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
echo "<center><table width='80%' cellspacing='0' cellpadding='0' class='tbl'>\n";
while ($data = dbarray($result)) {
if (checkgroup($data['download_cat_access'])) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
$num = dbcount("(download_cat)", "downloads", "download_cat='".$data['download_cat_id']."'");
echo "<td align='left' valign='top' width='50%'>";
if ($data['download_cat_image'] != "") {
echo "<img src='".$data['download_cat_image']."' align='left' height='50'>";
} else {
echo "<img src='".IMAGES."download_cat.gif' align='left' height='50'>";
}
echo "<b><u>Kategoria:</u><br><b>".$data['download_cat_name']."</b>";
if ($data['download_cat_description'] != "") echo "<br>\n<span class='small'>".$data['download_cat_description']."</span>";
echo "</td><td width='2%'><img src='".IMAGES."download_table.gif' align='center' width='1'></td><td><td align='left' valign='top' width='48%'><b><u>SubKategorie:</u></b><br>\n";
$r = dbquery("SELECT download_cat_id,download_cat_name from ".$db_prefix."download_cats WHERE download_cat_up='".$data['download_cat_id']."'");
$x=0;
$num = dbrows($r);
while ($d = dbarray($r))
{
$x++;
if ($x == $num) $p=""; else $p=", ";
$files = dbrows(dbquery("SELECT download_id from ".$db_prefix."downloads WHERE download_cat='".$d['download_cat_id']."'"));
echo "<a href='".FUSION_SELF."?cat_id=".$d['download_cat_id']."'>".$d['download_cat_name']." ($files)</a>".$p;
}
echo "</td>";
$counter++;
}
}
echo "</tr>\n</table></center><br><br>\n";
} else {
echo "<center><br>\n".$locale['430']."<br><br>\n</center>\n";
}
echo "<center><form name='searchform' method='post' action='".BASEDIR."search.php?stype=d'>
Szukaj w Download: <input type='text' name='stext' value='$stext' class='textbox' style='width:150px'>
<input type='submit' name='search' value='Szukaj' class='button'>
</form></center>";
$plikow = dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads");
echo "<div align='right'>Wszystkich plików: <b>".dbresult($plikow, 0)."</b> </div>";
closetable();
} else {
$res = 0;
if (!isNum($cat_id)) fallback(FUSION_SELF);
$t1 = dbarray(dbquery("SELECT * from ".$db_prefix."download_cats WHERE download_cat_id='".$cat_id."'"));
$t2 = dbarray(dbquery("SELECT download_cat_name from ".$db_prefix."download_cats WHERE download_cat_id='".$t1['download_cat_up']."'"));
echo "<a name='Download'></a>";
opentable($t2['download_cat_name']." - ".$t1['download_cat_name']);
if (checkrights("DC")){
echo "<div align='right'>";
echo "[ <a href='".ADMIN."download_cats.php?step=edit&cat_id=".$t1['download_cat_id']."'>Edytuj subkategorię</a>";
echo " | <a href='".ADMIN."downloads.php?step=add&download_cat_id=".$t1['download_cat_id']."'>Dodaj plik</a> ]";
}
echo "</div><center><table width='90%' cellspacing='0' cellpadding='0' class='tbl'>\n";
echo "<td align='left' valign='top' width='70%'>";
if ($t1['download_cat_image'] != "") {
echo "<img src='".$t1['download_cat_image']."' align='left' height='70'>";
} else {
echo "<img src='".IMAGES."subdownload_cat.gif' align='left' height='70'>";
}
echo "<table width='100%' cellspacing='0' cellpadding='0'><tr><td class='tbl2' > <strong>".$t1['download_cat_name']."</strong></td></tr>";
echo "<tr><td class='tbl1' height='100%'><span class='small'>".$t1['download_cat_description']."</span></td></tr></table>";
echo "</td></tr></table><table width='80%' cellspacing='0' cellpadding='0' class='tbl'>\n" ;
echo "<td align='center' valign='bottom' width='100%'>Inne Subkategorie: ";
$t3 = dbquery("SELECT download_cat_name,download_cat_id from ".$db_prefix."download_cats WHERE download_cat_up='".$t1['download_cat_up']."'");
$num = dbrows($t3);
$x=0;
while ($d = dbarray($t3))
{
$x++;
if ($d['download_cat_id'] != $cat_id) echo "<a href='".FUSION_SELF."?cat_id=".$d['download_cat_id']."'>".$d['download_cat_name']."</a>";
else echo "<font color='orange'><strong>".$d['download_cat_name']."</strong></font>";
if ($x != $num) echo ", ";
}
echo "</td></tr></table><br><table width='100%' cellspacing='0' cellpadding='0' class='tbl'><tr><td align='left'>";
echo "<form name='searchform' method='post' action='".BASEDIR."search.php?stype=d'>
Szukaj w Download: <input type='text' name='stext' value='$stext' class='textbox' style='width:150px'>
<input type='submit' name='search' value='Szukaj' class='button'>
</form>";
echo "</td><td align='right'>";
if ($t1['download_cat_datestamp'] !=0) echo "Data ostatniej aktualizacji: ".showdate("forumdate", $t1['download_cat_datestamp']);
echo "</td></tr></table></center>";
closetable();
$action_id = 13;
$param1 = $cat_id;
$param2 = 0;
$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
$result = dbquery("SELECT * FROM ".$db_prefix."users_actions WHERE online_user=".$cond."");
if (dbrows($result) != 0) {
$result = dbquery("UPDATE ".$db_prefix."users_actions SET online_lastactive='".time()."', action_id='".$action_id."', param1='".$param1."', param2='".$param2."' WHERE online_user=".$cond."");
} else {
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
$result = dbquery("INSERT INTO ".$db_prefix."users_actions VALUES('$name', '".USER_IP."', '".time()."', '".$action_id."', '".$param1."', '".$param2."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."users_actions WHERE online_lastactive<".(time()-300)."");
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='$cat_id'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
opentable($locale['400'].": ".$data['download_cat_name']);
$rows = dbcount("(*)", "downloads", "download_cat='$cat_id'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='$cat_id' ORDER BY download_title LIMIT $rowstart,15");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>".$locale['410']."</span>";
} else {
$new = "";
}
echo "<center><table width='520' cellspacing='0' cellpadding='0' class='tbl'><tr><td class='tbl2' width='75%'><img src='".THEME."images/bullet.gif'> <a href='".FUSION_SELF."?cat_id=$cat_id&download_id=".$data['download_id']."' target='_blank'><strong>".$data['download_title']."</strong></a> - ".$data['download_filesize']." $new</td><td class='tbl2' width='25%'> </td></tr><tr><td class='tbl1' valign='top'>\n";
if ($data['download_description'] != "") echo nl2br(parseubb($data['download_description']))."\n";
echo "</td><td class='tbl1' align='center' valign='top'>";
echo "<a href='$PHP_SELF?cat_id=$cat_id&download_id=".$data['download_id']."' target='_blank' onmouseover=\"gpe('text:<center><b>° informacje °</b><hr>Pobierz plik<b></b></center>;')\"><img src='".IMAGES."download.gif' border='0'></a>";
if ($data[download_image] != "") {
echo " <a href='".$data[download_image]."' target='_blank' onmouseover=\"gpe('text:<center><b>° informacje °</b><hr>Pokaż przykład w nowym oknie<b></b></center>;')\"><img src='".IMAGES."preview.gif' border='0'></a>";
} else {
echo "\n";
}
echo " <a href='#' onmouseover=\"gpe('text:<center><b>° informacje °</b></center><hr><b>Licencja:</b> ".$data['download_license']."<br><b>O/S:</b> ".$data['download_os']."<br><b>Wersja:</b> ".$data['download_version']."<br><b>Dodano:</b> ".showdate("%d.%m.%y", $data['download_datestamp'])."<br><b>Rozmiar:</b> ".$data['download_filesize'].";')\" class='side'>
<img src='".IMAGES."info.gif' border='0'></a>";
if ($data[download_adres] != "") {
echo " <a href='".$data[download_adres]."' target='_blank' onmouseover=\"gpe('text:<center><b>° informacje °</b><hr>Strona autora<b></b></center>;')\"><img src='".IMAGES."www.gif' border='0'></a>";
} else {
echo "\n";
}
echo "<a href='".BASEDIR."contact.php?subject=".$locale['RContact01'].$data['download_title']."&message=".$locale['RContact02'].$data['download_title'].$locale['RContact03'].$data['download_id']."' onmouseover=\"gpe('text:<center><b>° informacje °</b><hr>".$locale['RContact04']."<b></b></center>;')\"><img src='".IMAGES."error.gif' border='0'></a>";
echo "<br><span class='small'>Pobrano</span><br><b>".$data['download_count']."</b></center>";
echo "</span></td></tr></table></center><br>";
echo ($i != $numrows ? "\n" : "\n"); $i++;
}
echo "<center><table width='520' cellspacing='0' cellpadding='0'><tr><td width='50%'><a href=\"javascript:history.go(-1)\"><img src='".IMAGES."back.gif' align='left' border='0'></td><td width='50%'><a href='#Download'><img src='".IMAGES."top.gif' align='right' border='0'></a></td></tr></table></center>";
closetable();
echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,15,$rows,3,FUSION_SELF."?cat_id=$cat_id&")."\n</div>\n";
} else {
echo $locale['431']."\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
require_once "side_right.php";
require_once "footer.php";
?>
moze mi ktos go przerobic ?? opis w poscie powyzej
Wylaczaj emotki!!/Pieka
Edytowane przez Pieka dnia 02.05.2006 19:51:52
|
|
|
|
JazOOn |
Dodany dnia 02.05.2006 19:40:03
|
Ekspert
Postów: 2155 Pomógł: 2
v7.02.07 Data rejestracji: 21.02.2005 13:47
|
zastąp całą zawartość tego pliku tym kodem i powiedz czy jest ok:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
include LOCALE.LOCALESET."downloads.php";
if (iMEMBER) {
if (!isset($cat_id)) {
$meta_title = " : ".$locale['400'];
}
if (isset($cat_id)) {
$result = dbquery("SELECT download_cat_name,download_cat_up FROM ".$db_prefix."download_cats WHERE download_cat_id='$cat_id'");
$cdata = dbarray($result);
$ddata = dbarray(dbquery("SELECT download_cat_name from ".$db_prefix."download_cats WHERE download_cat_id='".$cdata['download_cat_up']."'"));
$meta_title = " : ".$locale['400']." : ".$ddata['download_cat_name']." : ".$cdata['download_cat_name'];
}
require_once "subheader.php";
$panels="panels_download";
require_once "side_left.php";
if (isset($download_id) && !isNum($download_id)) fallback("index.php");
if (!isset($cat_level)) $cat_level=0;
if (!isset($cat_up)) $cat_up=0;
if (isset($download_id)) {
$res = 0;
if ($data = dbarray(dbquery("SELECT download_url,download_cat FROM ".$db_prefix."downloads WHERE download_id='$download_id'"))) {
$cdata = dbarray(dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='".$data['download_cat']."'"));
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
$result = dbquery("UPDATE ".$db_prefix."downloads SET download_count=download_count+1 WHERE download_id='$download_id'");
redirect($data['download_url']);
}
}
if ($res == 0) redirect("downloads.php");
}
if (!isset($cat_id)) {
$action_id = 12;
$param1 = 0;
$param2 = 0;
$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
$result = dbquery("SELECT * FROM ".$db_prefix."users_actions WHERE online_user=".$cond."");
if (dbrows($result) != 0) {
$result = dbquery("UPDATE ".$db_prefix."users_actions SET online_lastactive='".time()."', action_id='".$action_id."', param1='".$param1."', param2='".$param2."' WHERE online_user=".$cond."");
} else {
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
$result = dbquery("INSERT INTO ".$db_prefix."users_actions VALUES('$name', '".USER_IP."', '".time()."', '".$action_id."', '".$param1."', '".$param2."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."users_actions WHERE online_lastactive<".(time()-300)."");
opentable($locale['400']);
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_up='-1' ORDER BY download_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
echo "<center><table width='80%' cellspacing='0' cellpadding='0' class='tbl'>\n";
while ($data = dbarray($result)) {
if (checkgroup($data['download_cat_access'])) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
$num = dbcount("(download_cat)", "downloads", "download_cat='".$data['download_cat_id']."'");
echo "<td align='left' valign='top' width='50%'>";
if ($data['download_cat_image'] != "") {
echo "<img src='".$data['download_cat_image']."' align='left' height='50'>";
} else {
echo "<img src='".IMAGES."download_cat.gif' align='left' height='50'>";
}
echo "<b><u>Kategoria:</u><br><b>".$data['download_cat_name']."</b>";
if ($data['download_cat_description'] != "") echo "<br>\n<span class='small'>".$data['download_cat_description']."</span>";
echo "</td><td width='2%'><img src='".IMAGES."download_table.gif' align='center' width='1'></td><td><td align='left' valign='top' width='48%'><b><u>SubKategorie:</u></b><br>\n";
$r = dbquery("SELECT download_cat_id,download_cat_name from ".$db_prefix."download_cats WHERE download_cat_up='".$data['download_cat_id']."'");
$x=0;
$num = dbrows($r);
while ($d = dbarray($r))
{
$x++;
if ($x == $num) $p=""; else $p=", ";
$files = dbrows(dbquery("SELECT download_id from ".$db_prefix."downloads WHERE download_cat='".$d['download_cat_id']."'"));
echo "<a href='".FUSION_SELF."?cat_id=".$d['download_cat_id']."'>".$d['download_cat_name']." ($files)</a>".$p;
}
echo "</td>";
$counter++;
}
}
echo "</tr>\n</table></center><br><br>\n";
} else {
echo "<center><br>\n".$locale['430']."<br><br>\n</center>\n";
}
echo "<center><form name='searchform' method='post' action='".BASEDIR."search.php?stype=d'>
Szukaj w Download: <input type='text' name='stext' value='$stext' class='textbox' style='width:150px'>
<input type='submit' name='search' value='Szukaj' class='button'>
</form></center>";
$plikow = dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads");
echo "<div align='right'>Wszystkich plików: <b>".dbresult($plikow, 0)."</b> </div>";
closetable();
} else {
$res = 0;
if (!isNum($cat_id)) fallback(FUSION_SELF);
$t1 = dbarray(dbquery("SELECT * from ".$db_prefix."download_cats WHERE download_cat_id='".$cat_id."'"));
$t2 = dbarray(dbquery("SELECT download_cat_name from ".$db_prefix."download_cats WHERE download_cat_id='".$t1['download_cat_up']."'"));
echo "<a name='Download'></a>";
opentable($t2['download_cat_name']." - ".$t1['download_cat_name']);
if (checkrights("DC")){
echo "<div align='right'>";
echo "[ <a href='".ADMIN."download_cats.php?step=edit&cat_id=".$t1['download_cat_id']."'>Edytuj subkategorię</a>";
echo " | <a href='".ADMIN."downloads.php?step=add&download_cat_id=".$t1['download_cat_id']."'>Dodaj plik</a> ]";
}
echo "</div><center><table width='90%' cellspacing='0' cellpadding='0' class='tbl'>\n";
echo "<td align='left' valign='top' width='70%'>";
if ($t1['download_cat_image'] != "") {
echo "<img src='".$t1['download_cat_image']."' align='left' height='70'>";
} else {
echo "<img src='".IMAGES."subdownload_cat.gif' align='left' height='70'>";
}
echo "<table width='100%' cellspacing='0' cellpadding='0'><tr><td class='tbl2' > <strong>".$t1['download_cat_name']."</strong></td></tr>";
echo "<tr><td class='tbl1' height='100%'><span class='small'>".$t1['download_cat_description']."</span></td></tr></table>";
echo "</td></tr></table><table width='80%' cellspacing='0' cellpadding='0' class='tbl'>\n" ;
echo "<td align='center' valign='bottom' width='100%'>Inne Subkategorie: ";
$t3 = dbquery("SELECT download_cat_name,download_cat_id from ".$db_prefix."download_cats WHERE download_cat_up='".$t1['download_cat_up']."'");
$num = dbrows($t3);
$x=0;
while ($d = dbarray($t3))
{
$x++;
if ($d['download_cat_id'] != $cat_id) echo "<a href='".FUSION_SELF."?cat_id=".$d['download_cat_id']."'>".$d['download_cat_name']."</a>";
else echo "<font color='orange'><strong>".$d['download_cat_name']."</strong></font>";
if ($x != $num) echo ", ";
}
echo "</td></tr></table><br><table width='100%' cellspacing='0' cellpadding='0' class='tbl'><tr><td align='left'>";
echo "<form name='searchform' method='post' action='".BASEDIR."search.php?stype=d'>
Szukaj w Download: <input type='text' name='stext' value='$stext' class='textbox' style='width:150px'>
<input type='submit' name='search' value='Szukaj' class='button'>
</form>";
echo "</td><td align='right'>";
if ($t1['download_cat_datestamp'] !=0) echo "Data ostatniej aktualizacji: ".showdate("forumdate", $t1['download_cat_datestamp']);
echo "</td></tr></table></center>";
closetable();
$action_id = 13;
$param1 = $cat_id;
$param2 = 0;
$cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'");
$result = dbquery("SELECT * FROM ".$db_prefix."users_actions WHERE online_user=".$cond."");
if (dbrows($result) != 0) {
$result = dbquery("UPDATE ".$db_prefix."users_actions SET online_lastactive='".time()."', action_id='".$action_id."', param1='".$param1."', param2='".$param2."' WHERE online_user=".$cond."");
} else {
$name = ($userdata['user_level'] != 0 ? $userdata['user_id'] : "0");
$result = dbquery("INSERT INTO ".$db_prefix."users_actions VALUES('$name', '".USER_IP."', '".time()."', '".$action_id."', '".$param1."', '".$param2."')");
}
$result = dbquery("DELETE FROM ".$db_prefix."users_actions WHERE online_lastactive<".(time()-300)."");
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='$cat_id'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
opentable($locale['400'].": ".$data['download_cat_name']);
$rows = dbcount("(*)", "downloads", "download_cat='$cat_id'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='$cat_id' ORDER BY download_title LIMIT $rowstart,15");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span class='small'>".$locale['410']."</span>";
} else {
$new = "";
}
echo "<center><table width='520' cellspacing='0' cellpadding='0' class='tbl'><tr><td class='tbl2' width='75%'><img src='".THEME."images/bullet.gif'> <a href='".FUSION_SELF."?cat_id=$cat_id&download_id=".$data['download_id']."' target='_blank'><strong>".$data['download_title']."</strong></a> - ".$data['download_filesize']." $new</td><td class='tbl2' width='25%'> </td></tr><tr><td class='tbl1' valign='top'>\n";
if ($data['download_description'] != "") echo nl2br(parseubb($data['download_description']))."\n";
echo "</td><td class='tbl1' align='center' valign='top'>";
echo "<a href='$PHP_SELF?cat_id=$cat_id&download_id=".$data['download_id']."' target='_blank' onmouseover=\"gpe('text:<center><b>° informacje °</b><hr>Pobierz plik<b></b></center>;')\"><img src='".IMAGES."download.gif' border='0'></a>";
if ($data[download_image] != "") {
echo " <a href='".$data[download_image]."' target='_blank' onmouseover=\"gpe('text:<center><b>° informacje °</b><hr>Pokaż przykład w nowym oknie<b></b></center>;')\"><img src='".IMAGES."preview.gif' border='0'></a>";
} else {
echo "\n";
}
echo " <a href='#' onmouseover=\"gpe('text:<center><b>° informacje °</b></center><hr><b>Licencja:</b> ".$data['download_license']."<br><b>O/S:</b> ".$data['download_os']."<br><b>Wersja:</b> ".$data['download_version']."<br><b>Dodano:</b> ".showdate("%d.%m.%y", $data['download_datestamp'])."<br><b>Rozmiar:</b> ".$data['download_filesize'].";')\" class='side'>
<img src='".IMAGES."info.gif' border='0'></a>";
if ($data[download_adres] != "") {
echo " <a href='".$data[download_adres]."' target='_blank' onmouseover=\"gpe('text:<center><b>° informacje °</b><hr>Strona autora<b></b></center>;')\"><img src='".IMAGES."www.gif' border='0'></a>";
} else {
echo "\n";
}
echo "<a href='".BASEDIR."contact.php?subject=".$locale['RContact01'].$data['download_title']."&message=".$locale['RContact02'].$data['download_title'].$locale['RContact03'].$data['download_id']."' onmouseover=\"gpe('text:<center><b>° informacje °</b><hr>".$locale['RContact04']."<b></b></center>;')\"><img src='".IMAGES."error.gif' border='0'></a>";
echo "<br><span class='small'>Pobrano</span><br><b>".$data['download_count']."</b></center>";
echo "</span></td></tr></table></center><br>";
echo ($i != $numrows ? "\n" : "\n"); $i++;
}
echo "<center><table width='520' cellspacing='0' cellpadding='0'><tr><td width='50%'><a href=\"javascript:history.go(-1)\"><img src='".IMAGES."back.gif' align='left' border='0'></td><td width='50%'><a href='#Download'><img src='".IMAGES."top.gif' align='right' border='0'></a></td></tr></table></center>";
closetable();
echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,15,$rows,3,FUSION_SELF."?cat_id=$cat_id&")."\n</div>\n";
} else {
echo $locale['431']."\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
} else {
opentable($locale['400']);
echo "<center>Dział <b>Download</b> jest dostępny tylko dla <u>zarejestrowanych</u> użytkowników.<br><a href='".BASEDIR."register.php'>Zarejestruj się</a> by móc ¶ci±gać pliki.</center>";
closetable();
}
require_once "side_right.php";
require_once "footer.php";
?>
Edytowane przez JazOOn dnia 02.05.2006 19:47:09
|
|
|
|
Pieka |
Dodany dnia 02.05.2006 19:54:13
|
Postów: 19882 Pomógł: 767
v7.02.03 Data rejestracji: 23.02.2005 18:12
|
Kolega pisze posta za postem, prosbe za prosba i nawet nie jest laskaw napisac zwyklego dziekuje..
Troszke kultury.
Jestem jaki jestem
|
|
|
|
darek308 |
Dodany dnia 02.05.2006 22:08:03
|
Przedszkolak
Postów: 7
Data rejestracji: 29.04.2006 21:48
|
Dzikuje Ale bardzo zalezy mi na tym download-dzie :/ Prosze help me |
|
|