Esempio n. 1
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUIX($this);
     $gui->name("Fhem");
     $gui->label("FhemServerID", "Server");
     $gui->label("FhemName", "Name in FHEM");
     $gui->label("FhemAlias", "Zu zeigender Name");
     $gui->label("FhemType", "Type");
     $gui->label("FhemSpecific", "Adresscode");
     $gui->label("FhemRoom", "Raumname");
     $gui->label("FhemModel", "Model");
     $gui->label("FhemFHTModel", "Model");
     $gui->label("FhemITModel", "Model");
     $gui->label("FhemHMModel", "Model");
     $gui->label("FhemHMSub", "Sub-Type");
     $gui->label("FhemHMClass", "hmClass");
     $gui->label("FhemEMModel", "Model");
     $gui->label("FhemRunOn", "run on");
     $gui->label("FhemCommand", "Command");
     $gui->label("FhemLocationID", "Location");
     $gui->label("FhemInOverview", "In Overview?");
     $gui->label("FhemFHTDefaultDayTemp", "day-temp");
     $gui->label("FhemExtension", "Erweiterung");
     $extensions = array("none" => "keine");
     if (Session::isPluginLoaded("mSieHabenPost")) {
         $extensions["SieHabenPost"] = "Briefkasten";
     }
     $gui->type("FhemExtension", "select", $extensions);
     $gui->type("FhemInOverview", "checkbox");
     $gui->type("FhemModel", "select", array("" => "none", "fs20du" => "FS20 DU", "fs20s4u" => "FS20 S4U", "fs20s4" => "FS20 S4", "fs20st" => "FS20 ST", "fs20di" => "FS20 DI", "fs20irf" => "FS20 IRF", "fs20rsu" => "FS20 RSU"));
     $gui->type("FhemITModel", "select", array("" => "none", "itdimmer" => "IT-Dimmer", "itswitch" => "IT-Switch"));
     $gui->type("FhemHMModel", "select", array("" => "none", "dimmer" => "Dimmer", "switch" => "Switch", "HM-LC-Dim1L-CV" => "HM-LC-Dim1L-CV", "HM-LC-Dim1L-Pl" => "HM-LC-Dim1L-Pl", "HM-LC-Dim1PBU-FM" => "HM-LC-Dim1PBU-FM", "HM-LC-Dim1T-CV" => "HM-LC-Dim1T-CV", "HM-LC-Dim1T-Pl" => "HM-LC-Dim1T-Pl", "HM-LC-Dim2L-SM" => "HM-LC-Dim2L-SM", "HM-LC-Dim2T-SM" => "HM-LC-Dim2T-SM", "HM-LC-Sw1-FM" => "HM-LC-Sw1-FM", "HM-LC-Sw1-Pl" => "HM-LC-Sw1-Pl", "HM-LC-Sw1-SM" => "HM-LC-Sw1-SM", "HM-LC-Sw1PB-FM" => "HM-LC-Sw1PB-FM", "HM-LC-Sw1PBU-FM" => "HM-LC-Sw1PBU-FM", "HM-LC-Sw2-FM" => "HM-LC-Sw2-FM", "HM-LC-Sw4-WM" => "HM-LC-Sw4-WM", "HM-Sec-RHS" => "HM-Sec-RHS"));
     $gui->type("FhemHMSub", "select", array("" => "none", "AlarmControl" => "AlarmControl", "KFM100" => "KFM100", "THSensor" => "THSensor", "blindActuator" => "blindActuator", "dimmer" => "dimmer", "keyMatic" => "keyMatic", "motionDetector" => "motionDetector", "pushButton" => "pushButton", "remote" => "remote", "sensor" => "sensor", "smokeDetector" => "smokeDetector", "swi" => "swi", "switch" => "switch", "threeStateSensor" => "threeStateSensor", "winMatic" => "winMatic"));
     $gui->type("FhemHMClass", "select", array("" => "none", "receiver" => "Empfänger", "sender" => "Sender"));
     $gui->type("FhemEMModel", "select", array("" => "none", "EMEM" => "EM 1000-EM"));
     $gui->type("FhemFHTModel", "select", array("" => "none", "fht80b" => "80B"));
     $gui->type("FhemType", "select", array("" => "none", "FS20" => "FS20", "FHZ" => "FHZ", "FHT" => "FHT", "CUL_HM" => "HomeMatic", "IT" => "Intertechno", "CUL_EM" => "ELV EM", "notify" => "notify", "dummy" => "dummy"));
     $B = $gui->addSideButton("Show\ndata", "./fheME/Fhem/showData.png");
     $B->popup("", "Show data", "Fhem", $this->getID(), "showData");
     $gui->type("FhemLocationID", "select", new mFhemLocationGUI(), "FhemLocationName", "everywhere");
     #$gui->selectWithCollection("FhemLocationID", );
     $gui->type("FhemCommand", "textarea");
     $gui->descriptionField("FhemRunOn", "e.g. Door:toggle");
     $gui->descriptionField("FhemCommand", "you may use new line, it will be replaced by space");
     $gui->inputStyle("FhemCommand", "height:300px;font-size:8px;");
     $gui->attributes(array("FhemServerID", "FhemLocationID", "FhemName", "FhemAlias", "FhemInOverview", "FhemType", "FhemExtension", "FhemModel", "FhemITModel", "FhemHMModel", "FhemEMModel", "FhemFHTModel", "FhemSpecific", "FhemHMSub", "FhemHMClass", "FhemRoom", "FhemRunOn", "FhemCommand"));
     $gui->space("FhemType");
     $gui->toggleFieldsInit("FhemType", array("FhemModel", "FhemITModel", "FhemHMModel", "FhemEMModel", "FhemSpecific", "FhemHMSub", "FhemHMClass", "FhemRoom", "FhemRunOn", "FhemCommand", "FhemFHTModel", "FhemFHTDefaultDayTemp", "FhemExtension"));
     $gui->toggleFields("FhemType", "FHZ", array("FhemSpecific", "FhemRoom"));
     $gui->toggleFields("FhemType", "FS20", array("FhemModel", "FhemSpecific", "FhemRoom"));
     $gui->toggleFields("FhemType", "notify", array("FhemRunOn", "FhemCommand", "FhemRoom"));
     $gui->toggleFields("FhemType", "IT", array("FhemITModel", "FhemSpecific", "FhemRoom"));
     $gui->toggleFields("FhemType", "CUL_HM", array("FhemHMModel", "FhemSpecific", "FhemHMSub", "FhemHMClass", "FhemRoom"));
     $gui->toggleFields("FhemType", "CUL_EM", array("FhemEMModel", "FhemSpecific", "FhemRoom"));
     $gui->toggleFields("FhemType", "FHT", array("FhemFHTModel", "FhemSpecific", "FhemRoom"));
     $gui->toggleFields("FhemType", "dummy", array("FhemRoom", "FhemExtension"));
     $gui->type("FhemServerID", "select", new mFhemServerGUI(), "FhemServerName");
     return $gui->getEditHTML();
 }
Esempio n. 2
0
 public function getHTML($id)
 {
     $this->loadMeOrEmpty();
     #if($this->A == null AND $id != -1) $this->loadMe();
     #if($id == -1) $this->A = new InstallationAttributes();
     BPS::setProperty("mInstallationGUI", "showErrorText", "1");
     $gui = new HTMLGUI();
     if (!Session::isPluginLoaded("multiInstall")) {
         $this->A->httpHost = "*";
         $gui->setType("httpHost", "hidden");
     } else {
         $gui->insertSpaceAbove("httpHost");
     }
     $gui->setObject($this);
     $gui->setName("Zugangsdaten");
     $gui->setType("password", "password");
     $gui->setLabel("datab", "Datenbank");
     $gui->setLabel("user", "Benutzer");
     $gui->setLabel("password", "Passwort");
     $gui->setLabel("httpHost", "Domain");
     $gui->setFieldDescription("host", "Der Rechner, auf dem die Datenbank liegt. Das kann 'localhost' sein, oder eine IP wie '192.168.8.243' oder ein Hostname wie 'rdbms.strato.de'.");
     $gui->setFieldDescription("httpHost", "unter der phynx erreichbar ist oder * für alle Domains");
     #$this->loadGUITranslation($gui);
     $gui->translate($this->loadTranslation());
     $gui->setJSEvent("onSave", "\n\t\t\t\tfunction() {\n\t\t\t\t\tcontentManager.emptyFrame('contentLeft');\n\t\t\t\t\tcontentManager.emptyFrame('contentBelow');\n\t\t\t\t\tcontentManager.reloadFrame('contentRight');" . "\n\t\t\t\t}");
     $gui->setStandardSaveButton($this);
     return $gui->getEditHTML();
 }
Esempio n. 3
0
 public static function joinPoint($mode, $class, $method, $args = null, $defaultValue = null)
 {
     $value = Aspect::findPointCut($mode, $class, $method, $args);
     if (Session::isPluginLoaded("mAchievement") and $mode == "after") {
         Achievement::findPointCut($class, $method, $args);
     }
     if ($value === null) {
         return $defaultValue;
     }
     return $value;
 }
Esempio n. 4
0
 function getHTML($id, $page, $frame = null)
 {
     $this->loadMultiPageMode($id, $page);
     $gui = new HTMLGUIX($this);
     $tab = "";
     if (Session::isPluginLoaded("mAdressBuch") and $id == -1) {
         $tab = mAdressBuchGUI::getSelectionMenu($this, $frame, false, true);
     }
     $gui->displayGroup("KategorieID", "AdressenGUI::DGParser");
     $gui->options(true, true, true, true);
     $gui->parser("firma", "mAdresseGUI::parserFirma");
     if ($frame != null) {
         $gui->targetFrame($frame);
     }
     $gui->attributes(array("firma"));
     return $tab . $gui->getBrowserHTML($id);
 }
