<? 
//kontrola a start sesion s uzivatelovymi udaji
session_start();
if (!$_SESSION['nick'] )
{
 header("Location:index.php");
 exit;
}
include("./config.php"); //soubor s pripojenim k db
$aa=MySQL_Query("SELECT * FROM servers WHERE id_server=$id_server");
while($bb=mysql_fetch_array($aa))
{
  $nazev = $bb["nazev"];
  $ip = $bb["ip"];
  $memdnu = $bb["memdnu"];
  if ($bb["activ"])
    $anoactiv=checked;
  else
    $neactiv=checked;
}
echo " <HTML>
<HEAD>
<title>Přidání knihy</title>
<meta http-equiv=\"Content-Type\" content=\"text/html;   charset=iso-8859-2\">
</HEAD>
    	 <H2> Add new server</H2>

  	<br />
  	<br />
    	 <FORM method=post action=\"edit0.php?id_server=$id_server\">
  	<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\"   >


	<tr>
     	 <td align=\"left\">Server`s name&nbsp;</td>
     	 <td><input type=\"text\"  name=\"nazev\" size=\"80\" value=\"$nazev\"></td>
    	</tr> 

	<tr>
     	 <td align=\"left\">Server`s IP&nbsp;</td>
     	 <td><input type=\"text\"  name=\"ip\" size=\"80\" value=\"$ip\"></td>
    	</tr> 


	<tr>
     	 <td align=\"left\">How long save data:&nbsp;</td>
     	 <td><input type=\"text\"  name=\"memdnu\" size=\"80\" value=\"$memdnu\"></td>
    	</tr> 
    	
	<tr>
     	 <td height=21 align=\"left\">Active?&nbsp; </td>
     	 <td height=21>
      	  ANO <input type=\"radio\"   name=\"activ\"  value='1' $anoactiv> 
       	  NE <input type=\"radio\"   name=\"activ\"  value='0' $neactiv>
     	 </td>
    	</tr> 
    	
    		<tr>
     	 <td height=21 align=\"left\"></td>
     	 <td height=21>
     	   	<input name=\"SUBMIT\" type=submit value=\"Uložit\">&nbsp; 
     	 </td>
    	</tr> 

        </form>

	</table> 


     ";
?>
