View file parkerforum2/showtopic.php

File size: 3.51Kb
<?
if(QUERY_STRING=="logged");
$logged=0;
session_start();
include"design/header.htm";
include"params.php";
include"colors.php";
if($epass==$pass and $elog==$log)
{
print"<div align=right><font size=1 face=$fonttype1 color=$fontcolor1><a href='admin.php'>Вы опознаны как администратор форума!</a></font></div>";
$logged=1;
}
$gettopic=file("topics.dat");
list($id,$date,$author,$mail,$icq,$site,$topic,$msg)=split("::",$gettopic[$line]);

$access = "data/seens/$id.dat";
$visits = @file($access);
$current_seens = $visits[0];
++$current_seens;
$fh = fopen($access, "w");
@fwrite($fh, $current_seens);
fclose($fh);

print"<font size=2 face=$fonttype1><a href='index.php?page=1' color=$fontcolor1>Главная</a> / <B>$topic</B></font><BR><font size=2 face=$fonttype1><a href='answer.php?line=$line'><B>Добавить ответ!</B></a></font><BR><BR>";
print"
<table width=\"100%\" border=\"0\" bgcolor=\"$border1\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td>
<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\">
<tr>
<td bgcolor=\"$color5\" valign=\"top\" width=\"25%\">&nbsp;<font size=1 face=$fonttype1 color=$fontcolor1>$date</font><BR>
&nbsp;<font size=2 face=$fonttype1 color=$fontcolor1><a href='mailto:$mail'><B>$author</B></a><BR>&nbsp;<a href='http://$site'>$site</a><BR>&nbsp;<a href='http://icq.com/$icq'>$icq</a><BR><BR></font>
</td>
<td bgcolor=\"$color6\" valign=\"top\" width=\"74%\">
<font size=3 face=$fonttype1 color=$fontcolor1><B>$topic</B></font><BR>
<font size=2 face=$fonttype1 color=$fontcolor1>$msg</font>
<BR>
</td>
</tr>
</table>
</td>
</tr>
</table><BR>";

if($page=="")
$page=1;
$file=@file("data/answers/$id.dat");
$entries=count($file);
$total=$entries/$nums;
$pages = intval($total);
print"<font size=1 face=$fonttype1 color=$fontcolor1>Страницы:</font>&nbsp;&nbsp;";
for ($i = 1; $i <= ceil($entries/$nums); $i++)
{
print "<font size=\"2\" face=$fonttype1 color=$fontcolor1><A HREF=showtopic.php?line=$line&page=$i>$i</A></font> ";
}
print "<BR><BR>";

if ($page != "")
{
$Tmp=$nums*$page;
$tmp=$nums;
$up=$Tmp-$tmp;

$down=$up+$nums;
for ($i=$up; $i<$down; $i++)
{
if ($file[$i]!="")
{
list($udate,$uname,$umail,$uicq,$uurl,$umsg,$ip)=split("::",$file[$i]);

if($logged==1)
{
$message1="| <a href='edit.php?object=answer&line=$i&fileid=$id&Line=$line&Page=$page'>редактировать</a>";
$message2="<a href='delete.php?object=answer&line=$i&fileid=$id&Line=$line'>удалить</a>";
}

$n=$i+1;
print"
<table width=\"100%\" border=\"0\" bgcolor=\"$border1\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td>
<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\">
<tr>
<td bgcolor=\"$color7\" valign=\"top\" width=\"25%\">
<font size=1 face=$fonttype1 color=$fontcolor1>&nbsp;$n / $udate $message1 $message2</font><BR>
&nbsp;<font size=2 face=$fonttype1 color=$fontcolor1><a href='mailto:$umail'><B>$uname</B></a><BR>&nbsp;<a href='http://$uurl'>$uurl</a><BR>&nbsp;<a href='http://icq.com/$uicq'>$uicq</a><BR><BR></font>
</td>
<td bgcolor=\"$color8\" valign=\"top\" width=\"74%\">
<font size=2 face=$fonttype1 color=$fontcolor1>$umsg</font>
<BR><BR><BR><div align='right'><a href='quote.php?line=$line'>Цитировать</a>&nbsp;&nbsp;</div>
</td>
</tr>
</table>
</td>
</tr>
</table><BR>";
}
}
}
print"<BR><font size=1 face=$fonttype1 color=$fontcolor1><div align='center'>ParkerForum 2.00<BR>powered by <a href='mailto:[email protected]'>ademan</a><BR><a href='http://khoroshun.com'><B>www.khoroshun.com</B></a></font>";
include"design/footer.htm";
?>