session_start() ;
HEADER( "location: https://internic.ma/order/clientarea.php" ) ;
if ($_SERVER['HTTP_HOST'] != 'internic.ma'){
header("HTTP/1.1 301 Moved Permanently", true, 301);
header("Location: https://internic.ma".$_SERVER['REQUEST_URI']);
}
//echo $_SERVER['HTTP_HOST'];
if (isset($_POST['dd'])){$dd = $_POST['dd'];} else{$dd="";}
if (isset($_POST['username'])){$username = $_POST['username'];} else{$username="";}
if (isset($_POST['password'])){$password = $_POST['password'];} else{$password="";}
if (isset($_GET['msg'])){$msg = $_GET['msg'];} else{$msg="";}
$userid="";
include ("../functions/connexion.php");
$message=""; $clientid="";
if($username != ""){
$query = sprintf("SELECT * FROM personnel WHERE (username='%s') AND (password=OLD_PASSWORD(\"$password\"))",
mysql_real_escape_string($username));
$result=mysql_query($query) or die(HEADER( "location: index.php" ));
$r1 = mysql_fetch_array($result);
$clientid = $r1["id" ];
if($clientid==""){$message="Your login information is incorrect. Please check your username and password.
";}
}
if($clientid!=""){
$result2 = mysql_query("SELECT * FROM registrant where (username='$clientid')");
$r2= mysql_fetch_array($result2);
$clientid_v = $r2["id" ];
if($clientid_v!=""){
$_SESSION['clientid'] = $clientid;
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
$_SESSION['id_P']=$clientid;
if($dd=="t"){HEADER( "location: transfert/transfert.php" ) ;}
else{HEADER( "location: login_ok.php" ) ;}
exit ;
}
elseif($clientid_v==""){
$result2 = mysql_query("SELECT * FROM registrant where (validation='non') and (username='$clientid')");
$r2= mysql_fetch_array($result2);
$clientid_nv = $r2["id" ];
if($clientid_nv!=""){
$message="Your domain name is currently under processing. It has not been validated yet.
";
}
elseif($clientid_nv==""){
}
}
}
?>
if($msg=="non"){echo"Domain or email incorrect
- Forgot your password?
If you forgot your password, please type in the domain name you have registered
in the past.
An email with password information will be sent to the
personal contact that has been provided during account setup.
No email will be sent to the Whois contacts.