ponizej kod skryptu:
<?php include \"common.php\"; $id_polaczenia = db_connect(); if(!$id_polaczenia) error_message(sql_error()); html_header(); echo \"<TD WIDTH=\"100%\" HEIGHT=\"16\" background=\"layout/belka2.gif\" style=\"border-bottom: solid; border-bottom-width: 1px; border-bottom-color: black;\"><center><font style=\"font-family: Times New Roman; font-size: 8pt;\"><b>News</b></center></TD>n\"; echo \"<TABLE BORDER=\"0\" cellpadding=\"1\" cellspacing=\"0\" WIDTH=\"100%\" HEIGHT=\"1200\" BGCOLOR=\"#000000\" style=\"border-left: solid; border-left-width: 1px; border-left-color: black; border-bottom: solid; border-bottom-width: 1px; border-bottom-color: black; border-right: solid; border-right-width: 1px; border-right-color: black;\">n\"; $query = \"SELECT news_headline, add_ndate, autor, news_contents, more, news_id, edit_
n m FROM news ORDER BY news_num DESC LIMIT 0, 6\"; $wynik = mysql_query($query); if(!$wynik) error_message(sql_error()); while ($q_data = mysql_fetch_array($wynik)) { $naglowek = $q_data[\"news_headline\"]; $data = $q_data[\"add_ndate\"]; $autor = $q_data[\"autor\"]; $zawartosc_p = $q_data[\"news_contents\"]; $zawartosc_k = $q_data[\"more\"]; $id_news = $q_data[\"news_id\"]; $edit_n = $q_data[\"edit_num\"]; echo \"<font style=\"margin-left: 5pt; font-family: Verdana; font-size: 9pt; color: gray;\"><b> $naglowek </b><br>n\"; echo \"<font style=\"margin-left: 5pt; font-family: Verdana; font-size: 9px; color: darkgray;\"> $data <br>n\"; echo \" <table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"480\">n\"; echo \" <tr>n\"; echo \" <td align=\"center\" width=\"480\">n\"; echo \" <table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"450\">n\"; echo \" <tr>n\"; echo \" <td align=\"center\" width=\"450\">n\"; echo \" <DIV ALIGN=\"justify\">n\"; echo \"<font style=\"font-family: Verdana; font-size: 10px; color: gray;\">n\"; echo \"$zawartosc_p n\"; echo \" </div>n\"; echo \" </td>n\"; echo \" </tr>n\"; echo \" </table>n\"; echo \" </td>n\"; echo \" </tr>n\"; echo \" <tr>n\"; echo \" <td align=\"left\" with\"480\">n\"; echo \" <a target=\"blank\" href=\"index.php?action=view_r&id_news=$id_news\"><font style=\"font-family: Verdana; font-size: 9px;\"><i>Wiecej</i></a><br>n\"; if(!$edit_n == 0) { echo \" <font style=\"font-family: Verdana; font-size: 9px;\"><i>Edytowano $edit_n razy</i><br>n\"; } echo \" </td>n\"; echo \" </tr>n\"; echo \" </table>n\"; echo \"<center>n\"; echo \"<img src=\"layout/l.jpg\">n\"; echo \"</center>n\"; echo \"<br>n\"; } echo \"</td>n\"; echo \"</TR>n\"; echo \"</TABLE>n\"; html_footer(); function view_r() { global $id_news; $query = \"SELECT news_headline, add_ndate, autor, news_contents, more, edit_num FROM n ws WHERE news_id = '$id_news'\"; $wynik = mysql_query($query); if(!$wynik) error_message(sql_error()); $q_data = mysql_fetch_array($wynik); $naglowek = $q_data[\"news_headline\"]; $data = $q_data[\"add_ndate\"]; $autor = $q_data[\"autor\"]; $zawartosc_p = $q_data[\"news_contents\"]; $zawartosc_k = $q_data[\"more\"]; $edit_n = $q_data[\"edit_num\"]; html_header(); echo \"<TR>n\"; echo \"<TD WIDTH=\"100%\" HEIGHT=\"16\" background=\"layout/belka2.gif\" style=\"border-bottom: solid; border-bottom-width: 1px; border-bottom-color: black;\"><center><font style=\"font-family: Times New Roman; font-size: 8pt;\"><b>News</b></center></TD>n\"; echo \"</TR>n\"; echo \"</table>n\"; echo \"<TABLE BORDER=\"0\" cellpadding=\"1\" cellspacing=\"0\" WIDTH=\"100%\" HEIGHT=\"1200\" BGCOLOR=\"#000000\" style=\"border-left: solid; border-left-width: 1px; border-left-color: black; border-bottom: solid; border-bottom-width: 1px; border-bottom-color: black; border-right: solid; border-right-width: 1px; border-right-color: black;\">n\"; echo \" <TR>n\"; echo \" <TD valign=\"top\" align=\"left\" bgcolor=\"#414141\" colspan=\"3\">n\"; echo \"<br>n\"; echo \"<font style=\"margin-left: 5pt; font-family: Verdana; font-size: 9pt; color: gray;\"><b> $naglowek </b><br>n\"; echo \"<font style=\"margin-left: 5pt; font-family: Verdana; font-size: 9px; color: darkgray;\"> $data <br>n\"; echo \" <table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"480\">n\"; echo \" <tr>n\"; echo \" <td align=\"center\" width=\"480\">n\"; echo \" <table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"450\">n\"; echo \" <tr>n\"; echo \" <td align=\"center\" width=\"450\">n\"; echo \" <DIV ALIGN=\"justify\">n\"; echo \"<font style=\"font-family: Verdana; font-size: 10px; color: gray;\">n\"; echo \"$zawartosc_p <br><br>n\"; echo \"$zawartosc_k n\"; echo \" </div>n\"; echo \" </td>n\"; echo \" </tr>n\"; echo \" </table>n\"; echo \" </td>n\"; echo \" </tr>n\"; if(!$edit_n == 0) { echo \" <tr>n\"; echo \" <td align=\"left\" with\"480\">n\"; echo \" <font style=\"font-family: Verdana; font-size: 9px;\"><i>Edytowano $edit_n razy</i><br>n\"; echo \" </td>n\"; echo \" </tr>n\"; } echo \" </table>n\"; echo \"<center>n\"; echo \"<img src=\"layout/l.jpg\">n\"; echo \"</center>n\"; echo \"<br>n\"; echo \"</td>n\"; echo \"</TR>n\"; echo \"</TABLE>n\"; html_footer(); } switch($action) { case \"view_r\"; view_r(); break; } ?>
Prosze o pomoc.
Pzdr