 |
 | |
| | | | |
|  |
 |
 |
|
|
| Zadając pytanie dotyczące PHPNuke podaj jego wersje!! |
| Author |
Message |
moo
~user

Joined: 30.03.2006
Posts: 52
Status: Offline
|
Posted: 31 Mar 2008 23:19:21
|
|
User 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>·</big></strong> <a href=\"modules.php?name=abandonware&rop=showcontent&id=$id\">$title</a><br></div>";
}
?> |
z góry dziękuję za pomoc i pozdrawiam.
|
|
|
|
|
|
|
 |
|
|
 |
dudi
@admin

Joined: 13.12.2004
Posts: 3175
Helps: 330
Location: Tychy
Status: Offline
|
Posted: 1 Apr 2008 09:05:15
|
|
User 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>·</big></strong> <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 |
|
|
|
 |
moo
~user

Joined: 30.03.2006
Posts: 52
Status: Offline
|
Posted: 1 Apr 2008 22:31:07
|
|
User browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 |
|
|
|
 |
|
|
|
|
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 |
|
|
|
|
|
|
|