<html>
<head>
	<title>IMS-Import Masters</title>
</head>
<script src='../js/jquery-3.1.1.min.js' type='text/javascript'></script>
<script src='../js/jquery-ui.min.js' type='text/javascript'></script>
<link href="../css/style.css" rel="stylesheet" />
<link href="../css/style1.css" rel="stylesheet" />
<link href='../css/jquery-ui.min.css' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/all.css">
<link href="../css/bootstrap.min.css" rel="stylesheet" />

<body>
	<nav class="navbar navbar-default" style = "background-color: #007bff; height : 60px;">		
		<h1 style="color:white; font-size:24px;" class="text-primary" align="center">Import from Excel</h1>
		<a href="../main/index.php" style = "font-size:24px; margin-top :-50px; color:white;" class="navbar-brand">Home</a>
		<h1 style="color:white; font-size:24px;margin-top :-40px;margin-right :20px;" class="text-primary" id="demo2" align="right"></h1>
	</nav>
	<div class="container" style = "width:50%;">
	<center>
		 <form method="post" action="import_item_mst.php" enctype="multipart/form-data">
		 <h4>Import Excel to Database</h4>
			<div class="form-group">
				<button class="btn btn-info">Import</button>
			</div>
         </form>
		 <center>
		<tr>	
			<button type="button" style="width:23.5%; font-size:18px; margin-top: -0px; height:40px; text-align: center" name="action2" id="action2" class="btn btn-success">noofrow_mst</button>
			<button type="button" style="width:23.5%; font-size:18px; margin-top: -0px; height:40px; text-align: center" name="action" id="action" class="btn btn-warning">Part Wise Sales</button>
			<button type="button" style="width:23.5%; font-size:18px; margin-top: -0px; height:40px; text-align: center" name="action" id="action" class="btn btn-warning">Segment Wise Sales</button>
			<button type="button" style="width:23.5%; font-size:18px; margin-top: -0px; height:40px; text-align: center" name="action" id="action" class="btn btn-warning">Town Wise Sales</button>
		</tr>
	</center>
	</center>
	
	</div>
	</div>
	</div>
</body>
</html>
<?php
	$date = new DateTime();
	$current_timestamp = $date->getTimestamp();
?>
<script>
	flag_time = true;
	timer = '';
	setInterval(function(){phpJavascriptClock();},1000);
	
	function phpJavascriptClock()
	{
		if ( flag_time ) {
		timer = <?php echo $current_timestamp;?>*1000;
		}
		var d = new Date(timer);
		months = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec');
		
		month_array = new Array('January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'Augest', 'September', 'October', 'November', 'December');
		
		day_array = new Array( 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
		
		currentYear = d.getFullYear();
		month = d.getMonth();
		var currentMonth = months[month];
		var currentMonth1 = month_array[month];
		var currentDate = d.getDate();
		currentDate = currentDate < 10 ? '0'+currentDate : currentDate;
		
		var day = d.getDay();
		current_day = day_array[day];
		var hours = d.getHours();
		var minutes = d.getMinutes();
		var seconds = d.getSeconds();
		
		var ampm = hours >= 12 ? 'PM' : 'AM';
		hours = hours % 12;
		hours = hours ? hours : 12; // the hour ’0′ should be ’12′
		minutes = minutes < 10 ? '0'+minutes : minutes;
		seconds = seconds < 10 ? '0'+seconds : seconds;
		var strTime = hours + ':' + minutes+ ':' + seconds + ' ' + ampm;
		timer = timer + 1000;
		document.getElementById("demo2").innerHTML='Date : ' + currentDate+'-' +(month+1)+'-' +currentYear + ' Time : ' + strTime ;
		flag_time = false;
	}
</script>
<script>
$(document).ready(function() {
	$('#action2').click(function() {			
		var action = $('#action').text();
		$actiontext = $('#action').text();
		if (date1 != '' && date2 != ''){
			$.ajax({
				url: "noofrow_mst.php",
				method: "POST",
				data: {										
					action: action
				},
				success: function(data) {
					//$('#result').html(data);
				}
			});
		}
	});

//=====================
});
</script>