Esempio n. 5
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Domain");
     if ($id != -1) {
         $Seiten = new SeitenGUI();
         $Seiten->addAssocV3("DomainID", "=", $this->getID());
         $Seiten->setFieldsV3(array("SeiteID", "IF(name = '', header , name) AS name"));
         $gui->selectWithCollection("startseite", $Seiten, "name");
     } else {
         $gui->setParser("startseite", "DomainGUI::startseiteParser");
     }
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "domainTemplate");
     $gui->selectWithCollection("TemplateID", $T, "name");
     $gui->setStandardSaveButton($this);
     #$gui->setSaveButtonValues(get_parent_class($this),$this->ID,"Domains");
     $gui->setShowAttributes(array("TemplateID", "url", "DomainDefaultSpracheID", "startseite", "title", "header", "umleitung", "permalinkPrefix", "horizontalNav"));
     if (Session::isPluginLoaded("mSprache")) {
         $mS = new anyC();
         $mS->setCollectionOf("Sprache");
         $gui->selectWithCollection("DomainDefaultSpracheID", $mS, "SpracheIdentifier", "keine Auswahl");
     } else {
         $gui->setType("DomainDefaultSpracheID", "hidden");
     }
     $gui->setLabel("DomainDefaultSpracheID", "Sprache");
     $gui->setLabel("url", "Domains");
     $gui->setLabel("title", "Titelzeile");
     $gui->setLabel("header", "Header");
     $gui->setLabel("permalinkPrefix", "Permalink-Präfix");
     $gui->setLabel("horizontalNav", "horizontale Navigation");
     $gui->setType("horizontalNav", "checkbox");
     $gui->setFieldDescription("horizontalNav", "Subkategorien in der Navigation werden nicht zwischen den Einträgen angezeigt sondern am Ende angehängt.");
     $gui->setFieldDescription("umleitung", "<b>www-Umleitung</b><br />Anfragen an Adressen ohne www-Subdomain werden auf die www-subdomain umgeleitet. Also es würde http://example.com an http://www.example.com umgeleitet. Nicht jedoch http://test.example.com<br /><br /><b>erster Eintrag</b><br />Alle Anfragen werden auf den ersten Eintrag der Liste umgeleitet.");
     $gui->setType("umleitung", "select");
     $gui->setOptions("umleitung", array("0", "1", "2"), array("keine", "www-Umleitung", "erster Eintrag"));
     $gui->setType("url", "textarea");
     $gui->setFieldDescription("url", "geben Sie eine Domain pro Zeile an oder * für eine beliebige Domain");
     $tab = new HTMLTable(1);
     $tab->addRow("Das Permalink-Präfix wird vor den Permalink geschrieben, wenn er für eine Seite eingetragen wurde.<br /><br />Wenn Sie also \"page-\" als Präfix angeben, wird der Permalink für die Startseite so aussehen (wenn der Permalink für die Startseite \"Startseite\" lautet) page-Startseite.<br /><br />Sie müssen diesen Permalink dann noch mit mod_rewrite umschreiben. Mit präfix \"page-\" dann zum Beispiel:<pre style=\"font-size:9px;\">RewriteEngine on\nRewriteRule ^page-([a-zA-Z0-9-_]*)\$ ?permalink=\$1</pre>");
     return $gui->getEditHTML() . $tab;
 }
 function getHTML($id)
 {
     $this->addOrderV3("sort", "ASC");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $gui = new HTMLGUIX($this);
     $gui->name("Content");
     $gui->options(true, true, false, false);
     $a = array("sort", "text");
     if (Session::isPluginLoaded("mSprache")) {
         $a[] = "SpracheIdentifier";
         $gui->colWidth("SpracheIdentifier", "50");
     }
     $gui->attributes($a);
     $gui->parser("text", "mContentGUI::textParser");
     $gui->colWidth("sort", "30");
     $gui->colStyle("sort", "text-align:right;");
     $gui->addToEvent("onDelete", "contentManager.reloadFrame('contentLeft');");
     $gui->customize($this->customizer);
     return $gui->getBrowserHTML($id);
 }
 function getHTML($id)
 {
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     $this->loadMeOrEmpty();
     if ($id == -1 and $U != null) {
         $this->A->DomainID = $U;
         $this->A->sort = -1;
         $this->A->SeiteID = -1;
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Navigation");
     $N = new mNavigation();
     $N->addAssocV3("NavigationID", "!=", $this->ID);
     $N->addAssocV3("DomainID", "=", $U);
     //$gui->selectWithCollection("DomainID", new Domains(), "url");
     $gui->selectWithCollection("parentID", $N, "name", "kein übergeordnetes Element");
     #$gui->setType("parentID","hidden");
     #$gui->selectWithCollection("SeiteID", $aC, "name");
     /*$aC = new anyC();
     		$aC->setCollectionOf("Seite");
     		$aC->setFieldsV3(array("IF(name = '', header, name) AS name"));
     		$aC->addAssocV3("DomainID","=",$this->A->DomainID);
     		
     		$pages = array();
     		while($s = $aC->getNextEntry()){
     			$pages[$s->getID()] = $s->A("name");
     		}
     
     		$gui->setType("SeiteID","select");
     		$gui->setOptions("SeiteID", array_keys($pages), array_values($pages));*/
     $gui->setParser("SeiteID", "NavigationGUI::SeiteParser", array($this->A->DomainID));
     $gui->setType("DomainID", "hidden");
     $gui->insertSpaceAbove("activeTemplateID");
     $gui->insertSpaceAbove("linkType");
     $gui->insertSpaceAbove("hidden", "Optionen", true);
     $gui->setType("sort", "hidden");
     $gui->setLabel("httpsLink", "Https-Link?");
     $gui->setType("httpsLink", "checkbox");
     $gui->setLabel("activeTemplateID", "Link aktiv");
     $gui->setLabel("inactiveTemplateID", "Link inaktiv");
     $gui->setLabel("DomainID", "Domain");
     $gui->setLabel("SeiteID", "Seite");
     $gui->setLabel("parentID", "Vaterelement");
     /*if($this->A->linkType == "cmsPage" OR $id == -1)
     			$gui->setLineStyle("linkURL","display:none;");
     		else*/
     $gui->setLineStyle("SeiteID", "display:none;");
     $gui->setLineStyle("linkURL", "display:none;");
     $gui->setLineStyle("inactiveTemplateID", "display:none;");
     $gui->setLineStyle("activeTemplateID", "display:none;");
     if ($this->A->linkType == "cmsPage" or $id == -1) {
         $gui->setLineStyle("SeiteID", "");
         $gui->setLineStyle("inactiveTemplateID", "");
         $gui->setLineStyle("activeTemplateID", "");
     } else {
         if ($this->A->linkType == 'url') {
             $gui->setLineStyle("linkURL", "");
             $gui->setLineStyle("inactiveTemplateID", "");
         } else {
             if ($this->A->linkType == 'HTML') {
                 $gui->setLineStyle("activeTemplateID", "");
             } else {
                 if ($this->A->linkType == 'separator') {
                 }
             }
         }
     }
     if (Session::isPluginLoaded("mMultiLanguage")) {
         $gui->activateFeature("addAnotherLanguageButton", $this, "name");
     }
     $gui->setLabel("linkType", "Link-Typ");
     $gui->setInputJSEvent("linkType", "onchange", "Website.set(this)");
     $gui->setLabel("linkURL", "Link-URL");
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "naviTemplate");
     $gui->selectWithCollection("activeTemplateID", $T, "name");
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "naviTemplate");
     $gui->selectWithCollection("inactiveTemplateID", $T, "name");
     $gui->setLabel("hidden", "versteckt");
     $gui->setFieldDescription("hidden", "Der Menüpunkt wird auf der Seite nicht angezeigt");
     $gui->setType("hidden", "checkbox");
     #$gui->insertSpaceAbove("parentID");
     $gui->setLabel("displaySub", "Unterkat. immer anzeigen");
     $gui->setFieldDescription("displaySub", "Blendet die Unterkategorien immer ein, auch wenn der Menüpunkt nicht ausgewählt ist.");
     $gui->setType("displaySub", "checkbox");
     #$gui->setType("displaySub","hidden");
     $gui->setFieldDescription("httpsLink", "Erzeugt einen https://...-Link");
     $gui->setType("linkType", "select");
     #$gui->setOptions("linkType", array("cmsPage", "url", "separator"), array("multiCMS-Seite", "URL", "Trennlinie"));
     $gui->setOptions("linkType", array("cmsPage", "url", "separator", "HTML"), array("multiCMS-Seite", "URL", "Trennlinie", "Template-HTML"));
     if ($id == -1) {
         $gui->setJSEvent("onSave", "function() { \$('contentLeft').update(); contentManager.reloadFrameRight(); }");
     } else {
         $gui->setJSEvent("onSave", "function() { contentManager.reloadFrameRight(); }");
     }
     $gui->setStandardSaveButton($this);
     #$gui->setSaveButtonValues(get_parent_class($this),$this->ID,"mNavigation");
     return $gui->getEditHTML();
 }
Esempio n. 8
0
 function deleteMe()
 {
     mUserdata::checkRestrictionOrDie("cantDelete" . str_replace("GUI", "", get_class($this)));
     try {
         if (Session::isPluginLoaded("mArchiv")) {
             Archiv::archive($this);
         }
     } catch (TableDoesNotExistException $e) {
     }
     $this->loadAdapter();
     if (!$this->noDeleteHideOnly) {
         $this->Adapter->deleteSingle($this->getClearClass(get_class($this)));
     } else {
         $this->loadMe();
         $this->A->isDeleted = 1;
         $this->saveMe();
     }
     Aspect::joinPoint("after", $this, get_class($this) . "::deleteMe", $this->A);
 }
Esempio n. 9
0
 public static function getLangCurrencyFactor($language)
 {
     if (!Session::isPluginLoaded("mSprache")) {
         return 1;
     }
     $Sprache = anyC::getFirst("Sprache", "SpracheIdentifier", $language);
     $faktor = 1;
     if ($Sprache != null) {
         $faktor = $Sprache->A("SpracheWaehrungFaktor") * 1;
     }
     if ($Sprache == null) {
         $Sprache = anyC::getFirst("Sprache", "CONCAT(SpracheIdentifier, '_', SpracheWaehrung) ", $language);
         if ($Sprache != null) {
             $faktor = $Sprache->A("SpracheWaehrungFaktor") * 1;
         }
     }
     return $faktor;
 }
Esempio n. 10
0
 function getOperationsHTML($pluginName, $id = -1)
 {
     $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $pluginName);
     $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $pluginName);
     if ($this->texts == null) {
         $c = $this->loadLanguageClass("HTML");
         $this->texts = $c->getEditTexts();
     }
     $html = "";
     if (PMReflector::implementsInterface($pluginName, "iNewWithValues") and $userCanCreate) {
         $os = "1";
     } else {
         $os = "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iCloneable") and $userCanCreate) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if ((PMReflector::implementsInterface($pluginName, "iDeletable") or PMReflector::implementsInterface($pluginName, "iDeletable2")) and $userCanDelete) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iRepeatable") and Session::isPluginLoaded("mRepeatable")) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iXMLExport")) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if ($id != -1 and $os != "00000") {
         $B = new Button("Operationen", "wrench", "iconic");
         $B->id($pluginName . "Operations");
         $B->onclick("phynxContextMenu.start(this, 'HTML','operations:{$pluginName}:{$id}:{$os}','" . $this->texts["Operationen"] . ":');");
         $B->style("float:right;margin-top:-3px;");
         return $B;
         #"<span title=\"Operationen\" id=\"".$pluginName."Operations\" class=\"iconic wrench\" onclick=\"\" style=\"\" ></span>";
     }
     return "";
 }
Esempio n. 11
0
 public function getHTML($id)
 {
     $bps = $this->getMyBPSData();
     $B1 = new Button("Servers", "./fheME/Fhem/fhemServers.png");
     $B1->style("float:right;");
     $B1->onclick("contentManager.loadFrame('contentRight','mFhemServer'); contentManager.emptyFrame('contentLeft');");
     $B2 = new Button("Devices", "./fheME/Fhem/fhem.png");
     $B2->style("float:right;");
     $B2->onclick("contentManager.loadFrame('contentRight','mFhem', -1, 0,'mFhemGUI;showDevices:true'); contentManager.emptyFrame('contentLeft');");
     //		$B3 = new Button("Rooms","gutschrift");
     //		$B3->style("float:right;");
     //		$B3->onclick("contentManager.loadFrame('contentRight','mGruppe');");
     $B6 = new Button("Presets", "./fheME/Fhem/events.png");
     $B6->style("float:right;");
     $B6->onclick("contentManager.loadFrame('contentRight','mFhemPreset'); contentManager.emptyFrame('contentLeft');");
     $BLoc = new Button("Locations", "./fheME/FhemLocation/FhemLocation.png");
     $BLoc->style("float:right;");
     $BLoc->onclick("contentManager.loadFrame('contentRight','mFhemLocation'); contentManager.emptyFrame('contentLeft');");
     if (!Session::isPluginLoaded("mFhemLocation")) {
         $BLoc = "";
     }
     //		$B4 = new Button("Refresh","refresh");
     //		$B4->style("float:right;");
     //		$B4->onclick("Fhem.refreshControls();");
     #$B5 = new Button("Timers","backup");
     #$B5->style("float:right;");
     #$B5->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;-'); contentManager.emptyFrame('contentLeft');");
     $html = "\n\t\t<script type=\"text/javascript\">\n\t\t\tcontentManager.loadFrame('contentLeft','FhemControl');\n\t\t</script>";
     if (isset($bps["noLeft"])) {
         $html = "";
     }
     $t = new HTMLTable(1);
     $t->setTableStyle("width:160px;float:right;margin-right:10px;");
     #$t->addRow($B5);
     #$t->addRowClass("backgroundColor0");
     #$t->addRow("");
     #$t->addRowClass("backgroundColor1");
     //		$t->addRow($B3);
     //		$t->addRowClass("backgroundColor0");
     $t->addRow($B2);
     $t->addRowClass("backgroundColor0");
     $t->addRow($B6);
     $t->addRowClass("backgroundColor0");
     //		$t->addRow($B4);
     //		$t->addRowClass("backgroundColor0");
     $t->addRow($B1);
     $t->addRowClass("backgroundColor0");
     $t->addRow($BLoc);
     $t->addRowClass("backgroundColor0");
     if (!isset($bps["showDevices"]) and !isset($bps["selectionMode"])) {
         return $html . $t;
     }
     if (isset($bps["selectionMode"])) {
         $this->addAssocV3("FhemServerID", "=", $_SESSION["BPS"]->getProperty("mFhemSelection", "selectionServerID"));
         $this->addAssocV3("FhemType", "!=", "FHZ");
     }
     #----------------------------------------------
     $this->addOrderV3("FhemServerID");
     $this->addOrderV3("FhemType");
     $this->addOrderV3("FhemName");
     $gui = new HTMLGUIX($this);
     $gui->displayGroup("FhemServerID", "mFhemGUI::DGParser");
     $B = $gui->addSideButton("Load devices\nfrom server", "refresh");
     $B->popup("", "Load devices", "mFhem", "-1", "loadDevices");
     $B = $gui->addSideButton("Register\nsettings", "./fheME/Fhem/fhem.png");
     $B->rme("FhemControl", "", "registerSettings", "", "if(checkResponse(transport)) \$(\\'contentLeft\\').update(transport.responseText);");
     $B = $gui->addSideButton("Reset\nServers", "empty");
     $B->rme("FhemControl", "", "resetServers", "", "if(checkResponse(transport)) \$(\\'contentLeft\\').update(transport.responseText);");
     #$this->lCV3($id);
     $gui->attributes(array("FhemName", "FhemType"));
     $gui->name("Device");
     if ($bps != -1 and isset($bps["selectionMode"])) {
         $t2 = "";
     }
     return $gui->getBrowserHTML($id);
 }
