<?php ob_start();

 session_start();

include($_SERVER['DOCUMENT_ROOT'].'/includes/connection.php');

//mysql_query("delete from moon_calendar");

$year=$_REQUEST['year'];

for($month=1;$month<=12;$month++)

{

$month3=strtolower(date("F",strtotime($year."-".$month."-01")));

$monthname=strtoupper(date("F",strtotime($year."-".$month."-01")));

?>

<h2 style="text-align:center; color:#CC9900;"><a name='<?php echo  $month3?>' id='<?php echo  $month3?>' style="color: #CC9900;"><?php echo $monthname."&nbsp;".$year?></a></h2>
			
 <div class="rTable">

			  <div class="rTableRow" style="background:linear-gradient(to bottom, #b47100, #613600);">

				<div class="rTableHead"><span class="brd1"> <strong><B>EVENTS</B></strong></span></div> 

                <div class="rTableHead"><span class="brd1"> <strong>DATE</strong></span></div> 

                <div class="rTableHead"><span class="brd1"> <strong>GMT TIME</strong></span></div> 

                <div class="rTableHead"><span class="brd1"> <strong>PACIFIC TIME</strong></span></div> 

                <div class="rTableHead"><span class="brd1"> <strong>INDIA TIME</strong></span></div> 

   </div>
		  
 <?php

$catquery=mysql_query("select * from major_events where year(eventdate)=".$year." and month(eventdate)=".$month."  order by eventdate asc");
  
 	while($noticia = mysql_fetch_array($catquery))

 	{ 
  
	?> 

				<div class="rTableRow">

                          <div class="rTableCell" style="text-align:center;"><?php echo $noticia['events']?></div>

                          <div class="rTableCell" style="text-align:center;"><?php echo date('F',strtotime($noticia['eventdate']))."&nbsp;".date('j',strtotime($noticia['eventdate']))?></div>

                          <div class="rTableCell" style="text-align:center;"><?php echo $noticia['gmt']?></div>

                          <div class="rTableCell" style="text-align:center;"><?php echo $noticia['pacific']?></div>

                          <div class="rTableCell" style="text-align:center;"><?php echo $noticia['indian']?></div>

						  </div> 

						  <?php 

						  }

		 ?>

		  </div>  

               	<br> <div style="float:right; font-size:large; color:#CC9900;"> <a href="#top"><b style="color:#CC9900;"><u>Top</u></b></a></div><br>  

<div style="text-align:center; vertical-align:top;"><img src="https://www.findyourfate.com/astrology/year2016/images/strip.png"  alt="" style="text-align:center;"></div>

<br>    

 <?php

		 } 

 mysql_close($link);

?>  