Файл: LinkForum/LinkUserInc/LinkStartGameOk.php
Строк: 44
<?php
/**
* @author MyStyle
* @copyright 2013
*/
if(isset($_GET['LinkUserProfile1'])){
//unset($_COOKIE['datereg']);
if(isset($_COOKIE['datereg'])){
header("Location: index.php");
exit;
}else{
setcookie('datereg',1,time()+60*60);
mysql_query("INSERT INTO `mystyle_user` SET `guest` = '1', `date` = '".$time."'");
$post=mysql_insert_id();
$nick = 'Guest '.$post.'';
$pass1 = rand(123456,999999);
$reg = encrypt($pass1);
$pit = 'images/dogs/bolonka_small.png';
mysql_query("UPDATE `mystyle_user` SET `rating` = '0', `pol` = '2', `ruby` = '2', `beauty2` = '2', `beauty` = '2', `faith` = '7', `like` = '0', `bold` = '1', `level` = '1', `pitomec` = '".$pit."', `nick` = '".$nick."', `pass` = '".$reg."', `pass1` = '".$pass1."' WHERE `id` = '".$post."'");
setcookie('id', $post, time() + 60 * 60 * 24 * 365);
setcookie('pass', $reg, time() + 60 * 60 * 24 * 365);
header("Location: index.php");
exit;
}
}elseif(isset($_GET['LinkUserProfile2'])){
unset($_COOKIE['datereg']);
if(isset($_COOKIE['datereg'])){
header("Location: index.php");
exit;
}else{
setcookie('datereg',1,time()+60*60);
mysql_query("INSERT INTO `mystyle_user` SET `guest` = '1', `date` = '".$time."'");
$post=mysql_insert_id();
$nick = 'Guest '.$post.'';
$pass1 = rand(123456,999999);
$reg = encrypt($pass1);
$pit = 'images/dogs/haski_small.png';
mysql_query("UPDATE `mystyle_user` SET `rating` = '0', `pol` = '2', `ruby` = '2', `beauty2` = '2', `beauty` = '2', `faith` = '7', `like` = '0', `bold` = '1', `level` = '1', `pitomec` = '".$pit."', `nick` = '".$nick."', `pass` = '".$reg."', `pass1` = '".$pass1."' WHERE `id` = '".$post."'");
setcookie('id', $post, time() + 60 * 60 * 24 * 365);
setcookie('pass', $reg, time() + 60 * 60 * 24 * 365);
header("Location: index.php");
exit;
}
}elseif(isset($_GET['LinkUserProfile3'])){
//unset($_COOKIE['datereg']);
if(isset($_COOKIE['datereg'])){
header("Location: index.php");
exit;
}else{
setcookie('datereg',1,time()+60*60);
mysql_query("INSERT INTO `mystyle_user` SET `guest` = '1', `date` = '".$time."'");
$post=mysql_insert_id();
$nick = 'Guest '.$post.'';
$pass1 = rand(123456,999999);
$reg = encrypt($pass1);
$pit = 'images/dogs/sharpei_small.png';
mysql_query("UPDATE `mystyle_user` SET `rating` = '0', `pol` = '2', `ruby` = '2', `beauty2` = '2', `beauty` = '2', `faith` = '7', `like` = '0', `bold` = '1', `level` = '1', `pitomec` = '".$pit."', `nick` = '".$nick."', `pass` = '".$reg."', `pass1` = '".$pass1."' WHERE `id` = '".$post."'");
setcookie('id', $post, time() + 60 * 60 * 24 * 365);
setcookie('pass', $reg, time() + 60 * 60 * 24 * 365);
header("Location: index.php");
exit;
}
}else{
}
?>