Esempio n. 12
0
 function getHTML($id)
 {
     $forReload = "";
     $displayMode = null;
     $AuftragID = -1;
     $bps = $this->getMyBPSData();
     if ($bps != -1 and isset($bps["AuftragID"])) {
         $AuftragID = $bps["AuftragID"];
     }
     if ($bps != -1 and isset($bps["displayMode"])) {
         $displayMode = $bps["displayMode"];
     }
     $_SESSION["BPS"]->unsetACProperty("AuftragID");
     $_SESSION["BPS"]->unsetACProperty("displayMode");
     #if($this->A == null AND $id != -1) $this->loadMe();
     $this->loadMeOrEmpty();
     if ($id * 1 == -1) {
         $this->A = $this->newAttributes();
         $this->A->AuftragID = $AuftragID;
         if ($displayMode != null) {
             $this->A->type = $displayMode;
         }
         //Has to stay or lieferAdresse will also overwrite a normal Auftrags-Adresse
         if (Session::isPluginLoaded("mAdressBuch")) {
             $AB = BPS::getProperty("AdressenGUI", "AdressBuch", null);
             if ($AB) {
                 $this->A->type = "AB{$AB}";
             }
         }
         $id = $this->newMe(true, false);
         $this->forceReload();
         try {
             $K = new Kunden();
             if ($displayMode == null and $this->A("type") == "default") {
                 //Or else a lieferAdresse will get a Kundennummer
                 $K->createKundeToAdresse($id, false);
             }
         } catch (ClassNotFoundException $e) {
         }
         $forReload = "<script type=\"text/javascript\">lastLoadedLeft = {$id}; lastLoadedLeftPlugin = 'Adresse';</script>";
     }
     $OptTab = new HTMLSideTable("right");
     if (Session::isPluginLoaded("Kunden") and $this->A->AuftragID == -1) {
         $B = new Button("Kundendaten", "kunden");
         $B->loadFrame("contentLeft", "Kunde", "-1", "0", "KundeGUI;AdresseID:{$this->getID()};action:Kappendix");
         $OptTab->addRow($B);
     }
     if ($_SESSION["applications"]->getActiveApplication() == "open3A") {
         if ($displayMode != null) {
             $OptTab->setTableStyle("width:160px;margin:0px;margin-left:-170px;float:left;");
         }
         if (($id == -1 or $forReload != "") and Session::isPluginLoaded("mImport")) {
             $OTBV = new Button("Schnell-\nImport", "import");
             #$OTBV->rmePCR("importAdresse", "", "getFastImportWindow", "", "Popup.display('Adresse importieren:',transport);");
             $OTBV->onclick("Import.openSchnellImportAdresse('Adresse importieren:');");
             $OTBV->id("ButtonAdresseSchnellImport");
             $OptTab->addRow($OTBV);
         }
         if ($id != -1 and Session::isPluginLoaded("Kundenpreise") and $this->A->AuftragID == -1 and $this->A->type == "default") {
             $ButtonKundenpreise = new Button("Kundenpreise", "package");
             $ButtonKundenpreise->onclick("contentManager.loadFrame('contentLeft','Kunde', -1, 0, 'KundeGUI;AdresseID:{$this->ID};action:Kundenpreise');");
             $OptTab->addRow($ButtonKundenpreise);
         }
         if ($this->A->AuftragID == -1 and (Session::isPluginLoaded("mAnsprechpartner") or Session::isPluginLoaded("mOSM"))) {
             $OptTab->addRow("");
             $OptTab->addCellStyle(1, "height:30px;");
         }
         if ($id != -1 and Session::isPluginLoaded("mAnsprechpartner") and $this->A->AuftragID == -1) {
             $OptTab->addRow(Ansprechpartner::getButton("Adresse", $this->getID()));
         }
         if ($id != -1 and Session::isPluginLoaded("mOSM") and $this->A("AuftragID") == -1) {
             $OptTab->addRow(OpenLayers::getButton("Adresse", $this->getID()));
         }
     }
     if (Session::isPluginLoaded("mklickTel") and $this->A->AuftragID == -1) {
         $OptTab->addRow(klickTel::getButton($this->getID()));
     }
     $this->loadMeOrEmpty();
     $gui = $this->gui;
     $gui->insertSpaceAbove("tel", "Kontakt");
     $gui->insertSpaceAbove("strasse", "Adresse");
     $gui->insertSpaceAbove("homepage", "Sonstiges");
     $gui->setFormID("AdresseForm");
     $fields = array("firma", "position", "anrede", "vorname", "nachname", "AdresseSpracheID", "strasse", "bezirk", "zusatz1", "ort", "land", "tel", "fax", "mobil", "email", "homepage", "gebRem", "gebRemMail", "AuftragID", "KategorieID", "type", "geb", "bemerkung");
     if (Session::isPluginLoaded("mLDAP")) {
         $fields[] = "exportToLDAP";
     }
     $gui->setShowAttributes($fields);
     $gui->setLabel("bemerkung", "Notizen");
     if (Session::isPluginLoaded("mSprache")) {
         $gui->setLabel("AdresseSpracheID", "Sprache");
         $gui->setLabelDescription("AdresseSpracheID", "und Währung");
         #$ACS = anyC::get("Sprache");
         #$S = array();
         #while($SLW = $ACS->getNextEntry())
         #	$S[$SLW->getID()] = $SLW->A("SpracheSprache")." "." ".$SLW->A("SpracheWaehrung");
         $gui->selectWithCollection("AdresseSpracheID", new mSprache(), "SpracheName");
         #$gui->setType("AdresseSpracheID", "select");
         #$gui->setOptions("AdresseSpracheID", array_keys($S), array_values($S));
         #$gui->insertSpaceAbove("firma");
     } else {
         $gui->setType("AdresseSpracheID", "hidden");
     }
     #$gui->setAttributes($this->A);
     $gui->setObject($this);
     $gui->setName("Adresse");
     $gui->setOptions("anrede", array_keys(self::getAnreden()), array_values(self::getAnreden()));
     $gui->setType("anrede", "select");
     $gui->setType("geb", "hidden");
     $gui->setType("gebRemMail", "hidden");
     $gui->setType("gebRem", "hidden");
     $gui->setType("exportToLDAP", "checkbox");
     $gui->insertSpaceAbove("exportToLDAP");
     $gui->setFieldDescription("exportToLDAP", "Soll die Adresse auf einen LDAP-Server exportiert werden?");
     $gui->setType("AuftragID", "hidden");
     $gui->setType("type", "hidden");
     #$gui->setLabel("geb","Jahrestag");
     $gui->setLabel("ort", "PLZ/Ort");
     $gui->setLabel("strasse", "Straße/Hausnr.");
     $gui->setLabel("tel", "Telefon");
     $gui->setLabel("email", "E-Mail");
     $gui->setLabel("exportToLDAP", "LDAP-Export?");
     $gui->setParser("strasse", "AdresseGUI::parserStrasse", array($this->A("nr")));
     $gui->setParser("ort", "AdresseGUI::parserOrt", array($this->A("plz")));
     #$gui->useAutoCompletion("plz", (Session::isPluginLoaded("Postleitzahlen") ? "Postleitzahlen" : "Adressen"));
     if (Session::isPluginLoaded("mStammdaten") or Applications::activeApplication() == "MMDB") {
         /*if($this->A("land") == ""){
         			$S = Stammdaten::getActiveStammdaten();
         			if($S->A("land") == "D") $S->changeA("land","DE");
         			$this->changeA("land", ISO3166::getCountryToCode($S->A("land")));
         		}*/
         $gui->setType("land", "select");
         $countries = ISO3166::getCountries();
         $labels = array_merge(array("" => "keine Angabe"), $countries);
         $values = array_merge(array("" => ""), $countries);
         $gui->setOptions("land", array_values($values), array_values($labels));
         if ($this->A("land") != ISO3166::getCountryToCode("GB") and $this->A("land") != ISO3166::getCountryToCode("US") and $this->A("land") != ISO3166::getCountryToCode("CH")) {
             $gui->setLineStyle("zusatz1", "display:none;");
             $gui->setLineStyle("position", "display:none;");
         }
         if ($this->A("land") != ISO3166::getCountryToCode("DK") and $this->A("land") != ISO3166::getCountryToCode("ES")) {
             $gui->setLineStyle("bezirk", "display:none;");
         }
         $gui->setLabel("zusatz1", "Zusatz 1");
         $gui->setInputJSEvent("land", "onchange", "contentManager.toggleFormFields((this.value == '" . ISO3166::getCountryToCode("GB") . "' || this.value == '" . ISO3166::getCountryToCode("US") . "' || this.value == '" . ISO3166::getCountryToCode("CH") . "') ? 'show' : 'hide', ['zusatz1', 'position']); contentManager.toggleFormFields((this.value == '" . ISO3166::getCountryToCode("DK") . "' || this.value == '" . ISO3166::getCountryToCode("ES") . "') ? 'show' : 'hide', ['bezirk']);");
     }
     if (Session::isPluginLoaded("mGemeinschaft")) {
         $gui->activateFeature("addCustomButton", $this, "tel", Gemeinschaft::getCallButton($this->A("tel")));
         $gui->activateFeature("addCustomButton", $this, "mobil", Gemeinschaft::getCallButton($this->A("mobil"), "mobile"));
     }
     $kat = new Kategorien();
     $kat->addAssocV3("type", "=", $displayMode != "" ? $displayMode : "1");
     $keys = $kat->getArrayWithKeys();
     $keys[] = "0";
     $values = $kat->getArrayWithValues();
     $values[] = "bitte auswählen";
     $gui->setOptions("KategorieID", $keys, $values);
     $gui->setType("bemerkung", "textarea");
     $gui->setLabel("KategorieID", "Kategorie");
     if ($AuftragID == -1) {
         $gui->setType("KategorieID", "select");
     } else {
         $gui->setType("KategorieID", "hidden");
         $gui->setType("bemerkung", "hidden");
         $gui->setType("tel", "hidden");
         $gui->setType("fax", "hidden");
         $gui->insertSpaceAbove("email");
         $gui->setType("homepage", "hidden");
         $gui->setType("exportToLDAP", "hidden");
         $gui->setType("mobil", "hidden");
     }
     switch ($displayMode) {
         case "auftragsAdresse":
             $gui->setJSEvent("onSave", "function() {\n\t\t\t\t\tcontentManager.loadFrame('contentLeft','Auftrag',{$this->A->AuftragID});\n\t\t\t\t\tcontentManager.loadFrame('contentRight','Auftraege');\n\t\t\t\t}");
             break;
         case "lieferAdresse":
             $this->A->type = "lieferAdresse";
             $gui->setJSEvent("onSave", "function() {\n\t\t\t\t\tcontentManager.loadFrame('contentRight','Auftraege');\n\t\t\t\t\tcontentManager.loadFrame('subframe','GRLBM',{$this->A->AuftragID});\n\t\t\t\t}");
             break;
     }
     Aspect::joinPoint("buttons", $this, __METHOD__, $OptTab);
     $gui->setStandardSaveButton($this, "Adressen");
     $gui->customize($this->customizer);
     return $forReload . $OptTab . $gui->getEditHTML();
 }
Esempio n. 13
0
        SysMessages::log($errortype[$errno] . ": " . $errmsg . "\n{$filename}:{$linenum}", "PHP");
    } catch (Exception $e) {
    }
}
session_start();
if (isset($_COOKIE["phynx_customer"]) and isset($_GET["cloud"]) and $_COOKIE["phynx_customer"] != $_GET["cloud"]) {
    //if someone switches the cloud, kick him and reinitialize
    session_destroy();
    session_start();
}
if (!isset($_SESSION["classPaths"])) {
    $_SESSION["classPaths"] = array();
}
function __autoload($class_name)
{
    try {
        return findClass($class_name);
    } catch (ClassNotFoundException $e) {
        $_SESSION["classPaths"] = array();
        return findClass($class_name);
    }
}
if (!isset($_SESSION["S"]) or !isset($_SESSION["applications"]) or $_SESSION["applications"]->numAppsLoaded() == 0) {
    Session::init();
    if (Session::isPluginLoaded("mAutoLogin")) {
        mAutoLogin::doAutoLogin();
    }
}
if ($physion != "default" and isset($_GET["application"]) and isset($_GET["plugin"])) {
    Session::physion($_GET["physion"], $_GET["application"], $_GET["plugin"]);
}
Esempio n. 14
0
 function getOperationsHTML($pluginName, $id = -1)
 {
     $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $pluginName);
     $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $pluginName);
     if ($this->texts == null) {
         $c = $this->loadLanguageClass("HTML");
         $this->texts = $c->getEditTexts();
     }
     $html = "";
     if (PMReflector::implementsInterface($pluginName, "iNewWithValues") and $userCanCreate) {
         $os = "1";
     } else {
         $os = "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iCloneable") and $userCanCreate) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if ((PMReflector::implementsInterface($pluginName, "iDeletable") or PMReflector::implementsInterface($pluginName, "iDeletable2")) and $userCanDelete) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iRepeatable") and Session::isPluginLoaded("mRepeatable")) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iXMLExport")) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if ($id != -1 and $os != "00000") {
         $html .= "<img title=\"Operationen\" id=\"" . $pluginName . "Operations\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','operations:{$pluginName}:{$id}:{$os}','" . $this->texts["Operationen"] . ":');\" style=\"float:right;\" />";
     }
     return $html;
 }
Esempio n. 15
0
 function getHTML($id)
 {
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($id == -1) {
         $this->A = $this->newAttributes();
         $this->A->DomainID = $U;
         $this->A->header = "leere Seite";
         if ($_SESSION["S"]->checkForPlugin("Templates")) {
             $this->A->TemplateID = TemplatesGUI::getDefault("pageTemplate");
         }
         $id = $this->newMe();
         $c = new Content(-1);
         $cA = $c->newAttributes();
         $c->setA($cA);
         $c->changeA("SeiteID", $id);
         if ($_SESSION["S"]->checkForPlugin("Templates")) {
             $c->changeA("TemplateID", TemplatesGUI::getDefault("contentTemplate"));
         }
         $c->newMe();
         $this->forceReload();
     }
     if ($this->A == null) {
         $this->loadMe();
     }
     #$this->loadMeOrEmpty();
     #if($id == -1 AND $U != null) $this->A->DomainID = $U;
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Seite");
     $gui->setShowAttributes(array("header", "TemplateID", "name", "metaTagDescription", "permalink"));
     $gui->insertSpaceAbove("name", "sonstiges", true);
     $gui->setLabel("header", "Seitenname");
     #$gui->insertSpaceAbove("metaTagDescription");
     #$gui->setFieldDescription("header","wird auf der Seite angezeigt");
     $gui->setFieldDescription("name", "wird nur intern angezeigt");
     $gui->setFieldDescription("permalink", "Ein Name, unter der die Seite über ?permalink= erreichbar ist. Darf nur aus Buchstaben (keine Umlaute), Zahlen, _ und - bestehen und muss eindeutig für die Domain sein. Es kann dann mit mod_rewrite auf diesen permalink an Stelle der SeitenID verlinkt werden.");
     $gui->setLabel("TemplateID", "Vorlage");
     $gui->setType("DomainID", "hidden");
     $gui->setType("metaTagDescription", "textarea");
     $gui->setLabel("metaTagDescription", "Beschreibung für meta tag");
     $gui->setInputJSEvent("metaTagDescription", "onkeyup", "\$('charCounter').update(\$('metaTagDescription').value.length)");
     $gui->setFieldDescription("metaTagDescription", "<span id=\"charCounter\">" . strlen($this->A("metaTagDescription")) . "</span> Zeichen");
     $gui->setInputStyle("metaTagDescription", "font-size:8px;");
     if (Session::isPluginLoaded("mMultiLanguage")) {
         $gui->activateFeature("addAnotherLanguageButton", $this, "header");
     }
     if (Session::isPluginLoaded("Templates")) {
         $T = new anyC();
         $T->setCollectionOf("Template");
         $T->addAssocV3("templateType", "=", "pageTemplate", "AND", "1");
         $T->addAssocV3("TemplateDomainID", "=", "0", "AND", "2");
         $T->addAssocV3("TemplateDomainID", "=", $this->A("DomainID"), "OR", "2");
         $gui->selectWithCollection("TemplateID", $T, "name");
     } else {
         $gui->setType("TemplateID", "hidden");
     }
     $gui->setStandardSaveButton($this);
     $H = "";
     $E = "";
     $C = new mContentGUI();
     $C->addAssocV3("SeiteID", "=", $this->ID);
     $C->lCV3();
     if ($C->numLoaded() == 1) {
         $content = $C->getNextEntry();
         $H = new ContentGUI($content->getID());
         $H->singular = true;
         $H = "<div style=\"height:20px;width:20px;\"></div>" . $H->getHTML($content->getID());
     } else {
         $E = $C->getHTML(-1);
     }
     $tab = new HTMLTable(1);
     $tab->setTableStyle("margin-top:20px;");
     $B = new Button("Content\nhinzufügen", "gutschrift");
     $B->rmePCR("Seite", $this->ID, "createContent", "", "contentManager.reloadFrame('contentLeft');");
     $tab->addRow($B);
     return $gui->getEditHTML() . $H . $tab . $E;
 }
