Download na głównej
|
mateusz68 |
Dodany dnia 01.08.2014 12:01:53
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
Jak zrobić aby pliki download były na stronie głównej zamiast newsów. I żeby były wyświetlane tak samo jak newsy.Link do stronki http://ls-mody.xa...
PW od moderatora:
- Zmiana nazwy tematu - krystian1988 01.08.2014 14:28
Edytowane przez mateusz68 dnia 03.08.2014 16:06:49
|
|
|
|
Wścibski Gość |
Dodany dnia 22.12.2024 09:11:47
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
kura100214 |
Dodany dnia 01.08.2014 14:37:14
|
Przedszkolak
Postów: 60 Pomógł: 1 Ostrzeżeń: 1
v7.02.07 Data rejestracji: 21.11.2010 11:53
|
W ustawieniach głównych jako strona startowa wpisz to " downloads.php " |
|
|
|
mateusz68 |
Dodany dnia 01.08.2014 16:59:10
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
ale wtedy wygląda to tak http://ls-mody.xa...nloads.php
A chciałby żeby były wyświetlana taak jak newsy lub jak w kategoriach. |
|
|
|
bogdan |
Dodany dnia 01.08.2014 17:39:03
|
Ekspert
Postów: 2451 Pomógł: 164
v7.02.07 Data rejestracji: 21.07.2009 12:55
|
Moder prosił o poprawę nazwy wątku.
Adres strony podaj w edycji profilu, wersję PHP-Fusion też, a nie w każdym poście linkuj do strony.
Po tą są pola profilu, żeby je uzupełnić, aby każdy w razie potrzeby kuknął na Twoją stronę.
Popraw to wszystko, żebym nie musiał usunąć tematu, Ty, żebyś nie zarobił "różyczki" w profilu.
Nie szukaj Szczęścia, lecz dawaj Je innym, a wtedy samo do Ciebie przyjdzie.
Nie ma mnie na GG.
|
|
|
|
krystian1988 |
Dodany dnia 01.08.2014 18:52:06
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Ostatni raz proszę o poprawę tematu!
Jeżeli chcesz tak jak kombinujesz to zrób sobie nową podstronę php
i tutaj na supporcie masz generator możesz w nim wygenerować kod download.
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
mateusz68 |
Dodany dnia 01.08.2014 19:25:22
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
Temat poprawiłem.
Dodałem kod z generatora w dodatkowej podstronie http://ls-mody.xa...
Pliki z download wyświetlają się tylko nazwy.
Chciałbym jeszcze aby było wyświetlane tak jak w kategoriach download czyli z obrazkiem opisem datą ilością pobrań i przyciskiem pobierz.
Załączam plik downloands.php
Bogdan
Link do strony w profilu nie podam bo ja ja tylko pomagam robić.
Połączony z 03 sierpień 2014 12:40:
Uporałem się z tym najnowsze pliki są wyświetlane tylko jest problem z obrazami bo nie sa wyświetlane jest tylko ścieżka http://ls-mody.xa...ds/images/
Link podstrony: http://ls-mody.xa...
Zamieszczam kod podstrony
{
echo '<img src="'.THEME.'images/bullet.gif" alt=""> <a href="'.BASEDIR.'downloads.php?cat_id='.$row['download_cat'].'&download_id='.$row['download_id'].'">'.$row['download_title'].'</a><br>';
echo "<tr>\n<td colspan='3' class='tbl1'><center><img src='".DOWNLOADS."images/".$data['download_image']."' height='288px' witch='500px'></center><br></td>\n</tr>\n"; }
}
Edytowane przez mateusz68 dnia 03.08.2014 12:40:47
|
|
|
|
Vanko |
Dodany dnia 03.08.2014 13:37:40
|
Początkujący
Postów: 228 Pomógł: 28
v7.02.07 Data rejestracji: 04.11.2012 15:54
|
Pokaż reszte kodu. |
|
|
|
mateusz68 |
Dodany dnia 03.08.2014 13:47:10
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
Proszę
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename:
| Author:
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
openside("Statystyki");
$result = dbquery("SELECT download_id, download_title, download_count, download_cat FROM ".$db_prefix."downloads ORDER BY download_id DESC LIMIT 10");
echo '<b>Najnowsze pliki:</b><br>';
$rows = dbrows($result);
if ($rows != 0) {
while ($row = mysql_fetch_array($result))
{
echo '<img src="'.THEME.'images/bullet.gif" alt=""> <a href="'.BASEDIR.'downloads.php?cat_id='.$row['download_cat'].'&download_id='.$row['download_id'].'">'.$row['download_title'].'</a><br>';
echo "<tr>\n<td colspan='3' class='tbl1'><center><img src='".DOWNLOADS."images/".$data['download_image']."' height='288px' witch='500px'></center><br></td>\n</tr>\n"; }
}
else {
echo 'Brak danych do wyświetlenia w statystykach'; }
echo '<hr><br>';
closeside();
require_once THEMES."templates/footer.php";
?>
|
|
|
|
Vanko |
Dodany dnia 03.08.2014 13:49:02
|
Początkujący
Postów: 228 Pomógł: 28
v7.02.07 Data rejestracji: 04.11.2012 15:54
|
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename:
| Author:
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
openside("Statystyki");
$result = dbquery("SELECT download_id, download_title, download_image, download_count, download_cat FROM ".$db_prefix."downloads ORDER BY download_id DESC LIMIT 10");
echo '<b>Najnowsze pliki:</b><br>';
$rows = dbrows($result);
if ($rows != 0) {
while ($row = mysql_fetch_array($result))
{
echo '<img src="'.THEME.'images/bullet.gif" alt=""> <a href="'.BASEDIR.'downloads.php?cat_id='.$row['download_cat'].'&download_id='.$row['download_id'].'">'.$row['download_title'].'</a><br>';
echo "<tr>\n<td colspan='3' class='tbl1'><center><img src='".DOWNLOADS."images/".$data['download_image']."' height='288px' witch='500px'></center><br></td>\n</tr>\n"; }
}
else {
echo 'Brak danych do wyświetlenia w statystykach'; }
echo '<hr><br>';
closeside();
require_once THEMES."templates/footer.php";
?>
|
|
|
|
mateusz68 |
Dodany dnia 03.08.2014 16:07:35
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
Poprawiłem.
Kod który podał Vanko nie działa mi. |
|
|
|
krystian1988 |
Dodany dnia 03.08.2014 20:44:34
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Na pewno działa tylko musisz dodać jako podstronę albo plik php.
Kiedyś miałem panel który pokazywał ostatnio dodany plik z opisem, podglądem oraz linkiem do pobrania, jeśli by się to przydało mogę go o nowa napisać oraz udostępnić
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
mateusz68 |
Dodany dnia 03.08.2014 21:55:16
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
krystian1988 napisał(a):
Na pewno działa tylko musisz dodać jako podstronę albo plik php.
Kiedyś miałem panel który pokazywał ostatnio dodany plik z opisem, poglądem oraz linkiem do pobrania, jeśli by się to przydało mogę go o nowa napisać oraz udostępnić
Jak byś mógł to napisz.
Zamiast linku wstaw "pobiera i skomentuj" które będzie prowadzić do pliku w dziale dowloand. Takie czytaj więcej.
Bardzo dziękuje. |
|
|
|
Vanko |
Dodany dnia 04.08.2014 10:28:45
|
Początkujący
Postów: 228 Pomógł: 28
v7.02.07 Data rejestracji: 04.11.2012 15:54
|
Panel w załączniku, wygląd taki jak w downloadzie.
INSTALACJA:
wgraj folder download_center_panel do folderu infusions na swoim serwerze po czym
przejdź w panel administratora => zarządzanie stroną => panele => wybierz z listy download_center_panel zapisz i włącz.
Vanko dodał/a następującą plik:
|
|
|
|
mateusz68 |
Dodany dnia 04.08.2014 11:32:36
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
Wyświetla mi się takie coś:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY download_id DESC LIMIT 0,10' at line 1Brak plikow w downloadzie
Może przez to że mam podkategorie download o ten: http://www.php-fu...d_id=31161 |
|
|
|
krystian1988 |
Dodany dnia 05.08.2014 11:11:27
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
Spróbuj mojego panelu.
Instalacja:
Wrzuć download_center_panel do infusions na serwerze oraz wejdź do PA-Panele i go dodaj oraz włącz. Demo u mnie na stronie.
krystian1988 dodał/a następującą plik:
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
mateusz68 |
Dodany dnia 05.08.2014 14:14:38
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
działa :)
Można zrobić żeby wyświetlała np 10 najnowszych plików ?
Mam problem z download ponieważ jak wejdę w kategorię np tą: http://ls-mody.xa...?cat_id=17 i tylko na samym dole pojawia się tabela z datą dodania ilością pobrań oraz napisem pobierz i skomentuj a na gurze przy każdym pliku nie.
Ostatnio przestał działać mi przycisk pobierz i skomentuj czyli takie czytaj więcej które przenosiło do pełnego opisu pliku itp oraz liczbę pobrań. Daje plik downland
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: downloads.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."downloads.php";
add_to_title($locale['global_200'].$locale['400']);
if (!defined("DB_DOWNLOAD_SECTIONS")) {
define("DB_DOWNLOAD_SECTIONS", DB_PREFIX."downloads_sections");
}
if(!isSet($_GET['sec_id']) && !isSet($_GET['cat_id'])) {
opentable("Sekcje downloadu");
$result = dbquery("SELECT download_sec_id, download_sec_name, download_sec_description FROM ".DB_DOWNLOAD_SECTIONS." WHERE ".groupaccess('download_sec_access')." ORDER BY download_sec_name");
$rows = dbrows($result);
closetable();
}
elseif (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
$res = 0;
$result = dbquery("SELECT * FROM ".DB_DOWNLOAD_CATS." WHERE download_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
add_to_title($locale['global_201'].$cdata['download_cat_name']);
opentable($locale['400']." ".$cdata['download_cat_name']);
echo "<!--pre_download_cat-->";
$rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".DB_DOWNLOADS." WHERE download_cat='".$_GET['cat_id']."' ORDER BY ".$cdata['download_cat_sorting']." LIMIT ".$_GET['rowstart'].",15");
$pytanie = dbquery("SELECT download_id, download_title, download_count, download_image_thumb, download_description, download_description_short, download_count, download_cat FROM ".DB_DOWNLOADS." ORDER BY download_id DESC LIMIT 1");
$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 = "";
}
if ($odp['download_image_thumb']) {
$obraz = DOWNLOADS."images/".$odp['download_image_thumb'];
} else {
$obraz = DOWNLOADS."images/no_image.jpg";
}
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
echo "<tr>\n<td colspan='3' class='forum-caption'><strong>".$data['download_title']."</strong> $new</td>\n</tr>\n";
echo "<tr>\n<td colspan='3' class='tbl1'><center><img src='".DOWNLOADS."images/".$data['download_image']."' height='288px' witch='500px'></center><br></td>\n</tr>\n"; }
echo "<tr>\n<td class='tbl1' style='vertical-align:top;'>".($data['download_description'] != "" ? nl2br(parseubb(parsesmileys($data['download_description']))) : nl2br(stripslashes($data['download_description_short'])))."</td>\n</tr>\n";
echo "<center><td width='30%' class='tbl2'><strong>".$locale['414']."</strong> ".showdate("shortdate", $data['download_datestamp'])."</center></td>\n";
echo "<center><td width='30%' class='tbl1'><strong>".$locale['415']."</strong> ".$data['download_count']."</td>\n<td width='40%' class='tbl2'><a href='".FUSION_SELF."?cat_id=".$cat_data['download_cat_id']."&download_id=".$data['download_id']."'><b>Pobierz i Skomentuj</b></a></center></td>\n</tr>\n";
echo "</table>\n";
if ($i != $numrows) { echo "<div style='text-align:center'><img src='".get_image("blank")."' alt='' height='15' width='1' /></div>\n"; $i++; }
}
}
}
}
// download the file
if (isset($_GET['file_id']) && isnum($_GET['file_id'])) {
$download_id = stripinput($_GET['file_id']);
$res = 0;
if ($data = dbarray(dbquery("SELECT download_url, download_file, download_cat FROM ".DB_DOWNLOADS." WHERE download_id='".$download_id."'"))) {
$cdata = dbarray(dbquery("SELECT download_cat_access FROM ".DB_DOWNLOAD_CATS." WHERE download_cat_id='".$data['download_cat']."'"));
if (checkgroup($cdata['download_cat_access'])) {
$result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1 WHERE download_id='".$download_id."'");
if (!empty($data['download_file']) && file_exists(DOWNLOADS.$data['download_file'])) {
$res = 1;
require_once INCLUDES."class.httpdownload.php";
ob_end_clean();
$object = new httpdownload;
$object->set_byfile(DOWNLOADS.$data['download_file']);
$object->use_resume = true;
$object->download();
exit;
} elseif (!empty($data['download_url'])) {
$res = 1;
redirect($data['download_url']);
}
}
}
if ($res == 0) { redirect("downloads.php"); }
}
// Statistics
$dl_stats = "";
$i_alt = dbresult(dbquery("SELECT SUM(download_count) FROM ".DB_DOWNLOADS), 0);
$dl_stats .= "<table cellpadding='0' cellspacing='1' class='tbl-border' style='width:100%;'>\n";
$dl_stats .= "<tr>\n<td class='tbl2' valign='middle'><img src='".get_image("statistics")."' alt='".$locale['429']."' /></td>\n";
$dl_stats .= "<td width='100%' align='left' class='tbl1'>\n";
$dl_stats .= "<span class='small'>".$locale['415']." ".dbcount("(download_cat)", DB_DOWNLOADS)."</span><br />\n";
$dl_stats .= "<span class='small'>".$locale['440']." ".($i_alt ? $i_alt : "0")."</span><br />";
$result = dbquery(
"SELECT td.download_id, td.download_title, td.download_count, td.download_cat,
tc.download_cat_id, tc.download_cat_access
FROM ".DB_DOWNLOADS." td
LEFT JOIN ".DB_DOWNLOAD_CATS." tc ON td.download_cat=tc.download_cat_id
WHERE ".groupaccess('download_cat_access')."
ORDER BY download_count DESC LIMIT 0,1");
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$download_title = $data['download_title'];
$dl_stats .= "<span class='small'>".$locale['441'];
$dl_stats .= " <a href='".FUSION_SELF."?download_id=".$data['download_id']."' title='".$download_title."' class='side'>".trimlink($data['download_title'], 100)."</a>";
$dl_stats .= " [ ".$data['download_count']." ]</span><br />";
}
}
$result = dbquery(
"SELECT td.download_id, td.download_title, td.download_count, td.download_cat, td.download_datestamp,
tc.download_cat_id, tc.download_cat_access
FROM ".DB_DOWNLOADS." td
LEFT JOIN ".DB_DOWNLOAD_CATS." tc ON td.download_cat=tc.download_cat_id
WHERE ".groupaccess('download_cat_access')."
ORDER BY download_datestamp DESC LIMIT 0,1");
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$download_title = $data['download_title'];
$dl_stats .= "<span class='small'>".$locale['442'];
$dl_stats .= " <a href='".FUSION_SELF."?download_id=".$data['download_id']."' title='".$download_title."' class='side'>".trimlink($data['download_title'], 100)."</a>";
$dl_stats .= " [ ".$data['download_count']." ]</span><br />";
}
}
$dl_stats .= "</td>\n</tr>\n</table>\n";
// Download details
if (isset($_GET['download_id']) && isnum($_GET['download_id'])) {
add_to_head("<link rel='stylesheet' href='".INCLUDES."jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
add_to_head("<script type='text/javascript' src='".INCLUDES."jquery/colorbox/jquery.colorbox.js'></script>");
add_to_head("<script type='text/javascript'>\n
/* <![CDATA[ */\n
jQuery(document).ready(function(){
jQuery('a.tozoom').colorbox();
});\n
/* ]]>*/\n
</script>\n");
$result = dbquery(
"SELECT td.*,
tc.download_cat_id, tc.download_cat_access, tc.download_cat_name,
tu.user_id, tu.user_name, tu.user_status
FROM ".DB_DOWNLOADS." td
LEFT JOIN ".DB_DOWNLOAD_CATS." tc ON td.download_cat=tc.download_cat_id
LEFT JOIN ".DB_USERS." tu ON td.download_user=tu.user_id
WHERE download_id='".$_GET['download_id']."'");
if (dbrows($result)) {
$data = dbarray($result);
if (!checkgroup($data['download_cat_access'])) { redirect(FUSION_SELF);}
opentable($locale['400'].": ".$data['download_title']);
echo "<!--pre_download_details-->\n";
echo "<div class='tbl-border' style='margin-bottom:10px; padding:3px;'>\n";
echo "<div class='forum-caption' style='text-align:left;'>\n";
echo "<a href='".FUSION_SELF."'>".$locale['417']."</a> > <a href='".FUSION_SELF."?cat_id=".$data['download_cat']."'>".$data['download_cat_name']."</a> > <strong>".$data['download_title']."</strong>";
echo "</div>\n</div>\n";
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border center'>\n";
echo "<tr>\n<td class='tbl1' colspan='2'><h2>".$data['download_title']." ".$data['download_version']."</h2><hr /></td></tr>\n";
echo "<tr>\n<td colspan='3' class='tbl1'><center><img src='".DOWNLOADS."images/".$data['download_image']."' height='288px' witch='500px'></center><br></td>\n</tr>\n"; }
echo "<tr>\n<td class='tbl1' style='vertical-align:top;'>".($data['download_description'] != "" ? nl2br(parseubb(parsesmileys($data['download_description']))) : nl2br(stripslashes($data['download_description_short'])))."</td>";
echo "<td class='tbl1' style='width:20%;text-align:center;vertical-align:top;'>";
echo "</td>\n</tr>\n";
if ($data['download_version'] != "" || $data['download_license'] != "" || $data['download_os'] != "" || $data['download_copyright'] != "") {
echo "<tr>\n<td class='tbl2' style='text-align:center;'><img src='".get_image("info")."' alt='".$locale['428']."' /><br />\n";
}
if ($data['download_version'] != "") {
echo $locale['413']." ".$data['download_version']."<br />\n";
}
if ($data['download_license'] != "") {
echo $locale['411']." ".$data['download_license']."<br />\n";
}
if ($data['download_os'] != "") {
echo $locale['412']." ".$data['download_os']."<br />\n";
}
if ($data['download_copyright'] != "") {
echo "© ".$data['download_copyright']."<br />\n";
}
if ($data['download_version'] != "" || $data['download_license'] != "" || $data['download_os'] != "" || $data['download_copyright'] != "") {
echo "</td>\n</tr>\n";
}
echo "</table>\n";
echo "</td></tr>\n";
echo "<tr>\n";
echo "<td class='tbl1' colspan='2' style='text-align:center;'><hr />\n";
echo "<strong><center>".$locale['416'].":</center></strong><br />\n";
echo "<center><a href='".FUSION_SELF."?cat_id=".$data['download_cat']."&file_id=".$data['download_id']."' target='_blank'>".get_image("download", $locale['416'], "border:none;", $locale['416'])."</a>\n";
if ($data['download_filesize'] != "") {
echo "<br />(".$data['download_filesize'].")\n";
}
echo "</center></td>\n</tr>\n";
echo "></table>\n";
echo "<!--sub_download_details-->\n";
closetable();
echo "<!--pre_download_comments-->\n";
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
if ($data['download_allow_comments']) { showcomments("D", DB_DOWNLOADS, "download_id", $_GET['download_id'], FUSION_SELF."?cat_id=".$data['download_cat']."&download_id=".$_GET['download_id']); }
if ($data['download_allow_ratings']) { showratings("D", $_GET['download_id'], FUSION_SELF."?cat_id=".$data['download_cat']."&download_id=".$_GET['download_id']); }
}
echo $dl_stats;
require_once THEMES."templates/footer.php";
?>
Edytowane przez mateusz68 dnia 05.08.2014 15:15:23
|
|
|
|
krystian1988 |
Dodany dnia 06.08.2014 08:45:06
|
Zaawansowany
Postów: 1187 Pomógł: 100
v7.02.07 Data rejestracji: 07.05.2009 17:37
|
W download_center_panel zmień sobie:
DESC LIMIT 1
na:
DESC LIMIT 10
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|
|
|
|
mateusz68 |
Dodany dnia 06.08.2014 10:02:46
|
Przedszkolak
Postów: 12 Ostrzeżeń: 4
v7.02.07 Data rejestracji: 29.07.2014 21:08
|
Dzięki a ktoś pomoże z tym
Mam problem z download ponieważ jak wejdę w kategorię np tą: http://ls-mody.xa...?cat_id=17 i tylko na samym dole pojawia się tabela z datą dodania ilością pobrań oraz napisem pobierz i skomentuj a na gurze przy każdym pliku nie.
Ostatnio przestał działać mi przycisk pobierz i skomentuj czyli takie czytaj więcej które przenosiło do pełnego opisu pliku itp oraz liczbę pobrań. Daje plik downland
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: downloads.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."downloads.php";
add_to_title($locale['global_200'].$locale['400']);
if (!defined("DB_DOWNLOAD_SECTIONS")) {
define("DB_DOWNLOAD_SECTIONS", DB_PREFIX."downloads_sections");
}
if(!isSet($_GET['sec_id']) && !isSet($_GET['cat_id'])) {
opentable("Sekcje downloadu");
$result = dbquery("SELECT download_sec_id, download_sec_name, download_sec_description FROM ".DB_DOWNLOAD_SECTIONS." WHERE ".groupaccess('download_sec_access')." ORDER BY download_sec_name");
$rows = dbrows($result);
closetable();
}
elseif (isset($_GET['cat_id']) && isnum($_GET['cat_id'])) {
$res = 0;
$result = dbquery("SELECT * FROM ".DB_DOWNLOAD_CATS." WHERE download_cat_id='".$_GET['cat_id']."'");
if (dbrows($result) != 0) {
$cdata = dbarray($result);
if (checkgroup($cdata['download_cat_access'])) {
$res = 1;
add_to_title($locale['global_201'].$cdata['download_cat_name']);
opentable($locale['400']." ".$cdata['download_cat_name']);
echo "<!--pre_download_cat-->";
$rows = dbcount("(*)", DB_DOWNLOADS, "download_cat='".$_GET['cat_id']."'");
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$result = dbquery("SELECT * FROM ".DB_DOWNLOADS." WHERE download_cat='".$_GET['cat_id']."' ORDER BY ".$cdata['download_cat_sorting']." LIMIT ".$_GET['rowstart'].",15");
$pytanie = dbquery("SELECT download_id, download_title, download_count, download_image_thumb, download_description, download_description_short, download_count, download_cat FROM ".DB_DOWNLOADS." ORDER BY download_id DESC LIMIT 1");
$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 = "";
}
if ($odp['download_image_thumb']) {
$obraz = DOWNLOADS."images/".$odp['download_image_thumb'];
} else {
$obraz = DOWNLOADS."images/no_image.jpg";
}
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>\n";
echo "<tr>\n<td colspan='3' class='forum-caption'><strong>".$data['download_title']."</strong> $new</td>\n</tr>\n";
echo "<tr>\n<td colspan='3' class='tbl1'><center><img src='".DOWNLOADS."images/".$data['download_image']."' height='288px' witch='500px'></center><br></td>\n</tr>\n"; }
echo "<tr>\n<td class='tbl1' style='vertical-align:top;'>".($data['download_description'] != "" ? nl2br(parseubb(parsesmileys($data['download_description']))) : nl2br(stripslashes($data['download_description_short'])))."</td>\n</tr>\n";
echo "<center><td width='30%' class='tbl2'><strong>".$locale['414']."</strong> ".showdate("shortdate", $data['download_datestamp'])."</center></td>\n";
echo "<center><td width='30%' class='tbl1'><strong>".$locale['415']."</strong> ".$data['download_count']."</td>\n<td width='40%' class='tbl2'><a href='".FUSION_SELF."?cat_id=".$cat_data['download_cat_id']."&download_id=".$data['download_id']."'><b>Pobierz i Skomentuj</b></a></center></td>\n</tr>\n";
echo "</table>\n";
if ($i != $numrows) { echo "<div style='text-align:center'><img src='".get_image("blank")."' alt='' height='15' width='1' /></div>\n"; $i++; }
}
}
}
}
// download the file
if (isset($_GET['file_id']) && isnum($_GET['file_id'])) {
$download_id = stripinput($_GET['file_id']);
$res = 0;
if ($data = dbarray(dbquery("SELECT download_url, download_file, download_cat FROM ".DB_DOWNLOADS." WHERE download_id='".$download_id."'"))) {
$cdata = dbarray(dbquery("SELECT download_cat_access FROM ".DB_DOWNLOAD_CATS." WHERE download_cat_id='".$data['download_cat']."'"));
if (checkgroup($cdata['download_cat_access'])) {
$result = dbquery("UPDATE ".DB_DOWNLOADS." SET download_count=download_count+1 WHERE download_id='".$download_id."'");
if (!empty($data['download_file']) && file_exists(DOWNLOADS.$data['download_file'])) {
$res = 1;
require_once INCLUDES."class.httpdownload.php";
ob_end_clean();
$object = new httpdownload;
$object->set_byfile(DOWNLOADS.$data['download_file']);
$object->use_resume = true;
$object->download();
exit;
} elseif (!empty($data['download_url'])) {
$res = 1;
redirect($data['download_url']);
}
}
}
if ($res == 0) { redirect("downloads.php"); }
}
// Statistics
$dl_stats = "";
$i_alt = dbresult(dbquery("SELECT SUM(download_count) FROM ".DB_DOWNLOADS), 0);
$dl_stats .= "<table cellpadding='0' cellspacing='1' class='tbl-border' style='width:100%;'>\n";
$dl_stats .= "<tr>\n<td class='tbl2' valign='middle'><img src='".get_image("statistics")."' alt='".$locale['429']."' /></td>\n";
$dl_stats .= "<td width='100%' align='left' class='tbl1'>\n";
$dl_stats .= "<span class='small'>".$locale['415']." ".dbcount("(download_cat)", DB_DOWNLOADS)."</span><br />\n";
$dl_stats .= "<span class='small'>".$locale['440']." ".($i_alt ? $i_alt : "0")."</span><br />";
$result = dbquery(
"SELECT td.download_id, td.download_title, td.download_count, td.download_cat,
tc.download_cat_id, tc.download_cat_access
FROM ".DB_DOWNLOADS." td
LEFT JOIN ".DB_DOWNLOAD_CATS." tc ON td.download_cat=tc.download_cat_id
WHERE ".groupaccess('download_cat_access')."
ORDER BY download_count DESC LIMIT 0,1");
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$download_title = $data['download_title'];
$dl_stats .= "<span class='small'>".$locale['441'];
$dl_stats .= " <a href='".FUSION_SELF."?download_id=".$data['download_id']."' title='".$download_title."' class='side'>".trimlink($data['download_title'], 100)."</a>";
$dl_stats .= " [ ".$data['download_count']." ]</span><br />";
}
}
$result = dbquery(
"SELECT td.download_id, td.download_title, td.download_count, td.download_cat, td.download_datestamp,
tc.download_cat_id, tc.download_cat_access
FROM ".DB_DOWNLOADS." td
LEFT JOIN ".DB_DOWNLOAD_CATS." tc ON td.download_cat=tc.download_cat_id
WHERE ".groupaccess('download_cat_access')."
ORDER BY download_datestamp DESC LIMIT 0,1");
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$download_title = $data['download_title'];
$dl_stats .= "<span class='small'>".$locale['442'];
$dl_stats .= " <a href='".FUSION_SELF."?download_id=".$data['download_id']."' title='".$download_title."' class='side'>".trimlink($data['download_title'], 100)."</a>";
$dl_stats .= " [ ".$data['download_count']." ]</span><br />";
}
}
$dl_stats .= "</td>\n</tr>\n</table>\n";
// Download details
if (isset($_GET['download_id']) && isnum($_GET['download_id'])) {
add_to_head("<link rel='stylesheet' href='".INCLUDES."jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
add_to_head("<script type='text/javascript' src='".INCLUDES."jquery/colorbox/jquery.colorbox.js'></script>");
add_to_head("<script type='text/javascript'>\n
/* <![CDATA[ */\n
jQuery(document).ready(function(){
jQuery('a.tozoom').colorbox();
});\n
/* ]]>*/\n
</script>\n");
$result = dbquery(
"SELECT td.*,
tc.download_cat_id, tc.download_cat_access, tc.download_cat_name,
tu.user_id, tu.user_name, tu.user_status
FROM ".DB_DOWNLOADS." td
LEFT JOIN ".DB_DOWNLOAD_CATS." tc ON td.download_cat=tc.download_cat_id
LEFT JOIN ".DB_USERS." tu ON td.download_user=tu.user_id
WHERE download_id='".$_GET['download_id']."'");
if (dbrows($result)) {
$data = dbarray($result);
if (!checkgroup($data['download_cat_access'])) { redirect(FUSION_SELF);}
opentable($locale['400'].": ".$data['download_title']);
echo "<!--pre_download_details-->\n";
echo "<div class='tbl-border' style='margin-bottom:10px; padding:3px;'>\n";
echo "<div class='forum-caption' style='text-align:left;'>\n";
echo "<a href='".FUSION_SELF."'>".$locale['417']."</a> > <a href='".FUSION_SELF."?cat_id=".$data['download_cat']."'>".$data['download_cat_name']."</a> > <strong>".$data['download_title']."</strong>";
echo "</div>\n</div>\n";
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border center'>\n";
echo "<tr>\n<td class='tbl1' colspan='2'><h2>".$data['download_title']." ".$data['download_version']."</h2><hr /></td></tr>\n";
echo "<tr>\n<td colspan='3' class='tbl1'><center><img src='".DOWNLOADS."images/".$data['download_image']."' height='288px' witch='500px'></center><br></td>\n</tr>\n"; }
echo "<tr>\n<td class='tbl1' style='vertical-align:top;'>".($data['download_description'] != "" ? nl2br(parseubb(parsesmileys($data['download_description']))) : nl2br(stripslashes($data['download_description_short'])))."</td>";
echo "<td class='tbl1' style='width:20%;text-align:center;vertical-align:top;'>";
echo "</td>\n</tr>\n";
if ($data['download_version'] != "" || $data['download_license'] != "" || $data['download_os'] != "" || $data['download_copyright'] != "") {
echo "<tr>\n<td class='tbl2' style='text-align:center;'><img src='".get_image("info")."' alt='".$locale['428']."' /><br />\n";
}
if ($data['download_version'] != "") {
echo $locale['413']." ".$data['download_version']."<br />\n";
}
if ($data['download_license'] != "") {
echo $locale['411']." ".$data['download_license']."<br />\n";
}
if ($data['download_os'] != "") {
echo $locale['412']." ".$data['download_os']."<br />\n";
}
if ($data['download_copyright'] != "") {
echo "© ".$data['download_copyright']."<br />\n";
}
if ($data['download_version'] != "" || $data['download_license'] != "" || $data['download_os'] != "" || $data['download_copyright'] != "") {
echo "</td>\n</tr>\n";
}
echo "</table>\n";
echo "</td></tr>\n";
echo "<tr>\n";
echo "<td class='tbl1' colspan='2' style='text-align:center;'><hr />\n";
echo "<strong><center>".$locale['416'].":</center></strong><br />\n";
echo "<center><a href='".FUSION_SELF."?cat_id=".$data['download_cat']."&file_id=".$data['download_id']."' target='_blank'>".get_image("download", $locale['416'], "border:none;", $locale['416'])."</a>\n";
if ($data['download_filesize'] != "") {
echo "<br />(".$data['download_filesize'].")\n";
}
echo "</center></td>\n</tr>\n";
echo "></table>\n";
echo "<!--sub_download_details-->\n";
closetable();
echo "<!--pre_download_comments-->\n";
include INCLUDES."comments_include.php";
include INCLUDES."ratings_include.php";
if ($data['download_allow_comments']) { showcomments("D", DB_DOWNLOADS, "download_id", $_GET['download_id'], FUSION_SELF."?cat_id=".$data['download_cat']."&download_id=".$_GET['download_id']); }
if ($data['download_allow_ratings']) { showratings("D", $_GET['download_id'], FUSION_SELF."?cat_id=".$data['download_cat']."&download_id=".$_GET['download_id']); }
}
echo $dl_stats;
require_once THEMES."templates/footer.php";
?>
/Problem rozwiązany temat można zamknąć.
Połączony z 04 październik 2014 13:36:
A czy da się zrobić jeszcze strony że też po 10 na stronie.
Edytowane przez mateusz68 dnia 04.10.2014 13:36:52
|
|
|