public function share() { $fields = array(); $US = Users::getUsers(); while ($U = $US->getNextEntry()) { if ($U->getID() == Session::currentUser()->getID()) { continue; } $fields[] = "User" . $U->getID(); } $US->resetPointer(); echo "<p>In diesem Fenster bestimmen Sie andere Systembenutzer, die auf Ihren Kalender zugreifen können. Falls es andere Systembenutzer gibt.</p>"; if (count($fields) == 0) { return; } $F = new HTMLForm("shareMailBox", $fields); $F->getTable()->setColWidth(1, 120); #$F->setValue("MailKontoID", $MailKontoID); #$F->setType("MailKontoID", "hidden"); while ($U = $US->getNextEntry()) { $F->setLabel("User" . $U->getID(), $U->A("name")); $F->setType("User" . $U->getID(), "select", null, array("none" => "kein Zugriff", "read" => "lesen", "read.create" => "lesen und erstellen")); } $UD = new mUserdata(); $shareWith = $UD->getAsArray("shareCalendar"); foreach ($shareWith as $v => $n) { $v = str_replace("shareCalendarTo", "", $v); $F->setValue("User{$v}", $n); } $F->setSaveRMEPCR("Speichern", "", "mKalender", "-1", "saveShare", OnEvent::closePopup("mKalender")); echo $F; }