File size: 2.68Kb
<?php
header("Content-type:text/html; charset=utf-8");
include("core.php"); //load main functions
include("conf.php"); //load config
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<link rel=\"shortcut icon\" href=\"logo/icon.php\"><meta http-equiv=\"refresh\" content=\"2;URL=index.php?action=usercp&nick=$nick&pass=$pass\"/><title>PIZDEC.RU</title><style type=\"text/css\">
body { font-weight: normal; font-size: normal; font-family: georgia; color: #FFFF00; background-color: #000033 }
a:link { text-decoration: underline; color : #FF00FF }
a:active { text-decoration: underline; color : #FFFF00 }
a:visited { text-decoration: underline; color : #00FFFF }
a:hover { text-decoration: none; color : #FFFF00 }
div { margin: 1px 0px 1px 0px; padding: 5px 5px 5px 5px; font-weight: bold;}
div.black{ background-color: #33CCFF; padding-top: 3px; padding-bottom: 3px; padding-left: 4px; border: 1px solid; text-align: center;}
div.blue{ background-color: #000066; text-align: left;}
a {font-weight: bold;}</style>
</head>
<body bgcolor=\"#000033\"><div class=\"black\"><img src=\"logo.gif\" alt=\"\"/><br/><font color=\"#FF0000\">Форум для риальных поцанов!</font></div>";
echo "<div>";
$nick=$_GET["nick"];
$pass=$_GET["pass"];
$email=$_POST["email"];
$owntext=$_POST["owntext"];
$avataras=$_POST["avataras"];
$svetajne=$_POST["svetajne"];
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]{4,})$]", $email)) {
$updatecp=mysql_query("UPDATE users SET email='".$email."', owntext='".$owntext."', avatar='".$avataras."', site='".$svetajne."' WHERE name='".$nick."'");
if (!$updatecp) echo "Problems!"; else echo "Информация обновленна!";
} else echo "<font color=\"#FF0000\">Email неправильный</font>";} else echo "<font color=\"#FF0000\">Аватар неправильный!</font>";
//} else echo "Max avatar size is 128x128!";
} else echo "Login before changing your info!";
echo "<br/><hr/><a href=\"index.php?nick=$nick&pass=$pass\"><font color=\"#FF00FF\">: Хуерумы</font></a><br/><a href=\"$ssite\"><font color=\"#FF0000\">$coppy</font></a>";
echo $endhtml;
?>