foreach ($maxlength as $i => $breite) { $worksheet->setColumn($i, $i, $breite); } $workbook->close(); } else { echo ' <html> <head> <title>' . $p->t('zeitsperre/zeitsperren') . '</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../skin/style.css.php" type="text/css"> </head> <body> <h1>' . $p->t('zeitsperre/zeitsperren') . '</h1> <H3>' . $p->T('zeitsperre/zeitsperreVonBis', array($datum_beginn, $datum_ende)) . '</H3>'; if (isset($_GET['organisationseinheit'])) { echo '<br>'; echo '<FORM action="' . $_SERVER['PHP_SELF'] . '" method="GET">' . $p->t('global/organisationseinheit') . ': <SELECT name="organisationseinheit">'; $oe_obj = new organisationseinheit(); $oe_obj->getAll(); echo "<option value='' " . (is_null($organisationseinheit) ? 'selected' : '') . ">-- " . $p->t('global/auswahl') . " --</option>"; foreach ($oe_obj->result as $oe) { if ($oe->aktiv) { if ($oe->oe_kurzbz == $organisationseinheit) { $selected = 'selected'; } else { $selected = ''; } echo "<option value='{$oe->oe_kurzbz}' {$selected}>{$oe->organisationseinheittyp_kurzbz} {$oe->bezeichnung}</option>"; }