Esempio n. 16
0
 public function editInPopup($formID, $fieldName, $variablesCallback = null, $picturesDir = null)
 {
     $tinyMCEID = "tinyMCEEditor" . rand(100, 9000000);
     $ITA = new HTMLInput("tinyMCEEditor", "textarea");
     $ITA->id($tinyMCEID);
     $ITA->style("width:" . ($variablesCallback != null ? "830" : "1000") . "px;height:300px;");
     if ($variablesCallback != null) {
         echo "<div style=\"float:right;width:160px;margin:5px;height:324px;overflow-y:auto;overflow-x:hidden;\">\n\t\t\t\t\t<p><small id=\"tinyMCEVarsDescription\"></small></p>\n\t\t\t\t\t<p style=\"margin-top:5px;\" id=\"tinyMCEVars\"></p></div>";
     }
     echo "<div style=\"width:" . ($variablesCallback != null ? "830" : "1000") . "px;\">" . $ITA . "</div>";
     $buttons = "save | undo redo | pastetext | styleselect fontsizeselect fontselect | bold italic underline forecolor | hr code";
     if ($picturesDir and Session::isPluginLoaded("mFile")) {
         $buttons .= " table phynximage";
         $buttons = str_replace("fontselect", "", $buttons);
     }
     $onInit = "";
     if ($fieldName == "textbausteinOben" or $fieldName == "textbausteinUnten" or $fieldName == "zahlungsbedingungen") {
         $onInit = 'ed.dom.loadCSS("./interface/rme.php?rand="+Math.random()+"&class=tinyMCE&construct=-1&method=activeTextbausteinFont");';
     }
     echo OnEvent::script("\nsetTimeout(function(){\n\t\$j('#{$tinyMCEID}').val(\$j('#{$formID} [name={$fieldName}]').val());\n\t" . $this->editorDokument($tinyMCEID, "function(content){\$j('#{$formID} [name={$fieldName}]').val(content.getContent()).trigger('change'); " . OnEvent::closePopup("tinyMCE") . OnEvent::closePopup("nicEdit") . "}", $buttons, "./styles/tinymce/office.css", $picturesDir, $onInit) . "\n\t\t\t" . ($variablesCallback != null ? "{$variablesCallback}('{$fieldName}');" : "") . "\n\t\t}, 100);");
 }
Esempio n. 17
0
#print_r($_GET);
if (isset($_GET["cloud"]) and (isset($_SESSION["phynx_customer"]) and $_SESSION["phynx_customer"] != $_GET["cloud"] or !isset($_SESSION["phynx_customer"]))) {
    //if someone switches the cloud, kick him and reinitialize
    session_destroy();
    session_start();
}
if (!isset($_SESSION["classPaths"])) {
    $_SESSION["classPaths"] = array();
}
function phynxAutoloader($class_name)
{
    try {
        return findClass($class_name);
    } catch (ClassNotFoundException $e) {
        $_SESSION["classPaths"] = array();
        return findClass($class_name);
    }
}
if (!isset($_SESSION["S"]) or !isset($_SESSION["applications"]) or $_SESSION["applications"]->numAppsLoaded() == 0) {
    Session::init();
    if (Session::isPluginLoaded("mAutoLogin")) {
        mAutoLogin::doAutoLogin(null, null, null, isset($_GET["application"]) ? $_GET["application"] : null);
    }
}
if (Session::isPluginLoaded("mAutoLogin") and isset($_GET["application"])) {
    //for DEMO always switch application
    mAutoLogin::doAutoLogin(null, null, null, $_GET["application"]);
}
if ($physion != "default") {
    Session::physion($_GET["physion"], isset($_GET["application"]) ? $_GET["application"] : null, isset($_GET["plugin"]) ? $_GET["plugin"] : null, isset($_GET["icon"]) ? $_GET["icon"] : null);
}
Esempio n. 18
0
 function getHTML($id)
 {
     $type = "none";
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     $bps = $this->getMyBPSData();
     if ($bps != -1 and isset($bps["type"])) {
         $type = $bps["type"];
     }
     $this->loadMeOrEmpty();
     if ($id == -1) {
         if ($type != "none" and $type != "undefined") {
             $this->A->SeiteID = $type;
         }
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Content");
     $gui->setType("contentType", "select");
     $gui->setOptions("contentType", array("text", "preset", "downloads", "php"), array("Text", "HTML-Vorlage", "Downloads", "PHP"));
     $FB = new FileBrowser();
     $FB->addDir("../specifics/");
     if ($_SESSION["S"]->checkForPlugin("mShop")) {
         $FB->addDir("../multiCMS/Shop/");
     }
     $a = $FB->getAsLabeledArray("iCustomContent", ".class.php");
     $gui->setLabel("customContent", "Inhalt");
     $gui->setType("customContent", "select");
     $gui->setOptions("customContent", array_values($a), array_keys($a));
     $Tab = new HTMLTable(1);
     if ($this->singular) {
         $gui->setType("sort", "hidden");
     } else {
         $B = new Button("zurück", "back");
         $B->onclick("contentManager.loadFrame('contentLeft','Seite', " . $this->A("SeiteID") . ");");
         $Tab->addRow($B);
     }
     $gui->setLabel("contentType", "Typ");
     $gui->setLabel("ContentImage", "Bild");
     $gui->setLabel("SeiteID", "Seite");
     $gui->setLabel("TemplateID", "Vorlage");
     $gui->setLabel("sort", "Sortierung");
     $gui->setFieldDescription("ContentImage", "Wird an Stelle des Parameters %%%IMAGE%%% eingesetzt.");
     #$gui->setType("header","hidden");
     $gui->insertSpaceAbove("contentType");
     #$gui->insertSpaceAbove("TemplateID","sonstiges", true);
     $gui->setInputJSEvent("contentType", "onchange", "Content.selectType(this);");
     $gui->setType("text", "HTMLEditor");
     if (Session::isPluginLoaded("mFile")) {
         $B = new Button("Bild auswählen", "./images/i2/add.png");
         $B->type("icon");
         $B->customSelect("contentRight", $this->ID, "mFile", "Content.selectImage");
         $gui->activateFeature("addCustomButton", $this, "ContentImage", $B);
     } else {
         $gui->setType("ContentImage", "hidden");
     }
     $gui->setShowAttributes(array("text", "ContentSpracheID", "ContentImage", "TemplateID", "header", "sort", "contentType", "presetTemplateID", "formHandlerID", "customContent"));
     $gui->setFormID("ContentForm");
     $S = new anyC();
     $S->setCollectionOf("Seite");
     $gui->selectWithCollection("SeiteID", $S, "name");
     $gui->setType("name", "hidden");
     $gui->setType("SeiteID", "hidden");
     $gui->setLabel("presetTemplateID", "Vorlage");
     $gui->setLabel("formHandlerID", "Handler");
     $gui->setLabel("ContentSpracheID", "Sprache");
     if (Session::isPluginLoaded("mSprache")) {
         $Sprachen = new anyC();
         $Sprachen->setCollectionOf("Sprache");
         $gui->selectWithCollection("ContentSpracheID", $Sprachen, "SpracheIdentifier", "alle");
     } else {
         $gui->setType("ContentSpracheID", "hidden");
     }
     $aC = new anyC();
     $aC->setCollectionOf("Template");
     $aC->addAssocV3("templateType", "=", "presetTemplate");
     $gui->selectWithCollection("presetTemplateID", $aC, "name");
     if ($_SESSION["S"]->checkForPlugin("mHandler")) {
         $handlerAC = new anyC();
         $handlerAC->setCollectionOf("Handler");
         $handlerAC->addAssocV3("HandlerDomainID", "=", $U);
         $gui->selectWithCollection("formHandlerID", $handlerAC, "HandlerName", "keiner");
     } else {
         $gui->setParser("formHandlerID", "ContentGUI::noHandlerParser");
     }
     if ($this->A->contentType != "preset") {
         $gui->setLineStyle("presetTemplateID", "display:none;");
         $gui->setLineStyle("formHandlerID", "display:none;");
     }
     if ($this->A->contentType != "php") {
         $gui->setLineStyle("customContent", "display:none;");
     }
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "contentTemplate");
     $T->addAssocV3("templateType", "=", "listTemplate", "OR");
     $T->addAssocV3("templateType", "=", "tableTemplate", "OR");
     $T->addAssocV3("templateType", "=", "dlTemplate", "OR");
     $T->addOrderV3("templateType");
     $TG = new TemplatesGUI();
     $cats = $TG->getAvailableCategories();
     $options = array();
     while ($o = $T->getNextEntry()) {
         $options[$o->getID()] = $cats[$o->getA()->templateType];
     }
     $T->resetPointer();
     $gui->selectWithCollection("TemplateID", $T, "name");
     $gui->selectOptgroup("TemplateID", $options);
     $gui->setJSEvent("onSave", "function() { contentManager.loadFrame('contentLeft','Seite', " . $this->A("SeiteID") . "); }");
     $gui->setStandardSaveButton($this);
     $gui->customize($this->customizer);
     return $Tab . $gui->getEditHTML();
 }
Esempio n. 19
0
 public static function getCalendarDetails($className, $classID, $T = null)
 {
     $K = new Kalender();
     if ($T == null) {
         $T = new Todo($classID);
     }
     $name = "";
     if ($T->A("TodoClass") == "Projekt" or $T->A("TodoClass") == "GRLBM") {
         $O = $T->getOwnerObject();
         $name = $O->getCalendarTitle();
     } else {
         $name = $T->A("TodoName");
     }
     $day = $T->A("TodoTillDay");
     if ($T->A("TodoFromDay") != "0") {
         $day = $T->A("TodoFromDay");
     }
     $time = $T->A("TodoTillTime");
     if ($T->A("TodoFromTime") != "0") {
         $time = $T->A("TodoFromTime");
     }
     $KE = new KalenderEvent($className, $classID, $K->formatDay($day), $K->formatTime($time), $name);
     #echo $T->A("TodoOrt");
     if ($T->A("TodoClass") == "WAdresse") {
         $O = $T->getOwnerObject();
         $KE->value("Kunde", $O->getHTMLFormattedAddress());
     }
     $KE->value("Typ", TodoGUI::types($T->A("TodoType")));
     $KE->value("Ort", $T->A("TodoLocation"));
     #$KE->value("Status", TodoGUI::getStatus($T->A("TodoStatus")));
     $KE->owner($T->A("TodoUserID"));
     if ($T->A("TodoClass") == "WAdresse") {
         $KE->value("Telefon", $O->A("tel"));
         $KE->value("Notiz", nl2br($O->A("bemerkung")));
         $KE->canNotify(true, $T->A("TodoNotified") == "1");
         if ($T->A("TodoType") == "1" and Session::isPluginLoaded("mAkquise")) {
             $B = new Button("Akquise", "./lightCRM/Akquise/callTel.png");
             #$B->doBefore(OnEvent::rme($T, "setStatus", array("'2'"), OnEvent::closePopup("mKalender").OnEvent::reload("Screen"))." %AFTER");
             $B->doBefore(OnEvent::closePopup("mKalender") . "contentManager.emptyFrame('contentScreen'); %AFTER");
             $B->loadFrame("contentLeft", "WAdresse", $T->A("TodoClassID"), 0, "mWAdresseGUI;Akquise:1;from:mKalender");
             #$B->popup("", "Akquise", "mAkquise", "-1", "showTelPopup", array($T->A("TodoClassID")), "", "{width: 950, top:20, hPosition:'center'}");
             $KE->addTopButton($B);
         }
     }
     $KE->allDay($T->A("TodoAllDay") == "1");
     if ($T->A("TodoClass") == "Projekt" and $O->A("ProjektKunde") != "0") {
         $Adresse = new Adresse($O->A("ProjektKunde"));
         $KE->value("Telefon", $Adresse->A("tel"));
     }
     if ($T->A("TodoClass") == "GRLBM") {
         $Auftrag = new Auftrag($O->A("AuftragID"));
         $Adresse = new Adresse($Auftrag->A("AdresseID"));
         $KE->value("Telefon", $Adresse->A("tel"));
     }
     $KE->status($T->A("TodoStatus"));
     $KE->endDay($K->formatDay($T->A("TodoTillDay")));
     $KE->endTime($K->formatTime($T->A("TodoTillTime")));
     $KE->icon(TodoGUI::typesImage($T->A("TodoType"), true));
     $KE->summary(nl2br($T->A("TodoDescription")));
     if ($T->A("TodoExceptionForID") != "0") {
         $KE->exception($T->A("TodoExceptionStarttime"), $T->A("TodoIsDeleted") == "1", $T->A("TodoExceptionForID"));
     }
     if ($T->A("TodoRemind") != "-1") {
         $KE->remind($T->A("TodoRemind") / 60, $T->A("TodoReminded"));
     }
     $editMethod = "editInPopup";
     if ($T->A("TodoOrganizer") != "") {
         $editMethod = null;
         $KE->organizer($T->A("TodoOrganizer"));
     }
     if (!$T->A("TodoDoneTime")) {
         $KE->editable($editMethod, "deleteFromCalendar");
     }
     if ($T->A("TodoOrganizer") == "" and !$T->A("TodoDoneTime")) {
         $KE->repeatable("editRepeatable");
     }
     $KE->location($T->A("TodoLocation"));
     $KE->repeat($T->A("TodoRepeat") != "", $T->A("TodoRepeat"), $T->A("TodoRepeatWeekOfMonth") * 1, $T->A("TodoRepeatDayOfWeek"), $T->A("TodoRepeatInterval"), $T->A("TodoRepeatUntil"));
     $KE->UID("TodoID" . $T->getID() . "@" . substr(Util::eK(), 0, 20));
     $KE->closeable($T->A("TodoDoneTime"), $T->A("TodoReport"));
     if (!$T->A("TodoDoneTime")) {
         $KE->canInvite();
     }
     return $KE;
 }
