"; exit; } 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='$tip' "); mysql_close(); $tipid=mysql_result($res3,0,"name"); $p=$_GET['p']; if(!$p)$p=1; $fp=fopen("page.txt","r"); $pg=fread($fp,filesize("page.txt")); fclose($fp); ?> e-Plovdiv.com: <? echo " $tipid "; ?> - Страница <? echo " $p "; ?>
 
"; 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 where tip='$tip' order by id desc"); $res2 = mysql_query("select * from imoti where tip='$tip' 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"); 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'"); mysql_close(); $video=mysql_result($res2,$i,"video"); $audio=mysql_result($res2,$i,"audio"); $zagl=mysql_result($res2,$i,"zagl"); 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 "
$zagl
"; } else echo" "; $opis=mysql_result($res2,$i,"opisan"); $opis=nl2br($opis); if($top)echo" "; echo"
".mysql_result($res2,$i,"mqsto")." ...
" ; echo mysql_result($res2, $i, "gostna")."

Повече »







"; } } $tip=str_replace(" ","+",$tip); # Pagenation линкче за назад $n=$p+1; if($kr<$num)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 линкче за напред $pr=$p-1; $s=$st-$pg; if($s>=0)echo" "; # Край на линкчето за назад echo "
"; ?>