PHP-Nuke
  Strona głównaDownloadForumFAQ Zaloguj się  
Forum


 
Rules  Forum FAQ   Search   Usergroups   Register   Log in
 
 
Zadając pytanie dotyczące PHPNuke podaj jego wersje!!

View next topic
View previous topic
Post new topic   Reply to topic  PHP-Nuke.org.pl Forum Index » Bloki
Author Message
moo
~user



Joined: 30.03.2006
Posts: 52


Status: Offline


 
View Single PostPosted: 31 Mar 2008 23:19:21 Back to top  
User browserUser browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Witam,
mam drobny problem z kodem. Chciałabym, by w bloku łączna liczba gier wyświetlała się pod 10 ostatnio dodanymi grami. Póki co mam tą sumę dodaną nad, ponieważ majsterkując z tym poniżej linków wywala mi cały blok. Oto obecny kod:

Code:
<?php

if (eregi("block-abandonware.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $prefix, $db;

$num = $db->sql_numrows($db->sql_query("SELECT id FROM ".$prefix."_abandonware"));
$content = '<div align="right">...³±czna ilo¶æ gier: <strong>'.$num.'</strong><br></div>';

$result = $db->sql_query("SELECT id, title FROM ".$prefix."_abandonware ORDER BY id DESC LIMIT 0,10");
while ($row = $db->sql_fetchrow($result)) {
$id = intval($row['id']);
$title = stripslashes($row['title']);
    $content .= "<div align=\"left\"><strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=abandonware&rop=showcontent&id=$id\">$title</a><br></div>";
}
?>


z góry dziękuję za pomoc i pozdrawiam.
View user's profile    
dudi
@admin



Joined: 13.12.2004
Posts: 3175
Helps: 330
Location: Tychy

Status: Offline


 
View Single PostPosted: 1 Apr 2008 09:05:15 Back to top  
User browserUser browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Code:
<?php

if (eregi("block-abandonware.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

global $prefix, $db;

$content = '';
$result = $db->sql_query("SELECT id, title FROM ".$prefix."_abandonware ORDER BY id DESC LIMIT 0,10");
while ($row = $db->sql_fetchrow($result)) {
    $id = intval($row['id']);
    $title = stripslashes($row['title']);
    $content .= "<div align=\"left\"><strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=abandonware&rop=showcontent&id=$id\">$title</a><br></div>";
}

$num = $db->sql_numrows($db->sql_query("SELECT id FROM ".$prefix."_abandonware"));
$content .= '<div align="right">...Łączna ilość gier: <strong>'.$num.'</strong><br></div>';
?>

_________________
Pomocy udzielam TYLKO na forum !!!
domy drewniane w technologii szkieletowej
View user's profile Visit poster's website    
moo
~user



Joined: 30.03.2006
Posts: 52


Status: Offline


 
View Single PostPosted: 1 Apr 2008 22:31:07 Back to top  
User browserUser browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Super, dzięki śliczne ^^
View user's profile    
Display posts from previous:   
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Nie możesz dołączać plików na tym forum
Możesz ściągać pliki na tym forum


Powered by phpBB [CR] © 2001, 2006 phpBB Group.
 

Copyright © 2004-2009 by phpnuke.org.pl :: PHP-Nuke Copyright © 2004 by Francisco Burzi.
Zdjęcia ślubne
Tworzenie strony: 0.22 sekund
Zapytań: 10