Location: PHPKode > projects > NodbForum > 0.1 Alfa/wshow.php
<?php
#############################################################################################
#																																														#
#																					NodbForum																					#
#																																														#
#					NodbForum is based on EasyForum developed by Host-Tings.		 											#
#					This program is distributed under the GPL license. Please read this for 					#
#					obtain more information.																													#
#																																														#
#		NodbForum is created, maintained and Copyright Guillermo Espert Carrasquer (el-eles)		#
#																																														#
#############################################################################################
 
include "global.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:|::|:';
}

echo "<card id=\"show\" title=\"$mg\">";
$row = explode(":|:",$row);
$fq = substr($row[3],$p,220);
echo "<p><a href=\"wadd.php?f=$f&amp;t=$t&amp;u=$random\">Add...</a> <a href=\"wnd.php?f=$f&amp;u=$random\">Topics</a></p>";

if($l != 0)
{
	$x = $l - 1;
	echo "<p><a href=\"wshow.php?f=$f&amp;t=$t&amp;l=0&amp;u=$random\">*</a>&nbsp;<a href=\"wshow.php?f=$f&amp;t=$t&amp;l=$x&amp;u=$random\">&lt;&lt;</a>&nbsp;&nbsp;";
}
else
{
	echo "<p>";
}
if($l < $posts - 1)
{
	$y = $l + 1;
	$g = $posts - 1;
	echo "<a href=\"wshow.php?f=$f&amp;t=$t&amp;l=$y&amp;u=$random\">&gt;&gt;</a>&nbsp;<a href=\"wshow.php?f=$f&amp;t=$t&amp;l=$g&amp;u=$random\">*</a></p>\n";
}
else
{
	echo "</p>\n";
}

if($n != 0)
{
	$d = $n - 1;
	echo "<p><a href=\"wshow.php?f=$f&amp;t=$t&amp;l=$l&amp;n=$d&amp;u=$random\">...</a></p>";
}
if(!strstr($row[0],' '))
{
	$row[0] = time_offset($row[0]);
}
echo "<p>$row[2] $row[0]<br /> <small>$fq</small></p>";
if(strlen($fq) >= 220)
{
	$d = $n + 1;
	echo "<p><a href=\"wshow.php?f=$f&amp;t=$t&amp;l=$l&amp;n=$d&amp;u=$random\">...</a></p>";
}

if($l != 0)
{
	$x = $l - 1;
	echo "<p><a href=\"wshow.php?f=$f&amp;t=$t&amp;l=0&amp;u=$random\">*</a>&nbsp;<a href=\"wshow.php?f=$f&amp;t=$t&amp;l=$x&amp;u=$random\">&lt;&lt;</a>&nbsp;&nbsp;";
}
else
{
	echo "<p>";
}
if($l < $posts - 1)
{
	$y = $l + 1;
	$g = $posts - 1;
	echo "<a href=\"wshow.php?f=$f&amp;t=$t&amp;l=$y&amp;u=$random\">&gt;&gt;</a>&nbsp;<a href=\"wshow.php?f=$f&amp;t=$t&amp;l=$g&amp;u=$random\">*</a></p>\n";
}
else
{
	echo "</p>\n";
}
?>
</card>
</wml>
Return current item: NodbForum