Esempio n. 20
0
 function getHTML($id)
 {
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     try {
         $MArgs = func_get_args();
         return Aspect::joinPoint("around", $this, __METHOD__, $MArgs);
     } catch (AOPNoAdviceException $e) {
     }
     Aspect::joinPoint("before", $this, __METHOD__, $MArgs);
     // </editor-fold>
     $this->loadMeOrEmpty();
     $bps = $this->getMyBPSData();
     $allowed = array();
     $ACS = anyC::get("Userdata", "name", "shareCalendarTo" . Session::currentUser()->getID());
     $ACS->addAssocV3("name", "=", "shareCalendarTo0", "OR");
     while ($Share = $ACS->getNextEntry()) {
         $allowed[$Share->A("UserID")] = $Share->A("wert");
     }
     if ($id == -1) {
         $this->A->TodoTillDay = Util::CLDateParser(time() + 7 * 24 * 3600);
         $this->A->TodoTillTime = Util::CLTimeParser(10 * 3600);
         $this->A->TodoFromDay = Util::CLDateParser(time() + 7 * 24 * 3600);
         $this->A->TodoFromTime = Util::CLTimeParser(9 * 3600);
         $this->A->TodoType = "2";
         if ($bps != -1 and isset($bps["TodoTillDay"])) {
             $this->A->TodoTillDay = $bps["TodoTillDay"];
             $this->A->TodoFromDay = $bps["TodoTillDay"];
             BPS::unsetProperty("TodoGUI", "TodoTillDay");
         }
         if ($bps != -1 and isset($bps["TodoFromTime"])) {
             $this->A->TodoFromTime = Util::CLTimeParser($bps["TodoFromTime"] * 3600);
             $this->A->TodoTillTime = Util::CLTimeParser(($bps["TodoFromTime"] + 1) * 3600);
             BPS::unsetProperty("TodoGUI", "TodoFromTime");
         }
         if ($bps != -1 and isset($bps["TodoDescription"])) {
             $this->A->TodoDescription = $bps["TodoDescription"];
             BPS::unsetProperty("TodoGUI", "TodoDescription");
         }
         if ($bps != -1 and isset($bps["TodoLocation"])) {
             $this->A->TodoLocation = $bps["TodoLocation"];
             BPS::unsetProperty("TodoGUI", "TodoLocation");
         }
         if ($bps != -1 and isset($bps["TodoName"])) {
             $this->A->TodoName = $bps["TodoName"];
             BPS::unsetProperty("TodoGUI", "TodoName");
         }
         $for = BPS::getProperty("mKalenderGUI", "KID", Session::currentUser()->getID());
         if ($for != Session::currentUser()->getID() and strpos($allowed[$for], "create") === false) {
             $for = Session::currentUser()->getID();
         }
         $this->A->TodoUserID = $for;
         $this->A->TodoClass = BPS::getProperty("mTodoGUI", "ownerClass");
         $this->A->TodoClassID = BPS::getProperty("mTodoGUI", "ownerClassID");
     }
     $gui = $this->GUI;
     $gui->name("Termin");
     $gui->label("TodoDescription", "Details");
     $gui->label("TodoTillDay", "Ende");
     $gui->label("TodoTillTime", "Uhrzeit");
     $gui->label("TodoFromDay", "Anfang");
     $gui->label("TodoFromTime", "Uhrzeit");
     $gui->label("TodoType", "Typ");
     $gui->label("TodoUserID", "Zuständig");
     $gui->label("TodoStatus", "Status");
     $gui->label("TodoRemind", "Erinnerung");
     $gui->label("TodoName", "Betreff");
     $gui->label("TodoRepeat", "Wiederholen");
     #$gui->label("TodoRepeatInterval","Intervall");
     $gui->label("TodoClassID", "Kunde");
     $gui->label("TodoLocation", "Ort");
     $gui->label("TodoAllDay", "Ganzer Tag");
     $gui->space("TodoRemind", "Optionen");
     $gui->space("TodoFromDay", "Zeit");
     if ($this->A("TodoFromDay") == "01.01.1970" and $this->A("TodoFromTime") == "00:00") {
         $this->changeA("TodoFromDay", $this->A("TodoTillDay"));
         $this->changeA("TodoFromTime", $this->A("TodoTillTime"));
     }
     $gui->attributes(array("TodoType", "TodoClass", "TodoClassID", "TodoDescription", "TodoLocation", "TodoFromDay", "TodoTillDay", "TodoAllDay", "TodoRemind", "TodoUserID"));
     $gui->type("TodoType", "select", TodoGUI::types());
     $gui->type("TodoRemind", "select", array("-1" => "keine Erinnerung", "60" => "1 Minute vorher", "300" => "5 Minuten vorher", "600" => "10 Minuten vorher", "900" => "15 Minuten vorher", "1800" => "30 Minuten vorher", "2700" => "45 Minuten vorher", "3600" => "1 Stunde vorher"));
     $gui->type("TodoClass", "hidden");
     $gui->type("TodoDescription", "textarea");
     $gui->type("TodoAllDay", "checkbox");
     $gui->addFieldEvent("TodoAllDay", "onchange", "\$j('#TodoFromTimeDisplay').css('display', this.checked ? 'none' : 'inline'); \$j('#TodoTillTimeDisplay').css('display', this.checked ? 'none' : 'inline');");
     $gui->parser("TodoFromDay", "TodoGUI::dayFromParser");
     $gui->parser("TodoTillDay", "TodoGUI::dayTillParser");
     $ac = Users::getUsers();
     $users = array();
     while ($u = $ac->getNextEntry()) {
         if (!isset($allowed[$u->getID()]) and $u->getID() != Session::currentUser()->getID()) {
             continue;
         }
         if (isset($allowed[$u->getID()]) and strpos($allowed[$u->getID()], "create") === false) {
             continue;
         }
         $users[$u->getID()] = $u->A("name");
     }
     $ac = Users::getUsers(1);
     while ($u = $ac->getNextEntry()) {
         if (!isset($allowed[$u->getID()]) and $u->getID() != Session::currentUser()->getID()) {
             continue;
         }
         if (isset($allowed[$u->getID()]) and strpos($allowed[$u->getID()], "create") === false) {
             continue;
         }
         $users[$u->getID()] = $u->A("name");
     }
     $users["-1"] = "Alle";
     if (Session::isPluginLoaded("mWAdresse") and ($this->A("TodoClass") == "WAdresse" or $this->A("TodoClass") == "Kalender")) {
         $gui->parser("TodoClassID", "TodoGUI::parserKunde");
     } else {
         $gui->type("TodoClassID", "hidden");
     }
     $gui->type("TodoUserID", "select", $users);
     $gui->type("TodoStatus", "select", $this->getStatus());
     $gui->activateFeature("CRMEditAbove", $this);
     if ($gui instanceof CRMHTMLGUI) {
         return $gui->getEditTableHTML(4);
     }
 }
Esempio n. 21
0
 public function getTable($GUI)
 {
     $bps = BPS::getAllProperties("mKalenderGUI");
     $K = $GUI->getData($this->first, $this->last, isset($bps["KID"]) ? $bps["KID"] : Session::currentUser()->getID());
     $ansicht = $this->ansicht;
     $cols = $this->cols;
     $rows = $this->rows;
     $html = "<table style=\"margin-left:10px;border-spacing: 0px;\" id=\"KalenderTable\">\n\t\t\t<colgroup>";
     for ($j = 0; $j < $cols - 2; $j++) {
         #
         $html .= "\n\t\t\t\t<col " . ($ansicht == "woche" ? "class=\"backgroundColor" . ($j % 2 + 2) . "\" " : "") . " style=\"width:" . 100 / $cols . "%;\" />";
     }
     $html .= "\n\t\t\t\t<col style=\"background-color:{$this->colorBgSaturday};width:" . 100 / $cols . "%;\" />\n\t\t\t\t<col style=\"background-color:{$this->colorBgSunday};width:" . 100 / $cols . "%;\" />\n\t\t\t</colgroup>";
     if ($ansicht != "tag") {
         $html .= "\n\t\t\t\t<tr>";
         $D2 = clone $this->date;
         for ($j = 0; $j < $cols; $j++) {
             $html .= "\n\t\t\t\t\t\t<th style=\"border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#EEE;padding-top:10px;\" class=\"backgroundColor0\">" . Util::CLWeekdayName(date("w", $D2->time())) . "</th>";
             $D2->addDay();
         }
         unset($D2);
         $html .= "\n\t\t\t</tr>";
     }
     $D = clone $this->date;
     for ($i = 0; $i < $rows; $i++) {
         $html .= "\n\t\t\t<tr class=\"cellHeight noHover\">";
         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 ($ansicht == "tag") {
                 #$dayContent = "";
                 $dayDivs = "";
                 for ($i = 0; $i < 24; $i++) {
                     $dayDivs .= "\n\t\t\t\t\t\t<div style=\"height:40px;z-index:10;\" class=\"backgroundColor" . ($i % 2 == 0 ? "3" : "2") . "\">\n\t\t\t\t\t\t\t";
                     $BN = "";
                     if (Session::isPluginLoaded("mTodo")) {
                         $BN = new Button("Neuer Termin", "./ubiquitous/Kalender/addToDo.png", "icon");
                         $BN->className("KalenderButton");
                         $BN->popup("", "Neuer Termin", "mKalender", "-1", "newTodo", array("-1", $D->time(), "'Kalender'", "-1", $i), "", "Kalender.popupOptions");
                         $BN->style("float:left;margin-left:5px;margin-top:5px;");
                     }
                     $dayDivs .= "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"borderColor1\" style=\"height:35px;border-right-width:1px;border-right-style:dotted;float:left;width:40px;padding-top:5px;padding-right:5px;font-weight:bold;text-align:right;color:grey;\">" . ($i < 10 ? "0" : "") . "{$i}:00</div>\n\t\t\t\t\t\t{$BN}</div>";
                 }
                 $eventsDiv = "";
                 for ($i = 0; $i < 24; $i++) {
                     if (count($events) > 0) {
                         foreach ($events as $time => $ev) {
                             if (substr($time, 0, 2) * 1 != $i) {
                                 continue;
                             }
                             foreach ($ev as $KE) {
                                 $eventsDiv .= $KE->getDayViewHTML($D->time());
                             }
                         }
                     }
                 }
                 $entry = "\n\t\t\t\t\t\t<div class=\"cellHeight\" style=\"overflow:auto;width:961px;\" id=\"tagDiv\">\n\t\t\t\t\t\t\t<div style=\"height:961px;\">\n\t\t\t\t\t\t\t{$dayDivs}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"margin-top:-961px;\">\n\t\t\t\t\t\t\t\t{$eventsDiv}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>";
             } elseif ($ansicht == "woche") {
                 $dayDivs = "";
                 for ($k = 0; $k < $hasMultiDay; $k++) {
                     $dayDivs .= "<div style=\"height:22px;z-index:10;\" class=\"borderColor0\"></div>";
                 }
                 for ($k = 0; $k < 24; $k++) {
                     $bgColor = "";
                     if ($k < 7 or $k > 19) {
                         $bgColor = "background-color:rgba(255, 255, 255, 0.3)";
                     }
                     $border = "border-top:1px dotted white;";
                     if ($k == 23) {
                         $border .= "border-bottom:1px dotted white;";
                     }
                     if ($k == 12) {
                         $border = "border-top:1px solid white;";
                     }
                     $dayDivs .= "\n\t\t\t\t\t\t<div style=\"height:" . ($k < 6 ? "10" : "21") . "px;z-index:10;{$border}{$bgColor}\" class=\"borderColor0\">\n\t\t\t\t\t\t\t";
                     if ($k > 5 and $k < 21 and $k % 2 == 0 and $j % 2 == 1) {
                         $dayDivs .= "\n\t\t\t\t\t\t\t\t<div class=\"borderColor1\" style=\"color:#777;padding-left:3px;\">" . ($k < 10 ? "0" : "") . "{$k}</div>";
                     }
                     $dayDivs .= "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>";
                 }
                 $eventsDiv = "";
                 for ($i = 0; $i < 24; $i++) {
                     if (count($events) > 0) {
                         foreach ($events as $time => $ev) {
                             if (substr($time, 0, 2) * 1 != $i) {
                                 continue;
                             }
                             foreach ($ev as $KE) {
                                 $eventsDiv .= $KE->getWeekViewHTML($D->time(), $hasMultiDay);
                             }
                         }
                     }
                 }
                 $entry = "\n\t\t\t\t\t\t<div style=\"overflow:auto;height:" . (11 * 6 + 22 * 18 + 1 + $hasMultiDay * 22) . "px;width:100%;\">\n\t\t\t\t\t\t\t<div style=\"height:" . (11 * 6 + 22 * 18 + 1) . "px;\">\n\t\t\t\t\t\t\t\t{$dayDivs}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"margin-top:-" . (11 * 6 + 22 * 18 + 1) . "px;\">\n\t\t\t\t\t\t\t\t{$eventsDiv}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>";
             } else {
                 if ($events != null) {
                     foreach ($events as $time => $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());
                         }
                     }
                 }
             }
             $BD = new Button("Tagesansicht", "./ubiquitous/Kalender/showDetails.png");
             $BD->type("icon");
             $BD->rmePCR("mKalender", "-1", "setView", array("'tag'", "'" . $D->time() . "'"), "contentManager.loadFrame('contentScreen','mKalender');");
             $BD->style("float:left;");
             $BN = "";
             if (Session::isPluginLoaded("mTodo")) {
                 $BN = new Button("Neuer Termin", "./ubiquitous/Kalender/addToDo.png");
                 $BN->type("icon");
                 $BN->popup("", "Neuer Termin", "mKalender", "-1", "newTodo", array("-1", $D->time(), "'Kalender'", "-1"), "", "Kalender.popupOptions");
                 $BN->style("float:left;margin-left:5px;");
             }
             #".((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;\"\n\t\t\t\t\tclass=\"" . ((date("d.m.Y", $D->time()) == date("d.m.Y") and $ansicht != "tag") ? "backgroundColor1" : "") . " Day borderColor1\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle=\"" . ($ansicht == "tag" ? "display:none;" : "") . "height:21px;padding-top:2px;padding-left:5px;text-align:right;padding-right:5px;\"\n\t\t\t\t\t\tclass=\"innerCellTitle\">\n\t\t\t\t\t\t" . ($ansicht != "tag" ? "<span class=\"dayOptions\">{$BD}{$BN}</span>" : "") . "\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tstyle=\"color:grey;\">\n\t\t\t\t\t\t\t" . ($ansicht != "tag" ? date("d", $D->time()) : "&nbsp;") . "\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"overflow:auto;" . ($ansicht == "monat" ? "margin-top:0px;width:100%;" : "") . "\" class=\"" . ($ansicht == "monat" ? "innerCellHeight" : "") . "\">{$entry}</div>\n\t\t\t\t</td>";
             }
             $D->addDay();
         }
         for ($j = 0; $j < 7 - $cols; $j++) {
             $D->addDay();
         }
         $html .= "\n\t\t\t</tr>";
     }
     $html .= "\n\t\t</table>";
     return $html;
 }
