Просмотр файла txtban/news.php

Размер файла: 2Kb
<? header("Content-Type: text/vnd.wap.wml");
header("Cache-Control: no-cache"); 
  echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>
  <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">";?>
<?php
include "config.inc.php";
include "fo.php";
?><wml><card title="Ho&#x0432;oc&#x0442;&#x0438;"><?php
include "valid.php";

$ffile=@fopen("news/read.txt","r");
$file=@fgets($ffile,10);
@fclose($ffile);
 If ($file==""){
 echo "<p><small>Ho&#x0432;oc&#x0442;e&#x0439; &#x043D;e&#x0442;<br/>
 <a href=\"apanel.php?id=$id&amp;pass=$pass\">B &#x043F;a&#x043D;e&#x043B;&#x044C;</a></small></p>
</card></wml>";
 exit;
 }

$pp=0;
$f=@fopen("news/read.txt","r");
while($fie=@fgets($f,100)){
$pp++;
}
//echo $pp;
@fclose($f);

If (!isset($_GET['p']) || !is_numeric($_GET['p']) ||$_GET['p']<1){
$p=1;
} else $p=$_GET['p'];

If ((ceil($pp/5))<$p)

{
echo "<p><small>Ta&#x043A;o&#x0439; c&#x0442;pa&#x043D;&#x0438;&#x0446;&#x044B; &#x043D;e&#x0442;<br/>
 <a href=\"apanel.php?id=$id&amp;pass=$pass\">B &#x043F;a&#x043D;e&#x043B;&#x044C;</a></small></p>
</card></wml>";
 exit;
}

$ffile=@fopen("news/read.txt","r");

If ($p>1){
$set=0;
for($set=1;$set<=((($p-1)*5));$set++){
$filfffff=@fgets($ffile,100);

//echo "pp";
}
}




$i=0;
If ($p>1){
echo ('<p><a href="news.php?id='.$id.'&amp;pass='.$pass.'&amp;p='.($p-1).'">&lt;&lt;</a></p>');

}
  while ($fil=@fgets($ffile,100)){
If ($i>=5) break;
echo "<p>";
 echo "$fil<br/>
 <small>
 ";
 $i++;
 //echo $fil;
 $ftext=fopen("news/".trim($fil),"r");
 $text=@fgets($ftext,1000);
 @fclose($ftext);
 echo($text."</small></p>");
 }
 
 @fclose($ffile);
 If ((ceil($pp/5))>$p) 
 echo ('<p><small><a href="news.php?id='.$id.'&amp;pass='.$pass.'&amp;p='.($p+1).'">&gt;&gt;</a></small></p>');
//echo $pp;
// echo "</small></p>";
 echo "
 <p><small>
 <a href=\"apanel.php?id=$id&amp;pass=$pass\">B &#x043F;a&#x043D;e&#x043B;&#x044C;</a><br/><br/>

</small></p>";
 
 
 
 


?></card></wml>