<?php ob_start();
 session_start();
include($_SERVER['DOCUMENT_ROOT'].'/includes/connection.php');
//mysql_query("delete from moon_calendar");

$year=$_REQUEST['year'];
$month=$_REQUEST['month'];
$monthname=strtoupper(date("F",strtotime($year."-".$month."-01"))); ?>
 
<p style="text-align:center; font-size:x-large; color:#ebb85d;"><b>PLANETS IN SIGNS - <?php echo $monthname.'&nbsp;'.$year?></b></p>
  <div class="rTable2">
<div class="rTableRow2" style="text-align:center;">
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><strong></strong></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/sun.png' alt='Sun' title='Sun' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/moon.png' alt='Moon' title='Moon' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/mrcry.png' alt='Mercury'  title='Mercury' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/venus.png' alt='Venus' title='Venus' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/mars.png' alt='Mars' title='Mars' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/jptr.png' alt='Jupiter' title='Jupiter' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/stn.png' alt='saturn' title='saturn' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/urns.png' alt='Uranius' title='Uranius' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/nptn.png' alt='Neptune' title='Neptune' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/pluto.png' alt='Pluto' title='Pluto' width='18' height='18' ></div> 
<div class="rTableCell2" style="text-align:center; background-color:#af740e;"><img src='https://www.findyourfate.com/astrology/year2018/images/trnd.png' alt='True Node' title='True Node' width='18' height='18' ></div> 
				  
</div>
	 
		 <?php
		 
 
  $catquery=mysql_query("select * from ephemeris where emonth=".$month." and eyear=".$year." order by eday asc");
 
 	while($noticia = mysql_fetch_array($catquery))
 	{ 
		 
$cday=$noticia['eday'];
 $content=$noticia['econtent'];

 echo "<div class='rTableRow2'><div class='rTableCell2' style='text-align:center; background-color:#af740e;'><strong>".$cday."</strong></div>";
 $content=$noticia['econtent'];
 
$sunsign=substr($content,11,2);
$moonsign=substr($content,18,2);
$mercurysign=substr($content,25,2);
$venussign=substr($content,32,2);
$marssign=substr($content,39,2);
$jupitersign=substr($content,46,2);
$saturnsign=substr($content,53,2);
$uranussign=substr($content,60,2);
$neptunesign=substr($content,67,2);
$plutosign=substr($content,74,2);
$nodesign=substr($content,81,2);
 
$result1 = signinfo($sunsign);
$result2 =signinfo($moonsign);
$result3=signinfo($mercurysign);
$result4=signinfo($venussign);
$result5=signinfo($marssign);
$result6=signinfo($jupitersign);
$result7=signinfo($saturnsign);
$result8=signinfo($uranussign);
$result9=signinfo($neptunesign);
$result10=signinfo($plutosign);
$result11=signinfo($nodesign);
 echo  $result1.$result2.$result3.$result4.$result5.$result6.$result7.$result8.$result9.$result10.$result11."</div>";
 
 }
 
function signinfo($sunsign)
{   
 if ($sunsign=="AR") {
  $path=$sunsign;
  $sign="Aries";
  }
   
  elseif ($sunsign=="TA") {
  $path=$sunsign;
  $sign="Taurus";
  }
  elseif ($sunsign=="GE") {
  $path=$sunsign;
  $sign="Gemini";
  }
  
  elseif ($sunsign=="CN"){
  $path="CAN";
  $sign="Cancer";
  }
   
   elseif ($sunsign=="LE") {
 $path=$sunsign;
  $sign="Leo";
  }
  
  elseif ($sunsign=="LI") {
 $path=$sunsign;
  $sign="Libra";
  }
 
  elseif ($sunsign=="VI") {
  $path=$sunsign;
  $sign="Virgo";
  }
  
  elseif ($sunsign=="SC") {
 $path=$sunsign;
  $sign="Scorpio";
  }
   
   elseif ($sunsign=="SG") {
  $path=$sunsign;
  $sign="Sagittarius";
  }
  
  elseif ($sunsign=="CP") {
  $path="CAP";
  $sign="Capricorn";
  }
  
  elseif ($sunsign=="AQ") {
   $path=$sunsign;
  $sign="Aquarius";
  }
  
  
  elseif ($sunsign=="PI") {
   $path=$sunsign;
  $sign="Pisces";
  }
 
 echo "<div class='rTableCell2' style='text-align:center; background-color:#af740e;'>";
 echo "<img border='0' src='https://www.findyourfate.com/astrology/year2018/images/".$path.".png'  title='".$sign."' alt='".$sign."'  align='absmiddle' width='18' height='18' ></div>";
 

 } 
 mysql_close($link);
				  
?>
 
</div>