<?
        $title="Новости";
        include "function/lib.php";
        $page.="<div class='f'>Новости</div></div>";
 	      $page.="<div class='link'>";
  		$sql=mysql_query("SELECT count(date) FROM news");
  		$count= mysql_result($sql,0,0);
  		if (isset($_GET[str])){$_GET[str]=htmlspecialchars($_GET[str]);}
  		else {$_GET[str]=1;}
  		$begin=($_GET[str]-1)*10;
        
        $sql=mysql_query("SELECT * FROM news ORDER BY date DESC LIMIT $begin,10");
        while($news=mysql_fetch_array($sql)){
        $page.="[<b>$news[zag]</b>](".date("j.m.",$news["date"]).(date("Y",$news["date"])+0).")<br/>";
            $page.="$news[news]<br/>";
            $page.="------<br/>";
        	
        	
        	
        } 
        
        $page.=nav_page(ceil($count/10),$_GET[str],"./news.php?str=")."<br/></div>";
        $page.="<div class='d'><a href='./'>На главную</a></div>";
        
        display($page,$title,$style);
        echo info_compress();
     echo $time;

?>