View file sgb/retrive.php

File size: 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=\"&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C;\">\n";

echo "<p align=\"left\" mode=\"wrap\">\n";



if(empty($action)) {

echo "&#x412;&#x430;&#x448; id:<br/><input name=\"id$ref\" /><br/>";

echo "<anchor>&#x412;&#x43E;&#x441;&#x441;&#x442;&#x430;&#x43D;&#x43E;&#x432;&#x438;&#x442;&#x44C;<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 "&#x418;&#x437;&#x432;&#x438;&#x43D;&#x438;&#x442;&#x435;, &#x43D;&#x43E; &#x433;&#x43E;&#x441;&#x442;&#x435;&#x432;&#x43E;&#x439; &#x43A;&#x43D;&#x438;&#x433;&#x438; &#x43D;&#x435; &#x441;&#x443;&#x449;&#x435;&#x441;&#x442;&#x432;&#x443;&#x435;&#x442;!";

echo "<br/><a href=\"in.php\">&#8592;&#x41D;&#x430;&#x437;&#x430;&#x434;</a>";

echo "<br/><a href=\"http://wap.waup.ru\">&#169; 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 "&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C; &#x43E;&#x442;&#x43F;&#x440;&#x430;&#x432;&#x43B;&#x435;&#x43D; &#x432;&#x430;&#x43C; &#x43D;&#x430; Email, &#x443;&#x43A;&#x430;&#x437;&#x430;&#x43D;&#x43D;&#x44B;&#x439; &#x43F;&#x440;&#x438; &#x440;&#x435;&#x433;&#x438;&#x441;&#x442;&#x440;&#x430;&#x446;&#x438;&#x438;.";



}

echo "<br/><a href=\"in.php\">&#x41D;&#x430;&#x437;&#x430;&#x434;</a>";

echo "<br/><a href=\"http://wap.waup.ru\">&#169; wap.waup.ru</a>";

echo "</p></card></wml>";

mysql_close ($link);

?>