Esempio n. 22
0
 public function deleteMe()
 {
     if (Session::isPluginLoaded("mGoogle")) {
         Google::calendarDeleteEvent(mTodoGUI::getCalendarDetails("Todo", $this->getID()));
     }
     $AC = anyC::get("Todo", "TodoExceptionForID", $this->getID());
     while ($T = $AC->getNextEntry()) {
         $T->deleteMe();
     }
     if ($this->A("TodoClass") == "DBMail" and Session::isPluginLoaded("mMail")) {
         Mail::assignRevoke("Todo", $this->getID(), $this->A("TodoClassID"));
     }
     if (Session::isPluginLoaded("mAufgabe") and ($this->A("TodoType") == 3 or $this->A("TodoType") == 4 or $this->A("TodoType") == 5) and $this->A("TodoUserID") > 0) {
         $AC = anyC::get("Aufgabe", "AufgabeByClass", "Todo");
         $AC->addAssocV3("AufgabeByClassID", "=", $this->getID());
         while ($A = $AC->n()) {
             $A->deleteMe();
         }
     }
     parent::deleteMe();
 }
Esempio n. 23
0
 public function getAdresse($Beleg)
 {
     $Auftrag = new Auftrag($Beleg->A("AuftragID"));
     $Adresse = new Adresse($Auftrag->A("AdresseID"));
     $BCheckK = "";
     if (Session::isPluginLoaded("mklickTel")) {
         $BCheckK = new Button("Adresse mit klickTel prüfen", "compass", "iconic");
         $BCheckK->style("float:right;font-size:30px;margin-right:15px;");
         $BCheckK->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressKlickTel', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
         $BCheckK->id("BCheckKT");
         Aspect::joinPoint("modButtonKlickTel", $this, __METHOD__, array($BCheckK, $Auftrag));
     }
     $BUpdate = new Button("Adresse ändern", "pen_alt2", "iconic");
     $BUpdate->style("float:right;font-size:30px;margin-right:15px;");
     $BUpdate->onclick("CustomerPage.popup('Adresse ändern', 'alterAddress', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
     if (!$this->showButtonEditAddress) {
         $BUpdate = "";
     }
     $BCheckG = new Button("Adresse mit Google prüfen", "compass", "iconic");
     $BCheckG->style("float:right;font-size:30px;");
     $BCheckG->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressGoogle', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
     $BCheckG->id("BCheckG");
     if (!$this->showButtonCheckWithGoogle) {
         $BCheckG = "";
     }
     Aspect::joinPoint("modButtonGoogle", $this, __METHOD__, array($BCheckG, $Auftrag));
     $TAdresse = new HTMLTable(2, "Kundenadresse");
     $TAdresse->setColWidth(1, 26);
     $TAdresse->setTableStyle("width:100%;");
     $TAdresse->addRow(array(new Button("Adresse", "home", "iconic"), $BCheckG . $BCheckK . $BUpdate . $Adresse->getHTMLFormattedAddress()));
     $TAdresse->setColStyle(1, "vertical-align:top;");
     return $TAdresse;
 }
Esempio n. 24
0
 public function getAuftrag($data)
 {
     $Beleg = new GRLBM($data["GRLBMID"]);
     #$this->createAuftrag(new Adresse(1), "W");
     $Auftrag = new Auftrag($Beleg->A("AuftragID"));
     $Adresse = new Adresse($Auftrag->A("AdresseID"));
     $BCheckK = "";
     if (Session::isPluginLoaded("mklickTel")) {
         $BCheckK = new Button("Adresse mit klickTel prüfen", "compass", "iconic");
         $BCheckK->style("float:right;font-size:30px;margin-right:15px;");
         $BCheckK->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressKlickTel', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
         $BCheckK->id("BCheckKT");
         Aspect::joinPoint("modButtonKlickTel", $this, __METHOD__, array($BCheckK, $Auftrag));
     }
     $BUpdate = new Button("Adresse ändern", "pen_alt2", "iconic");
     $BUpdate->style("float:right;font-size:30px;margin-right:15px;");
     $BUpdate->onclick("CustomerPage.popup('Adresse ändern', 'alterAddress', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
     $BCheckG = new Button("Adresse mit Google prüfen", "compass", "iconic");
     $BCheckG->style("float:right;font-size:30px;");
     $BCheckG->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressGoogle', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
     $BCheckG->id("BCheckG");
     Aspect::joinPoint("modButtonGoogle", $this, __METHOD__, array($BCheckG, $Auftrag));
     $TAdresse = new HTMLTable(2, "Kundenadresse");
     $TAdresse->setColWidth(1, 26);
     $TAdresse->setTableStyle("width:100%;");
     $TAdresse->addRow(array(new Button("Adresse", "home", "iconic"), $BCheckG . $BCheckK . $BUpdate . $Adresse->getHTMLFormattedAddress()));
     $TAdresse->setColStyle(1, "vertical-align:top;");
     $TPosten = new HTMLTable(7, "Auftragspositionen");
     $TPosten->setTableStyle("width:100%;");
     #$TPosten->addColStyle(3, "text-align:right;");
     $TPosten->addColStyle(4, "text-align:right;");
     $TPosten->addColStyle(5, "text-align:right;");
     $TPosten->addColStyle(6, "text-align:right;color:grey;");
     $TPosten->setColWidth(1, 26);
     $TPosten->setColWidth(2, 80);
     $TPosten->setColWidth(4, 80);
     $TPosten->setColWidth(5, 80);
     $TPosten->setColWidth(6, 80);
     $TPosten->setColWidth(7, 20);
     $AC = anyC::get("Posten", "GRLBMID", $Beleg->getID());
     $AC->addOrderV3("PostenID");
     $i = 0;
     $O = new Button("Positionen", "list", "iconic");
     while ($P = $AC->getNextEntry()) {
         $B = new Button("Position löschen", "trash_stroke", "iconic");
         $B->onclick("CustomerPage.rme('delPosten', {PostenID: '" . $P->getID() . "'}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
         $I = new HTMLInput("mwst", "text", Util::CLNumberParserZ($P->A("menge")));
         $I->style("text-align:right;width:80px;");
         $I->onEnter("\$j(this).trigger('blur');");
         $I->onblur("CustomerPage.rme('setMenge', {PostenID: '" . $P->getID() . "', menge: this.value}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
         $TPosten->addRow(array($i == 0 ? $O : "", $I, $P->A("name"), Util::CLNumberParserZ($P->A("preis")), Util::CLNumberParserZ($P->A("menge") * $P->A("preis")), Util::CLNumberParserZ($P->A("mwst")) . "%", $B));
         $i++;
     }
     if ($AC->numLoaded() == 0) {
         $TPosten->addRow(array($O, "Bitte fügen Sie einen Artikel hinzu."));
         $TPosten->addRowColspan(2, 6);
         $TPosten->setColWidth(2, "100%");
         $TPosten->setColStyle(2, "text-align:left;");
     }
     $TSumme = new HTMLTable(3);
     $TSumme->setTableStyle("width:100%;border-top:1px solid #AAA;margin-top:30px;");
     $TSumme->setColWidth(1, 26);
     $TSumme->addColStyle(3, "text-align:right;");
     $TSumme->addRow(array("", "Netto: <b>" . Util::CLFormatCurrency($Beleg->A("nettobetrag") * 1, true) . "</b>", "Brutto: <b>" . Util::CLFormatCurrency($Beleg->A("bruttobetrag") * 1, true) . "</b>"));
     $IZahlungsart = new HTMLInput("zahlungsart", "select", $Beleg->A("GRLBMpayedVia"), GRLBM::getPaymentVia(null, array("transfer", "debit")));
     $IZahlungsart->onchange("if(this.value == 'debit') \$('#rowZahlungsart').show(); else \$('#rowZahlungsart').hide(); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IBankleitzahl = new HTMLInput("bankleitzahl", "text", $Beleg->A("GRLBMBankleitzahl"));
     $IBankleitzahl->placeholder("Bankleitzahl");
     $IBankleitzahl->style("margin-top:10px;text-align:right;width:130px;");
     $IBankleitzahl->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IKontonummer = new HTMLInput("kontonummer", "text", $Beleg->A("GRLBMKontonummer"));
     $IKontonummer->placeholder("Kontonummer");
     $IKontonummer->style("margin-top:10px;text-align:right;margin-left:10px;width:130px;");
     $IKontonummer->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     #$IBIC = new HTMLInput("bic");
     #$IIBAN = new HTMLInput("iban");
     $BCheck = new Button("Prüfung", "question_mark", "iconic");
     $BCheck->id("ktoCheck");
     $BCheck->style("margin-left:8px;");
     $TZahlungsart = new HTMLTable(2, "Zahlungsart");
     $TZahlungsart->setTableStyle("width:100%;");
     $TZahlungsart->setColWidth(1, 26);
     $TZahlungsart->addRow(array(new Button("Zahlungsart", "pin", "iconic"), $IZahlungsart));
     $TZahlungsart->addRowColspan(2, 2);
     $TZahlungsart->addCellStyle(1, "vertical-align:top;");
     $TZahlungsart->addRow(array("", $IBankleitzahl . " " . $IKontonummer . "{$BCheck} <div id=\"bankMessage\" style=\"margin-top:6px;\">&nbsp;</div>"));
     $TZahlungsart->setRowID("rowZahlungsart");
     if ($Beleg->A("GRLBMpayedVia") != "debit") {
         $TZahlungsart->addRowStyle("display:none;");
     } else {
         echo OnEvent::script("CustomerPage.saveKontodaten();");
     }
     $IBemerkung = new HTMLInput("bemerkung", "textarea", $Beleg->A("textbausteinUnten"));
     $IBemerkung->style("width:100%;height:100px;margin-top:40px;");
     $IBemerkung->placeholder("Bemerkungen");
     #$IBemerkung->onblur("");
     $IBemerkung->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveBemerkung, 300);");
     $TZahlungsart->addRow(array(new Button("Bemerkung", "document_alt_stroke", "iconic"), $IBemerkung));
     #$TSumme->addRowColspan(2, 2);
     $TZahlungsart->addCellStyle(1, "vertical-align:top;padding-top:40px;");
     $IOK = new Button("Abschließen");
     $IOK->className("submitFormButton");
     $IOK->onclick("\$(window).unbind('beforeunload'); document.location.href='?CC=Auftrag&page=1';");
     $IC = new Button("Abbrechen");
     $IC->className("submitFormButton");
     $IC->style("background-color:#DDD;color:grey;float:none;");
     $IC->onclick("\$(window).unbind('beforeunload'); CustomerPage.rme('cancelAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(){ document.location.href='?CC=Auftrag&page=2'; });");
     $TZahlungsart->addRow(array("", $IC . $IOK));
     $TZahlungsart->addCellStyle(2, "padding-top:50px;");
     #$TZahlungsart->addCellStyle(3, "padding-top:50px;");
     $html = "<h1>Auftrag</h1>\n\t\t\t\t{$TAdresse}\n\t\t\t\t{$TPosten}\n\t\t\t\t{$TSumme}\n\t\t\t\t{$TZahlungsart}";
     return $html . OnEvent::script("\n\t\t\tCustomerPage.timeout = null;\n\t\t\tCustomerPage.saveBemerkung  = function(){ CustomerPage.rme('setBemerkung', {GRLBMID: {$data['GRLBMID']}, bemerkung: \$('textarea[name=bemerkung]').val() }); };\n\t\t\tCustomerPage.saveKontodaten = function(){ CustomerPage.rme('setKontodaten', {\n\t\t\t\tGRLBMID: {$data['GRLBMID']},\n\t\t\t\tzahlungsart: \$('select[name=zahlungsart]').val(),\n\t\t\t\tkontonummer: \$('input[name=kontonummer]').val(),\n\t\t\t\tbankleitzahl: \$('input[name=bankleitzahl]').val()\n\t\t\t}, function(t){ \$('#bankMessage').html(t); }); };");
 }
Esempio n. 25
0
 public function operationsButton()
 {
     $pluginName = str_replace("GUI", "", get_class($this->object));
     $id = $this->object->getID();
     $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $pluginName);
     $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $pluginName);
     /*if($this->texts == null) {
     			$c = $this->loadLanguageClass("HTML");
     			$this->texts = $c->getEditTexts();
     		}*/
     $html = "";
     if (PMReflector::implementsInterface($pluginName, "iNewWithValues") and $userCanCreate) {
         $os = "1";
     } else {
         $os = "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iCloneable") and $userCanCreate) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if ((PMReflector::implementsInterface($pluginName, "iDeletable") or PMReflector::implementsInterface($pluginName, "iDeletable2")) and $userCanDelete) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iRepeatable") and Session::isPluginLoaded("mRepeatable")) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iXMLExport")) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if ($id != -1 and $os != "00000") {
         $B = new Button("Operationen", "wrench", "iconic");
         $B->style("float:right;margin-top:-3px;");
         $B->contextMenu("HTML", "operations:{$pluginName}:{$id}:{$os}", "Operationen");
         $html = $B;
     }
     #$html .= "<img title=\"Operationen\" id=\"".$pluginName."Operations\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','operations:$pluginName:$id:$os','".$this->texts["Operationen"].":');\" style=\"float:right;\" />";
     return $html;
 }
