MOD-FMC Download v1.08
|
kefirek |
Dodany dnia 29.07.2009 15:53:46
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Jest to znana wersja downloadu z php fusion v6 przystosowana dla php fusion v7
Modyfikacja zmienia wygląd systemu download.
Dodana możliwość sortowania wg danych kryteriów:
- nazwa,
- ilość pobrań,
- data dodania.
Możliwość oceniania i komentowania plików.
screeny:
Z załącznika pliki wrzucamy tak jak są ustawione i potem odpalamy plik install.php
po instalacji usuwany plik z ftp
kefirek dodał/a następującą plik:
Edytowane przez kefirek dnia 04.10.2009 12:30:28
|
|
|
|
Wścibski Gość |
Dodany dnia 24.11.2024 19:21:48
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
Bochen |
Dodany dnia 29.07.2009 19:33:48
|
Bywalec
Postów: 380 Pomógł: 37
Data rejestracji: 18.03.2009 18:01
|
kefirek, tylko załącznika brak
Da się z innego systemu downloadu na ten przenieść pliki bez żadnych strat?
Prawdziwy mężczyzna nie je miodu, prawdziwy mężczyzna żuje pszczoły!
|
|
|
|
kefirek |
Dodany dnia 29.07.2009 19:43:23
|
Zaawansowany
Postów: 1191 Pomógł: 418 Ostrzeżeń: 1
v6.00.xxx Data rejestracji: 06.04.2008 21:59
|
Bochen napisał/a:
kefirek, tylko załącznika brak
Przepłaszam już jest. Nie zwarzyłem że nie było widocznie była spacja czy coś i nie dodało.
Da się z innego systemu downloadu na ten przenieść pliki bez żadnych strat?
Da się tylko ze standardowego downloadu. |
|
|
|
Bochen |
Dodany dnia 30.07.2009 00:10:56
|
Bywalec
Postów: 380 Pomógł: 37
Data rejestracji: 18.03.2009 18:01
|
Czy ktoś byłby chętny dorobić w tym możliwość dodawania podkategorii? Przydałoby się i była by wtyczka jak malina.
Prawdziwy mężczyzna nie je miodu, prawdziwy mężczyzna żuje pszczoły!
|
|
|
|
erlando |
Dodany dnia 30.09.2009 00:26:12
|
Przedszkolak
Postów: 25 Pomógł: 2
Data rejestracji: 28.08.2007 19:34
|
Widzę że długo nic się nie dzieje... Pozwolę sobie dołączyć się do prośby przedmówcy. Była by to bardzo przydatna i funkcjonalna modyfikacja , brakuje w niej właśnie tylko tej możliwości.
Cierpliwy kamień ugotuje ...
|
|
|
|
poki289 |
Dodany dnia 29.01.2010 18:08:51
|
Początkujący
Postów: 240 Pomógł: 33 Ostrzeżeń: 1
v7.02.07 Data rejestracji: 26.12.2009 05:49
|
Witam, FMC Download w standardzie wyświetla pliki jeden pod drugim, czy posiada ktoś modyfikację, która pokazuje dwa pliki w jednym rzędzie.
|
|
|
|
outchorn1 |
Dodany dnia 12.09.2010 23:25:27
|
Przedszkolak
Postów: 71 Ostrzeżeń: 3
Data rejestracji: 14.04.2010 20:16
|
Fantastycznie, że pojawił się ten mod po v7, jednak mam pewien problem z tą modyfikacją. Otóż gdy próbuje dodać nową kategorie w dziale downlaod, wyskakuje napis dodano nową kategorie, jednak wcale się ona nie pokazuje:/
Edit:
Problem załatwiony, kategorie dodaje ręcznie w bazie danych. Natomiast po instalacji modu pojawił mi się błąd w downlaod:
Notice: Undefined index: download_cat_sorting in /home/naitekik/public_html/downloads.php on line 170
Edytowane przez outchorn1 dnia 20.09.2010 07:23:17
|
|
|
|
krystian1988 |
Dodany dnia 15.10.2010 20:05:13
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Odświeżam temat po wgraniu plików w wersji v7.01.01 wyskakują następujące błędy:
Notice: Undefined variable: cat_id in /home/kris1988/domains/xxxxxxx/public_html/downloads.php on line 215
Notice: Undefined variable: sort in /home/kris1988/domains/xxxxxxx/public_html/downloads.php on line 215
A na drugą stronę nawet już wejść nie można...
Podaję kod downloads.php:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."downloads.php";
if (isset($_GET['download_id']) && !isNum($_GET['download_id'])) redirect("index.php");
if (isset($_GET['download_id'])) {
$res = 0;
if ($data = dbarray(dbquery("SELECT download_url,download_cat FROM ".$db_prefix."downloads WHERE download_id='".$_GET['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='".$_GET['download_id']."'");
redirect($data['download_url']);
}
}
if ($res == 0) redirect(BASEDIR."downloads.php");
}
if (!isset($_GET['cat_id'])) {
opentable($locale['400']);
echo "<br>";
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE ".groupaccess('download_cat_access')." ORDER BY download_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "<br>";
$num = dbcount("(download_cat)", DB_DOWNLOADS, "download_cat='".$data['download_cat_id']."'");
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption' colspan='2'>".$data['download_cat_name']."</td>
</tr>";
if ($data['download_cat_description']) {
echo "<tr>
<td class='tbl1' colspan='2' calign='top' style='padding:5px;'>";
echo "<small>".nl2br(stripinput($data['download_cat_description']))."</small>";
echo "</td>
</tr>";
}
echo "<tr>
<td class='tbl2' align='center' width='50%'><small>".$locale['D001'].$num."</small></td>
<td class='tbl2' align='center' width='50%'><a href='".FUSION_SELF."?cat_id=".$data['download_cat_id']."&sort=1'><small>".$locale['D002']."</small></a></td>
</tr>
</table>";
$counter++;
}
echo "<br>";
} else {
echo "<center><br>\n".$locale['430']."<br><br>\n</center>\n";
}
closetable();
} else {
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
if (isset($_GET['info_id']) && isnum($_GET['info_id'])) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_id='".$_GET['info_id']."'");
while ($data = dbarray($result)) {
opentable($locale['400']." » ".$data['download_title']);
echo "<br><br><table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'><tr>
<td colspan='3' class='forum-caption'>".$locale['D003']."</td>
</tr><tr>
<td class='tbl1' width='200' align='center' valign='middle' rowspan='8'>";
if ($data['download_screen']) {
echo "<img src='".$data['download_screen']."' alt='' width='160px' height='120px'>";
echo "<br><br><small>[ <a href='".$data['download_screen']."' target='_blank'>".$locale['D004']."</a> ]</small></td>";
} else {
echo "<img src='images/nonscreen.gif' alt='' width='160px' height='120px'>";
echo "<br><br><small>[ ".$locale['D004']." ]</small></td>";
}
echo "<td class='tbl2' width='1%' nowrap><b>".$locale['D005']."</b></td>
<td class='tbl1'>".$data['download_title']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D006']."</b></td>
<td class='tbl1'>".$data['download_author']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D007']."</b></td>
<td class='tbl1'>".$data['download_filesize']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D008']."</b></td>
<td class='tbl1'>".$data['download_license']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D009']."</b></td>
<td class='tbl1'>".showdate("%d.%m.%Y %H:%M:%S", $data['download_datestamp'])."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D010']."</b></td>
<td class='tbl1'>".$data['download_count']."</td>
</tr><tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D011']."</b></td>
<td class='tbl1'>".$data['download_os']."</td>
</tr><tr>
<td class='tbl2' align='center' height='30px' colspan='2'><small>";
if ($data['download_copyright']) {
echo $data['download_copyright'];
} else {
echo " ";
}
echo "</small></td>";
echo "</tr></table>";
echo "<br>";
if ($data['download_description']) {
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption'>".$locale['D012']."</td>
</tr>
<tr>
<td class='tbl1'>".nl2br(stripslashes($data['download_description']))."</td>
</tr>
</table>";
echo "<br>";
}
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'><tr>
<td class='forum-caption' colspan='3'>".$locale['D013']."</td>
</tr><tr>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&download_id=".$data['download_id']."' target='_blank'>Pobierz Plik</a></td>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=rate'>Oceń Plik</a></td>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=comment'>Skomentuj Plik</a></td>
</tr></table><br><br>";
closetable();
if (isset($_GET['act']) && $_GET['act'] == "rate") {
showratings("D",$_GET['info_id'],FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$_GET['info_id']."&act=rate");
}
if (isset($_GET['act']) && $_GET['act'] == "comment") {
showcomments("D",DB_DOWNLOADS,"download_id",$_GET['info_id'],FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$_GET['info_id']."&act=comment");
}
}
} else {
$res = 0;
if (!isNum($_GET['cat_id'])) redirect(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
opentable($locale['400']." - ".$cdata['download_cat_name']);
echo "<br>";
echo "<table width='70%' align='center' cellspacing='1' cellpadding='1' class='tbl-border'>";
echo "<tr>";
echo "<td align='center' width='33%' class='".(FUSION_QUERY == "cat_id=".$_GET['cat_id'] || $_GET['sort'] == 1 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo (FUSION_QUERY == "cat_id=".$_GET['cat_id'] || $_GET['sort'] == 1 ? "<b>".$locale['D014']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=1'>".$locale['D014']."</a>")."</span></td>\n";
echo "<td align='center' width='33%' class='".($_GET['sort'] == 3 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo ($_GET['sort'] == 3 ? "<b>".$locale['D015']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=3'>".$locale['D015']."</a>")."</span></td>\n";
echo "<td align='center' width='33%' class='".($_GET['sort'] == 2 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo ($_GET['sort'] == 2 ? "<b>".$locale['D016']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=2'>".$locale['D016']."</a>")."</span></td>\n";
echo "</tr></table><br>";
$rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if (!isset($_GET['sort']) || !isNum($_GET['sort'])) $_GET['sort'] = 0;
$sorting = $cdata['download_cat_sorting'];
if ($_GET['sort'] == 1) $sorting = "download_title ASC";
if ($_GET['sort'] == 2) $sorting = "download_count DESC";
if ($_GET['sort'] == 3) $sorting = "download_datestamp DESC, download_title ASC";
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='".$_GET['cat_id']."' ORDER BY $sorting LIMIT $rowstart,20");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span style='font-size:8px;'>".$locale['410']."</span>";
} else {
$new = "";
}
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption' colspan='4'>".$data['download_title']." $new</td>
</tr>";
if ($data['download_description']) {
echo "<tr>
<td class='tbl1' colspan='4' calign='top' style='padding:5px;'>";
echo "<small>".nl2br(stripslashes($data['download_description']))."</small>";
echo "</td>
</tr>";
}
echo "<tr>
<td class='tbl2' colspan='2' align='center'><small>".showdate("%d.%m.%Y %H:%M:%S", $data['download_datestamp'])."</small></td>
<td class='tbl2' colspan='1' align='center'><small>".$locale['D017'].$data['download_count']."</small></td>
<td class='tbl2' colspan='1' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."'><small>".$locale['D018']."</small></a></td>
</tr>
<tr>
<td class='tbl2' align='center' width='25%'><small>".$data['download_filesize']."</small></td>
<td class='tbl2' align='center' width='25%'><small>".$data['download_license']."</small></td>";
$wynik = dbquery("SELECT SUM(rating_vote) FROM ".$db_prefix."ratings WHERE rating_type='D' AND rating_item_id='".$data['download_id']."'");
$info = dbresult($wynik,0);
$num_rating = dbcount("(rating_vote)", DB_RATINGS, "rating_type='D' AND rating_item_id='".$data['download_id']."'");
$wyn_rating = ($num_rating ? $info / $num_rating : 0);
echo "<td class='tbl2' align='center' width='25%'><small>".$locale['D019']."<img src='".IMAGES."rate/".ceil($wyn_rating).".gif' alt='' style='vertical-align:middle;' title='".$locale['D019'].ceil($wyn_rating)."'></small></td>
<td class='tbl2' align='center' width='25%'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=comment'><small>".$locale['D020']."</small></a></td>
</tr>
</table>";
echo ($i != $numrows ? "<br>" : "\n"); $i++;
}
echo "<br>";
closetable();
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?cat_id=$cat_id&sort=$sort&")."\n</div>\n";
} else {
echo $locale['431']."\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
}
require_once THEMES."templates/footer.php";
?>
Dziękuję za pomoc.
EDIT://
Trochę popatrzyłem w kod i jak na razie działa. Jeżeli mógł by ktoś sprawdzić czy jest jest dobry to daję kod downloads.php:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."downloads.php";
if (isset($_GET['download_id']) && !isNum($_GET['download_id'])) redirect("index.php");
if (isset($_GET['download_id'])) {
$res = 0;
if ($data = dbarray(dbquery("SELECT download_url,download_cat FROM ".$db_prefix."downloads WHERE download_id='".$_GET['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='".$_GET['download_id']."'");
redirect($data['download_url']);
}
}
if ($res == 0) redirect(BASEDIR."downloads.php");
}
if (!isset($_GET['cat_id'])) {
opentable($locale['400']);
echo "<br>";
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE ".groupaccess('download_cat_access')." ORDER BY download_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "<br>";
$num = dbcount("(download_cat)", DB_DOWNLOADS, "download_cat='".$data['download_cat_id']."'");
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption' colspan='2'>".$data['download_cat_name']."</td>
</tr>";
if ($data['download_cat_description']) {
echo "<tr>
<td class='tbl1' colspan='2' calign='top' style='padding:5px;'>";
echo "<small>".nl2br(stripinput($data['download_cat_description']))."</small>";
echo "</td>
</tr>";
}
echo "<tr>
<td class='tbl2' align='center' width='50%'><small>".$locale['D001'].$num."</small></td>
<td class='tbl2' align='center' width='50%'><a href='".FUSION_SELF."?cat_id=".$data['download_cat_id']."&sort=1'><small>".$locale['D002']."</small></a></td>
</tr>
</table>";
$counter++;
}
echo "<br>";
} else {
echo "<center><br>\n".$locale['430']."<br><br>\n</center>\n";
}
closetable();
} else {
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
if (isset($_GET['info_id']) && isnum($_GET['info_id'])) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_id='".$_GET['info_id']."'");
while ($data = dbarray($result)) {
opentable($locale['400']." » ".$data['download_title']);
echo "<br><br><table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'><tr>
<td colspan='3' class='forum-caption'>".$locale['D003']."</td>
</tr><tr>
<td class='tbl1' width='200' align='center' valign='middle' rowspan='8'>";
if ($data['download_screen']) {
echo "<img src='".$data['download_screen']."' alt='' width='160px' height='120px'>";
echo "<br><br><small>[ <a href='".$data['download_screen']."' target='_blank'>".$locale['D004']."</a> ]</small></td>";
} else {
echo "<img src='images/nonscreen.gif' alt='' width='160px' height='120px'>";
echo "<br><br><small>[ ".$locale['D004']." ]</small></td>";
}
echo "<td class='tbl2' width='1%' nowrap><b>".$locale['D005']."</b></td>
<td class='tbl1'>".$data['download_title']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D006']."</b></td>
<td class='tbl1'>".$data['download_author']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D007']."</b></td>
<td class='tbl1'>".$data['download_filesize']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D008']."</b></td>
<td class='tbl1'>".$data['download_license']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D009']."</b></td>
<td class='tbl1'>".showdate("%d.%m.%Y %H:%M:%S", $data['download_datestamp'])."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D010']."</b></td>
<td class='tbl1'>".$data['download_count']."</td>
</tr><tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D011']."</b></td>
<td class='tbl1'>".$data['download_os']."</td>
</tr><tr>
<td class='tbl2' align='center' height='30px' colspan='2'><small>";
if ($data['download_copyright']) {
echo $data['download_copyright'];
} else {
echo " ";
}
echo "</small></td>";
echo "</tr></table>";
echo "<br>";
if ($data['download_description']) {
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption'>".$locale['D012']."</td>
</tr>
<tr>
<td class='tbl1'>".nl2br(stripslashes($data['download_description']))."</td>
</tr>
</table>";
echo "<br>";
}
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'><tr>
<td class='forum-caption' colspan='3'>".$locale['D013']."</td>
</tr><tr>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&download_id=".$data['download_id']."' target='_blank'>Pobierz Plik</a></td>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=rate'>Oceń Plik</a></td>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=comment'>Skomentuj Plik</a></td>
</tr></table><br><br>";
closetable();
if (isset($_GET['act']) && $_GET['act'] == "rate") {
showratings("D",$_GET['info_id'],FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$_GET['info_id']."&act=rate");
}
if (isset($_GET['act']) && $_GET['act'] == "comment") {
showcomments("D",DB_DOWNLOADS,"download_id",$_GET['info_id'],FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$_GET['info_id']."&act=comment");
}
}
} else {
$res = 0;
if (!isNum($_GET['cat_id'])) redirect(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
opentable($locale['400']." - ".$cdata['download_cat_name']);
echo "<br>";
echo "<table width='70%' align='center' cellspacing='1' cellpadding='1' class='tbl-border'>";
echo "<tr>";
echo "<td align='center' width='33%' class='".(FUSION_QUERY == "cat_id=".$_GET['cat_id'] || $_GET['sort'] == 1 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo (FUSION_QUERY == "cat_id=".$_GET['cat_id'] || $_GET['sort'] == 1 ? "<b>".$locale['D014']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=1'>".$locale['D014']."</a>")."</span></td>\n";
echo "<td align='center' width='33%' class='".($_GET['sort'] == 3 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo ($_GET['sort'] == 3 ? "<b>".$locale['D015']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=3'>".$locale['D015']."</a>")."</span></td>\n";
echo "<td align='center' width='33%' class='".($_GET['sort'] == 2 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo ($_GET['sort'] == 2 ? "<b>".$locale['D016']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=2'>".$locale['D016']."</a>")."</span></td>\n";
echo "</tr></table><br>";
$rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if (!isset($_GET['sort']) || !isNum($_GET['sort'])) $_GET['sort'] = 0;
$sorting = $cdata['download_cat_sorting'];
if ($_GET['sort'] == 1) $sorting = "download_title ASC";
if ($_GET['sort'] == 2) $sorting = "download_count DESC";
if ($_GET['sort'] == 3) $sorting = "download_datestamp DESC, download_title ASC";
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='".$_GET['cat_id']."' ORDER BY $sorting LIMIT ".$_GET['rowstart'].",".$settings['downloads_per_page']);
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span style='font-size:8px;'>".$locale['410']."</span>";
} else {
$new = "";
}
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption' colspan='4'>".$data['download_title']." $new</td>
</tr>";
if ($data['download_description']) {
echo "<tr>
<td class='tbl1' colspan='4' calign='top' style='padding:5px;'>";
echo "<small>".nl2br(stripslashes($data['download_description']))."</small>";
echo "</td>
</tr>";
}
echo "<tr>
<td class='tbl2' colspan='2' align='center'><small>".showdate("%d.%m.%Y %H:%M:%S", $data['download_datestamp'])."</small></td>
<td class='tbl2' colspan='1' align='center'><small>".$locale['D017'].$data['download_count']."</small></td>
<td class='tbl2' colspan='1' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."'><small>".$locale['D018']."</small></a></td>
</tr>
<tr>
<td class='tbl2' align='center' width='25%'><small>".$data['download_filesize']."</small></td>
<td class='tbl2' align='center' width='25%'><small>".$data['download_license']."</small></td>";
$wynik = dbquery("SELECT SUM(rating_vote) FROM ".$db_prefix."ratings WHERE rating_type='D' AND rating_item_id='".$data['download_id']."'");
$info = dbresult($wynik,0);
$num_rating = dbcount("(rating_vote)", DB_RATINGS, "rating_type='D' AND rating_item_id='".$data['download_id']."'");
$wyn_rating = ($num_rating ? $info / $num_rating : 0);
echo "<td class='tbl2' align='center' width='25%'><small>".$locale['D019']."<img src='".IMAGES."rate/".ceil($wyn_rating).".gif' alt='' style='vertical-align:middle;' title='".$locale['D019'].ceil($wyn_rating)."'></small></td>
<td class='tbl2' align='center' width='25%'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=comment'><small>".$locale['D020']."</small></a></td>
</tr>
</table>";
echo ($i != $numrows ? "<br>" : "\n"); $i++;
}
echo "<br>";
closetable();
if ($rows > 15) { echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 15, $rows, 3,FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=".$_GET['sort']."&")."\n</div>\n"; }
} else {
echo $locale['431']."\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
}
require_once THEMES."templates/footer.php";
?>
Testowane na PHP-Fusion v7.01.01.
Edytowane przez krystian1988 dnia 15.10.2010 20:56:51
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
Leszektl |
Dodany dnia 02.02.2011 17:10:13
|
Przedszkolak
Postów: 12
Data rejestracji: 30.01.2011 18:28
|
Mam pytanie co do tej modyfikacji, jak ustawić aby po wejściu w kategorie automatycznie wyświetlało modyfikacje wg daty dodania a nie jej nazwy? Bo teraz wygląda to tak, że muszę ręcznie klikać na opcję "Data dodania".
Edytowane przez Drecha dnia 02.02.2011 17:11:27
|
|
|
|
Sony |
Dodany dnia 03.02.2011 20:16:13
|
Początkujący
Postów: 253 Pomógł: 19 Ostrzeżeń: 1
v7.02.06 Data rejestracji: 19.04.2008 16:21
|
A w Panelu Administracyjnym w Kategorie downloadu nie ma opcji sortowania plików?
Jeśli nie, to znajdź:
if ($_GET['sort'] == 1) $sorting = "download_title ASC";
if ($_GET['sort'] == 2) $sorting = "download_count DESC";
if ($_GET['sort'] == 3) $sorting = "download_datestamp DESC, download_title ASC";
I pozmieniaj sobie 1 na 3 i 3 na 1. Gotowe.
Edytowane przez Sony dnia 03.02.2011 20:20:48
tjaa
|
|
|
|
Leszektl |
Dodany dnia 04.02.2011 08:55:06
|
Przedszkolak
Postów: 12
Data rejestracji: 30.01.2011 18:28
|
Dziękuje, działa |
|
|
|
dworak21 |
Dodany dnia 12.05.2011 22:45:18
|
Przedszkolak
Postów: 19 Ostrzeżeń: 2
v7.00.06 Data rejestracji: 23.02.2010 12:12
ZBANOWANY: Dożywotnio
|
Wiadomość doklejona:
krystian1988 napisał/a:
Odświeżam temat po wgraniu plików w wersji v7.01.01 wyskakują następujące błędy:
Notice: Undefined variable: cat_id in /home/kris1988/domains/xxxxxxx/public_html/downloads.php on line 215
Notice: Undefined variable: sort in /home/kris1988/domains/xxxxxxx/public_html/downloads.php on line 215
A na drugą stronę nawet już wejść nie można...
Podaję kod downloads.php:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."downloads.php";
if (isset($_GET['download_id']) && !isNum($_GET['download_id'])) redirect("index.php");
if (isset($_GET['download_id'])) {
$res = 0;
if ($data = dbarray(dbquery("SELECT download_url,download_cat FROM ".$db_prefix."downloads WHERE download_id='".$_GET['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='".$_GET['download_id']."'");
redirect($data['download_url']);
}
}
if ($res == 0) redirect(BASEDIR."downloads.php");
}
if (!isset($_GET['cat_id'])) {
opentable($locale['400']);
echo "<br>";
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE ".groupaccess('download_cat_access')." ORDER BY download_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "<br>";
$num = dbcount("(download_cat)", DB_DOWNLOADS, "download_cat='".$data['download_cat_id']."'");
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption' colspan='2'>".$data['download_cat_name']."</td>
</tr>";
if ($data['download_cat_description']) {
echo "<tr>
<td class='tbl1' colspan='2' calign='top' style='padding:5px;'>";
echo "<small>".nl2br(stripinput($data['download_cat_description']))."</small>";
echo "</td>
</tr>";
}
echo "<tr>
<td class='tbl2' align='center' width='50%'><small>".$locale['D001'].$num."</small></td>
<td class='tbl2' align='center' width='50%'><a href='".FUSION_SELF."?cat_id=".$data['download_cat_id']."&sort=1'><small>".$locale['D002']."</small></a></td>
</tr>
</table>";
$counter++;
}
echo "<br>";
} else {
echo "<center><br>\n".$locale['430']."<br><br>\n</center>\n";
}
closetable();
} else {
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
if (isset($_GET['info_id']) && isnum($_GET['info_id'])) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_id='".$_GET['info_id']."'");
while ($data = dbarray($result)) {
opentable($locale['400']." » ".$data['download_title']);
echo "<br><br><table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'><tr>
<td colspan='3' class='forum-caption'>".$locale['D003']."</td>
</tr><tr>
<td class='tbl1' width='200' align='center' valign='middle' rowspan='8'>";
if ($data['download_screen']) {
echo "<img src='".$data['download_screen']."' alt='' width='160px' height='120px'>";
echo "<br><br><small>[ <a href='".$data['download_screen']."' target='_blank'>".$locale['D004']."</a> ]</small></td>";
} else {
echo "<img src='images/nonscreen.gif' alt='' width='160px' height='120px'>";
echo "<br><br><small>[ ".$locale['D004']." ]</small></td>";
}
echo "<td class='tbl2' width='1%' nowrap><b>".$locale['D005']."</b></td>
<td class='tbl1'>".$data['download_title']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D006']."</b></td>
<td class='tbl1'>".$data['download_author']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D007']."</b></td>
<td class='tbl1'>".$data['download_filesize']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D008']."</b></td>
<td class='tbl1'>".$data['download_license']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D009']."</b></td>
<td class='tbl1'>".showdate("%d.%m.%Y %H:%M:%S", $data['download_datestamp'])."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D010']."</b></td>
<td class='tbl1'>".$data['download_count']."</td>
</tr><tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D011']."</b></td>
<td class='tbl1'>".$data['download_os']."</td>
</tr><tr>
<td class='tbl2' align='center' height='30px' colspan='2'><small>";
if ($data['download_copyright']) {
echo $data['download_copyright'];
} else {
echo " ";
}
echo "</small></td>";
echo "</tr></table>";
echo "<br>";
if ($data['download_description']) {
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption'>".$locale['D012']."</td>
</tr>
<tr>
<td class='tbl1'>".nl2br(stripslashes($data['download_description']))."</td>
</tr>
</table>";
echo "<br>";
}
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'><tr>
<td class='forum-caption' colspan='3'>".$locale['D013']."</td>
</tr><tr>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&download_id=".$data['download_id']."' target='_blank'>Pobierz Plik</a></td>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=rate'>Oceń Plik</a></td>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=comment'>Skomentuj Plik</a></td>
</tr></table><br><br>";
closetable();
if (isset($_GET['act']) && $_GET['act'] == "rate") {
showratings("D",$_GET['info_id'],FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$_GET['info_id']."&act=rate");
}
if (isset($_GET['act']) && $_GET['act'] == "comment") {
showcomments("D",DB_DOWNLOADS,"download_id",$_GET['info_id'],FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$_GET['info_id']."&act=comment");
}
}
} else {
$res = 0;
if (!isNum($_GET['cat_id'])) redirect(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
opentable($locale['400']." - ".$cdata['download_cat_name']);
echo "<br>";
echo "<table width='70%' align='center' cellspacing='1' cellpadding='1' class='tbl-border'>";
echo "<tr>";
echo "<td align='center' width='33%' class='".(FUSION_QUERY == "cat_id=".$_GET['cat_id'] || $_GET['sort'] == 1 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo (FUSION_QUERY == "cat_id=".$_GET['cat_id'] || $_GET['sort'] == 1 ? "<b>".$locale['D014']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=1'>".$locale['D014']."</a>")."</span></td>\n";
echo "<td align='center' width='33%' class='".($_GET['sort'] == 3 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo ($_GET['sort'] == 3 ? "<b>".$locale['D015']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=3'>".$locale['D015']."</a>")."</span></td>\n";
echo "<td align='center' width='33%' class='".($_GET['sort'] == 2 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo ($_GET['sort'] == 2 ? "<b>".$locale['D016']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=2'>".$locale['D016']."</a>")."</span></td>\n";
echo "</tr></table><br>";
$rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."'");
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
if (!isset($_GET['sort']) || !isNum($_GET['sort'])) $_GET['sort'] = 0;
$sorting = $cdata['download_cat_sorting'];
if ($_GET['sort'] == 1) $sorting = "download_title ASC";
if ($_GET['sort'] == 2) $sorting = "download_count DESC";
if ($_GET['sort'] == 3) $sorting = "download_datestamp DESC, download_title ASC";
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='".$_GET['cat_id']."' ORDER BY $sorting LIMIT $rowstart,20");
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span style='font-size:8px;'>".$locale['410']."</span>";
} else {
$new = "";
}
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption' colspan='4'>".$data['download_title']." $new</td>
</tr>";
if ($data['download_description']) {
echo "<tr>
<td class='tbl1' colspan='4' calign='top' style='padding:5px;'>";
echo "<small>".nl2br(stripslashes($data['download_description']))."</small>";
echo "</td>
</tr>";
}
echo "<tr>
<td class='tbl2' colspan='2' align='center'><small>".showdate("%d.%m.%Y %H:%M:%S", $data['download_datestamp'])."</small></td>
<td class='tbl2' colspan='1' align='center'><small>".$locale['D017'].$data['download_count']."</small></td>
<td class='tbl2' colspan='1' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."'><small>".$locale['D018']."</small></a></td>
</tr>
<tr>
<td class='tbl2' align='center' width='25%'><small>".$data['download_filesize']."</small></td>
<td class='tbl2' align='center' width='25%'><small>".$data['download_license']."</small></td>";
$wynik = dbquery("SELECT SUM(rating_vote) FROM ".$db_prefix."ratings WHERE rating_type='D' AND rating_item_id='".$data['download_id']."'");
$info = dbresult($wynik,0);
$num_rating = dbcount("(rating_vote)", DB_RATINGS, "rating_type='D' AND rating_item_id='".$data['download_id']."'");
$wyn_rating = ($num_rating ? $info / $num_rating : 0);
echo "<td class='tbl2' align='center' width='25%'><small>".$locale['D019']."<img src='".IMAGES."rate/".ceil($wyn_rating).".gif' alt='' style='vertical-align:middle;' title='".$locale['D019'].ceil($wyn_rating)."'></small></td>
<td class='tbl2' align='center' width='25%'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=comment'><small>".$locale['D020']."</small></a></td>
</tr>
</table>";
echo ($i != $numrows ? "<br>" : "\n"); $i++;
}
echo "<br>";
closetable();
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?cat_id=$cat_id&sort=$sort&")."\n</div>\n";
} else {
echo $locale['431']."\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
}
require_once THEMES."templates/footer.php";
?>
Dziękuję za pomoc.
EDIT://
Trochę popatrzyłem w kod i jak na razie działa. Jeżeli mógł by ktoś sprawdzić czy jest jest dobry to daję kod downloads.php:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."downloads.php";
if (isset($_GET['download_id']) && !isNum($_GET['download_id'])) redirect("index.php");
if (isset($_GET['download_id'])) {
$res = 0;
if ($data = dbarray(dbquery("SELECT download_url,download_cat FROM ".$db_prefix."downloads WHERE download_id='".$_GET['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='".$_GET['download_id']."'");
redirect($data['download_url']);
}
}
if ($res == 0) redirect(BASEDIR."downloads.php");
}
if (!isset($_GET['cat_id'])) {
opentable($locale['400']);
echo "<br>";
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE ".groupaccess('download_cat_access')." ORDER BY download_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "<br>";
$num = dbcount("(download_cat)", DB_DOWNLOADS, "download_cat='".$data['download_cat_id']."'");
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption' colspan='2'>".$data['download_cat_name']."</td>
</tr>";
if ($data['download_cat_description']) {
echo "<tr>
<td class='tbl1' colspan='2' calign='top' style='padding:5px;'>";
echo "<small>".nl2br(stripinput($data['download_cat_description']))."</small>";
echo "</td>
</tr>";
}
echo "<tr>
<td class='tbl2' align='center' width='50%'><small>".$locale['D001'].$num."</small></td>
<td class='tbl2' align='center' width='50%'><a href='".FUSION_SELF."?cat_id=".$data['download_cat_id']."&sort=1'><small>".$locale['D002']."</small></a></td>
</tr>
</table>";
$counter++;
}
echo "<br>";
} else {
echo "<center><br>\n".$locale['430']."<br><br>\n</center>\n";
}
closetable();
} else {
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
if (isset($_GET['info_id']) && isnum($_GET['info_id'])) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_id='".$_GET['info_id']."'");
while ($data = dbarray($result)) {
opentable($locale['400']." » ".$data['download_title']);
echo "<br><br><table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'><tr>
<td colspan='3' class='forum-caption'>".$locale['D003']."</td>
</tr><tr>
<td class='tbl1' width='200' align='center' valign='middle' rowspan='8'>";
if ($data['download_screen']) {
echo "<img src='".$data['download_screen']."' alt='' width='160px' height='120px'>";
echo "<br><br><small>[ <a href='".$data['download_screen']."' target='_blank'>".$locale['D004']."</a> ]</small></td>";
} else {
echo "<img src='images/nonscreen.gif' alt='' width='160px' height='120px'>";
echo "<br><br><small>[ ".$locale['D004']." ]</small></td>";
}
echo "<td class='tbl2' width='1%' nowrap><b>".$locale['D005']."</b></td>
<td class='tbl1'>".$data['download_title']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D006']."</b></td>
<td class='tbl1'>".$data['download_author']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D007']."</b></td>
<td class='tbl1'>".$data['download_filesize']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D008']."</b></td>
<td class='tbl1'>".$data['download_license']."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D009']."</b></td>
<td class='tbl1'>".showdate("%d.%m.%Y %H:%M:%S", $data['download_datestamp'])."</td>
</tr>
<tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D010']."</b></td>
<td class='tbl1'>".$data['download_count']."</td>
</tr><tr>
<td class='tbl2'width='1%' nowrap><b>".$locale['D011']."</b></td>
<td class='tbl1'>".$data['download_os']."</td>
</tr><tr>
<td class='tbl2' align='center' height='30px' colspan='2'><small>";
if ($data['download_copyright']) {
echo $data['download_copyright'];
} else {
echo " ";
}
echo "</small></td>";
echo "</tr></table>";
echo "<br>";
if ($data['download_description']) {
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption'>".$locale['D012']."</td>
</tr>
<tr>
<td class='tbl1'>".nl2br(stripslashes($data['download_description']))."</td>
</tr>
</table>";
echo "<br>";
}
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'><tr>
<td class='forum-caption' colspan='3'>".$locale['D013']."</td>
</tr><tr>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&download_id=".$data['download_id']."' target='_blank'>Pobierz Plik</a></td>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=rate'>Oceń Plik</a></td>
<td class='tbl1' width='33%' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=comment'>Skomentuj Plik</a></td>
</tr></table><br><br>";
closetable();
if (isset($_GET['act']) && $_GET['act'] == "rate") {
showratings("D",$_GET['info_id'],FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$_GET['info_id']."&act=rate");
}
if (isset($_GET['act']) && $_GET['act'] == "comment") {
showcomments("D",DB_DOWNLOADS,"download_id",$_GET['info_id'],FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$_GET['info_id']."&act=comment");
}
}
} else {
$res = 0;
if (!isNum($_GET['cat_id'])) redirect(FUSION_SELF);
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE download_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
opentable($locale['400']." - ".$cdata['download_cat_name']);
echo "<br>";
echo "<table width='70%' align='center' cellspacing='1' cellpadding='1' class='tbl-border'>";
echo "<tr>";
echo "<td align='center' width='33%' class='".(FUSION_QUERY == "cat_id=".$_GET['cat_id'] || $_GET['sort'] == 1 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo (FUSION_QUERY == "cat_id=".$_GET['cat_id'] || $_GET['sort'] == 1 ? "<b>".$locale['D014']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=1'>".$locale['D014']."</a>")."</span></td>\n";
echo "<td align='center' width='33%' class='".($_GET['sort'] == 3 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo ($_GET['sort'] == 3 ? "<b>".$locale['D015']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=3'>".$locale['D015']."</a>")."</span></td>\n";
echo "<td align='center' width='33%' class='".($_GET['sort'] == 2 ? "tbl1" : "tbl2")."'><span class='small'>\n";
echo ($_GET['sort'] == 2 ? "<b>".$locale['D016']."</b>" : "<a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=2'>".$locale['D016']."</a>")."</span></td>\n";
echo "</tr></table><br>";
$rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if (!isset($_GET['sort']) || !isNum($_GET['sort'])) $_GET['sort'] = 0;
$sorting = $cdata['download_cat_sorting'];
if ($_GET['sort'] == 1) $sorting = "download_title ASC";
if ($_GET['sort'] == 2) $sorting = "download_count DESC";
if ($_GET['sort'] == 3) $sorting = "download_datestamp DESC, download_title ASC";
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_cat='".$_GET['cat_id']."' ORDER BY $sorting LIMIT ".$_GET['rowstart'].",".$settings['downloads_per_page']);
$numrows = dbrows($result); $i = 1;
while ($data = dbarray($result)) {
if ($data['download_datestamp']+604800 > time()+($settings['timeoffset']*3600)) {
$new = " <span style='font-size:8px;'>".$locale['410']."</span>";
} else {
$new = "";
}
echo "<table border='0' width='95%' align='center' cellspacing='1' cellpadding='0' class='tbl-border'>
<tr>
<td class='forum-caption' colspan='4'>".$data['download_title']." $new</td>
</tr>";
if ($data['download_description']) {
echo "<tr>
<td class='tbl1' colspan='4' calign='top' style='padding:5px;'>";
echo "<small>".nl2br(stripslashes($data['download_description']))."</small>";
echo "</td>
</tr>";
}
echo "<tr>
<td class='tbl2' colspan='2' align='center'><small>".showdate("%d.%m.%Y %H:%M:%S", $data['download_datestamp'])."</small></td>
<td class='tbl2' colspan='1' align='center'><small>".$locale['D017'].$data['download_count']."</small></td>
<td class='tbl2' colspan='1' align='center'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."'><small>".$locale['D018']."</small></a></td>
</tr>
<tr>
<td class='tbl2' align='center' width='25%'><small>".$data['download_filesize']."</small></td>
<td class='tbl2' align='center' width='25%'><small>".$data['download_license']."</small></td>";
$wynik = dbquery("SELECT SUM(rating_vote) FROM ".$db_prefix."ratings WHERE rating_type='D' AND rating_item_id='".$data['download_id']."'");
$info = dbresult($wynik,0);
$num_rating = dbcount("(rating_vote)", DB_RATINGS, "rating_type='D' AND rating_item_id='".$data['download_id']."'");
$wyn_rating = ($num_rating ? $info / $num_rating : 0);
echo "<td class='tbl2' align='center' width='25%'><small>".$locale['D019']."<img src='".IMAGES."rate/".ceil($wyn_rating).".gif' alt='' style='vertical-align:middle;' title='".$locale['D019'].ceil($wyn_rating)."'></small></td>
<td class='tbl2' align='center' width='25%'><a href='".FUSION_SELF."?cat_id=".$_GET['cat_id']."&info_id=".$data['download_id']."&act=comment'><small>".$locale['D020']."</small></a></td>
</tr>
</table>";
echo ($i != $numrows ? "<br>" : "\n"); $i++;
}
echo "<br>";
closetable();
if ($rows > 15) { echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 15, $rows, 3,FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=".$_GET['sort']."&")."\n</div>\n"; }
} else {
echo $locale['431']."\n";
closetable();
}
}
}
if ($res == 0) redirect(FUSION_SELF);
}
}
require_once THEMES."templates/footer.php";
?>
Testowane na PHP-Fusion v7.01.01.
Mam ten sam problem u mnie dalej wyświetla błąd:
Notice: Undefined index: rowstart in /home/tibiaworld/domains/strefadisco.pl/public_html/Pliki.html on line 215
Linia 215 wygląda tak:
if ($rows > 15) { echo "<div align='center' style='margin-top:5px;'>\n".makepagenav($_GET['rowstart'], 15, $rows, 3,FUSION_SELF."?cat_id=".$_GET['cat_id']."&sort=".$_GET['sort']."&")."\n</div>\n"; }
Błąd tylko pojawia się jak 1 raz wchodzę w daną kategorię a jak przejdę na na następna stronę w danej kategorii to błąd znika i mogę znów wrócić na 1 i błędu nie ma ale za każdym razem jest po wejściu w dział.
Edytowane przez dworak21 dnia 12.05.2011 23:26:52
|
|
|
|
krystian1988 |
Dodany dnia 13.05.2011 10:00:53
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Jaką masz wersję PHP-Fusion? Jeśli najnowszą to postaram się wstawić poprawiony kod.
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
dworak21 |
Dodany dnia 13.05.2011 19:34:31
|
Przedszkolak
Postów: 19 Ostrzeżeń: 2
v7.00.06 Data rejestracji: 23.02.2010 12:12
ZBANOWANY: Dożywotnio
|
Moja wersja to v7.00.06. |
|
|
|
krystian1988 |
Dodany dnia 14.05.2011 05:39:17
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Jak najbardziej oryginalny plik działa z tą wersją.
Jest w tym poście: http://www.php-fu...ost_130236
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
dworak21 |
Dodany dnia 14.05.2011 15:05:28
|
Przedszkolak
Postów: 19 Ostrzeżeń: 2
v7.00.06 Data rejestracji: 23.02.2010 12:12
ZBANOWANY: Dożywotnio
|
Niestety podmieniłem plik na oryginalny i dalej to samo zobacz sam: http://strefadisc...amp;sort=1
A także proszę o pomoc jak zrobić żeby tu automatycznie dodawało reklamy Google: http://strefadisc...fo_id=3268
a także usunąć niepotrzebne dane:
Licencja
Autor
Platforma
Z góry dziękuje
Edytowane przez Pieka dnia 25.05.2011 18:48:06
|
|
|
|
krystian1988 |
Dodany dnia 15.05.2011 09:35:54
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
To coś masz źle na pewno.
Sprawdzałem specjalnie na tej wersji PHP-Fusion i działa oryginał.
Proszę zobacz: http://www.fuzja-...nloads.php
Edytowane przez krystian1988 dnia 15.05.2011 09:49:30
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
dworak21 |
Dodany dnia 25.05.2011 18:48:48
|
Przedszkolak
Postów: 19 Ostrzeżeń: 2
v7.00.06 Data rejestracji: 23.02.2010 12:12
ZBANOWANY: Dożywotnio
|
Wgrałem pliki wszystkie oryginalne i teraz pokazuje mi dwa błędy i jak klikam na 2 stronę to wraca do kategorii downloadu linia 215 wygląda tak:
if ($rows > 20) echo "<div align='center' style='margin-top:5px;'>\n".makePageNav($rowstart,20,$rows,3,FUSION_SELF."?cat_id=$cat_id&sort=$sort&")."\n</div>\n";
a u Ciebie Krystian może działa dlatego że masz mało plików w download.
Wiadomość doklejona:
Pomoże ktoś ?
PW od moderatora:
- Odświeżenie Tematu - Pieka 25.05 - 18:48
Edytowane przez dworak21 dnia 16.05.2011 21:18:21
|
|
|
|
DWito11 |
Dodany dnia 19.06.2011 00:35:39
|
Przedszkolak
Postów: 15 Ostrzeżeń: 3
v7.01.06 Data rejestracji: 07.04.2011 18:52
|
Czy mógłby mi ktoś wytłumaczyć jak dodać miniaturkę screena do tabelki z plikiem ??
chodzi mi o efekt taki jaki pokazałem w załączniku.
Rozumiem że muszę wstawić do tabeli dodać linijki:
<tr>
<td rowspan='4'> ? </td>
</tr>
Ale co mam wstawić zamiast "?" ?
Próbowałem wstawiać if ($data['download_screen']) {
echo "<img src='".$data['download_screen']."' alt='' width='50px' >";
echo "<br><br>[ <a href='".$data['download_screen']."' target='_blank'>".$locale['D004']."</a> ]</td>";
} else {
echo "<img src='images/nonscreen.gif' alt='' width='50px'>";
echo "<br><br>[ ".$locale['D004']." ]</td>";
}
ale wywalało błąd że w linijce z zamknięciem wiersza (</tr>) nieoczekiwanie pojawiło się "<" - przynajmniej tak mi google translator przetłumaczył.
Czy ma ktoś jakiś pomysł? Albo chociaż wskażcie co robię źle.
DWito11 dodał/a następującą grafikę:
|
|
|
|
jozio_94 |
Dodany dnia 02.03.2012 19:16:49
|
Przedszkolak
Postów: 84 Pomógł: 7 Ostrzeżeń: 2
Data rejestracji: 15.02.2011 21:39
|
Witam. Czy mógłby ktoś dostosować tą wtyczkę pod wersję PHP-Fusion 7.02.04? Podczas instalacji wywala błąd. |
|
|