<?php 
include('menu.html');
?>
	
<?php
$subor = '/home/bakalarka/Plocha/aplikacia/XML/data.xml';
$xml = simplexml_load_file('/home/bakalarka/Plocha/aplikacia/XML/data.xml');

$kuchyna = $xml->kuchyna;
$svetlo1 = $kuchyna->svetlo[0]->hodnota;
$svetlo2 = $kuchyna->svetlo[1]->hodnota;
$svetlo3 = $kuchyna->svetlo[2]->hodnota;
$svetlo4 = $kuchyna->svetlo[3]->hodnota;
$roleta1 = $kuchyna->roleta[0]->hodnota;
$roleta2 = $kuchyna->roleta[1]->hodnota;
$roleta3 = $kuchyna->roleta[2]->hodnota;


?> 
<form action="action_kuchyna.php" method="get">
<h3>Kuchyňa</h3>

svetlo1: &nbsp; 
<?php

if($svetlo1==1) {
echo 'Zapnute<input type="radio" value="1" name="svetlo1_kuchyna" checked="checked">
Vypnute<input type="radio" value="0" name="svetlo1_kuchyna"><br /><br>';
}
else {
echo 'Zapnute<input type="radio" value="1" name="svetlo1_kuchyna">
Vypnute<input type="radio" value="0" name="svetlo1_kuchyna" checked="checked"><br /><br>';
}
?>
svetlo2: &nbsp; 
<?php
if($svetlo2==1) {
echo 'Zapnute<input type="radio" value="1" name="svetlo2_kuchyna" checked="checked">
Vypnute<input type="radio" value="0" name="svetlo2_kuchyna"><br /><br>';
}

else {
echo 'Zapnute<input type="radio" value="1" name="svetlo2_kuchyna">
Vypnute<input type="radio" value="0" name="svetlo2_kuchyna" checked="checked"><br /><br>';
}
?>
svetlo3: &nbsp; 
<?php
if($svetlo3==1) {

echo 'Zapnute<input type="radio" value="1" name="svetlo3_kuchyna" checked="checked">
Vypnute<input type="radio" value="0" name="svetlo3_kuchyna"><br /><br>';
}
else {
echo 'Zapnute<input type="radio" value="1" name="svetlo3_kuchyna">
Vypnute<input type="radio" value="0" name="svetlo3_kuchyna" checked="checked"><br /><br>';
}
?>
svetlo4: &nbsp; 
<?php
if($svetlo4==1) {
echo 'Zapnute<input type="radio" value="1" name="svetlo4_kuchyna" checked="checked">
Vypnute<input type="radio" value="0" name="svetlo4_kuchyna"><br /><br>';
}
else {
echo 'Zapnute<input type="radio" value="1" name="svetlo4_kuchyna">
Vypnute<input type="radio" value="0" name="svetlo4_kuchyna" checked="checked"><br /><br>';
}
?>

<?php
echo "Roleta1 : <input type=\"text\" name=\"roleta1_kuchyna\" alt=\"Zadajte hodnotu od 0 po 100.\" value=\"$roleta1\">"
?>
<br>
<?php
echo "Roleta2 : <input type=\"text\" name=\"roleta2_kuchyna\" alt=\"Zadajte hodnotu od 0 po 100.\" value=\"$roleta2\">"
?>
<br>
<?php
echo "Roleta3 : <input type=\"text\" name=\"roleta3_kuchyna\" alt=\"Zadajte hodnotu od 0 po 100.\" value=\"$roleta3\">"
?>
<br>
<input type="submit" value="Uložiť" name="kuchyna">

</form>


</body>
</html>