Esempio n. 26
0
 public function getEmailData()
 {
     $recipients = array();
     $recipients[0] = array($this->A("firma") != "" ? $this->A("firma") : $this->A("vorname") . " " . $this->A("nachname"), $this->A("email"));
     if (Session::isPluginLoaded("mAnsprechpartner")) {
         $AC = Ansprechpartner::getAllAnsprechpartnerToAdresse($this->getID());
         while ($A = $AC->getNextEntry()) {
             $recipients[$A->getID()] = array($A->A("AnsprechpartnerVorname") . " " . $A->A("AnsprechpartnerNachname"), $A->A("AnsprechpartnerEmail"));
         }
     }
     return array("fromName" => Session::currentUser()->A("name"), "fromAddress" => Session::currentUser()->A("UserEmail"), "recipients" => $recipients, "subject" => "", "body" => "");
 }
Esempio n. 27
0
 function getHTML($id)
 {
     #$showHelp = true;
     if ($this->collector == null) {
         $this->lCV3($id);
     }
     $singularLanguageClass = $this->loadLanguageClass("Installation");
     $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : "";
     if ($id == -1) {
         echo OnEvent::script(OnEvent::rme($this, "getActions", "", "function(transport){ contentManager.contentBelow(transport.responseText); }"));
     }
     $hasDBConnection = false;
     try {
         mUserdata::getGlobalSettingValue("DBVersion", false);
         $hasDBConnection = true;
     } catch (Exception $e) {
     }
     $g = "";
     $DBFilePath = Util::getRootPath() . "system/DBData/Installation.pfdb.php";
     $writable = new HTMLTable(1);
     $File = new File($DBFilePath);
     $File->loadMe();
     if (!$File->A("FileIsWritable") and !$hasDBConnection) {
         return;
     }
     if (!$File->A("FileIsWritable")) {
         $writable->addRow("<img src=\"./images/navi/restrictions.png\" style=\"float:left;margin-right:10px;\"/>Die Datei " . $DBFilePath . " ist nicht beschreibbar, Änderungen können nicht gespeichert werden.<br /><br />Machen Sie die Datei mit einem FTP-Programm beschreibbar. Klicken Sie dazu mit der rechten Maustaste auf die Datei auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 666 an, damit sie durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.");
         $g .= $writable->getHTML();
     }
     $gui = new HTMLGUI();
     $gui->setName("Datenbank-Zugangsdaten");
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->setCollectionOf($this->collectionOf, "Datenbank-Zugangsdaten");
     $gui->hideAttribute("password");
     $gui->hideAttribute("httpHost");
     $gui->hideAttribute("InstallationID");
     if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
         $UA = $_SESSION["S"]->getCurrentUser()->getA();
         if ($UA->name != "Installations-Benutzer") {
             $g = "In der Demo können keine Datenbank-Zugangsdaten geändert werden!";
             $gui->setIsDisplayMode(true);
         }
     }
     if (!Session::isPluginLoaded("multiInstall")) {
         $gui->setIsDisplayMode(true);
         $gui->setEditInDisplayMode(true, "contentLeft");
     }
     #try {
     $g .= $gui->getBrowserHTML($id);
     #} catch (Exception $e){
     #	$t->addRow(array("Etwas stimmt nicht, eine ".get_class($e)." wurde abgefangen!"));
     #	$t->addRow(array("<span style=\"font-size:8px;\">".nl2br(str_replace("#","\n#", $e->getTraceAsString()))."</span>"));
     #}
     /*	$help = "
     	<script type=\"text/javascript\">
     		contentManager.rmePCR('mInstallation','','getHelp','true','if(checkResponse(transport)) { Popup.create(\'123\', \'Installation\', \'Hilfe\'); Popup.update(transport, \'123\', \'Installation\'); }');
     	</script>";*/
     $ST = new HTMLSideTable("left");
     try {
         #$MailServer = LoginData::get("MailServerUserPass");
         #$MailServerID = $MailServer == null ? -1 : $MailServer->getID();
         $BMail = $ST->addButton("Mail-Server", "./plugins/Installation/serverMail.png");
         #$BMail->popup("edit", "Mail-Server", "LoginData", $MailServerID, "getPopup", "", "LoginDataGUI;preset:mailServer");
         $BMail->popup("edit", "Mail-Server", "mInstallation", -1, "manageMailservers");
         $BTestMail = $ST->addButton("Mailversand\ntesten", "mail");
         $BTestMail->popup("mailTest", "Mailversand testen", "mInstallation", "-1", "testMailGUI");
         if (Session::isPluginLoaded("mJabber")) {
             $JabberServer = LoginData::get("JabberServerUserPass");
             $JabberServerID = $JabberServer == null ? -1 : $JabberServer->getID();
             $BJabber = $ST->addButton("Jabber-Server", "./plugins/Installation/serverMail.png");
             $BJabber->popup("edit", "Jabber-Server", "LoginData", $JabberServerID, "getPopup", "", "LoginDataGUI;preset:jabberServer");
         }
         $BackupButton = $ST->addButton("Daten-\nsicherungen", "disk");
         $BackupButton->onclick("contentManager.loadFrame('contentLeft','BackupManager');");
     } catch (Exception $e) {
     }
     return $ST . $g;
     #.$t->getHTML();
     $t = new HTMLTable(1);
     try {
         $user = new User(1);
         $user->loadMe();
     } catch (DatabaseNotSelectedException $e) {
         if (BPS::getProperty("mInstallationGUI", "showErrorText", false)) {
             $t->addRow(isset($text["noDatabase"]) ? $text["noDatabase"] : "Es wurde kein korrekter Datenbankname angegeben.<br /><br />Bitte geben Sie eine existierende Datenbank an, sie wird nicht automatisch erzeugt.");
             $t->addRowClass("backgroundColor0");
             $t->addRowStyle("color:red;");
         }
         return $g . $t->getHTML();
         #.$help;
     } catch (NoDBUserDataException $e) {
         if (BPS::getProperty("mInstallationGUI", "showErrorText", false)) {
             $t->addRow(isset($text["wrongData"]) ? $text["wrongData"] : "Mit den angegebenen Datenbank-Zugangsdaten kann keine Verbindung aufgebaut werden.<br /><br />Wenn sie korrekt sind, werden hier weitere Möglichkeiten angezeigt angezeigt.");
             $t->addRowClass("backgroundColor0");
             $t->addRowStyle("color:red;");
         }
         if (PHYNX_MAIN_STORAGE == "MySQL") {
             try {
                 $DB1 = new DBStorageU();
                 $B = new Button("Hinweis", "notice", "icon");
                 $B->style("float:left;margin-right:10px;");
                 $File = new File(Util::getRootPath() . "system/connect.php");
                 $BR = new Button("DB-Verbindung\numstellen", "lieferschein");
                 $BR->style("float:right;margin-left:10px;");
                 $BR->rmePCR("mInstallation", "-1", "switchDBToMySQLo", "", "Installation.reloadApp();");
                 $BR = "Verwenden Sie den nebenstehenden Knopf, um die Verbindungsart auf die ältere Version umzustellen.<br />{$BR} Sie müssen sich anschließend erneut anmelden.";
                 $BReload = new Button("Ansicht\naktualisieren", "refresh");
                 $BReload->onclick("contentManager.emptyFrame('contentLeft'); contentManager.loadFrame('contentRight', 'mInstallation', -1, 0, 'mInstallationGUI;-');Popup.closeNonPersistent();");
                 $BReload->style("float:right;margin:10px;");
                 if (!$File->A("FileIsWritable")) {
                     $BR = "Bitte machen Sie die Datei /system/connect.php für den Webserver beschreibbar, damit phynx auf die ältere Verbindungsart umstellen kann.<br /><br />Verwenden Sie dazu Ihr FTP-Programm. Klicken Sie mit der rechten Maustaste auf die Datei auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 666 an, damit sie durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.{$BReload}";
                 }
                 $t->addRow(array("{$B} <b>Möglicherweise ist die MySQLi-Erweiterung auf Ihrem Server nicht korrekt konfiguriert.</b><br /><br />{$BR}"));
                 $t->addRowClass("backgroundColor0");
             } catch (Exception $e) {
                 #echo "MySQL geht auch nicht!";
             }
         }
         return $g . $t->getHTML();
         #.$help;
     } catch (TableDoesNotExistException $e) {
     } catch (StorageException $e) {
     }
     /*$help = "
     	<script type=\"text/javascript\">
     		rme('mInstallation','','getHelp','false','if(checkResponse(transport)) { Popup.create(\'123\', \'Installation\', \'Hilfe\'); Popup.update(transport, \'123\', \'Installation\'); }');
     	</script>";*/
     /*if(false AND $id == -1) {
     			$BackupTab = new HTMLTable(1);
     
     			$BackupButton = new Button("Backup-\nManager","disk");
     			$BackupButton->style("float:right;");
     			$BackupButton->onclick("contentManager.loadFrame('contentLeft','BackupManager');");
     
     			$BackupTab->addRow($BackupButton);
     
     			$BUT = new Button((isset($text["alle Tabellen aktualisieren"]) ? $text["alle Tabellen aktualisieren"] : "alle Tabellen\naktualisieren"), "update");
     			$BUT->rmePCR("mInstallation", "", "updateAllTables", "", "$('contentLeft').update(transport.responseText);");
     
     			$g .= "
     	<div style=\"height:30px;\"></div>
     	$BackupTab
     	<div class=\"Tab backgroundColor1\"><p>Plugins</p></div>
     	<table>
     		<colgroup>
     			<col style=\"width:100px;\" class=\"backgroundColor2\" />
     			<col class=\"backgroundColor3\" />
     		</colgroup>
     		<tr>
     			<td colspan=\"3\">
     				<span style=\"float:right;\">".Installation::getReloadButton()."</span>
     				$BUT
     			</td>
     		</tr>
     		<tr>
     			<td style=\"background-color:white;\"></td>
     		</tr>";
     
     			$p = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins());
     			
     			
     			foreach($p as $key => $value){
     				try {
     					if(method_exists($_SESSION["CurrentAppPlugins"], "isPluginGeneric") AND $_SESSION["CurrentAppPlugins"]->isPluginGeneric($key)){
     						$c = new mGenericGUI('', $key);
     					} else {
     						$c = new $key();
     					}
     				} catch (ClassNotFoundException $e){
     					$key2 = $key."GUI";
     					
     					try {
     						$c = new $key2();
     					} catch (ClassNotFoundException $e2){
     						continue;
     					}
     				}
     				if($key == "CIs") continue;
     				
     
     				if($c->checkIfMyTableExists() AND $c->checkIfMyDBFileExists()) $showHelp = false;
     
     				if(!$c->checkIfMyDBFileExists())
     					continue;
     
     				$g .= "
     		<tr>
     			<td style=\"font-weight:bold;text-align:right;\">".($value != -1 ? $value : $key )."</td>
     			<td>".(!$c->checkIfMyTableExists() ? ($c->checkIfMyDBFileExists() ? "<input type=\"button\" value=\"".(isset($text["Tabelle anlegen"]) ? $text["Tabelle anlegen"] : "Tabelle anlegen")."\" onclick=\"installTable('$key');\" />" : "keine DB-Info-Datei" ) : ($c->checkIfMyDBFileExists() ? "<input type=\"button\" onclick=\"checkFields('$key');\" value=\"Tabellenupdate\" style=\"float:right;width:140px;\" />".(isset($text["Tabelle existiert"]) ? $text["Tabelle existiert"] : "Tabelle existiert") : (isset($text["keine DB-Info-Datei"]) ? $text["keine DB-Info-Datei"] : "keine DB-Info-Datei"))."")."</td>
     		</tr>";
     			}
     
     			$g .= "
     	</table>";
     		}*/
     #$showHelp = false;
     #if(!$showHelp)
     #	$help = OnEvent::script(OnEvent::closePopup("123", "Installation"));
     return $ST . $g;
     #.$help;
 }
Esempio n. 28
0
 public static function getLangCurrencyFactor($language)
 {
     if (!Session::isPluginLoaded("mSprache")) {
         return 1;
     }
     $Sprache = anyC::getFirst("Sprache", "SpracheIdentifier", $language);
     if ($Sprache == null) {
         return 1;
     }
     return $Sprache->A("SpracheWaehrungFaktor") * 1;
 }
