");
?>
RPG 2
");
if(eregi("[^0-9a-z]",$usr_id)) exit("access denied");
if($_POST['cmd']=="Login"){
sleep(1);
$q=@mysql_fetch_array(mysql_query("select id from user where id='".$usr_id."' and pw='".$usr_pw."'"));
if($q['id']){
$_SESSION['id']=$q['id'];
exit("");
}
}
if($_POST['cmd']=="Register"){
if(eregi("admin",$usr_id)) exit("access denied");
$q=@mysql_fetch_array(mysql_query("select id,pw from user where id='".$usr_id."' or ip='".$_SERVER['REMOTE_ADDR']."'"));
if(!$q['id']){
mysql_query("insert into user(id,ip,lv,exp,hp,att,mhp,gold,turn,tm,pw) values('".$usr_id."','".$_SERVER['REMOTE_ADDR']."',1,0,10,2,10,100,10,0,'".$usr_pw."')");
echo("Done");
exit();
}
else{ echo("$_SERVER[REMOTE_ADDR]
userid : $q[id]
password : $q[pw]"); exit(); }
}
}
}
?>