![]() |
![]() ![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 1 Pomógł: 0 Dołączył: 25.07.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witam! Jestem tu nowy i nie jestem pewien czy umieściłem dobrze temat, oraz czy nie było już podobnego.
![]() ![]() ![]() ![]() CODE <html> <head> <title>Internetowa baza kawalow.</title> </head> <body> <?php $dbcnx = @mysql_connect('localhost', 'maciek', 'maciek123'); if (!$dbcnx) { echo '<p>W tej chwili nie mozna nawiazac polaczenia z serwerem db. Blad: '.mysql_error().'</p>' ; exit(); } if (!@mysql_select_db('internet_joke_database')) { exit ('<p>Nie mozna zlokalizowac bazy kawalow. Blad: '.mysql_error().'</p>'); } $id = $_GET['id']; $kawal = @mysql_query("select tekstkawalu from kawal where id='$id'"); if (!$kawal) { exit('Nie można zaladowac kawalu z bazy danych.'); } if (mysql_num_rows($kawal) < 1) { exit('Nie można zlokalizować kawalu o podanym identyfikatorze.'); } $kawal = mysql_fetch_array($kawal); $tekstkawalu = $kawal['tekstkawalu']; $tekstkawalu = htmlspecialchars($tekstkawalu); if (!isset($_GET['page'])) { $page = 0; } else { $page = $_GET['page']; } /* $textarray = spliti('\[PAGEBREAK]', $tekstkawalu); $tekstkawalu = str_replace(array('[b]','[B]'), '<b>', $tekstkawalu); $tekstkawalu = str_replace(array('[eb]','[EB]'), '</b>', $tekstkawalu); $tekstkawalu = str_replace(array('[i]','[I]'), '<i>', $tekstkawalu); $tekstkawalu = str_replace(array('[ei]','[EI]'), '</i>', $tekstkawalu); $tekstkawalu = str_replace(array('[b]','[B]'), '<b>', $tekstkawalu); $tekstkawalu = ereg_replace("\r", '', $tekstkawalu); $tekstkawalu = ereg_replace("\n\n", '</p><p>', $tekstkawalu); $tekstkawalu = ereg_replace("\n", '<br />', $tekstkawalu); $tekstkawalu = eregi_replace('\\[L]([-_./a-z0-9!&%#?+,\'=:;@~]+)\\[EL]', '<a href="\\1">\\1</a>', $tekstkawalu); $tekstkawalu = eregi_replace('\\[L=([-_./a-z0-9!&%#?+,\'=:;@~]+)]([^\\[]+)\\[EL]', '<a href="\\1">\\2</a>', $joketext); $PHP_SELF = $_SERVER['PHP_SELF']; if ($page !=0) { $pervpage = $page - 1; echo "<p><a href=\"$PHP_SELF?id=$id&page=$nextpage\">". 'Kolejna strona</a></p>'; } echo "<p>$tekstkawalu</p>"; if ($page < count($textarray) - 1) { $nextpage = $page + 1; echo "<p><a href=\"$PHP_SELF?id=$id&page=$nextpage\">Kolejna strona</a></p>"; } mysql_close($dbcnx); */ ?> <p><a href="indexkawal.php">Powrot do strony startowej</a></p> <body> </html> Sorki za dłużyznę... ![]() PoZdRo:-) |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 15.07.2025 - 18:07 |