Esempio n. 29
0
 public function getHTML($id)
 {
     #$_SESSION["BPS"]->unregisterClass(get_class($this));
     $defaultAnsicht = "monat";
     if (Applications::activeApplication() == "personalKartei") {
         $defaultAnsicht = "jahr";
     }
     $ansicht = mUserdata::getUDValueS("KalenderAnsicht", $defaultAnsicht);
     #$ansicht = $ansicht->getUDValue("KalenderAnsicht");
     #if($ansicht == null) $ansicht = "monat";
     $display = mUserdata::getUDValueS("KalenderDisplay" . ucfirst($ansicht), "0");
     $BThis = new Button("", "arrow_down", "iconicG");
     $BThis->style("float:left;margin-top:-6px;margin-right:5px;");
     $Calendars = "";
     Registry::reset("Kalender");
     while ($C = Registry::callNext("Kalender", "categories")) {
         if (!$C) {
             continue;
         }
         foreach ($C as $tab) {
             $Calendars .= "<div onclick=\"{$tab->onclick}\">" . ($tab->isCurrent ? $BThis : "") . " {$tab->label}</div>";
         }
     }
     // <editor-fold defaultstate="collapsed" desc="styles">
     $html = "\n\t\t\n\t\t<style type=\"text/css\">\n\t\t.Day {\n\t\t\t-moz-user-select:none;\n\t\t\tborder-left:1px solid #EEE;\n\t\t\tborder-bottom:1px solid #EEE;\n\t\t}\n\t\t\n\t\t/*.Day:hover {\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tpadding:2px;\n\t\t}*/\n\n\t\t.dayOptions {\n\t\t\tdisplay:none;\n\t\t}\n\n\t\t.Day:hover .dayOptions {\n\t\t\tdisplay:inline;\n\t\t}\n\n\t\t.Termin {\n\t\t\tposition:relative;\n\t\t\tleft:44px;\n\t\t\tcursor:pointer;\n\t\t\twidth:150px;\n\t\t\tfloat:left;\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tmargin-right:3px;\n\t\t}\n\t\t\n\t\t.KalenderButton {\n\t\t\topacity:0.5;\n\t\t}\n\t\t\n\t\t.KalenderButton:hover {\n\t\t\topacity:1;\n\t\t}\n\t\t\n\t\t.KalenderUser {\n\t\t\tmargin-left:10px;\n\t\t}\n\t\t\n\t\t.KalenderUser div {\n\t\t\tpadding:10px;\n\t\t\tpadding-top:10px;\n\t\t\tpadding-bottom:5px;\n\t\t\tdisplay:inline-block;\n\t\t\tmargin-right:20px;\n\t\t\tcursor:pointer;\n\t\t\tmin-width:150px;\n\t\t}\n\t\t\n\t\t.cellHeight {\n\t\t}\n\t\t\n\t\t.ui-datepicker {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t#contentScreen tr:hover {\n\t\t\tbackground-color:inherit;\n\t\t}\n\n\t\t#calendar1stMonth .ui-datepicker-prev, #calendar1stMonth .ui-datepicker-next/*,\n\t\t#calendar2ndMonth .ui-datepicker-prev, #calendar2ndMonth .ui-datepicker-next */{\n\t\t\tdisplay:none;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-widget-content,\n\t\t#calendar2ndMonth .ui-widget-content, \n\t\t#calendar2ndMonth .ui-widget-content .ui-state-default,\n\t\t#calendar1stMonth .ui-widget-content .ui-state-default {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-datepicker-header,\n\t\t#calendar2ndMonth .ui-datepicker-header {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t/*@media only screen and (max-height: 820px) {\n\t\t\t.cellHeight {\n\t\t\t\theight:55px;\n\t\t\t}\n\t\t}*/\n\t\t</style>";
     // </editor-fold>
     $BLeft = new Button("Zurück", "back", "icon");
     $BLeft->rmePCR("mKalender", "", "setDisplay", $display - 1, "contentManager.loadFrame('contentScreen','mKalender');");
     $BLeft->style("margin-right:10px;");
     $BRight = new Button("Weiter", "navigation", "icon");
     $BRight->rmePCR("mKalender", "", "setDisplay", $display + 1, "contentManager.loadFrame('contentScreen','mKalender');");
     $BRight->style("margin-right:10px;");
     $BToday = new Button("Aktuelles Datum", "down", "icon");
     $BToday->rmePCR("mKalender", "", "setToday", '', "contentManager.loadFrame('contentScreen','mKalender');");
     $BToday->style("margin-right:10px;");
     $BJahr = new Button("Jahr", "./ubiquitous/Kalender/month.png", "icon");
     $BJahr->rmePCR("mKalender", "", "setView", "jahr", "contentManager.loadFrame('contentScreen','mKalender');");
     $BJahr->style("margin-right:10px;" . ($ansicht != "jahr" ? "opacity:0.5;" : ""));
     $BJahr->id("jahrButton");
     $BMonat = new Button("Monat", "./ubiquitous/Kalender/month.png", "icon");
     $BMonat->rmePCR("mKalender", "", "setView", "monat", "contentManager.loadFrame('contentScreen','mKalender');");
     $BMonat->style("margin-right:10px;" . ($ansicht != "monat" ? "opacity:0.5;" : ""));
     $BMonat->id("monatButton");
     $BWoche = new Button("Woche", "./ubiquitous/Kalender/workweek.png", "icon");
     $BWoche->rmePCR("mKalender", "", "setView", "woche", "contentManager.loadFrame('contentScreen','mKalender');");
     $BWoche->style("margin-right:10px;" . ($ansicht != "woche" ? "opacity:0.5;" : ""));
     $BWoche->id("wocheButton");
     $BTag = new Button("Tag", "./ubiquitous/Kalender/day.png", "icon");
     $BTag->rmePCR("mKalender", "", "setView", "tag", "contentManager.loadFrame('contentScreen','mKalender');");
     $BTag->style("margin-right:10px;" . ($ansicht != "tag" ? "opacity:0.5;" : ""));
     $BTag->id("tagButton");
     if (Applications::activeApplication() == "personalKartei") {
         $BTag = "";
         $BWoche = "";
         $BMonat = "";
     }
     if (Applications::activeApplication() != "personalKartei") {
         $BJahr = "";
     }
     $ST = new HTMLTable(1);
     $ST->setColClass(1, "");
     #$ST->setTableStyle("width:40px;margin:0px;margin-right:-215px;float:right;/*margin-right:-50px;margin-top:95px;*/");
     $newWindow = new Button("Kalender in neuem Fenster öffnen", "new_window", "iconicL");
     $newWindow->style("margin-right:10px;");
     $newWindow->newSession("Mail", Applications::activeApplication(), "mKalender", "Kalender");
     if (Session::physion()) {
         $newWindow = "";
     }
     $reminder = "";
     if (Session::isPluginLoaded("mReminder")) {
         $reminder = Reminder::getButton();
         $reminder->style("margin-right:10px;");
     }
     $ST->addRow("<div id=\"calendar1stMonth\"></div>");
     $ST->addRow("<div id=\"calendar2ndMonth\"></div>");
     $TC = "KalenderView" . ucfirst($ansicht);
     $TC = new $TC();
     $TCalendars = "<div>";
     if (trim($Calendars) != "") {
         $TCalendars .= "<div class=\"KalenderUser\">" . $Calendars . "</div>";
     }
     $TCalendars .= "</div>";
     $pCalButton = "";
     if (Session::isPluginLoaded("mpCal")) {
         $pCalButton = pCal::getTBButton();
         $pCalButton->type("icon");
         $pCalButton->style("margin-right:10px;");
     }
     $GoogleButton = "";
     $GoogleDLButton = "";
     if (Session::isPluginLoaded("mGoogle")) {
         $GoogleButton = LoginData::getButtonU("GoogleAccountUserPass", "Google-Daten bearbeiten", "./ubiquitous/Google/google.png");
         $GoogleButton->type("icon");
         $GoogleButton->style("margin-right:10px;");
         $GoogleDLButton = new Button("Daten herunterladen", "./ubiquitous/Google/googleDL.png", "icon");
         $GoogleDLButton->popup("", "Daten herunterladen", "Google", "-1", "syncByDateRange", array("'" . date("Y-m-d", $TC->getFirst()) . "'", "'" . date("Y-m-d", $TC->getLast()) . "'"));
         $GoogleDLButton->style("margin-right:10px;");
     }
     $xCalButton = "";
     if (Session::isPluginLoaded("mxCal")) {
         $xCalButton = xCal::getButton();
         $xCalButton->style("margin-right:10px;");
     }
     $BShare = new Button("Kalender teilen", "fork", "iconicL");
     $BShare->popup("", "Kalender teilen", "mKalender", "-1", "share");
     $BShare->style("margin-right:10px;");
     #$AWVButton = new Button("Müllabfuhr-Daten herunterladen", "trash_stroke", "iconicL");
     #$AWVButton->popup("", "Müllabfuhr-Daten", "mKalender", "-1", "downloadTrashData");
     $AWVButton = "";
     $ST->addRow($pCalButton . $GoogleButton . $GoogleDLButton);
     $html .= "\n\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"padding-top:30px;padding-bottom:15px;padding-left:0px;\">\n\t\t\t\t\t{$newWindow}{$BShare}{$AWVButton}{$xCalButton}{$reminder}\n\t\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<div style=\"margin-right:270px;\">\n\t\t<div id=\"KalenderTitle\" class=\"prettyTitle\">\n\t\t\t\n\t\t\t<span style=\"float:right;\">\n\t\t\t\t{$BLeft}{$BToday}{$BRight}\n\t\t\t</span>\n\t\t\t<div style=\"float:right;margin-right:100px;\">{$BTag}{$BWoche}{$BMonat}{$BJahr}</div>\n\t\t\t" . $TC->getTitle() . "\n\t\t</div>\n\t\t</div>\n\t\t<div id=\"KalenderAuswahl\">\n\t\t\t{$TCalendars}\n\t\t</div>\n\t\t" . $TC->getHeader() . "\n\t\t<div id=\"KalenderWrapper\" style=\"overflow:auto;\">\n\t\t\t" . ($ansicht != "jahr" ? "\n\t\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"height:23px;\"></div>{$ST}\n\t\t\t</div>" : "") . "\n\t\t\t<div style=\"" . ($ansicht != "jahr" ? "margin-right:270px;" : "") . "\">\n\n\t\t\t" . $TC->getTable($this) . "\n\t\t\t</div>\n\t\t</div>";
     $nextMonths = new Datum();
     $nextMonths->setToMonth1st();
     $thisMonth = $nextMonths->time();
     $nextMonths->addMonth();
     $nextMonth = $nextMonths->time();
     $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar1stMonth').datepicker({ minDate: '" . date("d.m.Y", $thisMonth) . "'" . ($TC->getCurrent()->time() < $nextMonth ? ",defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true,  showOtherMonths: true, onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t\t\t\n\t\t\$j('.KalenderUser div[class!=backgroundColor1]').hover(function(){ \$j(this).addClass('backgroundColor2'); }, function(){ \$j(this).removeClass('backgroundColor2'); });\n\t\tfitKalender();\n\t\t\t\n\t\t\$j(window).resize(function() {\n\t\t\tfitKalender();\n\t\t});\n\t\t\n\t\t});\n\t\t\n\t\tfunction fitKalender(){\n\t\t\tif(!\$j('#KalenderTitle').length)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t//console.log(\$j('#KalenderTitle').outerHeight());\n\t\t\t//console.log(\$j('#KalenderAuswahl').outerHeight());\n\t\t\tvar height = (contentManager.maxHeight() - \$j('#KalenderAuswahl').outerHeight() - \$j('#KalenderTitle').outerHeight() - \$j('#KalenderHeader').outerHeight()) + 4;\n\t\t\tvar width = contentManager.maxWidth();\n\t\t\t\n\t\t\t\$j('#KalenderWrapper').css('height', height);\n\t\t\t\$j('#KalenderWrapper').css('width', width);\n\n\t\t\tvar cellHeight = (height - \$j('#KalenderTable tr:first th').parent().outerHeight()) / (\$j('#KalenderTable tr').length - " . (($ansicht == "monat" or $ansicht == "jahr") ? "1" : "0") . ") - 1;\n\t\t\t\$j('.cellHeight').css('height', cellHeight+'px');\n\t\t\t\$j('.innerCellHeight').css('height', (cellHeight - \$j('.innerCellTitle:visible').outerHeight())+'px');\n\t\t\t\n\t\t\tif(\$j('#KalenderHeader').length > 0){\n\t\t\t\t//console.log(\$j('#KalenderHeader tr:first th'));\n\t\t\t\t\$j('#KalenderTable tr:first td').each(function(k, v){\n\t\t\t\t\t\n\t\t\t\t\t\$j(\$j('#KalenderHeader tr:first th')[k]).css('width', \$j(v).width());\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tif(\$j('#tagDiv').length) {\n\t\t\t\t\$j('#tagDiv').css('width', \$j('#KalenderTable tr').width()+'px');\n\t\t\t\t\$j('#tagDiv').animate({scrollTop: 7*40}, 0);\n\t\t\t\tvar pos = \$j('#tagDiv').offset();\n\t\t\t\tpos.position = 'absolute';\n\n\t\t\t\t\$j('#tagDiv').css(pos)\n\t\t\t}\n\t\t}") . "\n\t\t<style type=\"text/css\">\n\t\t\t" . ($TC->getCurrent()->time() < $thisMonth ? "#calendar1stMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t" . ($TC->getCurrent()->time() < $nextMonth ? "#calendar2ndMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t.ui-datepicker-week-col { color:grey; text-align:left; }\n\t\t\ttr td.ui-datepicker-week-col {text-align:left;font-size:10px; }\n\t\t\t/*.ui-datepicker-week-end { background-color:#DDD; }*/\n\t\t</style>";
     $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar2ndMonth').datepicker({ minDate: '" . date("d.m.Y", $nextMonth) . "'" . ($TC->getCurrent()->time() >= $nextMonth ? ", defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true, showOtherMonths: true,  onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t});");
     return $html;
 }
Esempio n. 30
0
 function deleteMe()
 {
     mUserdata::checkRestrictionOrDie("cantDelete" . str_replace("GUI", "", get_class($this)));
     if (Session::isPluginLoaded("mArchiv")) {
         Archiv::archive($this);
     }
     $this->loadAdapter();
     if (!$this->noDeleteHideOnly) {
         $this->Adapter->deleteSingle($this->getClearClass(get_class($this)));
     } else {
         $this->loadMe();
         $this->A->isDeleted = 1;
         $this->saveMe();
     }
 }