<?php

include("common/connection.php");

login_check();



$Lead_Pa_Id=base64_decode($_REQUEST['Lid']);

$user_type_sql="select User_Type from user_master where User_Name='".$_SESSION['user']."'";

$user_type_query=mysqli_query($con,$user_type_sql);

$user_type=mysqli_fetch_array($user_type_query);

?>

<!doctype html>

<html class="no-js" lang="en">



<head>

    <meta charset="utf-8">

    <meta http-equiv="x-ua-compatible" content="ie=edge">

    <title>Qualified Leads | Buurtzorg</title>

 

    <script type="text/javascript">

	

	function delete_lead(per) 

	{

	  var response = confirm("Are You Sure to Delete Lead!");

	  if (response == true) 

	  {

		$.ajax({

		url:"ajax_delete_lead.php",

		type:"POST",

		data:{'per':per},

		success:function(data)

		{

 			//alert('Lead '+data+' Deleted Successfully');

		}

		});

	  } 

	  else 

	  {

		alert('Lead Not Deleted');

	  }

	}

	</script>

    <script >

	function update_callconnect(Status,Lead_Id)

	{

	 //alert(Status);

	 

	 $.ajax({

		url:"ajax_updatecall_lead.php",

		type:"POST",

		data:{'Status':Status,'Lead_Id':Lead_Id},

		success:function(data)

		{

		//alert(data)

			if(Status=='Call Connected')

			{

			

			  window.location.href='call_connected.php?Lid='+Lead_Id;

			}

			else

			{

			  window.location.href='current_leads.php';

			}

		}

		})

	}

	</script>

    

    <script >

	function total_calculation()

	{

	var start12=$("input[name=stdate]").val();

	var finish12=$("input[name=ndate]").val();

	var Rate=$('#Rate').val();

	if(start12!="" && finish12!="")

	{

	 $.ajax({

		url:"ajax_total_calculation.php",

		type:"POST",

		data:{'start12':start12,'finish12':finish12},

		success:function(data)

		{

		$('#Duration').val(data);
		$('#Rate').val('');
		$('#numdays2').val('');
		
		

		}

		});

	}

	}

	</script>

    <script type="text/javascript">

	/*function getrate()

	{

		

		var Hours=$('#Duration').val();

		

		

	$.ajax ({

		url:'ajax_patient_agreement.php',

		type:'POST',

		data: 'Hours=' + Hours ,

		async: false,

		success:function(f)

		{

		$("#Rate").val(f);

		total_calculation();

		}

		})

	}*/

	</script>

    <script>

	function Totalamount()

	{

	var Duration=$('#Duration').val();

	var Rate=$('#Rate').val();
	
	if(Rate=="")
	{
	   var Rate=0;
	}
    
		if(Duration!='')

		{
                
	$.ajax({

			url:'ajax-total-value-agreement.php',

			type:'POST',

			data:{'Duration':Duration,'Rate':Rate},

			success:function(f)

			{

			//alert(f);

				$('#numdays2').val(f);

			}

		  });

	}

	}

	</script>

    <script>

	function form_validation()

   {

   		var flag=0;
		
		var designation = $("#designation").val();

		
		

		
		if(designation=='')

		{

		$("#designation").css('border-color','#FF0000');

		$("#alert_msg").show();

		flag=1;

		}


		return false;

		}

		else

		{

		$("#desktop_enq").submit();

		}

   }

   

   function ActiveColour(per)

{

   $('#'+per).css('border','');

  // $('#msgdiv1').html('');

}
	
</script>

<script type="text/javaScript">
        $(function() {
            $('input[type="checkbox"]').on('change', function() {
                $(this).closest('fieldset').find('.myClass').toggle(!this.checked);
            });
        });
    </script>

    
 <script>
function isNumberKey(evt)
{
    var charCode = (evt.which) ? evt.which : event.keyCode;
    if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57))
    {
        return false;
    }
    else
    {
        return true;
    }
}

</script> 
    

    

    <?php include("headerlink.php"); ?>

    

     	<link rel="stylesheet" href="css/data-table/bootstrap-table.css">

    	<link rel="stylesheet" href="css/data-table/bootstrap-editable.css">

        

        <link rel="stylesheet" href="css/datapicker/datepicker3.css">

  <script>
function show1(){

	if(document.getElementById('financial').checked==true)
	{
	  document.getElementById('email_div').style.display = 'block';
	}
   else{
     document.getElementById('email_div').style.display ='none';
  }
}
/*function show2(){
  document.getElementById('email_div').style.display = 'block';
}*/
</script>       

        

        

</head>



