Kód souboru statistika_form.php pro opsání

<?php
/*Kroužek webdesignu DDM Chomutov - pomocný soubor zobrazující statistická data*/

echo"<html>
<head>
<meta http-equiv=\"Content-Language\" content=\"cs\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1250\">
<title>Registr obyvatel mého města</title>
</head>

<body>
<div align=\"center\">
<table border=\"1\" width=\"80%\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#000000\" id=\"table2\" bgcolor=\"#FFFFCC\">
<tr>
<td>
<div align=\"center\">
<table border=\"0\" width=\"100%\" id=\"table3\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#000000\" >
<tr>
<td >
<p align=\"center\"><b><font size=\"6\">Registr obyvatel mého města</font></b></td>
</tr>
<tr>
<td >&nbsp;</td>
</tr>
<tr>
<td align=\"center\">
<a target=\"_self\" href=\"vypis.php\">Výpis všech obyvatel</a></td>
</tr>
<tr>
<td align=\"center\">
Statistika</td>
</tr>
<tr>
<td align=\"center\">
<a target=\"_self\" href=\"novy_obyvatel.php\">Nový obyvatel</a></td>
</tr>
<tr>
<td align=\"center\">
<a target=\"_self\" href=\"editovat_obyvatele.php\">Editovat obyvatele</a></td>
</tr>
<tr>
<td align=\"center\">
<a href=\"smazat_obyvatele.php\">Smazat obyvatele</a></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<p align=\"center\"><b><font size=\"5\">Statistické údaje z vašeho města</font></b></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><p align=\"center\">";
/*------------------Vypisovaná data---------------------------------------------------------------------------*/
echo"<div align=\"center\">
<table border=\"1\" width=\"80%\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#000000\" id=\"table6\" bgcolor=\"#FFFFFF\">
<tr>
<td>
<div align=\"center\">
&nbsp;<table border=\"1\" width=\"860\" cellspacing=\"0\" cellpadding=\"0\" id=\"table7\" bordercolor=\"#000000\">
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet všech obyvatel města</td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$pocet_obyvatel_mesta."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet mužů</td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$pocet_obyvatel_mesta_muzi."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet žen</td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$pocet_obyvatel_mesta_zeny."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 1-10 let</td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek1_10."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 11-20 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek11_20."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 21-30 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek21_30."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 31-40 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek31_40."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 41-50 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek41_50."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 51-60 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek51_60."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 61-70 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek61_70."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 71-80 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek71_80."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 81-90 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek81_90."</td>
</tr>
<tr>
<td align=\"center\" width=\"192\" style=\"border-style: solid; border-width: 1px\">
Počet obyvatel 91-100 </td>
<td align=\"center\" width=\"668\" style=\"border-style: solid; border-width: 1px\">".$vek91_100."</td>
</tr>
</table>
</div>";
echo"<div align=\"center\"><p align=\"center\"><b><font size=\"3\">Poměr</font></b>

&nbsp;<table border=\"0\" width=\"60%\" cellspacing=\"0\" cellpadding=\"0\" id=\"table9\">
<tr>
<td align=\"center\" width=\"50%\">Muži</td>
<td align=\"center\" width=\"50%\">Ženy</td>
</tr>
</table>
<table border=\"0\" width=\"60%\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#000000\" id=\"table8\">
<tr>
<td align=\"center\" bgcolor=\"#000099\" width=\"".$procento_m."%\"><b><font color=\"#FFFFFF\">".$procento_m."%</font></b></td>
<td align=\"center\" bgcolor=\"#FF3300\" width=\"".$procento_z."%\"><b><font color=\"#FFFFFF\">".$procento_z."%</font></b></td>
</tr>
</table>
</div>
<div align=\"center\"><p align=\"center\"><b><font size=\"3\">Poměry věkových skupin</font></b>

<table border=\"0\" width=\"60%\" cellspacing=\"0\" cellpadding=\"0\" height=\"200\" id=\"table10\">
<tr>
<td align=\"center\" width=\"9%\" height=\"30\">1-10</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">11-20</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">21-30</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">31-40</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">41-50</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">51-60</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">61-70</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">71-80</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">81-90</td>
<td width=\"5\" align=\"center\" height=\"30\">&nbsp;</td>
<td align=\"center\" width=\"9%\" height=\"30\">91-100</td>
</tr>
<tr>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta1." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta2." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta3." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta4." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta5." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta6." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta7." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta8." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta9." %</td>
<td width=\"5\" height=\"30\">&nbsp;</td>
<td width=\"9%\" align=\"center\" height=\"30\">".$procenta10." %</td>
</tr>
<tr>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta1."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta2."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta3."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta4."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta5."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta6."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta7."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta8."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta9."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
<td width=\"5\" valign=\"bottom\">&nbsp;</td>
<td width=\"9%\" valign=\"bottom\">
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#0033CC\" height=\"".$procenta10."%\" id=\"table11\">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
";

echo "</table></div>";
/*------------------Ukončení tabulky z výpisem----------------------------------------------------------------*/
echo"</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</div></td>
</tr>
</table>
</div>
</body>
</html>";
?>