File size: 1.56Kb
<?
require("functionChat.ssp");
require("headerwml.ssp");
$r = GetRandom();
echo "<card id=\"$MagMail\" title=\"$menu[22]\">";
echo "<onevent type=\"onenterforward\">\n";
echo "<refresh>\n";
echo "<setvar name=\"to\" value=\"\"/>\n";
echo "<setvar name=\"sel\" value=\"\"/>\n";
echo "</refresh></onevent>\n";
echo "<p align=\"center\">";
echo "$menu[47]<br/>";
echo "$menu[10]:<br/>";
echo "<input name=\"to\" emptyok=\"true\" title=\"=\" type=\"text\" maxlength=\"50\"/>";
openDB();
$result = checkpass($login,$pass,"friends");
$friends = mysql_result($result,0, "friends");
//echo "<br/>$friends<br/>";
mysql_close();
if (isset($foto)) $fotos="&foto=$foto";
else $fotos = "";
if ($friends == "")
{
echo $menu[49];
echo "<a href=\"writeMess.php?p=$r&to=$(to:escape)&login=$login&pass=$pass$fotos\">$menu[3]</a>\n";
}
else
{
$records = explode($dlm,$friends);
$maxrec = count($records);
echo "$menu[48] (1-$maxrec):<br/>";
echo "<input name=\"sel\" emptyok=\"true\" format=\"*N\" title=\"=\" type=\"text\" maxlength=\"2\"/>";
echo "<a href=\"writeMess.php?p=$r&sel=$(sel)&to=$(to:escape)&login=$login&pass=$pass$fotos\">$menu[3]</a>\n";
echo "</p><p>\n";
for ($i = 1; $i <= $maxrec; $i++)
{
echo "<b>$i.</b> ".win2utf($records[$i-1])."\n";
if ($i != $maxrec) { echo "<br/>\n";}
}
}
echo "</p><p align=\"center\"><a href=\"dispMess.php?p=$r&page=old&login=$login&pass=$pass\">$menu[2]</a>\n";
echo "</p>";
include ("bottom.inc");
?>