<?php
if ($nr>0) {
$temp=$_GET['nr'];
$wynik = mysql_query (\"select * from news WHERE nr='$nr';\") or
die(\"Zapytanie niepoprawne\");if ($ilosc==1) {
<table width=570 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=570 height=24 align=left background=gfx/news/1.gif class=tekst2>
Tytuł: <b>\".$rekord[2].\"</b>
</td>
</tr>
<tr>
<td valign=top>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=570 style=padding:7px valign=top align=left background=gfx/news/2.gif class=tekst>
<img src=gfx/news/5.gif align=left>
\".$rekord[3].\" \".$rekord[4].\"
<br />
<br />
</td>
</tr>
<tr>
<td height=16 valign=top>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=364 height=16 valign=top><img src=gfx/news/3.gif width=364 height=16></td>
<td width=206 height=16 valign=middle background=gfx/news/4.gif align=center class=tekst2>
Dodał: <a \".$rekord[6].\" href=forum/profile.php?mode=viewprofile&u=\".$rekord[7].\">\".$rekord[5].\"</a> komentarze[\".$ilosckom[0].\"]
</td>
</tr>
</table>
</td>
</tr>
</table>
</table>\";
// news wydrukowany
//if ( defined('logged_in') ) {
$wynik = mysql_query(\"SELECT comment, time, author, ip, user, kolor user FROM komentarze WHERE ne
w ='$_GET[nr]' ORDER BY
time DESC\
"); echo \"<center>\";
while(list($comment, $time, $author, $ip, $user, $kolor) = mysql_fetch_array($wynik)) {
$comment = nl2br(htmlspecialchars($comment));
$author = \"<a \".$kolor.\" href='forum/profile.php?mode=viewprofile&u=\".$user.\"'>$author</a>\";
$ip = nl2br(htmlspecialchars($ip));
print \"<br><table class=tekst width=300>n\";
print \"<tr>n\";
print \"<td align=left width=150 bgColor=black> \".$author.\"</span></td>n\";
print \"<td align=right width=150 bgColor=black>\".$time.\" </td></tr>n\";
print \"<tr><td width=300 bgColor=black colspan='2' align=justify> $comment </td></tr>n\";
print \"<tr><td width='300' bgColor=black colspan='2'><center>$ip</center></td></tr>n\";
print \"</table>n\";
}
print \"</center>\";
echo \"<div align='center'>
<div align=center>
<form action='dodaj_strona.php' method='post' name='dodaj_strona'>
</div>
<table class=menu border=0 cellpadding=0 cellspacing=0>
<tr valign=top>
<td class='kom'>
<p align=center>
<textarea name='comment' rows=10 cols=35>Twój komentarz...</textarea>
</p>
</td>
</tr>
<tr>
<td><p align=center><input type=submit value='Dodaj'>
<input type='hidden' name='nr' value='$_GET[nr]'></p></td>
</tr>
</table>
</form>
</div>\";
//} else {
//echo \"<br><br><span class=tekst>Aby przeglądać i dodawać komentarze musisz się zalogować!</span>\"; }
} else {
print \"Nie ma newsa o podanym numerzen\"; }
} else {
$wynik = mysql_query (\"select * from news order by nr desc\") or
die(\"Zapytanie niepoprawne\");
<table width=570 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=570 height=24 align=left background=gfx/news/1.gif class=tekst2>
Tytuł: <b>\".$rekord[2].\"</b>
</td>
</tr>
<tr>
<td valign=top>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=570 style=padding:7px valign=top align=left background=gfx/news/2.gif class=tekst>
<img src=gfx/news/5.gif align=left>
\".$rekord[3].\"
<br><br>
<i><p align=left><a class=a2 href=\"strona.php?nr=\".$rekord[0].\"\">Więcej...</i></p>
</td>
</tr>
<tr>
<td height=16 valign=top>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=364 height=16 valign=top><img src=gfx/news/3.gif width=364 height=16></td>
<td width=206 height=16 valign=middle background=gfx/news/4.gif align=center class=tekst2>
Dodał: <a \".$rekord[6].\" href=forum/profile.php?mode=viewprofile&u=\".$rekord[7].\">\".$rekord[5].\"</a> komentarze[\".$ilosckom[0].\"]
</td>
</tr>
</table>
</td>
</tr>
</table>
</table><br>\";
}
}
?>