<commit_before>var cnt =0;
// JavaScript Document// JavaScript Document
$(document).ready(function(){
	$('#btnAddbooking').click(function(event) {							
		event.preventDefault();
		
		$.ajax({
			url: "pages/Addbooking",
			type: "POST",
			data:  $("#form_sample_3").serialize(),
			error: function(xhr, status, error) {
  				//var err = eval("(" + xhr.responseText + ")");
  				alert(xhr.responseText);
	
			},
			beforeSend: function(){},
			complete: function(){},
			success: function(result){
	
				document.getElementById('hdnBookingcode').value = result;
				alert ('تمت عملية الإضافة بنجاح');
					alert(document.getElementById('hdnBookingcode').value )			;
			}
		});//END $.ajax
	}); // END CLICK
}); // END READY


/*********************check booking date*******************/
$(document).ready(function(){
	$('#booking_date').change(function(event) {							
		event.preventDefault();
		
		
		var booking_date= document.getElementById('booking_date').value;
		var w_code=$('#w_code').val();
		if (w_code== null || w_code == ""|| w_code == 0)
				{
				document.getElementById('booking_date').value = '';
				document.getElementById("w_code").focus();	
				alert ('يجب اختيار الصالة قبل اختيار التاريخ');
			
				}
				//var d = new Date("03-25-2015"); 
				//alert(Date().get);
		if (booking_date<=Date())
				alert ('يجب ان يكون تاريخ الحجز اكبر من تاريخ اليوم');
		$.ajax({
			url: "http://localhost/weddinghall/pages/get_booking_date/"+booking_date+"/"+w_code,
			type: "POST",<commit_msg>Check Date<commit_after>var cnt =0;
// JavaScript Document// JavaScript Document
$(document).ready(function(){
	$('#btnAddbooking').click(function(event) {							
		event.preventDefault();
		
		$.ajax({
			url: "pages/Addbooking",
			type: "POST",
			data:  $("#form_sample_3").serialize(),
			error: function(xhr, status, error) {
  				//var err = eval("(" + xhr.responseText + ")");
  				alert(xhr.responseText);
	
			},
			beforeSend: function(){},
			complete: function(){},
			success: function(result){
	
				document.getElementById('hdnBookingcode').value = result;
				alert ('تمت عملية الإضافة بنجاح');
					alert(document.getElementById('hdnBookingcode').value )			;
			}
		});//END $.ajax
	}); // END CLICK
}); // END READY


/*********************check booking date*******************/
$(document).ready(function(){
	$('#booking_date').change(function(event) {							
		event.preventDefault();
		
		
		var booking_date= document.getElementById('booking_date').value;
		var w_code=$('#w_code').val();
		if (w_code== null || w_code == ""|| w_code == 0)
		{
			document.getElementById('booking_date').value = '';
			document.getElementById("w_code").focus();	
			alert ('يجب اختيار الصالة قبل اختيار التاريخ');
			return;
			
		}
				//var d = new Date("03-25-2015"); 
				//alert(Date().get);
		
		var date = new Date();
		
		var day = date.getDate();
		if (day>= 1 && day <= 9) 
			day = '0' + day;
			
		var month = date.getMonth()+1;
		if (month >= 1 && month <= 9)
			month = '0' + month;
		
		var year = date.getFullYear();
		
		
		var d = year+'-'+month+'-'+day;
		
		var bookingDate = new Date(booking_date);
		var today = new Date(d);
		//alert ("bookingDate: "+bookingDate);
		//alert ("today: "+today);
		if (bookingDate <= today)
		{
			alert ('يجب ان يكون تاريخ الحجز اكبر من تاريخ اليوم');
			return;
		}
			
		$.ajax({
			url: "http://localhost/weddinghall/pages/get_booking_date/"+booking_date+"/"+w_code,
			type: "POST",
{'fraction_non_alphanumeric': 0.20839363241678727, 'fraction_numerical': 0.008393632416787264, 'mean_word_length': 3.4536082474226806, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7005831', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1219, 'n_words': 237}