<?php require_once("library.php"); 
require_once('mail/emails.php');
    if(isset($_POST['uName'])){
        $msg = $lib->register($_POST['uName'], $_POST['fName'], $_POST['lName'], $_POST['email'], @$_POST['phone'], @$_POST['country'], $_POST['btcAdd'], $_POST['referUser'], $_POST['pass'], $_POST['cpass']);
        print json_encode($msg);
        if($msg=='Registration successful, login to continue!'){
            @$email->welcomeEmail($_POST['email'],$_POST['uName']);
        }
    }

    if( isset($_POST['pEmail']) ){
        $msg = $lib->passwordRecovery($_POST['pEmail']);
        print json_encode($msg);
        if($msg=='Check email inbox for password activation link'){
            @$email->passRecovery($_POST['pEmail']);
        }
    }
    
	if(isset($_POST['login_email'])){
		$msg = $lib->login($_POST['login_email'],$_POST['login_pass']);
        print json_encode($msg);
   }
   
if(isset($_POST['contact_us_name']) && isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['message']) ){
	$msg = $lib->send_support_Ticket($_POST['email'],$_POST['contact_us_name'],$_POST['subject'],$_POST['message']);
    print_r(json_encode($msg));
}
