<?php
include "scrinit.php";
include "logo.php";
mysqli_set_charset($con, "utf8");
//date_default_timezone_set("Europe/Athens");
?>
<head>
<script src="3b-calendar.js"></script>
<link href="3c-theme.css" rel="stylesheet">
</head>
<?php
// DEFAULT MONTH/YEAR = TODAY
include "dbconnect.php";
$dt=$_SESSION['dt'];
$unix = strtotime($dt);
$monthNow = date("M", $unix);
$yearNow = date("Y", $unix); 
// MONTHS
$months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
$mm=['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος','Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'];
?>
  <body>
  <h2> ΔΥΝΑΜΙΚΟΣ ΜΗΝΙΑΙΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ </h2>
    <!-- [DATE SELECTOR] -->
    <div id="selector">
      <select id="month">
	  <?php
		$i=0;
        foreach ($months as $m) 
		{
			
          //printf("<option %svalue='%s'>%s</option>",$m==$monthNow ? "selected='selected' " : "", $m, $m);
		  ?><option value=<?php echo $m;?> <?php if($m==$monthNow) echo 'selected';?>  /><?php echo $mm[$i]; ?></option><?php
			$i++;
		}
      ?>
	  </select>
      <select id="year">
	  <?php
        // 10 years range - change if not enough for you
        for ($y=$yearNow-10; $y<=$yearNow+10; $y++) {
          printf("<option %svalue='%s'>%s</option>",
            $y==$yearNow ? "selected='selected' " : "", $y, $y
          );
        }
      ?></select>
      <input type="button" value="ΕΠΙΛΟΓΗ" onclick="cal.list()"/>
    </div>

    <!-- [CALENDAR] -->
    <div id="container"></div>

    <!-- [EVENT] -->
    <div id="event"></div>
<br><br>
<a  href=<?php echo $menu; ?> style="color:blue "  > <button> Επιστροφή στο Μενού   </a> 
</body>
</html>