$elements["title"]='НОВИНИ '; $elements["keywords"]=""; require_once("adpanel/functions.inc.php"); include_once("adpanel/".MYSQL); $dbc=open_connection(); include("top.inc.php"); $current_month=date("n"); $current_year=date("Y"); if($current_month<9){$start_date=($current_year-1).'-09-01';}else{$start_date=$current_year.'-09-01';} if(isset($_GET["pg"]))$pg_a=(int)$_GET["pg"]; if($pg_a<=0)$pg_a=1; $broi_q=mysql_query("select count(ID) from news where status=1 and date(post_date)>='$start_date'",$dbc); $qqq=mysql_fetch_array($broi_q); $obshto=$qqq[0]; if($obshto%30==0)$broi_pg=intval($obshto/30);else $broi_pg=intval($obshto/30)+1; if($pg_a>$broi_pg)$pg_a=$broi_pg; //echo "pg e: ".$broi_pg; $start=($pg_a*30)-30; if($start<0)$start=0; $q="select news.ID,news.image_n,post_title,post_content,date_format(post_date,'%d.%m.%Y') as dd from news where status=1 and date(post_date)>='$start_date' order by post_date desc,news.ID desc limit $start,30"; $r=mysql_query($q,$dbc); $broi_novini=mysql_num_rows($r); if($broi_novini>0){ if($broi_pg>1 && $obshto>30){ echo'
'; show_page_count($broi_pg,'news.php','',13,$pg_a,4); echo '
'; } echo "| ";
if($row["image_n"]!=''){
$new_image='upload/news/'.$row["ID"].".".$row["image_n"];
?>
| ';
?>
$p_content=substr(strip_tags($row["post_content"]),0,1000); if(strpos($p_content,"[/caption]")>0)$n_pcpntent=substr($p_content,strpos($p_content,"[/caption]")+10);else $n_pcpntent=$p_content; echo str_stop($n_pcpntent,700); ?> echo " |