Размер файла: 3.29Kb
<?
header("Cache-Control: no-cache");
header("Content-type:text/vnd.wap.wml");
$ref=rand(10000,1000000);
require("conf.inc.php");
$link = @mysql_pconnect ($MySQL_Hostname, $MySQL_Username, $MySQL_Password)
or die ("<wml>
<card id=\"error\" title=\"error\">
<do type=\"prev\" label=\"Back\"><prev/></do><p align=\"center\">Can not connect to MySQL<br/>".mysql_error()."</p>
</card>
</wml>");
@mysql_select_db($MySQLDatabasename) or die ("<wml>
<card id=\"error\" title=\"error\">
<do type=\"prev\" label=\"Back\"><prev/></do><p align=\"center\">error select the database...<br/>".mysql_error()."</p>
</card>
</wml>");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">\n";
echo "<wml>\n";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>\n";
echo "<card id=\"index\" title=\"Пароль\">\n";
echo "<p align=\"left\" mode=\"wrap\">\n";
if(empty($action)) {
echo "Ваш id:<br/><input name=\"id$ref\" /><br/>";
echo "<anchor>Восстановить<go href=\"retrive.php\" method=\"post\">
<postfield name=\"action\" value=\"done\"/>
<postfield name=\"id\" value=\"$(id$ref)\"/>
</go></anchor>";
}
else
{
$id = intval($id);
$id=@mysql_escape_string($id);
$sear=mysql_query("Select * from users where id='".$id."'");
if (mysql_affected_rows() == 0) {
echo "Извините, но гостевой книги не существует!";
echo "<br/><a href=\"in.php\">←Назад</a>";
echo "<br/><a href=\"http://wap.waup.ru\">© wap.waup.ru</a>";
echo "</p></card></wml>";
exit;
mysql_close($link);
}
$find=mysql_fetch_array($sear);
$past=$find['pass'];
$to=$find['email'];
$mes = "(Guest Book Service for your Site) http://wap.waup.ru Your Password: $past
Link your GuestBook: http://wap.waup.ru/sgb/index.php?id=$id
AvtoReanimator Password service WaUP.RU
------
Zdravstvuite! Parol ot Vashei gostevoi id=$id na servere http://wap.waup.ru : $past
Adres Vashei gostevoi: http://wap.waup.ru/sgb/index.php?id=$id
S uvazheniem, administracia portala WaUP.RU
";
$mes = convert_cyr_string( $mes, "w","k");
mail("$to", "Guestbook password", $mes, "From: [email protected]\r\nContent-type: text/plain; charset=KOI8-R\r\nX-Mailer: WaUP.RU-mail");
echo "Пароль отправлен вам на Email, указанный при регистрации.";
}
echo "<br/><a href=\"in.php\">Назад</a>";
echo "<br/><a href=\"http://wap.waup.ru\">© wap.waup.ru</a>";
echo "</p></card></wml>";
mysql_close ($link);
?>