<?
session_start();
if(isset($_SESSION['ses_name']))
{
$user=$_SESSION['ses_name'];
}else{
header("location:index.php");
}
$tyrenum_veh='';$client_main='';
$cclient_name='';$rproduct_client_code='';
include("include/config.php");
require_once "include/Database_functions.php";
$sqlObj=new sqlclass();

$rproduct_name='';$rproduct_category='';

?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>OIL FILL</title>
<link href="css/styles.css" rel="stylesheet"  />
<!--<link type="text/css" href="css_date/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="dist/bootstrap-clockpicker.min.css">
<link rel="stylesheet" type="text/css" href="assets/css/github.min.css">-->
<link href='fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />

<script type="text/javascript" src="js/jquery.min.js"></script>

<script src='fullcalendar/fullcalendar.min.js'></script>

<script type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->


</script>

<script type='text/javascript'>	
function validationprod()
{

	if(document.prodfrmname.clientname.value=='')
	{
		alert("Enter Client Name");
		document.prodfrmname.clientname.focus();
		return false;
	}
	if(document.prodfrmname.productname.value=='')
	{
		alert("Enter Product Name");
		document.prodfrmname.productname.focus();
		return false;
	}
}
//--client code dropdown

</script>

<script type="text/javascript">

$(function(){
	holidayCalendar();
	});
	/////////////////////////////////////////// Holiday Calendar ////////////////////////////////////////
function holidayCalendar(){
	
	
	var fillURL='http://www.aadhocc.com/oil_fill/ajax/';
	
//	var user_type=$('.hiddenuser_type').val();	

	
		
	$("#tablelist").append('<table class="calendarHolder">'+
							'<tr><td><div id="calendar"></div></td></tr></table>');


		var calendar = $('#calendar').fullCalendar({
		
		//	editable: true,
			
			eventSources: [ {url:fillURL + "holidatManagement.php?act=list"}],
			
			eventDrop: function(event, delta) {
			//	alert(event.title + ' was moved ' + delta + ' days\n' +
					//'(should probably update your database)');
				date = new Date(event.start).format("yyyy-mm-dd");
				$.get(fillURL + "holidatManagement.php?act=update&title"+event.title+"&start="+date+"&id="+event.id);
				
			},
			selectable: true,
			selectHelper: true,
			select: function(start, end, allDay) {
				
				
				var title = prompt('Event Title:');
				if (title) {
					date = new Date(start).format("yyyy-mm-dd");
					
					$.get(fillURL + "holidatManagement.php?act=addNew&title="+title+"&start="+date,function(){
					
					calendar.fullCalendar('renderEvent',{
							title: title,
							start: start,
							end: end,
							allDay: allDay
						},true );
					 });
				}
				calendar.fullCalendar('unselect');
				
			},
			eventClick: function (calEvent, jsEvent, view) {       
				 if(confirm('Are you sure from removing the event?')){
					 $.get(fillURL + "holidatManagement.php?act=remove&id="+calEvent._id)
						$('#calendar').fullCalendar('removeEvents', calEvent._id);
				 }
			},
			
			loading: function(bool) {
				if (bool) $('#loading').show();
				else $('#loading').hide();
			}
			
		});
	$('.calendarHolder').show('blind',500);
	
	
}
</script>
<style>
.lableentrytext{
font-size: 12px;
color: #505050;
clear: both;
margin-bottom: 5px;
text-transform: capitalize;
}
.addimgs{
font-size: 12px;
color: #505050;
clear: both;
margin-bottom: 5px;
text-transform: capitalize;
cursor:hand;
cursor:pointer;
}
.addimgs a:hover{
color: #000;
}
.rimg{
font-size: 12px;
color: #505050;
clear: both;
margin-bottom: 5px;
text-transform: capitalize;
cursor:hand;
cursor:pointer;
}
.rimg a:hover{
color: #000;
}


</style>
</head>

<body>
<div class="wrapper">
  <div>
<?php 
	include("header.php");
?>
 
</div>
 
 
 <div class="tabbedArea">
  
  <div id="tablelist"></div>


 </div>
 <div class="footer"><p>Powered by <a href="http://www.aadhocc.co.uk/" target="_blank">Aadhocc</a></p></div>
 
</div>
<div class="quicLInksCover">
  <?php 
	include("leftlink.php");
?>

</div>
</body>

</html>


		






