<?php

/*** Freedom City | Check RPGBUNNY.COM for more Full RPG Sources | www.rpgbunny.com ***/include "antet.php"; include "func.php";
$config=config();
if (!$config[3][1]) msg($lang['regClosed']);
else
{
 if (!$config[0][1]) $ip=$_SERVER["REMOTE_ADDR"]; else $ip="-";
 if (!$config[1][1]) $email=$_POST["email"]; else $email="-";
 
 if (!is_user($_POST["name"], $email, $ip))
  if (($_POST["name"]!="")&&($_POST["pass"]!="")&&($_POST["pass"]==$_POST["pass_"]))
   if ($_SESSION["code"]==$_POST["code"]) reg($_POST["name"], md5($_POST["pass"]), $_POST["email"], $_POST["faction"]+1);
   else header('Location: loginbox.php');
  else header('Location: loginbox.php');
 else header('Location: loginbox.php');
 session_destroy();
}
?>