28 lines
535 B
PHP
28 lines
535 B
PHP
<?php
|
|
$kontakty = [
|
|
1 => [
|
|
"Ghostfox"
|
|
],
|
|
2 => [
|
|
"Youpiter"
|
|
]
|
|
];
|
|
|
|
$typ = $_POST["typ"];
|
|
|
|
if (!isset($typ) || !array_key_exists($typ, $kontakty)) {
|
|
return;
|
|
}
|
|
|
|
foreach ($kontakty[$typ] as $indeks => $nazwa) {
|
|
$indeks++;
|
|
$komorka = $indeks % 2 == 0 ? "komorka_kolor" : "komorka_biala";
|
|
|
|
echo("
|
|
<label class=\"label1 $komorka\">
|
|
<input name=\"odbiorcy[]\" type=\"checkbox\" value=\"$indeks\"/>
|
|
<span class=\"nazwa-uzytkownika\">$nazwa</span>
|
|
</label>
|
|
");
|
|
}
|
|
?>
|