
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<TITLE>Selectie data</TITLE>

<link rel="stylesheet" type="text/css" href="A21_stiluri1.css">
<link rel="stylesheet" type="text/css" href="jquery-ui.css">

<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="jquery-ui.min.js"></script>


<script language="JavaScript">
	

$(document).ready(function() {
    $('#data_reg').each(function() {
        $(this).datepicker({ dateFormat: 'dd-mm-yy' });
    });
});

$(document).ready(function() {
    $('#data_prez').each(function() {
        $(this).datepicker({ dateFormat: 'dd-mm-yy' });
    });
});

function confirm_prezenta() {

    var msg = confirm('Daca raspundeti cu OK toti prescolarii de la grupa respectiva vor fi trecuti PREZENTI la data selectata.');
    if(msg == false) {
        return false;
    }
	else
	{
		setTimeout('self.close()',200)	
	}
}

function confirm_absenta() {

    var msg = confirm('Daca raspundeti cu OK toti prescolarii de la grupa respectiva vor fi trecuti ABSENTI/GOL la data selectata.');
    if(msg == false) {
        return false;
    }
	else
	{
		setTimeout('self.close()',200)	
	}
}
</script>

</HEAD>
<BODY bgcolor="#B3EEEE">
<CENTER>

<?php
include 'javascripts.php';

$wdenluna_sel=substr($_POST["luna_sel"],3,strlen($_POST["luna_sel"])-3);
$wdengrp_sel=substr($_POST["grp_sel"],3,strlen($_POST["grp_sel"])-3);

/*
$number = cal_days_in_month(CAL_GREGORIAN, 11, 2017); // 31
echo "number=".$number;
*/

IF ($_POST['actiune'] == 'REGISTRU DE CASA')
{
	echo "<FORM NAME=\"copii\" method=\"POST\" action=\"A21_copii.php\" target=\"win01\">";
	include "A21_param1.php";
	
	$wdata_reg=date("d-m-Y");
	
	echo "<TABLE class=\"table2\" cellSpacing=0 cellPadding=0 width=\"100%\" border=0>";
	echo "<tr>";	
	echo "<TD colspan=\"10\" height=\"35\" class=\"style1\" align=\"center\"><B>".$_POST['actiune']."</B></TD>";
	echo "</tr>";
	echo "<tr>";	
	echo "<TD colspan=\"1\" height=\"35\" class=\"style1\" align=\"right\"><B>DIN DATA DE : &nbsp</B></TD>";
	echo "<td colspan=\"4\" align=\"center\">";
	echo "<input name=\"data_reg\" type=\"text\" style=\"text-align:center;\" onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" id=\"data_reg\" size=\"10\" VALUE=\"".$wdata_reg."\">";
	echo "</td>";
	echo "</tr>";
	echo "<tr><td>&nbsp</td></tr>";
	echo "<tr><td>&nbsp</td></tr>";
	echo "<tr>";
	echo "<TD colspan=\"5\" height=\"35\" align=\"right\">";
	echo "<INPUT TYPE=\"submit\" class=\"noPrint\" NAME=\"actiune\" onClick=\"javascript:setTimeout('window.close()',300);\" VALUE=\"CONFIRM\">"; 
	echo "<INPUT TYPE=\"HIDDEN\" NAME=\"tip_act\" VALUE=\"".$_POST['actiune']."\">";
	//echo "<INPUT TYPE=\"HIDDEN\" NAME=\"grupa_sel\" VALUE=\"".$wdengrp_sel."\">";
	echo "</td>";
	echo "<TD colspan=\"5\" height=\"35\" align=\"left\">";
	echo "<input type=\"button\" onclick=\"javascript:window.close()\" class=\"noPrint\" value=\"RENUNT\">";
	echo "</td>";
	echo "</tr>";
	echo "</table>";
	echo "</FORM>";
}	

IF ($_POST['actiune'] == 'PREZENTA ZI')
{
	echo "<FORM NAME=\"copii\" method=\"POST\" action=\"A21_copii.php\" target=\"win01\">";
	include "A21_param1.php";

	$wdata_prez=date("d-m-Y");

	echo "<TABLE class=\"table2\" cellSpacing=0 cellPadding=0 width=\"100%\" border=0>";
	echo "<tr>";	
	echo "<TD colspan=\"10\" class=\"style1\" align=\"center\"><B>PREZENTA PE ZI PENTRU TOTI PRESCOLARII</B></TD>";
	echo "</tr>";
	echo "<tr>";	
	echo "<TD colspan=\"10\" class=\"style1\" align=\"center\"><B><U>".$wdengrp_sel."</U></B></TD>";
	echo "</tr>";
	echo "<tr><td>&nbsp</td></tr>";
	echo "<tr><td>&nbsp</td></tr>";	
	echo "<tr>";	
	echo "<TD colspan=\"1\" height=\"35\" class=\"style1\" align=\"right\"><B>DIN DATA DE : &nbsp</B></TD>";
	echo "<td colspan=\"4\" align=\"center\">";
	echo "<input name=\"data_prez\" type=\"text\" style=\"text-align:center;\" onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" id=\"data_prez\" size=\"10\" VALUE=\"".$wdata_prez."\">";
	echo "</td>";
	echo "</tr>";
	echo "<tr><td>&nbsp</td></tr>";
	echo "<tr><td>&nbsp</td></tr>";
	echo "<tr>";
	echo "<TD colspan=\"5\" height=\"35\" align=\"right\">";
//	echo "<INPUT TYPE=\"submit\" class=\"noPrint\" NAME=\"actiune\" onClick=\"javascript:setTimeout('window.close()',300);\" VALUE=\"CONFIRM\">"; 
	echo "<INPUT TYPE=\"submit\" class=\"noPrint\" NAME=\"actiune\" onClick=\"return confirm_prezenta()\" VALUE=\"PREZENTA\">"; 
	echo "<INPUT TYPE=\"submit\" class=\"noPrint\" NAME=\"actiune\" onClick=\"return confirm_absenta()\" VALUE=\"ABSENTA\">"; 
	echo "<INPUT TYPE=\"HIDDEN\" NAME=\"tip_act\" VALUE=\"".$_POST['actiune']."\">";
	echo "<INPUT TYPE=\"HIDDEN\" NAME=\"grp_sel\" VALUE=\"".$_POST["grp_sel"]."\">";
	echo "<INPUT TYPE=\"HIDDEN\" NAME=\"luna_sel\" VALUE=\"".$_POST["luna_sel"]."\">";
	echo "</td>";
	echo "<TD colspan=\"5\" height=\"35\" align=\"left\">";
	echo "<input type=\"button\" onclick=\"javascript:window.close()\" class=\"noPrint\" value=\"RENUNT\">";
	echo "</td>";
	echo "</tr>";
	echo "</table>";
	echo "</FORM>";
}	
?>	

</CENTER>
</BODY>
</head>
</html>