Размер файла: 1.51Kb
<?php
header("Content-type: text/vnd.wap.wml");
print "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<card id="login" title="WAP FORUMS">
<p align="center">
<?php
$nick=$_GET["nick"];
$pass=$_GET["pass"];
$email=$_POST["email"];
$owntext=$_POST["owntext"];
$avataras=$_POST["avataras"];
$svetajne=$_POST["svetajne"];
include("core.php"); //load main functions
include("conf.php"); //load config
echo connect($dbuser,$dbpass,$dbserver,$dbname);
echo login($nick,$pass);
echo "<br/>";
global $logged;
if ($logged) {
if (!$avataras==null) $avataropsk=substr($avataras,strlen($avataras)-3,3);
//$avatarosize=
//if ($avatarosize[0]<128 and $avatarosize[1]<128) {
// print_r(getimagesize($avataras));
if ($avataras=="http://" or $avataras==null or $avataropsk=="gif" or $avataropsk=="jpg"){
if(!eregi("^[A-Za-z0-9](([_.-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([.-]?[a-zA-Z0-9]+)*).([A-Za-z]{2,})$]", $email)) {
$updatecp=mysql_query("UPDATE users SET email='".$email."', owntext='".$owntext."', avatar='".$avataras."', site='".$svetajne."' WHERE name='".$nick."'");
if (!$updatecp) echo "Problems!"; else echo "User information updated successfully!";
} else echo "Your email is wrong!";} else echo "Your avatar is wrong!";
//} else echo "Max avatar size is 128x128!";
} else echo "Login before changing your info!";
echo "<br/><a href=\"index.php?nick=$nick&pass=$pass\">BACK</a>";
?>
</p>
</card>
</wml>