Размер файла: 1.9Kb
<?php
include "config.php";
include "incl/wml.inc";
if(!isset($t)){$t=0;}
is_topic($t);
$fs=open_file("$data/$t");
$fs=explode("\n",$fs);
$posts=count($fs);
if(isset($l)){$l=(int)$l;}else{$l=0;}
if($l>=$posts){$l=0;}
if(isset($n)){$n=(int)$n;}else{$n=0;}$p=$n*220;
if($n!=0){$er2=$n+1;$jj=' p.'.$er2;}else{$jj='';}
$er1=$l+1;$mg='Post '.$er1."($posts)".$jj;
$row=abc_only($fs[$l],1);if($row==0){$mg='Error';$row=':|::|::|:The post contains non-latin letters and cannot be shown:|::|:';}
print "<card id=\"show\" title=\"$mg\">";
$row=explode(":|:",$row);$fq=substr($row[3],$p,220);
print "<p><a href=\"wadd.php?f=$f&t=$t&u=$random\">Add...</a> <a href=\"wnd.php?f=$f&u=$random\">Topics</a></p>";
if($l!=0){$x=$l-1;print "<p><a href=\"wshow.php?f=$f&t=$t&l=0&u=$random\">*</a> <a href=\"wshow.php?f=$f&t=$t&l=$x&u=$random\"><<</a> ";}else{print "<p>";}
if($l<$posts-1){$y=$l+1;$g=$posts-1;print "<a href=\"wshow.php?f=$f&t=$t&l=$y&u=$random\">>></a> <a href=\"wshow.php?f=$f&t=$t&l=$g&u=$random\">*</a></p>\n";}else{print "</p>\n";}
if($n!=0){$d=$n-1;print "<p><a href=\"wshow.php?f=$f&t=$t&l=$l&n=$d&u=$random\">...</a></p>";}
if(!strstr($row[0],' ')){$row[0]=time_offset($row[0]);}
print "<p>$row[2] $row[0]<br /> <small>$fq</small></p>";
if(strlen($fq)>=220){$d=$n+1;print "<p><a href=\"wshow.php?f=$f&t=$t&l=$l&n=$d&u=$random\">...</a></p>";}
if($l!=0){$x=$l-1;print "<p><a href=\"wshow.php?f=$f&t=$t&l=0&u=$random\">*</a> <a href=\"wshow.php?f=$f&t=$t&l=$x&u=$random\"><<</a> ";}else{print "<p>";}
if($l<$posts-1){$y=$l+1;$g=$posts-1;print "<a href=\"wshow.php?f=$f&t=$t&l=$y&u=$random\">>></a> <a href=\"wshow.php?f=$f&t=$t&l=$g&u=$random\">*</a></p>\n";}else{print "</p>\n";}
?></card></wml>