--- sections/zaposleni.inc 2001/07/11 08:09:17 1.1 +++ sections/zaposleni.inc 2001/11/07 14:24:02 1.4 @@ -1,15 +1,25 @@ prepare("$sql"); $sth->execute(); + $pos=1; + while ($row=$sth->fetchrow_hash()) { - $data[]=$row; + if ($row[pozicija]=="c") { + $data[]=$row; // duplicate if center + $pos=1; + } else { + if ($pos % 2 == 1) $row[pozicija]="l"; + else $row[pozicija]="r"; + $data[]=$row; + $pos++; + } } $smarty->assign( "data", $data );