<?php session_start(); ?>
<?php session_cache_limiter('private-no-expire'); ?>

<!DOCTYPE html>
<meta charset="utf-8">
<html lang="en">
<HEAD>
<TITLE>Stabilire tarife</TITLE>

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

</HEAD>
<script language="javascript" type="text/javascript">
function load()
{
alert("Datele au fost salvate cu succes!");
window.close();
}

</script>

</head>
<body>
<CENTER>
<?php
ob_start();
include 'javascripts.php';
include 'conectare.php';

if ($_POST["actiune"]=="STABILIRE TARIFE")
{	
echo "<BODY id=\"bg_deb\">";
echo "<CENTER>";  

		echo "<FORM NAME=\"form3\" ACTION=\"A21_tarife.php\" METHOD=\"POST\">";
		include 'A21_param2.php';
		
			$connection=mysql_connect("$host","$username","$password") or die("Nu aveti acces la server");
			$baza="apponlin_".$_POST["aplic"]."_".$_POST["unit"];
			$db=mysql_select_db($baza,$connection) or die("Nu puteti selecta Baza de date ".$baza);		
			
	//		echo "<INPUT TYPE=\"HIDDEN\" NAME=\"dengrp_sel\" VALUE=\"".$wdengrp_sel."\">"; 
	//		echo "<INPUT TYPE=\"HIDDEN\" NAME=\"grupa_sel\" VALUE=\"".substr($_POST["grupa_sel"],0,2)."\">"; 
			echo "<INPUT TYPE=\"HIDDEN\" NAME=\"grupa_sel\" VALUE=\"".$_POST["grupa_sel"]."\">"; 
			
			$wdengrp_sel=substr($_POST["grupa_sel"],3,strlen($_POST["grupa_sel"])-3);
			$wgrp_sel=substr($_POST["grupa_sel"],0,2);
			
			echo "<INPUT TYPE=\"HIDDEN\" NAME=\"dengrp_sel\" VALUE=\"".$wdengrp_sel."\">"; 

			$query="SELECT * FROM grupe where codgrp=\"".substr($_POST["grupa_sel"],0,2)."\"";
			$result=mysql_query($query) or die("Interogare esuata: ".mysql_error());		
			$row = mysql_fetch_array( $result);

			echo "<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>";			
			echo "<TR>";
			echo "<TD colspan=\"32\" align=\"center\" class=\"td_print2\">";
			echo "<B>EDITARE TARIFE PENTRU <U>".$wdengrp_sel."</U></B>";
			echo "</TD>";
			echo "</TR>";
			echo "<TR>";
			echo "<TD>";
			echo "<BR>";
			echo "</TD>";
			echo "</TR>";
			echo "<BR>";
			echo "<TR BGCOLOR=\"white\">";
			
			echo	"<TH align=\"center\" width=\"5%\" class=\"td35\">&nbsp&nbsp</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">SEP</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">OCT</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">NOI</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td39\">DEC</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">IAN</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">FEB</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">MAR</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">APR</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">MAI</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">IUN</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">IUL</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">AUG</TH>";			
			echo "</TR>";
			
			
		//	$tarif_tot = $row["t_val01"] + $row["t_val02"] + $row["t_val03"] + $row["t_val04"] + $row["t_val05"] + $row["t_val06"] + $row["t_val07"] + $row["t_val08"] + $row["t_val09"] + $row["t_val10"] + $row["t_val11"] + $row["t_val12"];
			
			echo "<TR class=\"tr4\" BGCOLOR=\"#EAEBEB\">";
			echo "<TD width=\"5%\" align=\"center\">";
			echo "Tarif / zi";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val09\" VALUE=".$row["t_val09"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val10\" VALUE=".$row["t_val10"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val11\" VALUE=".$row["t_val11"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val12\" VALUE=".$row["t_val12"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\" onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val01\" VALUE=".$row["t_val01"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val02\" VALUE=".$row["t_val02"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val03\" VALUE=".$row["t_val03"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val04\" VALUE=".$row["t_val04"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val05\" VALUE=".$row["t_val05"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val06\" VALUE=".$row["t_val06"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val07\" VALUE=".$row["t_val07"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val08\" VALUE=".$row["t_val08"].">";
			echo "</TD>";
			echo "</TR>";		
			echo "</table>";
				
			echo "<TABLE cellSpacing=0 cellPadding=0 width=\"15%\" border=0 align=\"right\">";		
			echo "<TR>";
			echo "<TD>&nbsp</TD>";
			echo "</TR>";
			echo "<tr>";
		    echo "<td colspan=\"15\" width=\"15%\" height=\"35\" align=\"right\">";
			echo "<input type=\"submit\" name=\"actiune\" id=\"button10\" value=\"CONFIRM\">";
			echo "</td>";
			echo "<td  colspan=\"2\" width=\"15%\" height=\"35\" align=\"left\">";
			echo "<input name=\"button\" type=\"button\" id=\"button10\" value=\"RENUNT\" onClick=\"javascript:window.close()\">";
			echo "</td>";
			echo  "</tr>";			
			
		echo "</form>";
		echo "</table>";	
		mysql_close($connection);
}

if ($_POST["actiune"]=="CONFIRM")
{	
		echo "<body onload=\"load()\" id=\"bg_deb\">";
	
		$connection=mysql_connect("$host","$username","$password") or die("Nu aveti acces la server");
		$baza="apponlin_".$_POST["aplic"]."_".$_POST["unit"];
		$db=mysql_select_db($baza,$connection) or die("Nu puteti selecta Baza de date ".$baza);		
		
		echo "<FORM NAME=\"form3\" ACTION=\"A21_tarife.php\" METHOD=\"POST\">";
		include 'A21_param2.php';
		
		$query="SELECT * FROM copii where codgrp=\"".substr($_POST["grupa_sel"],0,2)."\"";
		$result=mysql_query($query) or die("Interogare esuata: ".mysql_error());		
	//	$row = mysql_fetch_array( $result);
		
		$w_t_val01=$_POST["t_val01"];
		$w_t_val02=$_POST["t_val02"];
		$w_t_val03=$_POST["t_val03"];
		$w_t_val04=$_POST["t_val04"];
		$w_t_val05=$_POST["t_val05"];
		$w_t_val06=$_POST["t_val06"];
		$w_t_val07=$_POST["t_val07"];
		$w_t_val08=$_POST["t_val08"];
		$w_t_val09=$_POST["t_val09"];
		$w_t_val10=$_POST["t_val10"];
		$w_t_val11=$_POST["t_val11"];
		$w_t_val12=$_POST["t_val12"];
		
	if(mysql_num_rows($result) == 0) 
	{			
		$query3="UPDATE grupe set t_val01=\"".$w_t_val01."\", t_val02=\"".$w_t_val02."\", t_val03=\"".$w_t_val03."\", ";
		$query3=$query3."t_val04=\"".$w_t_val04."\", t_val05=\"".$w_t_val05."\", t_val06=\"".$w_t_val06."\", t_val07=\"".$w_t_val07."\", ";
		$query3=$query3."t_val08=\"".$w_t_val08."\", t_val09=\"".$w_t_val09."\", t_val10=\"".$w_t_val10."\", t_val11=\"".$w_t_val11."\", ";
		$query3=$query3."t_val12=\"".$w_t_val12."\" WHERE codgrp=\"".substr($_POST["grupa_sel"],0,2)."\"";
		$result3=mysql_query($query3) or die("Interogare esuata: ".mysql_error());
	}
	else
	{
		while ($row = mysql_fetch_array( $result))
		{
			$w_z_val01=$row["z_val01"];
			$w_z_val02=$row["z_val02"];
			$w_z_val03=$row["z_val03"];
			$w_z_val04=$row["z_val04"];
			$w_z_val05=$row["z_val05"];
			$w_z_val06=$row["z_val06"];
			$w_z_val07=$row["z_val07"];
			$w_z_val08=$row["z_val08"];
			$w_z_val09=$row["z_val09"];
			$w_z_val10=$row["z_val10"];
			$w_z_val11=$row["z_val11"];
			$w_z_val12=$row["z_val12"];
		
			$w_d_val00 = $row["d_val00"];
			
			IF ($w_t_val01 == "0")
			{
			$w_d_val01 = 0;
			}
			else
			{
			$w_d_val01=$w_z_val01 * $w_t_val01;
			}
			IF ($w_t_val02 == "0")
			{
			$w_d_val02 = 0;
			}
			else
			{
			$w_d_val02=$w_z_val02 * $w_t_val02;
			}
			IF ($w_t_val03 == "0")
			{
			$w_d_val03 = 0;
			}
			else
			{
			$w_d_val03=$w_z_val03 * $w_t_val03;
			}
			IF ($w_t_val04 == "0")
			{
			$w_d_val04 = 0;
			}
			else
			{
			$w_d_val04=$w_z_val04 * $w_t_val04;
			}
			IF ($w_t_val05 == "0")
			{
			$w_d_val05 = 0;
			}
			else
			{
			$w_d_val05=$w_z_val05 * $w_t_val05;
			}
			IF ($w_t_val06 == "0")
			{
			$w_d_val06 = 0;
			}
			else
			{
			$w_d_val06=$w_z_val06 * $w_t_val06;
			}
			IF ($w_t_val07 == "0")
			{
			$w_d_val07 = 0;
			}
			else
			{
			$w_d_val07=$w_z_val07 * $w_t_val07;
			}
			IF ($w_t_val08 == "0")
			{
			$w_d_val08 = 0;
			}
			else
			{
			$w_d_val08=$w_z_val08 * $w_t_val08;
			}
			IF ($w_t_val09 == "0")
			{
			$w_d_val09 = 0;
			}
			else
			{
			$w_d_val09=$w_z_val09 * $w_t_val09;
			}
			IF ($w_t_val10 == "0")
			{
			$w_d_val10 = 0;
			}
			else
			{
			$w_d_val10=$w_z_val10 * $w_t_val10;
			}
			IF ($w_t_val11 == "0")
			{
			$w_d_val11 = 0;
			}
			else
			{
			$w_d_val11=$w_z_val11 * $w_t_val11;
			}
			IF ($w_t_val12 == "0")
			{
			$w_d_val12 = 0;
			}
			else
			{
			$w_d_val12=$w_z_val12 * $w_t_val12;
			}

			$w_p_val01=$row["p_val01"];
			$w_p_val02=$row["p_val02"];
			$w_p_val03=$row["p_val03"];
			$w_p_val04=$row["p_val04"];
			$w_p_val05=$row["p_val05"];
			$w_p_val06=$row["p_val06"];
			$w_p_val07=$row["p_val07"];
			$w_p_val08=$row["p_val08"];
			$w_p_val09=$row["p_val09"];
			$w_p_val10=$row["p_val10"];
			$w_p_val11=$row["p_val11"];
			$w_p_val12=$row["p_val12"];
	
			$w_r_val09=($w_d_val00+$w_d_val09)-$w_p_val09;
			$w_r_val10=($w_d_val00+$w_d_val09+$w_d_val10)-($w_p_val09+$w_p_val10);
			$w_r_val11=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11)-($w_p_val09+$w_p_val10+$w_p_val11);
			$w_r_val12=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12);
			$w_r_val01=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12+$w_d_val01)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12+$w_p_val01);
			$w_r_val02=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12+$w_d_val01+$w_d_val02)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12+$w_p_val01+$w_p_val02);
			$w_r_val03=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12+$w_d_val01+$w_d_val02+$w_d_val03)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12+$w_p_val01+$w_p_val02+$w_p_val03);
			$w_r_val04=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12+$w_d_val01+$w_d_val02+$w_d_val03+$w_d_val04)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12+$w_p_val01+$w_p_val02+$w_p_val03+$w_p_val04);
			$w_r_val05=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12+$w_d_val01+$w_d_val02+$w_d_val03+$w_d_val04+$w_d_val05)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12+$w_p_val01+$w_p_val02+$w_p_val03+$w_p_val04+$w_p_val05);
			$w_r_val06=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12+$w_d_val01+$w_d_val02+$w_d_val03+$w_d_val04+$w_d_val05+$w_d_val06)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12+$w_p_val01+$w_p_val02+$w_p_val03+$w_p_val04+$w_p_val05+$w_p_val06);
			$w_r_val07=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12+$w_d_val01+$w_d_val02+$w_d_val03+$w_d_val04+$w_d_val05+$w_d_val06+$w_d_val07)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12+$w_p_val01+$w_p_val02+$w_p_val03+$w_p_val04+$w_p_val05+$w_p_val06+$w_p_val07);
			$w_r_val08=($w_d_val00+$w_d_val09+$w_d_val10+$w_d_val11+$w_d_val12+$w_d_val01+$w_d_val02+$w_d_val03+$w_d_val04+$w_d_val05+$w_d_val06+$w_d_val07+$w_d_val08)-($w_p_val09+$w_p_val10+$w_p_val11+$w_p_val12+$w_p_val01+$w_p_val02+$w_p_val03+$w_p_val04+$w_p_val05+$w_p_val06+$w_p_val07+$w_p_val08);
		
			$query3="UPDATE grupe set t_val01=\"".$w_t_val01."\", t_val02=\"".$w_t_val02."\", t_val03=\"".$w_t_val03."\", ";
			$query3=$query3."t_val04=\"".$w_t_val04."\", t_val05=\"".$w_t_val05."\", t_val06=\"".$w_t_val06."\", t_val07=\"".$w_t_val07."\", ";
			$query3=$query3."t_val08=\"".$w_t_val08."\", t_val09=\"".$w_t_val09."\", t_val10=\"".$w_t_val10."\", t_val11=\"".$w_t_val11."\", ";
			$query3=$query3."t_val12=\"".$w_t_val12."\" WHERE codgrp=\"".substr($_POST["grupa_sel"],0,2)."\"";
			$result3=mysql_query($query3) or die("Interogare esuata: ".mysql_error());
		
			$query4="UPDATE copii set d_val00=\"".$w_d_val00."\", d_val01=\"".$w_d_val01."\", d_val02=\"".$w_d_val02."\", d_val03=\"".$w_d_val03."\", ";
			$query4=$query4."d_val04=\"".$w_d_val04."\", d_val05=\"".$w_d_val05."\", d_val06=\"".$w_d_val06."\", d_val07=\"".$w_d_val07."\", ";
			$query4=$query4."d_val08=\"".$w_d_val08."\", d_val09=\"".$w_d_val09."\", d_val10=\"".$w_d_val10."\", d_val11=\"".$w_d_val11."\", ";
			$query4=$query4."d_val12=\"".$w_d_val12."\", ";
			$query4=$query4."r_val01=\"".$w_r_val01."\", r_val02=\"".$w_r_val02."\", r_val03=\"".$w_r_val03."\", ";
			$query4=$query4."r_val04=\"".$w_r_val04."\", r_val05=\"".$w_r_val05."\", r_val06=\"".$w_r_val06."\", r_val07=\"".$w_r_val07."\", ";
			$query4=$query4."r_val08=\"".$w_r_val08."\", r_val09=\"".$w_r_val09."\", r_val10=\"".$w_r_val10."\", r_val11=\"".$w_r_val11."\", ";
			$query4=$query4."r_val12=\"".$w_r_val12."\" WHERE codcopil = ".$row["codcopil"]."";
			$result4=mysql_query($query4) or die("Interogare esuata: ".mysql_error());
		}	
	}
		$query="SELECT * FROM grupe where codgrp=\"".substr($_POST["grupa_sel"],0,2)."\"";
		$result=mysql_query($query) or die("Interogare esuata: ".mysql_error());		

			echo "<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>";			
			echo "<TR>";
			echo "<TD colspan=\"32\" align=\"center\" class=\"td_print2\">";
			echo "<B>EDITARE TARIFE PENTRU <U>".$_POST["dengrp_sel"]."</U></B>";
			echo "</TD>";
			echo "</TR>";
			echo "<TR>";
			echo "<TD>";
			echo "<BR>";
			echo "</TD>";
			echo "</TR>";
			echo "<BR>";
			echo "<TR BGCOLOR=\"white\">";
			
			echo	"<TH align=\"center\" width=\"5%\" class=\"td35\">&nbsp&nbsp</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">SEP</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">OCT</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">NOI</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td39\">DEC</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">IAN</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">FEB</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">MAR</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">APR</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">MAI</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">IUN</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">IUL</TH>";
			echo	"<TH align=\"center\" width=\"3%\" class=\"td35\">AUG</TH>";			
			echo "</TR>";
			
			$row = mysql_fetch_array( $result);
		//	$tarif_tot = $row["t_val00"] + $row["t_val01"] + $row["t_val02"] + $row["t_val03"] + $row["t_val04"] + $row["t_val05"] + $row["t_val06"] + $row["t_val07"] + $row["t_val08"] + $row["t_val09"] + $row["t_val10"] + $row["t_val11"] + $row["t_val12"];
			
			echo "<TR class=\"tr4\" BGCOLOR=\"#EAEBEB\">";
			echo "<TD width=\"5%\" align=\"center\">";
			echo "Tarif / zi";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val09\" VALUE=".$row["t_val09"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val10\" VALUE=".$row["t_val10"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val11\" VALUE=".$row["t_val11"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val12\" VALUE=".$row["t_val12"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\" onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val01\" VALUE=".$row["t_val01"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val02\" VALUE=".$row["t_val02"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val03\" VALUE=".$row["t_val03"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val04\" VALUE=".$row["t_val04"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val05\" VALUE=".$row["t_val05"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val06\" VALUE=".$row["t_val06"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val07\" VALUE=".$row["t_val07"].">";
			echo "</TD>";
			echo"<TD width=\"3%\" align=\"center\">";
			echo "<INPUT TYPE=\"TEXT\" size=\"3\"  onfocus=\"onfocus_camp(this)\" onblur=\"onblur_text(this)\" onkeypress=\"return isNumberKey(event)\" class=\"text1\" NAME=\"t_val08\" VALUE=".$row["t_val08"].">";
			echo "</TD>";
			echo "</TR>";		
			echo "</table>";
				
			echo "<TABLE cellSpacing=0 cellPadding=0 width=\"15%\" border=0 align=\"right\">";		
			echo "<TR>";
			echo "<TD>&nbsp</TD>";
			echo "</TR>";
			echo "<tr>";
		    echo "<td colspan=\"15\" width=\"15%\" height=\"35\" align=\"right\">";
			echo "<input type=\"submit\" name=\"actiune\" id=\"button10\" value=\"CONFIRM\" onLoad=\"javascript:window.close();\">";
			echo "</td>";
			echo "<td  colspan=\"2\" width=\"15%\" height=\"35\" align=\"left\">";
			echo "<input name=\"button\" type=\"button\" id=\"button10\" value=\"RENUNT\" onClick=\"javascript:window.close()\">";
			echo "</td>";
			echo  "</tr>";			

		echo "</form>";
		echo "</table>";	
	
		mysql_close($connection);
}
?>
</BODY>		
</HTML>
