"; echo "
"; echo "

Последни новини

"; echo "
"; echo "

$tipid

"; $st=$_GET['st']; if(!$st)$st=0; $kr=$st+$pg; mysql_connect("localhost:/tmp/mysql5.sock","resu321","rabota") or die("No connection!"); mysql_select_db("eplovdiv_news_bg"); mysql_query("SET NAMES 'cp1251'")or die("No setting names!"); $res = mysql_query("select * from imoti order by id desc"); $res2 = mysql_query("select * from imoti order by id desc LIMIT $st,$pg "); mysql_close(); $num=mysql_num_rows($res); $num2=mysql_num_rows($res2); if($num2>0){ for($i=0;$i<$num2; $i++){ $id=mysql_result($res2,$i,"id"); $tipid=mysql_result($res2,$i,"tip"); mysql_connect("localhost:/tmp/mysql5.sock","resu321","rabota") or die("No connection!"); mysql_select_db("eplovdiv_news_bg"); mysql_query("SET NAMES 'cp1251'")or die("No setting names!"); $res3=mysql_query("select * from categoriq where id='$tipid'"); $numcat=mysql_num_rows($res3); mysql_close(); $video=mysql_result($res2,$i,"video"); $audio=mysql_result($res2,$i,"audio"); echo"".mysql_result($res2,$i,"date")." "; $pic=mysql_result($res2,$i,"pic"); $top=mysql_result($res2,$i,"top"); if($pic) { $pics=explode(",",$pic); $m=0; echo "
"; } else echo" "; $opis=mysql_result($res2,$i,"opisan"); $opis=nl2br($opis); if($top)echo""; $katego="Не е в категория
"; if($numcat)$katego="".mysql_result($res3,0,"name")." "; echo"
Категория: $katego
" ; echo "
".mysql_result($res2,$i,"mqsto")." ...

Повече »






"; } } $tip=str_replace(" ","+",$tip); #Pagenation линкче за назад $pr=$p-1; $s=$st-$pg; if($s>=0)echo" "; #Край на линкчето за назад #Pagenation начало на излизането на номера на страниците $pages=$num/$pg; $uk=0; for($u=0;$u<$pages; $u++){ $us++; if($us!=$p)echo"$us"; else echo"($us)"; if($us<$pages)echo" - "; $uk+=$pg; } echo" "; #Край на излизането на страниците Pagenation #Pagenation линкче за напред $n=$p+1; if($kr<$num)echo" "; #Край на линкчето за напред echo "
"; ?>