Witam serdecznie mam taki problem.
Modyfikuje mój skrypt z kawałami i chciałem zmienić wygląd aby kawały były wyświetlanie jak na stronie www.wcipy.pl w 2 kolumnach
Myślałem nad tym żeby po dublować zmienne $res itp ale to nie wyjdzie, myślałem również aby zrobić div'a który za pomocą css wyświetlał by się w 2 kolumnach ale niestety to chyba jest nie wykonalne.
Strona wygląda tak:
<?
$res = mysql_query('select * from `stuff` where `category`=' . ((int
) $_GET['cat']));
if(isset($categories[$row['category']])) $cat = sprintf("%s", $categories[$row['category']]); else
$cat = (string) '';
<title>'.$site_www2.' - kawały - '.$cat.'</title>
</html>';
<table width="100% cellpadding="0" cellspacing="0" class="brd">
<tr><td class="m2">kawały - '.$cat.'</td></tr>
<tr><td width="100%"><div class="newsy">';
?>
<?php
if(isset($_GET['typ'])) { $typ = '`typ` = ' . (int) $_GET['typ'];
}else{
$typ = "((`typ` >= 1 and `typ` <= 4) or (typ = '15') or (typ = '16') or (typ = '17'))";
}
//$typ = (isset($_GET['typ']) ? '`typ` = ' . (int) $_GET['typ'] : '((`typ` >= 1 and `typ` <= 4) or (typ = '15'))');
$cat = (isset($_GET['cat']) ?
' and `category` = ' . (int
) $_GET['cat'] 
: ''); $order = '';
if ($_GET['top'] == 1)
{
$order = ' order by `ocena` desc';
}
elseif ($_GET['last'] == 1)
{
$order = ' order by `added` desc';
}
$res = mysql_query('select * from `stuff` where ' . $typ . $cat); // ilosć trafień
$res = mysql_query('select * from `stuff` where ' . $typ . $cat . $order . ' order by added desc limit ' . ((int
) $_GET['currentpage'] * 10) . ', ' . ((int
) $_GET['currentpage'] * 10
+ 10
));
if ($hits == 0)
{
echo 'Nie ma żadnych rekordów w tej kategorii.'; }
else
{
{
if($row['added']>0)
$date = sprintf('%s / %s', date('Y.m.d', $row['added']), date('::s', $row['added'])); else
$date = (string) '';
$comments_count = (int) 0;
$query = sprintf("SELECT COUNT(*) AS CommentsCount FROM komentarze WHERE stuff='%d'", $row['id']); if($comments) {
$comments_count = $record['CommentsCount'];
}
if(isset($categories[$row['category']])) $cat = sprintf("%: ", $categories[$row['category']]); else
$cat = (string) '';
printf('<p class="linki"align="left"><b>'.$count.'Dowcipy - '.$cat.' </b><br> ' . $row['opis'] . '</font>
<center>
</p>
<p align="center"> <b>Autor: </b> ' . $row['login'] . '<b> Ocen: </b> ' . $row['ocena'] . '<b> </b></b><br>
[<font size="2"><a href="index.php?page=display&id=' . $row['id'] . '">więcej...</a></font>]<hr>',
$cat, $row['id'], $row['tytul'],
$date,
$row['ocena'], $row['counter'],
$comments_count, $row['login']);
if ($licznik == $liczba_kolumn - 1){
include'reklama2.php';
}
$licznik++;
$licznik %= $liczba_kolumn;
}
}
echo '<div style="text-alig: center">';
/********* NUMEROWANIE *********/
$temp = min((int
) $_GET['currentpage'] + 4
, ceil((float
) $hits / 9
.0
));
for ($i = max((int
) $_GET['currentpage'] - 4
, 0
); $i < $temp; $i++) {
print("<a href=\"index.php?page=list¤tpage=" . $i . "&cat=" . $_GET['cat'] . "\"><font size=2>" . ($i+1) . " | </font></a>"); if($i == ($temp - 1)) {
print("<a href=\"index.php?page=list¤tpage=" . ($temp - 1) . "&cat=" . $_GET['cat'] . "\"><img src=\"gfx/dalej.jpg\" border=\"0\"></a>"); }
}
/*******************************/
?>
czy mógłby mi ktoś doradzić naprowadzić.