<body>

	<?php 
		if(isset($_REQUEST['designation']))
		{
		$check_des=mysqli_fetch_array(mysqli_query($con,"select Designation from designation_master where Designation='".$_REQUEST['designation']."'"));
		if($check_des[Designation]!=$_REQUEST['designation'])
		{
		$designation=mysqli_fetch_array(mysqli_query($con,"insert into designation_master (Designation,Active) values('".$_REQUEST['designation']."','Yes')"));
					?>
                <script>
				alert('Designation added successfully');
				//window.parent.location.href='add-tna.php';
				</script>
                <?php
				}
				else
				{
				?>
                <script>
				alert('already Exist!')
				</script>
                <?php
				}
		}
	        	?>

	

		

		





    

    <div class="row">

    <form id="t_size" method="post" enctype="multipart/form-data" action="" onSubmit="return form_validation()" >

                <div class="col-md-12 fix-pad" id="org_div">

    

                <div class="col-md-4">

               <div class="form-group">

                  <label>ADD NEW DESIGNATION</label>

                  <input class="form-control radius_5" name="designation" id="designation" placeholder="Add New Designation"  autocomplete="off" required >

                    

                </div>

                </div>

                

               

                  <div class="" id="banner_new_image_div" style="display:none;">

                  

                  </div>

                </div>

                 

                <div class="col-md-12 fix-pad"> 
 

                  <div class="col-md-3"><button type="submit" class="btn btn-block btn-warning" name="tyre_submit" >ADD</button></div>

               </div><br>

                  

               

                  

                </form>

    </div>



    <!-- jquery

		============================================ -->

    <script src="js/vendor/jquery-1.12.4.min.js"></script>

    <!-- bootstrap JS

		============================================ -->

    <script src="js/bootstrap.min.js"></script>

    <!-- wow JS

		============================================ -->

    <script src="js/wow.min.js"></script>

    <!-- price-slider JS

		============================================ -->

    <script src="js/jquery-price-slider.js"></script>

    <!-- meanmenu JS

		============================================ -->

    <script src="js/jquery.meanmenu.js"></script>

    <!-- owl.carousel JS

		============================================ -->

    <script src="js/owl.carousel.min.js"></script>

    <!-- sticky JS

		============================================ -->

    <script src="js/jquery.sticky.js"></script>

    <!-- scrollUp JS

		============================================ -->

    <script src="js/jquery.scrollUp.min.js"></script>

    

    

    <!-- data table JS

		============================================ -->

    <script src="js/data-table/bootstrap-table.js"></script>

    <script src="js/data-table/tableExport.js"></script>

    <script src="js/data-table/data-table-active.js"></script>

    <script src="js/data-table/bootstrap-table-editable.js"></script>

    <script src="js/data-table/bootstrap-editable.js"></script>

    <script src="js/data-table/bootstrap-table-resizable.js"></script>

    <script src="js/data-table/colResizable-1.5.source.js"></script>

    <script src="js/data-table/bootstrap-table-export.js"></script>

    

    

    

    <!-- mCustomScrollbar JS

		============================================ -->

    <script src="js/scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>

    <script src="js/scrollbar/mCustomScrollbar-active.js"></script>

    <!-- metisMenu JS

		============================================ -->

    <script src="js/metisMenu/metisMenu.min.js"></script>

    <script src="js/metisMenu/metisMenu-active.js"></script>

    <!-- peity JS

		============================================ -->

    <script src="js/peity/jquery.peity.min.js"></script>

    <script src="js/peity/peity-active.js"></script>

    <!-- sparkline JS

		============================================ -->

    <script src="js/sparkline/jquery.sparkline.min.js"></script>

    <script src="js/sparkline/sparkline-active.js"></script>

    <!-- tab JS

		============================================ -->

    <script src="js/tab.js"></script>

    <!-- plugins JS

		============================================ -->

    <script src="js/plugins.js"></script>

    <!-- main JS

		============================================ -->

    <script src="js/main.js"></script>

    <!-- tawk chat JS

		============================================ -->

        

         <script>

$(document).ready(function() {

   $("body").tooltip({ 

   	selector: '[data-toggle=tooltip]' 

	 });

});

 

</script>



  <script src="js/main.js"></script>



    <script src="js/datepicker/jquery-ui.min.js"></script>

    <script src="js/datepicker/datepicker-active.js"></script>

    

     <script src="js/form-validation/jquery.form.min.js"></script>

    <script src="js/form-validation/jquery.validate.min.js"></script>

    <script src="js/form-validation/form-active.js"></script>

    <!------------------------Fancybox---------------------------------->

 

 <script type="text/javascript" src="lib/jquery.mousewheel.pack.js"></script>



<script type="text/javascript" src="source/jquery.fancybox.pack.js?v=2.1.5"></script>

	<link rel="stylesheet" type="text/css" href="source/jquery.fancybox.css" media="screen" />



<style type="text/css">

	.fancybox-custom .fancybox-skin {

		box-shadow: 0 0 50px #222;

	}

</style> 

<script>

$(document).ready(function() {

	$(".various").fancybox({

		maxWidth	: 380,

		maxHeight	: 410,

		fitToView	: true,

		width		: '100%',

		height		: '100%',

		autoSize	: false,

		closeClick	: false,

		openEffect	: 'none',

		closeEffect	: 'none',

		

		

		

		

	});

	

	$(".various5").fancybox({



		maxWidth	: 700,



		maxHeight	: 530,



		fitToView	: false,



		width		: '100%',



		height		: '100%',



		autoSize	: false,



		closeClick	: false,



		openEffect	: 'none',



		closeEffect	: 'none'



	});

	

 

});



</script>



<script type="text/javascript">

$("#manual").validate({

          

      showErrors: function(errorMap, errorList) {

          // Clean up any tooltips for valid elements

          $.each(this.validElements(), function (index, element) {

              var $element = $(element);

              $element.data("title", "") // Clear the title - there is no error associated anymore

                  .removeClass("error")

                  .tooltip("destroy");

          });

          // Create new tooltips for invalid elements

          $.each(errorList, function (index, error) {

              var $element = $(error.element);



              $element.tooltip("destroy") // Destroy any pre-existing tooltip so we can repopulate with new tooltip content

                  .data("title", error.message)

                  .addClass("error")

                  .tooltip(); // Create a new tooltip based on the error messsage we just set in the title

          });

      },



     

	  

});

</script> 

<!--    <script src="js/tawk-chat.js"></script>-->

</body>



</html>