<?php
/**
 * This is general file which contains
 * connection file, common function file, etc.,
 *
 * PHP version 5
 *
 * @category Admin_Tool
 * @package  Admin_Tool
 * @author   Aum Infosys <admin@auminfosys.com>
 * @license  ACE
 * @version  CVS:1.0.1
 * @link     http://auminfosys.com/
 * @filesource
 */

/**
 * This is general file which contains
 * connection file, common function file, etc.,
 *
 */

require "../commonincludefiles.php";

 $username	   = 	Escape($_REQUEST['username']);
 $user_id		= 	Escape($_REQUEST['user_id']);
	
 if($username !="")
 { 

	$condition="";
	
	if($user_id != ""){
		$condition .= " and user_id!='$user_id' ";
	}
	
	if($username != ""){
		$condition .= " and user_name='$username' ";
	}
	

	$objUserMgmt = new UserMgmt();
	$out = $objUserMgmt->getAllRecords(0,0,$condition,"","");
	
	$count=dbRows($out);




	if($count > 0){ echo "{success:'false'}"; }
    else { 
     echo "{success:'true'}";
	}

}
?>