ForumCała strona

Nawigacja

Aktualnie online

Gości online: 30

Użytkowników online: 0

Łącznie użytkowników: 25,400
Najnowszy użytkownik: AlojzyBartek

Logowanie

Nazwa użytkownika

Hasło



Zarejestruj się

Odzyskaj hasło

Shoutbox

Musisz zalogować się, aby móc dodać wiadomość.

Zbigniew@
17.11.2024 11:33:24
Nie ten grzeszy kto pije, ale ten, kto się nie upije.

JazOOn
16.11.2024 20:46:18
tja

Zbigniew@
15.11.2024 18:58:17
Kto pije, ten nie bije.

JazOOn
31.10.2024 20:49:47
Kto pije?

piterus
30.10.2024 19:45:48
I będziemy śpiewać: "Kiedy 20 blisko, przebadaj wszystko, przebadaj wszystko..." Pfft

Pobierz nową wersję
Pobierz podręcznik
Zobacz inne oficjalne Supporty
Statystyki supportu
PHP-Fuson PL na Facebooku

RSS

Polecamy hosting SferaHost.pl

Zobacz temat

Polski Oficjalny Support PHP-Fusion » PHP-Fusion v5.00-v6.01 Support » Błędy i korekty
 Drukuj temat
Problem z kodem
Martinez
Witam, ściągłem sobie download z eXtreme packa i dodałem do Fusion 6, download przerobiłem i teraz wygląda tak http://www.martin...nloads.php

Ja wolabym by wyglądało inaczej tak jak orginalne download z Fusion 6. np. http://gz.aplus.p...nloads.php tylko zamniast opisów linki :)


<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fu...
+----------------------------------------------------+
| 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 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='center'>";


echo "<Center>";

echo "</td><td><td align='center' ><font size=2><b><u>".$data['download_cat_name']."</u></b><br></font>\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><BR>".$p;
}
echo "<BR></td></center>";
$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";
?>


Czy możecie przerobić ten kod tak by mi odpowiedał ??

Dziekuje.
Edytowane przez Martinez dnia 23.07.2005 20:08:10
 
Wścibski Gość
Dodany dnia 25.11.2024 08:50:43
Pan Kontekstualny

Postów: n^x
Data rejestracji: Zawsze

Polecamy hosting SferaHost.pl
IP: localhost  
crasch
nie trzeba przerabiać Pfft
po prostu wrzucasz pliki downloadu z zwykłej wersji v6.

downloads.php
administration/downloads.php
administration/download_cats.php

te pliki podmień Smile na stare ze zwyklego PHP-Fusion v6

PS.

Ja wolabym by wyglądało inaczej tak jak orginalne download z Fusion 6. np. http://gz.aplus.p...nloads.php


miło Grin
Edytowane przez crasch dnia 23.07.2005 20:58:57
..i to by było na tyle.
28 listopada 2006
 
Przejdź do forum:
Created by Arox Copyright (C) 2004
Copyright (C) 2004 - 2018 Ekipa PHP-Fusion.pl