<?php // Dane z SQL'a do tablicy $count = 0; { $array_smiles[$count]['smile'] = $record_smiles['smile']; $array_smiles[$count]['file'] = $record_smiles['file']; $count++; } { $int_poile = $_POST['submit_poile']; { $int_od = 0; } else { $int_od = $_GET['od']; } } else { $int_poile = 5; { $int_od = 0; } else { $int_od = $_GET['od']; } } $sql = "SELECT id, status, text_short, title, nick, image, link, date, mail FROM ne
ws_news WHERE status='1' ORDER BY date DESC"; $newsy = 0; $limit = ' LIMIT ' . $int_od . ', ' . $int_poile; $sql = "SELECT id, status, text_short, title, nick, image, link, date, mail FROM ne
ws_news WHERE status='1' ORDER BY date DESC $limit"; { if ($record['status'] == 1) { $id_news = $record['id']; $num_comments = 0; $sql = "SELECT id, id_news FROM news_comments WHERE id_news='$id_news'"; { $record['text_short'] = str_replace($array_smiles[$i]['smile'], '<img src="images/smiles/icon_' . $array_smiles[$i]['file'] . '.gif" />', $record['text_short']); } { $image = '<img src="images/avatars/' . $record['image'] . '">'; } else { $image = ''; } $link_short = $record['link']; { $link_short .= '...'; } { $link = '<br /><br /><b>Link:</b> <a href="' . $record['link'] . '" target="_blank">' . $link_short . '</a>'; } else { $link = ''; } //wyswietlam link nick ttytul acatar i mail } } echo' <table class="news_short" cellpadding="0" cellspacing="0" width="300"> <form action="index.php?po='. $int_poile .'" method="post"> <tr> <td class="nick" width="70" align="center">Pokaż po</td> <td class="nick" width="60" align="center"><select name="submit_poile"><option>1<option selected>5<option>10<option>25</td> <td class="nick" width="110" align="center"> newsów na stronie</td> <td class="nick" width="60" align="center"><input type="submit" name="send" value="Pokaż" /></td> </tr> </form> </table> <br /><br />'; $prev = $int_od - $int_poile; if($prev >=0) { { echo '<a href="index.php?po=' . $int_poile .'&od=' . $prev . '"><span class="arrows">« Poprzednia </span></a>'; } else { echo '<a href="index.php?od=' . $prev . '"><span class="arrows">« Poprzednia </span></a>'; } } else { } $x = 0; for($j = 0; $j<$newsy; $j+=$int_poile) { if ($j != 0) { } if($j == $_GET['od']) { } else { { } else { } } $x++; } $next = $int_od + $int_poile; if($next<floor($newsy)) { { echo '<a href="index.php?po=' . $int_poile .'&od='. $next . '"><span class="arrows">« Poprzednia </span></a>'; } else { echo '<a href="index.php?od=' .$next . '"><span class="arrows"> Następna »</span></a>'; } } else { } ?>
i chodzi o to ze chce przekazac wartosci z linii 107 so linii 47 zeby moc sortowac newsy tak jak to sobie wybieram! w jaki sposob moge to zrobic?