<?php

REQUIRE 'pu.php';



?>
<font size=4>Siin saab opereerida seadmetega.</font><BR><BR><BR><BR>


<form action="seade.php">
      <table>
	<tr>
<td>Seade:</td><td><input type="text" name="seade" /></td>
</tr>
</table>

<input type="submit" value="LISA" />
</form>

<?php
  mysql_connect("localhost","kasutajanimi","parool");
  mysql_select_db("baas");

  $lause="SELECT id,nimi FROM SEADMED";
  $vastus=mysql_query($lause);

  

echo "<form action='masskustutus2.php'>";
echo "<BR><BR>Töökorras seadmed";
    while($rida=mysql_fetch_array($vastus))

    {
echo "<table>
	 <tr>
	 </tr>
	 \n
	<tr>
     <td><input type='checkbox' name='ruut[]' value='$rida[id]'></td>
     <td>$rida[nimi]</td>	 
     </tr>
	 </table>\n";

}
echo"<input type='submit'  name='kustutus' value='Kustuta Seade'><input type='submit' name='hooldus' value='Vajab Hooldust'><input type='submit' name='korras' value='Tehti korda'>";



$lause2="SELECT id,nimi FROM SEADMED_katki";
$vastus2=mysql_query($lause2);

echo "<BR><BR>Katkised seadmed";
    while($rida=mysql_fetch_array($vastus2))

    {
echo "<table>
	 <tr>
	 </tr>
	 \n
	<tr>
     <td><input type='checkbox' name='ruut[]' value='$rida[id]'></td>
     <td>$rida[nimi]</td>	 
     </tr>
	 </table>\n";

}
echo "</form>";
  mysql_close();
?>