function sendMessage($to, $text) { $F = new Factory("phim"); $target = $to; $group = 0; if ($to[0] == "g") { $group = str_replace("g", "", $to); $to = 0; } $F->sA("phimFromUserID", Session::currentUser()->getID()); $F->sA("phimToUserID", $to); $F->sA("phimTime", time()); $F->sA("phimMessage", $text); $F->sA("phimphimGruppeID", $group); $message = new stdClass(); $message->method = "message"; $message->content = $text; $message->from = Session::currentUser()->getID(); $message->fromUser = Session::currentUser()->A("name"); $message->to = $to; $message->time = time(); $message->group = $group; $F->store(); $this->go($message, $target); }
public function checkTermine() { $today = Util::parseDate("de_DE", date("d.m.Y"), "store"); $Kalender = mxCalGUI::getCalendarData($today, $today + 3600 * 24 * 1, Session::currentUser()->getID()); $found = false; for ($i = 0; $i < 2; $i++) { if ($found !== false) { break; } $events = $Kalender->getEventsOnDay(date("dmY", $today + 3600 * 24 * $i)); foreach ($events as $v) { foreach ($v as $s) { if ($s->timestamp() > time() and $found === false) { $found = $s; break; } } } } if (!$found) { die("false"); } $O = new stdClass(); $O->name = $found->title(); $O->start = $found->timestamp(); echo json_encode(array($O)); }
function __construct() { $this->customize(); if (get_class($this) != "CCAuftrag") { parent::__construct(); return; } /*if(!isset($_POST["benutzer"])){ $_POST["benutzer"] = "Max"; $_POST["password"] = sha1("Max"); $_POST["belegart"] = "R"; $_POST["lead_id"] = "Vicidial-001"; $_POST["firma"] = "Furtmeier Hard- und Software"; $_POST["strasse"] = "Neuteile"; $_POST["nr"] = "8"; $_POST["plz"] = "86682"; $_POST["ort"] = "Genderkingen"; }*/ $this->loggedIn = true; if (Session::currentUser() == null and !Users::login($_POST["benutzer"], $_POST["password"], "open3A")) { $this->loggedIn = false; } $this->showZahlungsart = true; $this->showButtonEditAddress = true; $this->showButtonCheckWithGoogle = true; }
function deleteMe() { if ($this->A("phimFromUserID") != Session::currentUser()->getID()) { Red::errorD("Sie können nur eigene Nachrichten löschen!"); } parent::deleteMe(); }
public function getUsers() { if (Session::currentUser() == null) { throw new Exception("No user logged in!"); } $this->collector = array(); $collection = array(); try { $ldap = self::getADConnection(); if ($ldap == null) { return; } $LD = LoginData::get("ADServerUserPass"); $result = ldap_search($ldap, $LD->A("optionen"), "(&(objectCategory=person)(samaccountname=*))"); if (function_exists("ldap_sort")) { ldap_sort($ldap, $result, "sn"); } $info = ldap_get_entries($ldap, $result); foreach ($info as $user) { if (!isset($user["samaccountname"])) { continue; } $R = self::getADEntry($user); $U = new User($R->UserID); $U->setA($R); $collection[] = $U; } } catch (Exception $e) { } $this->collector = array_merge($this->collector, $collection); }
public function getAngebote($data) { if (!$this->loggedIn) { return "TIMEOUT"; } $html = ""; $T = new HTMLTable(2); #, "Bitte wählen Sie einen Lieferschein"); $T->setTableStyle("width:100%;margin-top:10px;"); $T->setColWidth(1, 130); $T->useForSelection(false); $T->maxHeight(400); $AC = anyC::get("GRLBM", "isA", "1"); $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID"); $AC->addAssocV3("UserID", "=", Session::currentUser()->getID()); $AC->addAssocV3("status", "=", "open"); #$AC->addOrderV3("datum", "DESC"); $AC->addOrderV3("nummer", "DESC"); #$AC->setLimitV3(100); #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID"); $i = 0; while ($B = $AC->n()) { $Adresse = new Adresse($B->A("AdresseID")); $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress())); $T->addCellStyle(1, "vertical-align:top;"); $T->addRowStyle("cursor:pointer;border-bottom:1px solid #ccc;"); #if($i % 2 == 1) # $T->addRowStyle ("background-color:#eee;"); $T->addRowEvent("click", "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');"); $i++; } $html .= $T; return $html; }
public function createNewServer() { $F = new Factory("xCal"); $F->sA("xCalServerActive", "1"); $F->sA("xCalUserID", Session::currentUser()->getID()); $F->store(); }
function __construct() { $_SESSION["viaInterface"] = true; if (isset($_GET["cloud"]) and !isset($_SESSION["phynx_customer"])) { $_SESSION["phynx_customer"] = $_GET["cloud"]; } $this->loggedIn = Session::currentUser() != null; }
public function getHTML($id, $page) { $this->addAssocV3("phimGruppeMasterUserID", "=", Session::currentUser()->getID()); $this->loadMultiPageMode($id, $page, 0); $gui = new HTMLGUIX($this); $gui->version("mphim"); $gui->name("Gruppe"); $B = $gui->addSideButton("Zurück", "back"); $B->loadPlugin("contentRight", "mphim"); $gui->attributes(array("phimGruppeName")); return $gui->getBrowserHTML($id); }
private function getAppServerUsers() { $S = Util::getAppServerClient(); try { $collection = array(); $Users = $S->getUsers(Session::currentUser()->getA()); foreach ($Users as $UL) { $U = new User($UL->UserID); $U->setA($UL); $collection[] = $U; } } catch (Exception $e) { } $this->addAssocV3("isAdmin", "=", "0"); $this->lCV3(); $this->collector = array_merge($this->collector, $collection); }
function __construct() { /*if(!isset($_POST["benutzer"])){ $_POST["benutzer"] = "Max"; $_POST["password"] = sha1("Max"); $_POST["belegart"] = "R"; $_POST["lead_id"] = "Vicidial-001"; $_POST["firma"] = "Furtmeier Hard- und Software"; $_POST["strasse"] = "Neuteile"; $_POST["nr"] = "8"; $_POST["plz"] = "86682"; $_POST["ort"] = "Genderkingen"; }*/ if (Session::currentUser() == null and !Users::login($_POST["benutzer"], $_POST["password"], "open3A")) { $this->loggedIn = false; } }
public static function getAppServerClient($auth = true) { try { $AppServer = mUserdata::getGlobalSettingValue("AppServer", ""); if ($AppServer != "") { $CU = Session::currentUser(); $uri = $AppServer . "/plugins/AppServer/AppServer.php"; if ($CU != null and $auth) { $c = Session::currentUser()->getA(); return new SoapClient(null, array("location" => $uri, "uri" => $uri, "login" => $c->username, "password" => $c->SHApassword)); } else { return new SoapClient(null, array("location" => $uri, "uri" => $uri)); } #$user = $S->getUser($username, $password); } } catch (Exception $e) { } return null; }
function getCMSHTML() { if (!isset($_SERVER['PHP_AUTH_USER']) or $_SERVER['PHP_AUTH_USER'] == "") { header('WWW-Authenticate: Basic realm="Ticket POS"'); header('HTTP/1.0 401 Unauthorized'); die("Authentifikation fehlgeschlagen"); } $EC = new ExtConn(Util::getRootPath()); if (!$EC->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) { header('WWW-Authenticate: Basic realm="Ticket POS"'); header('HTTP/1.0 401 Unauthorized'); die("Authentifikation fehlgeschlagen"); } $html = "<div style=\"width:200px;float:right;\">Angemeldet als<br /><b>" . Session::currentUser()->A("name") . "</b></div>"; $html .= "<h1>Ticket POS</h1>"; $AC = anyC::get("Seminar"); $AC->addAssocV3("SeminarVon", ">=", time() - 3600 * 48); $Events = array(); while ($S = $AC->getNextEntry()) { $Events[$S->getID()] = $S->A("SeminarName") . ", " . Util::CLFormatDate($S->A("SeminarVon"), true); } $I = new HTMLInput("currentEvent", "select", null, $Events); $I->style("font-size:20px;width:45%;"); $html .= "<div style=\"margin-bottom:45px;\">{$I}</div>"; $TS = new CCTicketShop(); /*$count = array(); for($i = 0; $i < 21; $i++) $count[$i] = $i; $I = new HTMLInput("ticketCount", "select", null, $count); $I->style("width:100%;font-size:20px;"); $IC = new Button("Weiter", ""); $IC->onclick("CustomerPage.rme('handleTicketSale', [$('select[name=currentEvent]').val(), $('select[name=ticketCount]').val()], function(){ })"); $IC->className("submitFormButton");*/ $html .= "\n\t\t<div style=\"float:right;width:45%;\">\n\t\t\t<h2 style=\"margin-bottom:10px;\">Ticketverkauf</h2>\n\t\t\t" . $TS->getCMSHTML(false) . "\n\t\t\t<!--<div style=\"border:1px dashed grey;padding:10px;margin-top:10px;\">\n\t\t\t\tAnzahl der Tickets:\n\t\t\t\t{$I}{$IC}\n\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</div>-->\n\t\t</div>"; $I = new HTMLInput("ticketCheck"); $I->style("width:98%;font-size:20px;"); $I->onEnter("CustomerPage.rme('handleTicketCheck', [\$('select[name=currentEvent]').val(), \$(this).val()], function(transport){ \$('#ticketValidInfo').html(transport); })"); $html .= "\n\t\t<div style=\"width:45%;\">\n\t\t\t<h2 style=\"margin-bottom:10px;\">Einlass</h2>\n\t\t\t<div style=\"border:1px dashed #BBBBBB;padding:10px;\">\n\t\t\t\tTicket-Nummer:\n\t\t\t\t{$I}\n\t\t\t\t<div id=\"ticketValidInfo\" style=\"font-size:20px;margin-top:20px;\">\n\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>"; return $html; }
function __construct() { parent::__construct(); $this->customize(); $bps = $this->getMyBPSData(); if (Session::isPluginLoaded("mAdressBuch")) { $CAB = mAdressBuchGUI::getCurrent($this, false, true); if ($CAB == "-2") { $this->addAssocV3("type", "=", "default", "AND", "1"); $AC = anyC::get("AdressBuch"); $AC->addAssocV3("AdressBuchUserID", "=", Session::currentUser()->getID()); $AC->addAssocV3("AdressBuchTyp", "=", "2"); while ($AB = $AC->getNextEntry()) { $this->addAssocV3("type", "=", "AB" . $AB->getID(), "OR", "1"); } } if ($CAB == "0") { $this->addAssocV3("type", "=", "default"); } if ($CAB > 0) { $AB = new AdressBuch($CAB); if ($AB->A("AdressBuchTyp") == "1" or $AB->A("AdressBuchTyp") == "3" or $AB->A("AdressBuchTyp") == "2" and $AB->A("AdressBuchUserID") == Session::currentUser()->getID()) { $this->addAssocV3("type", "=", "AB" . $bps["AdressBuch"]); } } } /*if($bps == -1 OR !isset($bps["AdressBuch"]) OR $bps["AdressBuch"] == 0) $this->addAssocV3("type","=","default"); else { $AB = new AdressBuch($bps["AdressBuch"]); if($AB->A("AdressBuchTyp") == "1" OR $AB->A("AdressBuchTyp") == "3" OR ($AB->A("AdressBuchTyp") == "2" AND $AB->A("AdressBuchUserID") == Session::currentUser()->getID())) $this->addAssocV3("type","=","AB".$bps["AdressBuch"]); }*/ $this->gui = new HTMLGUI(); if ($bps != -1 and isset($bps["selectionMode"]) and (strpos($bps["selectionMode"], "Vertrag") !== false or strpos($bps["selectionMode"], "Bestellung") !== false or strpos($bps["selectionMode"], "CloudKunde") !== false or strpos($bps["selectionMode"], "Einsatzort") !== false)) { $this->gui = new HTMLGUI2(); $this->gui->setDisplaySide("right"); } }
public function saveShare() { $args = func_get_args(); #$UD = new mUserdata(); #$UD->getAsArray("shareCalendar"); $i = 0; $US = Users::getUsers(); while ($U = $US->getNextEntry()) { if ($U->getID() == Session::currentUser()->getID()) { continue; } if ($args[$i] != "none") { mUserdata::setUserdataS("shareCalendarTo" . $U->getID(), $args[$i], "shareCalendar"); } else { $UD = new mUserdata(); $UD->delUserdata("shareCalendarTo" . $U->getID()); } $i++; } }
public static function checkRestrictionOrDie($restriction) { if ($_SESSION["S"]->getCurrentUser() == null) { return; } #throw new Exception("No user authenticated with the system!"); if ($_SESSION["S"]->isUserAdmin()) { return; } if (SpeedCache::inStaticCache("checkRestrictionOrDie{$restriction}")) { $sUD = SpeedCache::getStaticCache("checkRestrictionOrDie{$restriction}", true); } else { $UD = new mUserdata(); $UD->addAssocV3("wert", "=", $restriction); $UD->addAssocV3("UserID", "=", Session::currentUser()->getID()); $sUD = $UD->getNextEntry(); SpeedCache::setStaticCache("checkRestrictionOrDie{$restriction}", $sUD); } if ($sUD != null) { Red::errorD("Diese Aktion ist nicht erlaubt!"); } }
public static function newSession($physion, $application, $plugin, $cloud = "", $title = "", $icon = "") { echo "<p>Bitte haben Sie etwas Geduld, während die neue Sitzung initialisiert wird...</p><iframe onload=\"window.open(contentManager.getRoot()+'?physion={$physion}&application={$application}&plugin={$plugin}" . ($cloud != "" ? "&cloud={$cloud}" : "") . "" . ($title != "" ? "&title={$title}" : "") . "" . ($icon != "" ? "&icon={$icon}" : "") . "');" . OnEvent::closePopup("Util") . "\" src=\"interface/rme.php?class=Users&construct=&method=doLogin¶meters=%27" . Session::currentUser()->A("username") . "%27,%27" . Session::currentUser()->A("SHApassword") . "%27,%27" . Applications::activeApplication() . "%27,%27" . Session::currentUser()->A("language") . "%27&physion={$physion}" . ($cloud != "" ? "&cloud={$cloud}" : "") . "\" style=\"display:none;\"></iframe>"; }
public static function isAltUserS() { return get_class(Session::currentUser()) == "phynxAltLogin"; }
public function getPopup() { $bps = $this->getMyBPSData(); $gui = $this->getGUI($this->getID()); $onSave = "Popup.close('LoginData', 'edit');"; #$gui->setJSEvent("onSave", "function() { Popup.close('', 'mailServer'); contentManager.reloadFrame('contentRight'); }"); #$gui->setStandardSaveButton($this,"mLoginData"); $gui->displayMode("popup"); $gui->label("server", "Server"); $gui->label("passwort", "Passwort"); $html = ""; #$html2 = ""; if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "mailServer") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "MailServerUserPass"); $gui->descriptionField("server", "Für eine verschlüsselte Verbindung tragen Sie ein: Protokoll://server.de:Port<br />Also zum Beispiel tls://smtp.1und1.de:465 oder tls://smtp.strato.de:465"); $gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "jabberServer") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); #$html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "JabberServerUserPass"); $gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "AWS") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "AWSUserPass"); $gui->label("benutzername", "Access key"); $gui->label("passwort", "Secret key"); $gui->type("optionen", "hidden"); $gui->type("server", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "regID") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); #$html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter). Es kann auch notwendig sein, die E-Mail über den korrekten Server zu schicken, um die Ankunft beim Empfänger sicherzustellen.</small></p>"; $gui->type("UserID", "hidden"); $gui->type("server", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "RegIDUserPass"); $gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and strpos($bps["preset"], "mailServerAdditional") !== false) { $Nr = str_replace("mailServerAdditional", "", $bps["preset"]); $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn eine Absender-Domain nicht über den Standard-Mailserver verschickt werden kann.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "MailServer{$Nr}UserPass"); $gui->label("optionen", "Absender-Domain"); $onSave .= OnEvent::reloadPopup("mInstallation"); #$gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and ($bps["preset"] == "remoteMailServer1" or $bps["preset"] == "remoteMailServer2" or $bps["preset"] == "remoteMailServer3")) { $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "RemoteMailServer" . substr($bps["preset"], -1) . "APIKey"); $gui->type("optionen", "hidden"); $gui->type("passwort", "hidden"); $gui->label("benutzername", "API key"); $gui->descriptionField("server", "Der Pfad zur openMM-Installation inklusive Protokollangabe. Zum Beispiel https://www.meinMailserver.de/openMM"); $onSave .= OnEvent::reloadPopup("mVUser"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "backupFTPServer") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie die Backups automatisch auf einen FTP-Server hochladen möchten.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "BackupFTPServerUserPass"); $gui->descriptionField("optionen", "Bitte geben Sie hier das Unterverzeichnis an, in das die Datei hochgeladen werden soll"); $gui->label("optionen", "Verzeichnis"); #$gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "backupSFTPServer") { $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('LoginData', 'edit');"); $BAbort->style("float:right;"); $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie die Backups automatisch auf einen SFTP-Server hochladen möchten.</small></p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "BackupSFTPServerUserPass"); $gui->descriptionField("optionen", "Bitte geben Sie hier das Unterverzeichnis an, in das die Datei hochgeladen werden soll"); $gui->label("optionen", "Verzeichnis"); #$gui->type("optionen", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and ($bps["preset"] == "googleData" or $bps["preset"] == "GoogleAccountUserPass")) { $html = "<p>Bitte beachten Sie: Es werden nur Ihre eigenen Termine synchronisiert.</p>"; $gui->type("UserID", "hidden"); $this->changeA("UserID", Session::currentUser()->getID()); $gui->type("name", "hidden"); $this->changeA("name", "GoogleAccountUserPass"); $gui->type("optionen", "hidden"); $gui->type("server", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "AnySMSUserPass") { $html = ""; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->type("name", "hidden"); $this->changeA("name", "AnySMSUserPass"); #$gui->type("optionen", "hidden"); #$gui->type("server", "hidden"); $gui->label("server", "Gateway"); $gui->label("optionen", "Absender"); $gui->descriptionField("optionen", "Dies ist vom gewählten Gateway abhängig."); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "klickTelAPIKey") { $html = ""; $gui->type("UserID", "hidden"); $this->changeA("UserID", "-1"); $gui->label("benutzername", "API-Key"); $gui->type("name", "hidden"); $this->changeA("name", "klickTelAPIKey"); $gui->type("optionen", "hidden"); $gui->type("server", "hidden"); $gui->type("passwort", "hidden"); } if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "adServer") { $this->changeA("UserID", "-1"); $this->changeA("name", "ADServerUserPass"); #$html = ""; /* $gui->label("benutzername", "API-Key"); $gui->type("optionen", "hidden"); $gui->type("server", "hidden"); $gui->type("passwort", "hidden");*/ $gui->type("name", "hidden"); $gui->type("UserID", "hidden"); $gui->label("server", "AD-Server"); $gui->label("optionen", "Benutzer-Pfad"); $gui->descriptionField("benutzername", "Mit Domain-Name. Z.B. Administator@Furtmeier.dom"); $gui->descriptionField("optionen", "Bitte geben Sie den LDAP-Pfad zum Benutzer-Verzeichnis ein. Z.B. OU=Benutzer,DC=furtmeier,DC=dom"); $onSave = "Popup.close('Users', 'edit');"; } #$gui->label("benutzername", "Benutzername"); $gui->addToEvent("onSave", $onSave); echo $html . $gui->getEditHTML(); }
/** * @param string $iCal * @param string $myEmail * @param int $answer possible values: accept: 1, maybe: 2, decline: 3 */ public static function answerInvitation(string $iCal, string $myEmail, int $answer) { if ($answer == "1") { $text = "akzeptiert"; } if ($answer == "2") { $text = "vorläufig akzeptiert"; } if ($answer == "3") { $text = "abgelehnt"; } $VC = new vcalendar(); $VC->parse($iCal); $event = $VC->getComponent("vevent"); $targetAttendee = "MAILTO:" . $myEmail; $i = 1; while ($valueOccur = $event->getProperty("ATTENDEE", $i, true)) { if (stripos($valueOccur["value"], $targetAttendee) === false) { $i++; continue; } $params = $valueOccur["params"]; if ($answer == "1") { $params["PARTSTAT"] = "ACCEPTED"; } if ($answer == "2") { $params["PARTSTAT"] = "TENTATIVE"; } if ($answer == "3") { $params["PARTSTAT"] = "DECLINED"; } if (isset($params["RSVP"])) { unset($params["RSVP"]); } $event->setAttendee($targetAttendee, $params, $i); $i++; } $i = 1; while ($valueOccur = $event->getProperty("ATTENDEE", $i, true)) { if (stripos($valueOccur["value"], $targetAttendee) === false) { $i++; $event->deleteProperty("ATTENDEE"); continue; } $i++; } $event->setProperty("DTSTAMP", gmdate("Ymd") . "T" . gmdate("His") . "Z"); $event->setProperty("LAST-MODIFIED", gmdate("Ymd") . "T" . gmdate("His") . "Z"); $VC->deleteComponent("vevent"); $VC->setComponent($event); $VC->setMethod("REPLY"); $ics = $VC->createCalendar(); $fromName = Session::currentUser()->A("name"); $from = Session::currentUser()->A("UserEmail"); $mail = new htmlMimeMail5(); $mail->setFrom(utf8_decode($fromName . " <" . $from . ">")); if (!ini_get('safe_mode')) { $mail->setReturnPath($from); } $mail->setSubject(utf8_decode("Antwort Termineinladung (" . ucfirst($text) . "): " . $event->getProperty("SUMMARY"))); $mail->addAttachment(new stringAttachment($ics, "invite.ics", 'application/ics')); $mail->setCalendar($ics, "REPLY"); $mail->setCalendarCharset("UTF-8"); $mail->setTextCharset("UTF-8"); $mail->setText("{$fromName} hat diesen Termin {$text}"); $organizer = str_replace("MAILTO:", "", $event->getProperty("ORGANIZER")); return $mail->send(array($organizer)); }
public function getTable($GUI) { $bps = BPS::getAllProperties("mKalenderGUI"); $K = $GUI->getData($this->first, $this->last, isset($bps["KID"]) ? $bps["KID"] : Session::currentUser()->getID()); $cols = $this->cols; $rows = $this->rows; #"<table id=\"KalenderHeader\" style=\"position:absolute;margin-left:10px;border-spacing: 0px;width:auto;\" class=\"backgroundColor0\"> $tableHeader = "\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th style=\"border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#EEE;padding-top:10px;text-align:right;\" class=\"backgroundColor0\">Monat</th>"; for ($j = 0; $j < $this->cols; $j++) { $tableHeader .= "\n\t\t\t\t<th style=\"border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#EEE;padding-top:10px;\" class=\"backgroundColor0\">" . ($j + 1) . "</th>"; } $tableHeader .= "\n\t\t</tr>\n\t\t</thead>\n\t\t"; #</table> $html = "\n\t\t\t\n\t\t<div style=\"\">\n\t\t<!--<table id=\"KalenderHeader\" style=\"position:absolute;margin-left:10px;border-spacing: 0px;\">\n\t\t\t{$tableHeader}\n\t\t</table>-->\n\t\t<table style=\"margin-left:10px;border-spacing: 0px;\" id=\"KalenderTable\">\n\t\t\t<colgroup>\n\t\t\t\t<col></col>"; for ($j = 0; $j < $cols; $j++) { # $html .= "\n\t\t\t\t<col style=\"width:" . 100 / $cols . "%;\" />"; } $html .= ""; $html .= "\n\t\t{$tableHeader}\n\t\t<tbody>"; $D = clone $this->date; for ($i = 0; $i < $rows; $i++) { $html .= "\n\t\t\t<tr class=\"cellHeight\">\n\t\t\t\t<td class=\"Day borderColor1 backgroundColor3\" style=\"text-align:right;\">" . Util::CLMonthName($i + 1) . "</td>"; for ($j = 0; $j < $cols; $j++) { $entry = ""; $events = $K->getEventsOnDay(date("dmY", $D->time())); $holidays = $K->getHolidaysOnDay(date("dmY", $D->time())); #$hasMultiDay = $K->hasMultiDayEvents($this->first, $this->last); if ($events != null) { foreach ($events as $ev) { foreach ($ev as $v) { $entry .= $v->getMinimal($D->time()); } } } if ($holidays != null) { foreach ($holidays as $ev) { foreach ($ev as $v) { $entry .= $v->getMinimal($D->time()); } } } $bgColor = "none"; if (date("w", $D->time()) == 6) { $bgColor = $this->colorBgSaturday; } if (date("w", $D->time()) == 0) { $bgColor = $this->colorBgSunday; } #".((date("m.Y",$D->time()) != date("m.Y",$currentMonth->time())) ? "color:grey;" : "")." if ($j < $cols) { $html .= "\n\t\t\t\t<td\n\t\t\t\t\tstyle=\"vertical-align:top;padding:0px;background-color:{$bgColor};overflow:auto;\"\n\t\t\t\t\tclass=\"" . (date("d.m.Y", $D->time()) == date("d.m.Y") ? "backgroundColor1" : "") . " Day borderColor1\">\n\t\t\t\t\t<div style=\"font-size:10px;\">{$entry}</div>\n\t\t\t\t</td>"; } $D->addDay(); #if(date("d", $D->time()) == 1){ #for(;$j < $cols;$j++) # $html .= "<td class=\"Day borderColor1\"></td>"; #} } $html .= "\n\t\t\t</tr>"; } $html .= "\n\t\t\t</tbody>\n\t\t</table>\n\t\t</div>"; #.OnEvent::script("\$j('#KalenderTable thead th').each(function(k, v){ \$j(\$j('#KalenderHeader thead th').get(k)).css('width', \$j(v).width()); console.log(\$j(v).width()); }); \$j('#KalenderHeader').css('width', \$j('#KalenderTable').width())");#.OnEvent::script("\$j('#KalenderTable').fixedHeaderTable({ footer: false, cloneHeadToFoot: false, fixedColumn: true });"); return $html; }
function getMinimal($time) { if ($this->exception !== false and $this->exception[1] == "1") { return ""; } $B = ""; if ($this->icon != null) { $B = new Button("", $this->icon); $B->type("icon"); } $onClick = str_replace(array("%%CLASSNAME%%", "%%CLASSID%%", "%%TIME%%"), array($this->className, $this->classID, $time), $this->onClick); $startTime = Kalender::parseDay($this->day) - 60 + Kalender::parseTime($this->time); $grey = false; if ($this->owner != null and $this->owner != -1 and $this->owner != Session::currentUser()->getID()) { $grey = true; } #$('time_$this->className$this->classID$this->time').style.display = ''; $zeit = "<b>" . $this->formatTime($this->time) . "</b>"; if ($startTime < $time and $this->repeat == "0") { $zeit = ""; } if ($this->allDay) { $zeit = ""; } return "\n\t\t\t<div title=\"" . strip_tags($this->title) . "\" onclick=\"{$onClick}\" style=\"" . ($this->status == 2 ? "color:grey;" : "") . "white-space:nowrap;overflow:hidden;height:13px;/*width:60px;*/clear:left;padding:2px;padding-left:4px;cursor:pointer;" . ($grey ? "color:grey;" : "") . "\">\n\t\t\t\t<small>" . (($grey and isset(mKalenderGUI::$colors[$this->owner])) ? "<div style=\"display:inline-block;margin-right:3px;width:5px;background-color:" . mKalenderGUI::$colors[$this->owner] . ";\"> </div>" : "") . "{$zeit} {$this->title}</small>\n\t\t\t</div>"; }
public function chatPopup($root = "") { $S = anyC::getFirst("Websocket", "WebsocketUseFor", "phim"); $I = new HTMLInput("newMessage"); $I->style("width:100%;background-color:white;"); $I->onEnter("phimChat.send();"); $IC = new HTMLInput("channel", "hidden", "0"); $IC->id("channel"); $B = new Button("Neue Nachricht", "star", "iconic"); $B->style("color:orange;float:right;margin-top:-3px;"); $B->className("newMessage"); $BOn = new Button("Online", "{$root}../ubiquitous/phim/userOnline.png", "icon"); $BOn->style("float:left;display:none;margin-right:3px;margin-top:-2px;"); $BOn->className("online"); $BOff = new Button("Offline", "{$root}../ubiquitous/phim/userOffline.png", "icon"); $BOff->style("float:left;margin-right:3px;margin-top:-2px;"); $BOff->className("offline"); $AC = anyC::get("phimUserHidden"); $hidden = array(); while ($h = $AC->n()) { $hidden[$h->A("phimUserHiddenUserID")] = true; } $Users = Users::getUsersArray(); $L = new HTMLList(); $L->setListID("userList"); $L->addListStyle("overflow:auto;box-sizing:border-box;"); $L->noDots(); $L->addItem($B . "Alle"); $L->addItemEvent("onclick", "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatText0').show(); phimChat.scroll('chatText0'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0'); \$j('#channel').val('0');"); $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;"); $L->addItemClass("backgroundColor0"); $L->setItemID("user0"); $content = ""; $AC = anyC::get("phim"); $AC->addAssocV3("phimToUserID", "=", "0"); $AC->addAssocV3("phimphimGruppeID", "=", "0"); $AC->addOrderV3("phimID", "DESC"); $AC->setLimitV3(50); while ($M = $AC->n()) { $content = "<div><span class=\"username\">" . (isset($Users[$M->A("phimFromUserID")]) ? $Users[$M->A("phimFromUserID")] : "Unbekannt") . ": </span>" . $M->A("phimMessage") . "</div>" . $content; } $chatAll = "<div class=\"chatWindow\" id=\"chatText0\">{$content}</div>"; $AC = anyC::get("phimGruppe"); $AC->addAssocV3("INSTR(phimGruppeMembers, ';" . Session::currentUser()->getID() . ";')", ">", "0"); $groups = array(); $chatGroups = ""; while ($G = $AC->n()) { $L->addItem($B . $G->A("phimGruppeName")); $L->addItemEvent("onclick", "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatTextg" . $G->getID() . "').show(); phimChat.scroll('chatTextg" . $G->getID() . "'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0'); \$j('#channel').val('g" . $G->getID() . "');"); $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;"); #$L->addItemClass("backgroundColor0"); $L->setItemID("groupg" . $G->getID()); $content = ""; $ACS = anyC::get("phim"); $ACS->addAssocV3("phimToUserID", "=", "0"); $ACS->addAssocV3("phimphimGruppeID", "=", $G->getID()); $ACS->addOrderV3("phimID", "DESC"); $ACS->setLimitV3(50); while ($M = $ACS->n()) { $content = "<div><span class=\"username\">" . $Users[$M->A("phimFromUserID")] . ": </span>" . $M->A("phimMessage") . "</div>" . $content; } $groups[] = $G->getID(); $chatGroups .= "<div class=\"chatWindow\" style=\"display:none;\" id=\"chatTextg" . $G->getID() . "\">{$content}</div>"; } asort($Users); $chatUsers = ""; foreach ($Users as $ID => $U) { if ($ID == Session::currentUser()->getID()) { continue; } if (isset($hidden[$ID])) { continue; } $unread = false; $content = ""; $AC = anyC::get("phim"); $AC->addAssocV3("phimFromUserID", "=", Session::currentUser()->getID(), "AND", "1"); $AC->addAssocV3("phimToUserID", "=", $ID, "AND", "1"); $AC->addAssocV3("phimFromUserID", "=", $ID, "OR", "2"); $AC->addAssocV3("phimToUserID", "=", Session::currentUser()->getID(), "AND", "2"); $AC->addOrderV3("phimID", "DESC"); $AC->setLimitV3(50); while ($M = $AC->n()) { $content = "<div><span class=\"username\">" . $Users[$M->A("phimFromUserID")] . ": </span>" . $M->A("phimMessage") . "</div>" . $content; if (!$M->A("phimRead") and $M->A("phimToUserID") == Session::currentUser()->getID()) { $unread = true; } } $L->addItem($BOn . $BOff . $B . $U); $L->addItemEvent("onclick", OnEvent::rme("phim", "setRead", $ID) . "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatText{$ID}').show(); phimChat.scroll('chatText{$ID}'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0');\$j('#channel').val('{$ID}');"); $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;"); $L->setItemID("user{$ID}"); if ($unread) { $L->addItemClass("highlight"); } $chatUsers .= "<div style=\"display:none;\" class=\"chatWindow\" id=\"chatText{$ID}\">{$content}</div>"; } $content = "<div style=\"width:68%;display:inline-block;vertical-align:top;\">\n\t\t\t\t{$chatAll}\n\t\t\t\t{$chatUsers}\n\t\t\t\t{$chatGroups}\n\t\t\t\t<div>{$I}</div>\n\t\t\t</div><div style=\"width:32%;display:inline-block;vertical-align:top;\">{$L}{$IC}</div>"; $rp = str_replace("interface/rme.php", "", $_SERVER["SCRIPT_NAME"]); if (strpos($_SERVER["SCRIPT_NAME"], "phim.php") !== false) { $rp = "../../"; } $physion = "default"; if (isset($_GET["physion"])) { $physion = $_GET["physion"]; } echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>phim</title> <script type="text/javascript" src="' . $root . '../libraries/jquery/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="' . $root . '../libraries/jquery/jquery-ui-1.10.1.custom.min.js"></script> <script type="text/javascript" src="' . $root . '../libraries/iconic/iconic.min.js"></script> <script type="text/javascript" src="' . $root . '../libraries/jquery/jquery.qtip.min.js"></script> <script type="text/javascript" src="' . $root . '../javascript/P2J.js"></script> <script type="text/javascript" src="' . $root . '../javascript/Aspect.js"></script> <script type="text/javascript" src="' . $root . '../javascript/handler.js"></script> <script type="text/javascript" src="' . $root . '../javascript/contentManager.js"></script> <script type="text/javascript" src="' . $root . '../javascript/Interface.js"></script> <script type="text/javascript" src="' . $root . '../javascript/Overlay.js"></script> <script type="text/javascript" src="' . $root . '../libraries/webtoolkit.base64.js"></script> <script type="text/javascript" src="' . $root . '../ubiquitous/phim/autobahn.min.js"></script> <script type="text/javascript" src="' . $root . '../ubiquitous/phim/phimChat.js"></script> <script type="text/javascript"> contentManager.setRoot("' . $rp . '"); $j(function(){ Ajax.physion = "' . $physion . '"; phimChat.init( "ws' . ($S->A("WebsocketSecure") ? "s" : "") . '://' . $S->A("WebsocketServer") . ":" . $S->A("WebsocketServerPort") . '/", "' . $S->A("WebsocketRealm") . '", ' . Session::currentUser()->getID() . ', "' . Session::currentUser()->A("name") . '", "' . $S->A("WebsocketToken") . '", [' . implode(",", $groups) . '], "' . $root . '"); phimChat.scroll("chatText0"); $j("#userList").css("height", $j(window).height()); }); </script> <link rel="stylesheet" type="text/css" href="' . $root . '../libraries/jquery/jquery.qtip.min.css" /> <link rel="stylesheet" type="text/css" href="' . $root . '../styles/' . (isset($_COOKIE["phynx_color"]) ? $_COOKIE["phynx_color"] : "standard") . '/colors.css"></link> <link rel="stylesheet" type="text/css" href="' . $root . '../styles/standard/general.css"></link> <style type="text/css"> p { padding:5px; } body { background-color:#ddd; } html { overflow-y: auto; } .username { font-weight:bold; } .chatWindow { padding:5px; box-sizing:border-box; overflow-y: auto; height:270px; background-color:white; border-bottom:3px solid grey; } .newMessage { display:none; } .highlight .newMessage { display:block; } #darkOverlay { position:fixed; top:0; left:0; } #userList li { white-space: nowrap; overflow:hidden; margin-top:0; } </style> </head> <body> <div id="darkOverlay" style="background-color:rgba(0,0,0,.7);color:white;"></div> ' . $content . ' </body> </html>'; }
public static function getPluginSpecificData($forPlugin) { if (Session::currentUser() === null) { return array(); } $UD = new mUserdata(); $UD->addAssocV3("typ", "=", "pSpec"); $UD->addAssocV3("wert", "=", "{$forPlugin}", "AND"); $UD->addAssocV3("UserID", "=", $_SESSION["S"]->getCurrentUser()->getID()); $labels = array(); while ($sUD = $UD->getNextEntry()) { $A = $sUD->getA(); $labels[$A->name] = $A->wert; } return $labels; }
/** * Get login data for current user * * @param string $name * @return LoginData */ public static function getU($name, $userID = null) { if ($userID == null) { $userID = Session::currentUser()->getID(); } $UD = new mUserdata(); $UD->addAssocV3("UserID", "=", $userID); $UD->addAssocV3("name", "=", $name); $e = $UD->getNextEntry(); if ($e == null) { return null; } $LD = new LoginData($e->getID()); $LD->loadMe(); return $LD; }
function newAttributes() { $A = parent::newAttributes(); $A->phimGruppeMasterUserID = Session::currentUser()->getID(); return $A; }
public function getData($firstDay, $lastDay, $UserID = null, $skip = array()) { if ($UserID === null) { $UserID = Session::currentUser()->getID(); } Registry::reset("Kalender"); $K = new Kalender(); $K->timeRange($firstDay, $lastDay); while ($return = Registry::callNext("Kalender", "events", array($firstDay, $lastDay, $UserID), $skip)) { $K->merge($return); } Registry::reset("Kalender"); while ($return = Registry::callNext("Kalender", "holidays", array($firstDay, $lastDay, $UserID), $skip)) { $K->merge($return); } $K->exceptions(); return $K; }
public function getHTML($id) { if ($_SESSION["S"]->checkIfUserLoggedIn() == true) { return -1; } $es = $_SESSION["CurrentAppPlugins"]->getMenuEntries(); $ts = $_SESSION["CurrentAppPlugins"]->getMenuTargets(); $icons = $_SESSION["CurrentAppPlugins"]->getIcons(); $appIco = $_SESSION["applications"]->getApplicationIcon($_SESSION["applications"]->getActiveApplication()); if (isset($_COOKIE["phynx_color"]) and $_COOKIE["phynx_color"] != "standard") { $suffix = strrchr($appIco, "."); $newLogo = str_replace($suffix, ucfirst($_COOKIE["phynx_color"]) . $suffix, $appIco); if (file_exists("." . $newLogo)) { $appIco = $newLogo; } } // <editor-fold defaultstate="collapsed" desc="Aspect:jP"> $newAppIco = Aspect::joinPoint("appLogo", $this, __METHOD__); if ($newAppIco != null) { $appIco = $newAppIco; } // </editor-fold> $appMenuHidden = ""; $appMenuDisplayed = ""; $appMenuActive = (!$_SESSION["S"]->isUserAdmin() and (!isset($_COOKIE["phynx_layout"]) or $_COOKIE["phynx_layout"] == "fixed" or $_COOKIE["phynx_layout"] == "horizontal" or $_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical")); // <editor-fold defaultstate="collapsed" desc="Aspect:jP"> $aspectAppMenuActive = Aspect::joinPoint("appMenuActive", $this, __METHOD__); if ($aspectAppMenuActive !== null) { $appMenuActive = $aspectAppMenuActive; } // </editor-fold> $appIco = Environment::getS("ApplicationIcon:" . Applications::activeApplication(), $appIco); if ($appIco != "") { if (count($_SESSION["applications"]->getApplicationsList()) > 1 and !$_SESSION["S"]->isAltUser()) { echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden/Anwendung wechseln\" title=\"Abmelden/Anwendung wechseln\" onclick=\"" . Environment::getS("onLogout", "phynxContextMenu.start(this, 'Menu','1','Anwendung wechseln:','right');") . "\" />"; } else { echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden\" title=\"Abmelden\" onclick=\"" . Environment::getS("onLogout", "userControl.doLogout();") . "\" />"; } } $bigWorld = false; if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical")) { $bigWorld = true; } if (!$_SESSION["S"]->isUserAdmin()) { $userHiddenPlugins = mUserdata::getHiddenPlugins(); $U = new mUserdata(); $U->addAssocV3("typ", "=", "TTP"); $B = new Button(Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()), "application"); $B->type("icon"); $B->className($bigWorld ? "tabImg" : "smallTabImg"); #".(($t == null OR $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"")." $B->hasMouseOverEffect(false); $B->id("busyBox"); #$appMenuHidden = $this->getAppMenuOrder("appMenuHidden"); $appMenuDisplayed = $this->getAppMenuOrder("appMenuDisplayed"); #if($appMenuDisplayed != "" AND $appMenuHidden == "") # $appMenuHidden = implode(";", array_diff(array_values($es), explode(";", $appMenuDisplayed))); } $appMenuH = "\n\t\t\t<li id=\"appMenu_emptyList\" style=\"height:auto;" . ($appMenuHidden != "emptyList" ? "display:none;" : "") . "\">Ziehen Sie Einträge auf diese Seite, um sie aus dem Menü auszublenden und nur hier anzuzeigen.</li>"; $appMenuD = ""; if ($appMenuActive) { $es = self::sort($es, $appMenuDisplayed); } #, $appMenuHidden); echo "\n\t\t\t<div id=\"navTabsWrapper\">"; if ($appMenuActive) { echo "\n\t\t\t<div\n\t\t\t\tclass=\"navBackgroundColor navBorderColor " . ($bigWorld ? "" : " smallTab") . " navTab\"\n\t\t\t\tid=\"SpellbookMenuEntry\"\n\t\t\t>\n\t\t\t\t<div onclick=\"contentManager.loadPlugin('contentScreen', 'Spellbook', 'SpellbookGUI;-');\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\t\t\t\t{$B}" . ($bigWorld ? Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()) : "") . "\n\t\t\t\t</div>\n\t\t\t</div>"; } $collapsedTabs = Environment::getS("collapsedTabs", "0") == "1"; foreach ($es as $key => $value) { if (isset($userHiddenPlugins[$value])) { continue; } $single = $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($value); $anyC = new anyC(); $text = $anyC->loadLanguageClass($single); if ($text != null and $text->getMenuEntry() != "") { $key = $text->getMenuEntry(); } $t = !$_SESSION["S"]->isUserAdmin() ? $U->getUDValueCached("ToggleTab{$value}") : "big"; if ($t == null and $collapsedTabs) { $t = "small"; } $key = Aspect::joinPoint("renameTab", $this, __METHOD__, array($key), $key); if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "vertical" or $_COOKIE["phynx_layout"] == "desktop")) { $t = "big"; } #$emptyFrame = "contentLeft"; #if(isset($ts[$value]) AND $ts[$value] == "contentLeft") $emptyFrame = "contentRight"; #$onclick = "contentManager.emptyFrame('contentLeft'); contentManager.emptyFrame('contentRight'); contentManager.emptyFrame('contentScreen'); contentManager.loadFrame('".(isset($ts[$value]) ? $ts[$value] : "contentRight")."', '$value', -1, 0, '{$value}GUI;-');$('windows').update('');"; $onclick = "contentManager.loadPlugin('" . (isset($ts[$value]) ? $ts[$value] : "contentRight") . "', '{$value}', '{$value}GUI;-');"; $B = new Button($key, $icons[$value]); $B->type("icon"); $B->style("float:left;margin-right:10px;"); $BM = new Button("Reihenfolge ändern", "./images/i2/topdown.png"); $BM->type("icon"); $BM->style("float:right;margin-right:5px;"); $BM->className("appMenuHandle"); $appMenu = "\n\t\t\t<li\n\t\t\t\tid=\"appMenu_{$value}\"\n\t\t\t\tonmouseover = \"this.className = 'navBackgroundColor';\"\n\t\t\t\tonmouseout = \"this.className = '';\"\n\t\t\t>\n\t\t\t\t{$BM}\n\t\t\t\t<div\n\t\t\t\t\tonclick=\"appMenu.hide(); {$onclick}\"\n\t\t\t\t>\n\t\t\t\t{$B}<p>{$key}</p>\n\t\t\t\t</div>\n\t\t\t</li>"; if (strpos($appMenuHidden, $value) !== false) { $appMenuH .= $appMenu; } else { $appMenuD .= $appMenu; } $style = (strpos($appMenuHidden, $value) !== false and $appMenuActive) ? "style=\"display:none;\"" : ""; echo "\n\t\t\t\t\n\t\t\t\t<div\n\t\t\t\t\tid=\"" . $value . "MenuEntry\"\n\t\t\t\t\tclass=\"navBackgroundColor navBorderColor " . (($t == null or $t == "big") ? "" : " smallTab") . " navTab\"\n\t\t\t\t\t{$style}\n\t\t\t\t\t>\n\t\t\t\t\t<!--<img\n\t\t\t\t\t\tstyle=\"margin-top:-28px;float:left;\"\n\t\t\t\t\t\tid=\"" . $value . "TabMinimizer\"\n\t\t\t\t\t\tclass=\"navTabMinimizer\"\n\t\t\t\t\t\ttitle=\"Tab {$key} vergrößern/verkleinern\"\n\t\t\t\t\t\tonclick=\"toggleTab('{$value}');\"\n\t\t\t\t\t\tsrc=\"./images/i2/tabMinimize.png\" />-->\n\t\t\t\t\t\n\t\t\t\t\t<div onclick=\"{$onclick}\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tid=\"" . $value . "MenuImage\"\n\t\t\t\t\t\t\ttitle=\"{$key}\"\n\t\t\t\t\t\t\t" . (($t == null or $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"") . "\n\t\t\t\t\t\t\tsrc=\"{$icons[$value]}\" />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t" . (($t == null or $t == "big") ? $key : "") . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>"; } echo "\n\t\t\t\t<div style=\"float:none;clear:both;border:0px;height:0px;width:0px;margin:0px;padding:0px;\"></div>\n\t\t\t</div>"; /* <div id=\"appMenuContainer\" class=\"backgroundColor0 navBorderColor\" style=\"display:none;\"> <ul style=\"min-height:50px;\" id=\"appMenuHidden\">$appMenuH</ul> <p class=\"backgroundColor2\" style=\"cursor:pointer;background-image:url(./images/navi/down.png);background-repeat:no-repeat;background-position:95% 50%;\" onclick=\"if($('appMenuDisplayedContainer').style.display == 'none') new Effect.BlindDown('appMenuDisplayedContainer'); else new Effect.BlindUp('appMenuDisplayedContainer');\">Weitere Reiter</p> <div id=\"appMenuDisplayedContainer\" style=\"display:none;\"><ul style=\"min-height:50px;\" id=\"appMenuDisplayed\">$appMenuD</ul><p>Um die Sortierung der Einträge zu übernehmen, muss die Anwendung <a href=\"#\" onclick=\"Installation.reloadApp(); return false;\">neu geladen werden</a>.</p></div> </div>";*/ #echo OnEvent::script(""); if (!$_SESSION["S"]->isUserAdmin()) { $ud = new mUserdata(); $al = $ud->getUDValue("noAutoLogout", "false"); if ($al == "true") { echo "<script type=\"text/javascript\">contentManager.startAutoLogoutInhibitor();</script>"; } } echo OnEvent::script("contentManager.isAltUser = "******"true" : "false") . ";"); try { $c = get_class(Session::currentUser()); $U = new $c(Session::currentUser()->getID()); echo "<script type=\"text/javascript\">\$j.datepicker.setDefaults(\$j.datepicker.regional['" . $U->A("language") . "']); " . (Session::physion() ? "\$j('#navigation').hide();" : "") . "</script>"; } catch (Exception $e) { } }
function getMeetingData() { $currentTime = date("Hi"); //create obj for today $D = new Datum(); $D->normalize(); $DE = clone $D; $DE->addDay(); $T = new mTodoGUI(); $K = $T->getCalendarData($D->time(), $DE->time(), Session::currentUser()->getID()); while ($DE->time() > $D->time()) { $termine = $K->getEventsOnDay(date("dmY", $D->time())); //debug message echo "<div style='display:none'>"; print_r($termine); echo "</div>"; if ($termine != null) { foreach ($termine as $ev) { foreach ($ev as $v) { //start time in future = upcomming if ($v->getTime() > $currentTime) { array_push($this->upcommingMeetings, $v); //current events } else { if ($v->getTime() <= $currentTime && $v->getEndTime() > $currentTime) { array_push($this->currentMeetings, $v); } else { array_push($this->oldMeetings, $v); } } //echo get_class($v).": ".$v->title()."<br>"; } } } $D->addDay(); } }
public static function isUserAdminS() { return Session::currentUser()->A("isAdmin") == "1"; }