Просмотр файла magforum/writeMess.php

Размер файла: 2.47Kb
<?
                    
require("functionChat.ssp");

$r = GetRandom();

$ReplyID = GetReplyID($num);

openDB();

$tonick="";
if (isset($to))
{
  $result=mysql_query("select * from users where nick='$to'") or   die(mysql_error());
  $CountUsers=mysql_num_rows($result);
  If ($CountUsers != 1)   LogResult(utf(4),utf(9),"index.php?p=$r&amp;login=$login&amp;pass=$pass"); 
  // Нет такого зарегистрированного имени
  $tonick = mysql_result($result,0, "nick");
  $toid = mysql_result($result,0, "ind");
}  

$sqlSel="select * from forum where num='$num'";
$result=mysql_query($sqlSel) or die(mysql_error());
$CountUsers=mysql_num_rows($result);
If ($CountUsers != 1) LogResult(utf(4),utf(28),"index.php?p=$r"); 
$Tmess = mysql_result($result,0, "messtext");
mysql_close();




require("headerwml.ssp");
echo "<card id=\"$MagForum\" title=\"".utf(43)."\">\n";
echo "<p align=\"center\">";
echo utf(51).": ".win2utf($Tmess);
if (isset($to)) { echo "<br/>".utf(14).":&nbsp;".NoClones($tonick); }
   
echo "<br/><input name=\"mymess\" maxlength=\"200\" emptyok=\"true\" title=\"=\" type=\"text\"/></p><p>\n";   


echo "<anchor>- ".utf(43);
echo "<go method=\"post\" href=\"addMess.php?p=$r&amp;login=$login&amp;pass=$pass&amp;to=$tonick&amp;num=$num\">\n";
echo "<postfield name=\"log\" value=\"next\"/>\n";
echo "<postfield name=\"messtype\" value=\"$ReplyType\"/>\n";
echo "<postfield name=\"tonick\" value=\"$ReplyID\"/>\n";
echo "<postfield name=\"mymess\" value=\"$(mymess)\"/>\n";
echo "</go>\n";
echo "</anchor>\n"; 


echo "<br/><a href=\"dispR.php?p=$r&amp;login=$login&amp;pass=$pass&amp;num=$num&amp;page=old\">- ".utf(9)."</a>\n";
echo "<br/><a href=\"forums.php?p=$r&amp;login=$login&amp;pass=$pass\">- ".utf(18)."</a>\n";

if (isset($to)) 
{
  echo "<br/><a href=\"profile.php?p=$r&amp;login=$login&amp;pass=$pass&amp;to=$to\">- ".utf(17)."</a>\n";

  echo "<br/><anchor>- ".utf(16);
  echo "<go method=\"post\" href=\"addMess.php?p=$r&amp;login=$login&amp;pass=$pass&amp;num=$num\">\n";
  echo "<postfield name=\"log\" value=\"next\"/>\n";
  echo "<postfield name=\"messtype\" value=\"$UnReadType\"/>\n";
  echo "<postfield name=\"toid\" value=\"$toid\"/>\n";
  echo "<postfield name=\"tonick\" value=\"$tonick\"/>\n";
  echo "<postfield name=\"mymess\" value=\"$(mymess)\"/>\n";
  echo "</go>\n";
  echo "</anchor>\n"; 
}  

echo "<do type=\"prev\" label=\"".utf(9)."\">\n";
echo "<prev/>\n";
echo "</do>\n";

echo "</p>";
include ("bottom.inc");
?>