if ( $lang == "BG" ) { ?>
новини
} ?>
if ( $lang == "EN" ) { ?>
news
} ?>
echo "
";
if( !$cntId ) { $cntId = $r2[2] ;}
echo "
" . $r1[0] . "
";
echo "
" . $r2[1] . "
";
$r2[3] = eregi_replace('-','/', $r2[3] ) ;
if( $r2[3] != "" ){
?>
if( $lang == "BG" ) { ?>
} ?>
if( $lang == "EN" ) { ?>
} ?>
}
$r2[0] = eregi_replace('\<[^\>]+if[^\>]+\>','', $r2[0]);
require("smap.php");
/* Pls see comment \|/ down the street
if ($pid > 99) echo("
");
if (isset($r2[0])) {
require("cl/HTMLCleaner.php");
$cleaner=new HTMLCleaner();
$cleaner->Options['UseTidy']=false;
$cleaner->Options['OutputXHTML']=false;
$cleaner->Options['Optimize']=true;
$cleaner->html=$r2[0];
$cleanHTML=$cleaner->cleanUp('cp1251');
//echo $cleanHTML;
//Jahsen-e :) ideata ne e da se cleanupva vsichoto formatting, shtoto te majat yako cvetove spanove s WYSWYG. Opitah se da "fix"-na v cleanera, no e po-prosto revert tuk. Pls come on skype da se sync-neme.
//echo $r2[0];
} else*/
echo $r2[0];
echo "
\n";
?>
if( $cntId )
{
$cmntQ = "SELECT cmntTitle, cmntAuthor, cmntText, cmntDate FROM COMMENTS WHERE cntId=$cntId AND pid=$pid";
$cmntR = mysql_query( $cmntQ );
echo mysql_error();
if( $cmntR )
{ $i = 1;
echo "";
}
if (( $pid > 7 && $pid < 14 ) || ( $pid > 24 && $pid < 31 ) || ( $pid > 34 && $pid < 41 ) || $pid == 100 || $pid == 200){
$rnd = rand(7,20);
$rnd1 = rand(1,6);
$rest = $rnd-$rnd1;
if( $lang == "BG" ) {
echo "";
}
if( $lang == "EN" ) {
echo "";
}
}
}
$limStart = intval( $_GET['lim'] );
$nextQ = "SELECT * from CONTENT where pid=$pid AND cntId != $cntId ORDER BY pDate DESC LIMIT $limStart, 5";
$countQ = "SELECT count(*) from CONTENT where pid=$pid and cntId != $cntId";
$countR = mysql_query( $countQ );
$count = mysql_result( $countR, 0 );
$newsR = mysql_query( $nextQ );
if( $newsR )
{
$newsA = array();
while( $row = mysql_fetch_row( $newsR ) ) { array_push( $newsA, $row );}
$cnt = 0;
foreach( $newsA as $newsPiece )
{
$cnt ++;
if( $limStart ) { $cnt = 3 ;} //Da, kopele!
if(($cnt)==1)
{
echo "
";
$newsPiece[3] = eregi_replace('\<[^\>]+\>','', $newsPiece[3]);
$newsPiece[3] = substr( $newsPiece[3], 0, 120 ) . " ... ";
echo "
";
echo "
$newsPiece[3]";
$newsPiece[6] = str_replace( '-','/', $newsPiece[6] );
echo "повече
";
echo "
Публикувано на $newsPiece[6]
";
echo "
";
}
if(($cnt)==2)
{
echo "
";
$newsPiece[3] = eregi_replace('\<[^\>]+\>','', $newsPiece[3]);
$newsPiece[3] = substr( $newsPiece[3], 0, 120 ) . " ... ";
echo "
";
echo "
$newsPiece[2]";
$newsPiece[6] = str_replace( '-','/', $newsPiece[6] );
echo "повече
";
echo "
Публикувано на $newsPiece[6]
";
echo "
";
}
if( $cnt > 2 )
{
echo "
";
echo "
";
}
}
}
if($count > 1 )
{
$pp = 5;
$pg = floor( $count / $pp ) + 1;
for( $p = 0 ; $p < $pg ; $p++ )
{
$cp = $p+1;
$currLim = $p * 5;
if( $currLim != $limStart )
{
echo "
" . $cp ." ";
}
else
{
echo $cp . " ";
}
}
}
?>