<?php
include_once "includes/config.php";
include_once "includes/session.php";
include_once "includes/functions.php";
include_once "classes/cls_user.php";


 $username       =    $_REQUEST['uname'];
 $email          =    $_REQUEST['email'];

if($username!='')
{
    $userObj        =   User::check_user_name_exists($username); 
}

if($email!='')
{
    $userObj        =   User::check_user_email_exists($email);
}

if(!empty($userObj))
    {
        if($userObj->user_name!='')
        {
            $txtUsername    =       $userObj->user_name;
            if($txtUsername==$username) {
                    $response = '1';
            }
        }
        else { 
                    $response =  '0';
           } 
        
         if($userObj->email!='')
        {
             $txtEmail       =       $userObj->email;
            if($txtEmail==$email) {
                  $response =  '1';
            }
        }
          
        else { 
                    $response =  '0';
           } 
           

    }else{
         $response =  '0';
    }

    echo $response;
    exit;
?>