<?php
if (isset($_GET["q"]) && !empty($_GET["q"]))
{
if (file_exists("embedded/functions/site_functions.php"))
	{
	include_once("embedded/functions/site_functions.php");
	}
else
	{
include_once("../../embedded/functions/site_functions.php");
	}
db_open();		
$language=$_SESSION['language'];
if ($language==1)
	{
	$title1="Επιλέξτε μήνα:";
	$title2="Επιλέξτε εβδομάδα:";
	$title3="Επιλέξτε έτος:";
	$month="Μήνας:";
	$day="Μέρα:";
	$week="Εβδομάδα:";
	$year="Έτος:";
	}
else
	{
	$title1="Choose month:";
	$title2="Choose week:";
	$title3="Choose year:";
	$month="Month:";
	$day="Day:";
	$week="Week:";
	$year="Year:";
	}

$q= $_GET["q"];
	
		if ($q=='day')
			{
			echo'<select id="month_d" onchange="day_select_d(this.value,2);" title="'.$title1.'"><option value="">'.$month.'</option>';
			for ($i=1;$i<=12;$i++)
				{
				echo"<option value='$i'>$i</option>";
				}
			echo"</select><a id='cdayd'></a>";
			}
		else if ($q=='week')
			{
			echo'<select id="month_d" title="'.$title1.'"><option value="">'.$month.'</option>';
			for ($i=1;$i<=12;$i++)
				{
				echo"<option value='$i'>$i</option>";
				}
			echo'</select><select id="week_d" title="'.$title2.'"><option value="">'.$week.'</option>';
			for ($i=1;$i<=5;$i++)
				{
				echo"<option value='$i'>$i</option>";
				}
			echo"</select>";
			}
		else if ($q=='month')
			{
			echo'<select id="month_d" title="'.$title1.'"><option value="">'.$month.'</option>';
			for ($i=1;$i<=12;$i++)
				{
				echo"<option value='$i'>$i</option>";
				}
			echo"</select>";
			}
		else if ($q=='year')
			{
			echo'<select id="year_d"  title="'.$title3.'"><option value="">'.$year.'</option>';
			echo'<option value="2012">2012</option>';
			echo'</select>';
			}
		
db_close();
		}
?>