'; $id = $_GET['id']; if (isset($id)){ $result = mysql_query("SELECT * FROM news WHERE id = ".$id); $table = 'news'; $tableimg = "images"; $line = mysql_fetch_array($result,MYSQL_ASSOC); $data = $line["date"]; $resimage = mysql_query("SELECT count(imageid) as timg FROM ".$tableimg." WHERE id = ".$id); $rowimg = mysql_fetch_array($resimage,MYSQL_ASSOC); $totalimg = $rowimg['timg']; $resimage = mysql_query("SELECT * FROM ".$tableimg." WHERE id = ".$id); print ' '; if ($line["image_type"] != "0"){ $size = minimizer($line["img_w"],$line["img_h"],"*",$line['height']); print ' '; }else{ print ' '; } print ' '; } if($totalimg != 0){ $i = 0; print ' '; } $newspp = 11; if(!isset($page)){ $page = 1; }else{ $page = $_GET['page']; } $result = mysql_query("SELECT count(*) AS total FROM news WHERE visible='1' AND date <= '".date('Y-m-d H:i:s')."' "); $row = mysql_fetch_array($result,MYSQL_ASSOC); $total = (int)$row["total"]; $result = mysql_query("SELECT * FROM news WHERE visible='1' AND date <= '".date('Y-m-d H:i:s')."' ORDER BY date DESC, id DESC LIMIT ".($page-1)*$newspp.",".$newspp); $table = 'news'; print '
'.date("d",strtotime($line["date"])).'  '.$lMonths[(int)date("m",strtotime($line["date"]))].'  '.date("Y",strtotime($line["date"])).'
'.$line["subject"].'

'.$line['tuimage'].'
'.$line["firstpart"].'

 '.$line["secondpart"].'
'.$line["firstpart"].'

'.$line["secondpart"].'
'; while($rowimg = mysql_fetch_array($resimage,MYSQL_ASSOC)){ if(($i%4 == 0) && ($i != 0)){ print ' '; } print ' '; $i++; } print '

'.$rowimg['picTxt'].'
'; if (mysql_num_rows($result)){ $i = 0; while($line = mysql_fetch_array($result)){ $data = $line["date"]; print ' '; } } print '
'.getDay($data,0).' '.$line["subject"].'
'; if ($page != 1) print ''.$lPrevNews.' '; for ($ii=0;$ii<$total&&$total>$newspp;$ii+=$newspp){ if(($ii/$newspp+1) == $page){ print ''.($ii/$newspp+1).' '; }else{ print ''.($ii/$newspp+1).' '; } } if ($page*$newspp < $total) print ''.$lNextNews.' '; print '
'; ?>