<?php 
include('dashboard_bdo.php');
require_once('convert_marathi.php');
include('func12.php');
#######################################################Add New User Form##########################################
?>
<html> 
<head>
<style>
div.deco{
margin:25px;	
}	
</style>	
<style>
label.dec{
width:142px;		
}
</style>
<script type="text/javascript" src="js/adduser.js"></script> 				 
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<script type="text/javascript">
			function showUser(para1,para2,para3)
			{
				var s=document.forms["myform"]["usertype"];
				var d=document.forms["myform"]["deptid"];
				var p=document.forms["myform"]["deskid"];
				if (window.XMLHttpRequest)
				{	// code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp=new XMLHttpRequest();
				}
				else
				{	// code for IE6, IE5
					xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp.onreadystatechange=function()
				{
					if (xmlhttp.readyState==4 && xmlhttp.status==200)
					{
						document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
						
					}
				}
				xmlhttp.open("GET","getusername.php?s="+ s.value +"&d="+ d.value +"&p="+ p.value ,true);
				xmlhttp.send(); 
			}
			
function check()
{
	var login_id=document.getElementById("login").value;
	//alert(login_id);
	 var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				
				if(xmlhttp.responseText=='exist')
				{
					alert ("Login Id already exist....");
					document.getElementById("login").value='';
					document.getElementById("login").focus();
					return false;
				}
				
				//document.getElementById("d1").innerHTML = xmlhttp.responseText;
            }
        };
        xmlhttp.open("GET", "check_loginid.php?login_id="+login_id, true);
        xmlhttp.send();
	 
	 
}			
			
			
			
</script>
<script type="text/javascript">
$(document).ready(function() {
	$('#wait_1').hide();
	$('#usertype').change(function(){
	  $('#wait_1').show();
	  $('#result_1').hide();
	   $('#result_2').hide();
      $.get("func12.php", {
		func: "usertype",
		drop_var: $('#usertype').val()
      }, function(response){
        $('#result_1').fadeOut();
        setTimeout("finishAjax('result_1', '"+escape(response)+"')", 800);
      });
    	return false;
	});
});
function finishAjax(id, response) {
  $('#wait_1').hide();
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
}
function finishAjax_tier_three(id, response) {
  $('#wait_2').hide();
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
}
</script>
</head>
<body>
<div class="mainwrapper">
	<div class="rightpanel">  
        <ul class="breadcrumbs">
            <li><a href="dashboard_bdo.php"><i class="iconfa-home"></i></a> <span class="separator"></span></li>
            <li>नवीन युजर जोडा</li>
            <li class="right"></li>
        </ul>
        <div class="pageheader">
			<div class="pageicon"><span class="iconfa-pencil"></span></div>
			<div class="pagetitle">
				<h5>फॉर्म्स</h5>
				<h1>नवीन युजर जोडा</h1>
			</div>
		</div><!--pageheader-->
		<div class="maincontent">
            <div class="maincontentinner">
				<div class="widget">
					<h4 class="widgettitle">नवीन युजर जोडा</h4>
					<div class="widgetcontent">		
					
						<form class="stdform" action="./connection/addnewuser.php" method="post" name="myform">
						
						<table width="100%" style="border:2px;">			  
							
							<tr>
								<td>
									<label class="dec">व्यक्तीची ओळख(User Id) : </label>
								</td>
								
								<td>
									<input type="text" name="logid" id="login" class="input-small" placeholder="व्यक्तीची ओळख" onblur="return check()"/>
								</td>
								
								<td> 
									<label>पासवर्ड : </label>
								</td>
								<td> 
									<input type="password" name="password" class="input-medium" placeholder="password" />	
								</td>
							</tr>
							<tr>
								<td> 
									<label>व्यक्तीचे नाव टाका : </label>
								</td>
								<td>
									<input type="text" name="usernm" class="input-medium unicode" lang="mr" placeholder="व्यक्तीचे नाव टाका" />
								</td>
								<td>
									<label>यूजर प्रकार : </label>
								</td>
								<td> 
									<select class="usertype" name="usertype" id="usertype">
										<option value="">यूजर प्रकार निवडा</option>
										<option value="BDO">बी. डी. ओ.</option>
										<option value="Tapal">टपाल प्राप्त करता </option>
										<option value="Department">विभाग अधिकारी</option>
										<option value="Desk">डेस्क कर्मचारी </option>
										
									</select>
								</td>
							</tr>
							<tr>
							<?php getTierOne(); ?>
							</tr>
							<tr>
									<td colspan="2"> 
										<span id="wait_1" style="display: none;"><img alt="Please Wait" src="images/loaders/loader23.gif"/> </span>	
										<span id="result_1" name="result_1" style="display: none;"></span>
									</td>
									<td colspan="2"> 
										<span id="wait_2" style="display: none;"><img alt="Please Wait" src="images/loaders/loader23.gif"/></span>
										<span id="result_2" name="result_2" style="display: none;"></span>
									</td>
								</tr>
							<tr>
								<td> 
									<label>सुरक्षा प्रश्न निवडा  : </label>
								</td>
								<td> 
									<select name="secque" class="uniformselect">
									<option value="">सुरक्षा प्रश्न निवडा</option>
									<option value="Childhood Name?"> तुमचे टोपण नाव?</option>
									<option value="Favourite Color?">तुमचा आवडता रंग?</option>
									<option value="Favourite Movie?"> तुमचा आवडता सिनेमा?</option>
									<option value="First School Name?"> तुमच्या पहिल्या शाळेचे नाव?</option>
									</select>
								</td>
								<td>
									<label  class="dec">सुरक्षा प्रश्नाचे उत्तर : </label>
								</td>
								<td>
									<input type="text" name="secans" class="input-medium" placeholder="सुरक्षा प्रश्नाचे उत्तर " />
								</td>
							</tr>
							<tr>
								<td> 
									<label>मोबाईल क्रं. : </label>
								</td>
								<td>
									<input type="text" name="mobno" class="input-medium" placeholder="मोबाईल क्रं"/>
								</td>               
								<td> 
									<label>ईमेल आय. डी. : </label>
								</td>
								<td>
									<input type="text" name="emailid" class="input-medium" placeholder="ईमेल आय. डी."/>
								</td>
							</tr>
						</table>            
                            <p class="stdformbutton">
                               <center> <button class="btn btn-primary" name="save" onclick="return validateForm()">जतन करा </button>
                                <button type="reset" class="btn">रद्द करा </button></center>
                            </p>	
						</form>
				 
			</div><!--maincontentinner-->
		</div><!--maincontent-->
        <?php include_once('footer.php');?>
    </div><!--rightpanel-->
</div><!--mainwrapper-->
</body>
</html>