Ejemplo n.º 1
0
 public function getHTML($id)
 {
     try {
         $U = new mUserdata();
         $U->addAssocV3("typ", "=", $_SESSION["applications"]->getActiveApplication() . "DesktopLink");
         $U->addAssocV3("UserID", "=", $_SESSION["S"]->getCurrentUser()->getID());
         $U->addOrderV3("wert");
         $U->addOrderV3("UserdataID");
         $U->lCV3();
     } catch (Exception $e) {
         return "";
     }
     $html = "";
     while ($t = $U->getNextEntry()) {
         $e = explode(";", $t->A("name"));
         $v = explode(";", $t->A("wert"));
         $B = new Button($v[2], $v[1]);
         $B->type("icon");
         $B->onclick("DesktopLink.hide(); contentManager.loadFrame('{$e['2']}', '{$e['0']}', '{$e['1']}')");
         $BS = new Button("Einstellungen", "./images/i2/settings.png");
         $BS->type("icon");
         $BS->className("DesktopLinkSettings");
         $BS->rmePCR("DesktopLink", "", "editInWindow", $t->getID(), "Popup.displayNamed('DesktopLinkPopup','Desktop-Link bearbeiten', transport);");
         $BM = new Button("Verschieben", "./images/i2/moveLeftRight.png");
         $BM->type("icon");
         $BM->className("DesktopLinkHandler");
         $html .= "<li id=\"DesktopLink_" . $t->getID() . "\" class=\"DesktopLinkIcon\">{$BS}{$BM}{$B}" . "<p>" . $v[2] . "</p></li>";
     }
     if ($html != "") {
         echo "<ul id=\"DesktopLinkElements\">{$html}</ul><div style=\"clear:both;\"></div>";
     }
 }
Ejemplo n.º 2
0
 protected function createObject($params)
 {
     if (empty($params['name']) || is_int($params['name'])) {
         throw new \Exception('Please get the name for control');
     }
     if (empty($params['type']) && empty($params['class'])) {
         $params['class'] = Button::className();
     }
     if (isset($params['type'])) {
         $type = $params['type'];
         if (isset(static::$builtInColumns[$type])) {
             $type = static::$builtInColumns[$type];
         }
         if (is_array($type)) {
             $params = array_merge($type, $params);
         } else {
             $params['class'] = $type;
         }
     }
     return Yii::createObject($params, [$this->owner]);
 }
Ejemplo n.º 3
0
 public function getArtikel($data)
 {
     $TKategorien = new HTMLTable(2, "Kategorien");
     $TKategorien->setTableStyle("width:100%;");
     $TKategorien->setTableID("tableKategorien");
     $TKategorien->setColWidth(1, 20);
     $B = new Button("Nach Kategorie filtern", "arrow_down", "iconic");
     $B->className("reverse");
     $AC = anyC::get("Kategorie", "type", "2");
     $AC->addOrderV3("name");
     $TKategorien->addRow(array($B, "Alle Kategorien"));
     $TKategorien->addRowClass("selectable");
     $TKategorien->addRowEvent("click", "CustomerPage.rme('getArtikel', {KategorieID: '', query : '{$data['query']}', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     if ($data["KategorieID"] == "") {
         $TKategorien->addRowStyle("text-decoration:underline;");
     }
     while ($K = $AC->getNextEntry()) {
         $B = new Button("Nach Kategorie filtern", "arrow_down", "iconic");
         if ($data["KategorieID"] != $K->getID()) {
             $B->className("reverse");
         }
         $TKategorien->addRow(array($B, $K->A("name")));
         $TKategorien->addRowClass("selectable");
         $TKategorien->addRowEvent("click", "CustomerPage.rme('getArtikel', {KategorieID: '" . $K->getID() . "', query : '{$data['query']}', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
         #if($data["KategorieID"] == $K->getID())
         #	$TKategorien->addRowStyle ("text-decoration:underline;");
     }
     $TArtikel = new HTMLTable(4, "Artikel");
     $TArtikel->setTableStyle("width:100%;");
     $TArtikel->setColWidth(1, 26);
     $TArtikel->setColWidth(2, 100);
     $TArtikel->setColStyle(4, "text-align:right;");
     $BQ = "";
     if ($data["query"] != "") {
         $BQ = new Button("Suche löschen", "x_alt", "iconic");
         $BQ->onclick("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : '', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
         $BQ->style("color:darkred;float:left;");
     } else {
         $BQ = new Button("Suche", "question_mark", "iconic");
     }
     $I = new HTMLInput("query", "text", $data["query"]);
     $I->placeholder("Suche nach Name, Nummer oder Beschreibung");
     $I->style("width:90%;");
     $I->onEnter("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : this.value, GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     $BS = new Button("Los", "arrow_right", "iconic");
     $BS->onclick("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : \$j('[name=query]').val(), GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     $TArtikel->addRow(array($BQ, $I . " " . $BS));
     $TArtikel->addRowColspan(2, 3);
     $AC = anyC::get("Artikel");
     if ($data["KategorieID"] != "") {
         $AC->addAssocV3("KategorieID", "=", $data["KategorieID"], "AND", "1");
     }
     if ($data["query"] != "") {
         $AC->addAssocV3("artikelnummer", "LIKE", "%{$data['query']}%", "AND", "2");
         $AC->addAssocV3("name", "LIKE", "%{$data['query']}%", "OR", "2");
         $AC->addAssocV3("beschreibung", "LIKE", "%{$data['query']}%", "OR", "2");
     }
     $AC->addOrderV3("artikelnummer");
     $AC->addOrderV3("name");
     $AC->setLimitV3(100);
     while ($A = $AC->getNextEntry()) {
         $B = new Button("Artikel hinzufügen", "arrow_left", "iconic");
         $B->className("reverse");
         #$B->onclick("CustomerPage.rme('delPosten', {PostenID: '".$P->getID()."'}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: $data[GRLBMID]}, function(transport){ $('#contentLeft').html(transport); }); });");
         $A->resetParsers();
         $TArtikel->addRow(array($B, $A->A("artikelnummer"), $A->A("name") . ($A->A("bemerkung") != "" ? "<br /><small style=\"color:grey;\">" . $A->A("bemerkung") . "</small>" : ""), $this->showPrices ? Util::CLFormatCurrency($A->getGesamtBruttoVK() * 1, true) . "<br /><small style=\"color:grey;\">" . Util::CLFormatCurrency($A->getGesamtNettoVK() * 1, true) . "</small>" : ""));
         $TArtikel->addRowClass("selectable");
         $TArtikel->addRowEvent("click", "CCAuftrag.lastTextbausteinUnten = \$('[name=textbausteinUnten]').val(); CustomerPage.rme('addArtikel', {ArtikelID: '" . $A->getID() . "', GRLBMID: {$data['GRLBMID']}}, function(transport){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
     }
     if ($AC->numLoaded() == 0) {
         $TArtikel->addRow(array("", "Keine Artikel gefunden"));
         $TArtikel->setColWidth(2, 200);
     }
     $html = "<h1>Artikel</h1>\n\t\t\t\t{$TKategorien}\n\t\t\t\t{$TArtikel}";
     return $html;
 }
Ejemplo n.º 4
0
 public function sendMessagePopup()
 {
     $AC = anyC::get("Device");
     $AC->addOrderV3("DeviceName");
     $B = new Button("Alle", "fullscreen", "touch");
     $B->className("nuntiusMessageTo");
     $B->id("nuntiusMessageTarget0");
     $B->onclick("\$j('.nuntiusMessageTo:not(#nuntiusMessageTarget0)').slideToggle(); \$j('#nuntiusMessageContainer').slideToggle();");
     $L = $B;
     while ($D = $AC->getNextEntry()) {
         $B = new Button($D->A("DeviceName"), "iphone", "touch");
         $B->className("nuntiusMessageTo");
         $B->id("nuntiusMessageTarget" . $D->getID());
         $B->onclick("\$j('.nuntiusMessageTo:not(#nuntiusMessageTarget" . $D->getID() . ")').slideToggle(); \$j('#nuntiusMessageContainer').slideToggle();");
         $L .= $B;
     }
     $BS = new Button("Senden", "arrow_right", "touch");
     $BS->style("margin-top:0px;height:190px;margin-bottom:0px;");
     $BS->rmePCR("mNuntius", "-1", "sendMessage", array("\$j('.nuntiusMessageTo:visible').attr('id').replace('nuntiusMessageTarget', '')", "\$j('[name=NuntiusMessage]').val()", "'Device:'+\$j.jStorage.get('phynxDeviceID', -1)"), "function(){ " . OnEvent::closePopup("mNuntius") . " }");
     $I = new HTMLInput("NuntiusMessage", "textarea");
     $I->style("width:100%;height:200px;max-width:400px;font-size:15px;");
     $I->placeholder("Nachricht...");
     echo "\n\t\t\t<div id=\"nuntiusTargets\" style=\"padding-top:15px;padding-bottom:1px;\">\n\t\t\t\t" . $L . "\n\t\t\t</div>\n\t\t\t<div style=\"display:none;padding-bottom:1px;\" id=\"nuntiusMessageContainer\">\n\t\t\t\t<div style=\"width:100px;float:right;\">{$BS}</div><div style=\"width:300px;\">{$I}</div>\n\t\t\t</div>";
 }
Ejemplo n.º 5
0
 function getBrowserHTML($lineWithId = -1)
 {
     $this->texts = $this->languageClass->getBrowserTexts();
     $singularLanguageClass = $this->loadLanguageClass($this->singularClass);
     $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $this->singularClass);
     $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $this->singularClass);
     $userHiddenFields = mUserdata::getHides($this->singularClass);
     $defaultTarget = "contentRight";
     if ($this->displaySide != "default") {
         $defaultTarget = "content" . ucfirst($this->displaySide);
     }
     if ($this->singularClass == "none") {
         echo "collectionOf is not set. See message log for further details.";
         throw new CollectionOfNotSetException();
     }
     if ($this->name == "Noname") {
         $_SESSION["messages"]->addMessage("There is no name set. You might use setName of HTMLGUI to do that.");
     }
     /**
      * ERROR-TABLE
      */
     $errorTab = new HTMLTable(1);
     if (isset($_SESSION["phynx_errors"]) and $lineWithId == -1 and ($_SERVER["HTTP_HOST"] == "dev.furtmeier.lan" or strpos(__FILE__, "nemiah") !== false)) {
         $errorTab->addRow("\n\t\t\t\t\t<img style=\"float:left;margin-right:10px;\" src=\"./images/navi/warning.png\" />\n\t\t\t\t\t<b>Es " . (count($_SESSION["phynx_errors"]) != 1 ? "liegen" : "liegt") . " " . count($_SESSION["phynx_errors"]) . " PHP-Fehler vor:</b><br />\n\t\t\t\t\t<a href=\"javascript:windowWithRme('Util','','showPHPErrors','');\">Fehler anzeigen</a>,<br />\n\t\t\t\t\t<a href=\"javascript:rme('Util','','deletePHPErrors','','contentManager.reloadFrameRight();');\">Fehler löschen</a>");
     }
     /**
      * RETURN-BUTTON
      */
     $returnTab = new HTMLTable(1);
     if ($this->isSelection) {
         $BReturn = new Button("Auswahl\nbeenden", "back");
         $BReturn->onclick("contentManager.restoreFrame('content" . ucfirst($this->displaySide) . "','selectionOverlay');");
         #return "<input type=\"button\" value=\"zurück zu\n".$p2[$s[0]]."\" style=\"background-image:url(./images/navi/back.png);\" class=\"bigButton backgroundColor3\" onclick=\"loadFrameV2('contentRight','$s[0]');\" />";
         $returnTab->addRow($BReturn);
     }
     /**
      * DELETE-BUTTON
      */
     if ((!$this->onlyDisplayMode or $this->deleteInDisplayMode) and $userCanDelete and !$this->isSelection and $this->showDeleteButton) {
         $this->newColsRight["delete"] = "\n\t\t\t<span class=\"iconic trash_stroke\" onclick=\"deleteClass('" . $this->singularClass . "','%%VALUE%%', " . ($this->JSOnDelete == null ? "function() { " . ($this->displaySide == "left" ? "contentManager.reloadFrameLeft();" : "contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '%%VALUE%%') \$('contentLeft').update('');") . " }" : $this->JSOnDelete) . ",'" . str_replace("%1", $this->singularName, $this->texts["%1 wirklich löschen?"]) . "');\"></span>";
     } elseif (!$userCanDelete) {
         $this->newColsRight["delete"] = "<img src=\"./images/i2/empty.png\" />";
     }
     /**
      * EDIT-BUTTON
      */
     if (!isset($this->newColsLeft["select"]) and (!$this->onlyDisplayMode or $this->editInDisplayMode) and $this->showEditButton) {
         $EB = new Button("", "./images/i2/edit.png");
         $EB->type("icon");
         $EB->className("editButton");
         if ($this->JSOnEdit == null) {
             $EB->onclick("contentManager.selectRow(this); contentManager.loadFrame('contentLeft','" . $this->singularClass . "','%%VALUE%%','0');");
         } else {
             $EB->onclick($this->JSOnEdit);
         }
         $this->newColsLeft["select"] = $EB;
     }
     $cols = count($this->showAttributes) + count($this->newColsLeft) + count($this->newColsRight);
     $valuesTab = new HTMLTable($cols, $lineWithId == -1 ? $this->displaySide == "left" ? $this->name : "" : null);
     $valuesTab->addTableClass("contentBrowser");
     /*if(isset($this->newColsRight["delete"]) AND ($this->displaySide == "default" OR $this->displaySide == "right"))
     			$valuesTab->setColClass($cols, "backgroundColor0");
     		if(isset($this->newColsRight["delete"]) AND $this->displaySide == "left")
     			$valuesTab->setColClass(1, "backgroundColor0");*/
     /**
      * QUICKSEARCH
      */
     #$quickSearchRow = "";
     if ($this->quickSearchPlugin != "" and $lineWithId == -1) {
         list($quickSearchRow, $BSearchInfo) = $this->getQuicksearchField();
         if ($this->displaySide == "left") {
             $insertRow = array($quickSearchRow);
             for ($i = 1; $i < $cols - 1; $i++) {
                 $insertRow[] = "";
             }
             $insertRow[] = $BSearchInfo;
             $valuesTab->addRow($insertRow);
             $valuesTab->addRowColspan(1, $cols - 1);
         } else {
             $valuesTab->addRow(array($BSearchInfo, $quickSearchRow));
             $valuesTab->addRowColspan(2, $cols - 1);
         }
         $valuesTab->addRowClass("backgroundColorHeader");
     }
     if ($this->headerRow != null) {
         $valuesTab->addHeaderRow($this->headerRow);
     }
     /**
      * PAGE-BROWSER
      */
     #$multiPageRow = "";
     $separator = "";
     $userDefinedEntriesPerPage = false;
     $isMultiPageMode = false;
     if (count($this->multiPageMode) > 0) {
         $isMultiPageMode = true;
         $this->multiPageMode[3] = $defaultTarget;
         if ($this->multiPageMode[2] == 0) {
             $userDefinedEntriesPerPage = true;
             #$mU = new mUserdata();
             #$this->multiPageMode[2] = $mU->getUDValue("entriesPerPage{$this->multiPageMode[4]}");
             #if($this->multiPageMode[2] == null) $this->multiPageMode[2] = 20;
         }
         /*
         
         if($this->multiPageMode[1] == "undefined") $this->multiPageMode[1] = 0;
         
         $pages = ceil($this->multiPageMode[0] / $this->multiPageMode[2]);
         
         if($this->multiPageMode[1] != 0) $pageLinks = "<a href=\"javascript:contentManager.loadPage('$defaultTarget', '0');\">&nbsp;&lt;&lt;&nbsp;</a> ";
         else $pageLinks = "&nbsp;&lt;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != 0) $pageLinks .= "<a href=\"javascript:contentManager.backwardOnePage('$defaultTarget');\">&nbsp;&lt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.forwardOnePage('$defaultTarget');\">&nbsp;&gt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&gt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget',".($pages-1).");\">&nbsp;&gt;&gt;&nbsp;</a> | ";
         else $pageLinks .= "&nbsp;&gt;&gt;&nbsp; | ";
         
         $start = $this->multiPageMode[1] - 3;
         if($start < 0) $start = 0;
         
         $end = $this->multiPageMode[1] + 3;
         if($end > $pages - 1) $end = $pages - 1;
         
         for($i=$start; $i<=$end; $i++)
         	if($this->multiPageMode[1] != "$i") $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget','".$i."');\">".($i+1)."</a> ";
         	else $pageLinks .= ($i+1)." ";
         
         	$pageLinks = "".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": ".$pageLinks;
         */
         if ($this->displaySide == "left") {
             $pageLinks = "<span style=\"float:right;\">" . $this->getMultiPageButtons() . "</span>";
         } else {
             $pageLinks = $this->getMultiPageButtons();
         }
         /*if($lineWithId == -1) $multiPageRow = "
         					<tr>
         						".($userDefinedEntriesPerPage ? "<td><img class=\"mouseoverFade\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','multiPageSettings:{$this->multiPageMode[4]}','".$this->texts["Einstellungen"].":');\" /></td>" : "")."
         						<td colspan=\"".($colspan+1+($userDefinedEntriesPerPage ? 0 : 1))."\"><input type=\"text\"onkeydown=\"if(event.keyCode == 13) loadFrameV2('".$this->multiPageMode[3]."','".$this->multiPageMode[4]."','',this.value - 1);\" style=\"width:30px;float:right;text-align:right;\" value=\"".($this->multiPageMode[1]+1)."\" onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\" />".$this->multiPageMode[0]." ".($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"])."<!--, ".$pages." ".($pages != 1 ? $this->texts["Seiten"] : $this->texts["Seite"])."--></td>
         					</tr>
         					<tr>
         						<td colspan=\"$determinedNumberofCols\">".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": $pageLinks</td>
         					</tr>";
         
         
         */
         if ($lineWithId == -1) {
             $BSettings = $this->getPageOptionsButton();
             #$IPage = $this->getPageSelectionField();
             #$IPage->style("width:30px;float:right;text-align:right;");
             $pageOptions = $this->multiPageMode[0] . " " . ($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"]) . ", {$pageLinks}";
             if (!$userDefinedEntriesPerPage) {
                 $valuesTab->addRow(array($pageOptions));
                 $valuesTab->addRowColspan(1, $cols);
             } else {
                 if ($this->displaySide == "left") {
                     $insertRow = array($pageOptions);
                     for ($i = 1; $i < $cols - 1; $i++) {
                         $insertRow[] = "";
                     }
                     $insertRow[] = $BSettings;
                     $valuesTab->addRow($insertRow);
                     #$valuesTab->addRow(array($pageOptions,$BSettings));
                     $valuesTab->addRowColspan(1, $cols - 1);
                 } else {
                     /*$insertRow = array($BSettings);
                     		for($i=1; $i<$cols-1; $i++)
                     			$insertRow[] = "";
                     		$insertRow[] = $pageOptions;
                     		$valuesTab->addRow($insertRow);*/
                     $valuesTab->addRow(array($BSettings, $pageOptions));
                     $valuesTab->addRowColspan(2, $cols - 1);
                 }
             }
             $valuesTab->addRowClass("backgroundColorHeader");
             #$valuesTab->addRow(array($pageLinks));
             #$valuesTab->addRowColspan(1, $cols);
             #$valuesTab->addRowClass("backgroundColorHeader");
             $valuesTab->addRow("");
             $valuesTab->addRowColspan(1, $cols);
             $valuesTab->addRowClass("backgroundColor0 browserSeparatorTop");
         }
     }
     $filteredCol = null;
     if ($lineWithId == -1 and $this->showFilteredCategoriesWarning != null and $this->showFilteredCategoriesWarning[0]) {
         $dB = new Button($this->texts["Filter löschen"], "./images/i2/delete.gif");
         $dB->style("float:right;");
         $dB->type("icon");
         $dB->rme("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->showFilteredCategoriesWarning[1]}'"), "if(checkResponse(transport)) contentManager.reloadFrameRight();");
         /*$separator = "
         		<tr>
         			<td class=\"backgroundColor0\"".((isset($this->showFilteredCategoriesWarning[0]) AND $this->showFilteredCategoriesWarning[0] == true) ? "<img src=\"./images/i2/note.png\" /></td><td class=\"backgroundColor0\" colspan=\"".($determinedNumberofCols - 2)."\" style=\"color:grey;\" >".$this->texts["Anzeige wurde gefiltert"]."</td><td class=\"backgroundColor0\">$dB</td>" : " >")."</td>
         		</tr>";*/
         $filteredCol = array("<img src=\"./images/i2/note.png\" />", $dB . $this->texts["Anzeige wurde gefiltert"]);
         $valuesTab->addRow($filteredCol);
         $valuesTab->addRowColspan(2, $cols - 1);
         $valuesTab->addRowClass("backgroundColor0");
         $valuesTab->addRowStyle("color:grey;");
     }
     /**
      * NEW-BUTTON
      */
     if (!$this->onlyDisplayMode and $userCanCreate and $this->showNewButton and $lineWithId == -1) {
         $BNew = new Button("", "./images/i2/new.gif");
         $BNew->type("icon");
         $BNew->id("buttonNewEntry{$this->singularClass}");
         #$BNew->onclick($this->JSOnNew == null ? "contentManager.newClassButton('$this->singularClass','');" : $this->JSOnNew);
         if ($this->displaySide == "left") {
             #$valuesTab->addRow(array("<b>$this->singularName neu anlegen</b>",$BNew));
             #$valuesTab->addRowColspan(1, $cols-1);
         } else {
             $valuesTab->addRow(array($BNew, "<b>{$this->singularName} neu anlegen</b>"));
             $valuesTab->addRowColspan(2, $cols - 1);
             $valuesTab->addRowEvent("click", $this->JSOnNew == null ? "contentManager.newClassButton('{$this->singularClass}','');" : $this->JSOnNew);
             $valuesTab->addRowStyle("cursor:pointer;");
         }
         #$valuesTab->addRowColspan(2, $cols-1);
     }
     /**
      * TABLE-CONTENT
      */
     $displayGroup = null;
     for ($i = 0; $i < count($this->attributes); $i++) {
         $aid = $this->attributes[$i]->getID();
         // get the id of an object separately
         $sc = $this->attributes[$i]->getA();
         // get the attributes-object from the object
         if ($this->displayGroupBy != null) {
             $displayGroupField = $this->displayGroupBy;
             if ($sc->{$displayGroupField} != $displayGroup and $i > 0) {
                 $valuesTab->addRow("");
                 $valuesTab->addRowClass("backgroundColor0");
             }
         }
         $row = array();
         $styles = array();
         if ($this->displaySide == "left") {
             $colsLeft = $this->newColsRight;
             $colsRight = $this->newColsLeft;
         } else {
             $colsLeft = $this->newColsLeft;
             $colsRight = $this->newColsRight;
         }
         if (count($colsLeft) > 0) {
             foreach ($colsLeft as $key => $value) {
                 $row[] = str_replace("%%VALUE%%", $aid, $value);
                 $valuesTab->setColWidth(count($row), "20px");
             }
         }
         foreach ($this->showAttributes as $key => $value) {
             if (isset($userHiddenFields[$value])) {
                 continue;
             }
             if (isset($this->parsers[$value])) {
                 $t = $this->invokeParser($this->parsers[$value], $sc->{$value}, $this->makeParameterStringFromArray($this->parserParameters[$value], $sc, $aid));
             } else {
                 $t = htmlspecialchars($sc->{$value});
             }
             if ($this->multiEditMode != null and in_array($value, $this->multiEditMode)) {
                 $posInArray = array_search($value, $this->multiEditMode);
                 if ($this->multiEditModeInputs[$posInArray] == null) {
                     $MI = new HTMLInput($value . "ID{$aid}", "multiInput", $sc->{$value}, array($this->singularClass, $aid, $value));
                     if ($this->multiEditModeStyle != null) {
                         $MI->style($this->multiEditModeStyle[$posInArray]);
                     }
                 } else {
                     $MI = clone $this->multiEditModeInputs[$posInArray];
                     $MI->setValue($sc->{$value});
                     $MI->activateMultiEdit($this->singularClass, $aid);
                 }
                 $t = $MI;
             }
             #<td id=\"Browser".$value."$aid\" ".(isset($this->colStyles[$value]) ? "style=\"".$this->colStyles[$value]."\"" : "").">".$t."</td>";
             $row[] = $t;
             if (isset($this->colStyles[$value])) {
                 $styles[count($row)] = $this->colStyles[$value];
             }
         }
         if (count($colsRight) > 0) {
             foreach ($colsRight as $key => $value) {
                 $row[] = str_replace("%%VALUE%%", $aid, $value);
                 $valuesTab->setColWidth(count($row), "20px");
             }
         }
         $valuesTab->addRow($row);
         if (count($styles) > 0) {
             foreach ($styles as $col => $s) {
                 $valuesTab->addColStyle($col, $s);
             }
         }
         $valuesTab->setRowID("BrowserMain{$aid}");
         #foreach($this->showAttributes as $key => $value) {
         #	$valuesTab->addCellID($cellNo, "Browser".$value."$aid");
         #}
         if ($this->displayGroupBy != null) {
             $displayGroup = $sc->{$displayGroupField};
         }
     }
     if ($filteredCol !== null) {
         $valuesTab->addRow($filteredCol);
         $valuesTab->addRowColspan(2, $cols - 1);
         $valuesTab->addRowClass("backgroundColor0");
         $valuesTab->addRowStyle("color:grey;");
     }
     if ($lineWithId == -1 and $isMultiPageMode) {
         $valuesTab->addRow("");
         $valuesTab->addRowColspan(1, $cols);
         $valuesTab->addRowClass("backgroundColor0 browserSeparatorBottom");
         if (!$userDefinedEntriesPerPage) {
             $valuesTab->addRow(array($pageOptions));
             $valuesTab->addRowColspan(1, $cols);
         } else {
             if ($this->displaySide == "left") {
                 $valuesTab->addRow(array($pageOptions, $BSettings));
                 $valuesTab->addRowColspan(1, $cols - 1);
             } else {
                 $valuesTab->addRow(array($BSettings, $pageOptions));
                 $valuesTab->addRowColspan(2, $cols - 1);
             }
         }
         $valuesTab->addRowClass("backgroundColorHeader");
         #$valuesTab->addRow(array($pageLinks));
         #$valuesTab->addRowColspan(1, $cols);
         #$valuesTab->addRowClass("backgroundColorHeader");
     }
     if (count($this->attributes) == 0) {
         $valuesTab->addRow(array("keine Einträge"));
         $valuesTab->addRowColspan(1, $cols);
     }
     if ($lineWithId != -1) {
         $valuesTab = $valuesTab->getHTMLForUpdate();
     }
     return $errorTab . $returnTab . $valuesTab . ($lineWithId == -1 ? $this->tip : "");
 }
Ejemplo n.º 6
0
 public function getAuftrag($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     if ($data["GRLBMID"] == 0) {
         $html .= "<p class=\"highlight\" style=\"margin-top:10px;\">Bitte wählen Sie rechts einen Lieferschein.</p>";
         return $html;
     }
     $Beleg = new GRLBM($data["GRLBMID"]);
     #$this->createAuftrag(new Adresse(1), "W");
     $Auftrag = new Auftrag($Beleg->A("AuftragID"));
     $Adresse = new Adresse($Auftrag->A("AdresseID"));
     #$TAdresse = new HTMLTable(2, "Kundenadresse");
     #$TAdresse->setColWidth(1, 26);
     #$TAdresse->setTableStyle("width:100%;");
     #$TAdresse->addRow(array(new Button("Adresse", "home", "iconic"), $Adresse->getHTMLFormattedAddress()));
     #$TAdresse->setColStyle(1, "vertical-align:top;");
     $TPosten = new HTMLTable(3, "Lieferung");
     $TPosten->setTableStyle("width:100%;");
     $TPosten->setColWidth(1, 26);
     $TPosten->setColWidth(2, 80);
     $TPosten->setColWidth(3, "100%");
     $ACP = anyC::get("Posten", "GRLBMID", $Beleg->getID());
     $ACP->addOrderV3("PostenID");
     $ACP->addAssocV3("useForLieferung", "=", "1");
     $i = 0;
     $O = new Button("Positionen", "list", "iconic");
     /*while($P = $AC->getNextEntry()){
     			$I = new HTMLInput("mwst", "text", Util::CLNumberParser($P->A("menge")));
     			$I->style("text-align:right;width:80px;font-size:15px;padding:7px;padding-right:20px;");
     			#$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){ if(transport == 'TIMEOUT') { document.location.href='?CC=Lieferschein&page=login'; return; } $('#contentLeft .content').html(transport); noty({text: 'Menge gespeichert', type: 'success'}); }); });");
     			$I->onfocus("this.select();");
     			
     			$TPosten->addRow(array(
     				$i == 0 ? $O : "",
     				$I, 
     				"<span style=\"font-size:15px;\">".$P->A("name")."</span>"));
     			
     			$i++;
     		}*/
     $AC = anyC::get("Artikel");
     $AC->addOrderV3("name");
     $AC->addAssocV3("useForLieferung", "=", "1");
     while ($A = $AC->getNextEntry()) {
         $menge = 0;
         while ($P = $ACP->n()) {
             if ($P->A("oldArtikelID") == $A->getID()) {
                 $menge = abs($P->A("menge"));
             }
         }
         $ACP->resetPointer();
         $I = new HTMLInput("Artikel_" . $A->getID(), "text", Util::CLNumberParser($menge));
         $I->style("text-align:right;width:80px;font-size:15px;padding:7px;padding-right:20px;");
         #$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){ if(transport == 'TIMEOUT') { document.location.href='?CC=Lieferschein&page=login'; return; } $('#contentLeft .content').html(transport); noty({text: 'Menge gespeichert', type: 'success'}); }); });");
         $I->onfocus("this.select();");
         $TPosten->addRow(array($i == 0 ? $O : "", $I, "<span style=\"font-size:15px;\">" . $A->A("name") . "</span>"));
         $i++;
     }
     if ($AC->numLoaded() == 0) {
         $TPosten->addRow(array($O, "Keine Artikel"));
         $TPosten->addRowColspan(2, 6);
         $TPosten->setColWidth(2, "100%");
         $TPosten->setColStyle(2, "text-align:left;");
     }
     $IOK = new Button("Speichern");
     $IOK->className("submitFormButton");
     $IOK->onclick("CustomerPage.rme('handleLieferung', \$('#posten').serialize(), function(transport){ \$('#contentLeft h1').html('Auftrag'); \$('.selected').removeClass('selected'); \$('#contentLeft .content').html(transport); })");
     #$IOK->onclick("$('#contentLeft h1').html('Auftrag'); $('.selected').removeClass('selected'); CustomerPage.rme('getAuftrag', {GRLBMID: 0}, function(transport){ $('#contentLeft .content').html(transport); }, function(){}, 'POST');");
     $IC = new Button("Abbrechen");
     $IC->className("submitFormButton");
     $IC->style("background-color:#DDD;color:grey;float:none;");
     $IC->onclick("\$('#contentLeft h1').html('Auftrag'); \$('.selected').removeClass('selected'); CustomerPage.rme('getAuftrag', {GRLBMID: 0}, function(transport){ \$('#contentLeft .content').html(transport); }, function(){}, 'POST');");
     #$TZahlungsart = new HTMLTable(2);
     #$TZahlungsart->setTableStyle("width:100%;margin-top:50px;");
     #$TZahlungsart->setColWidth(1, 26);
     #$TZahlungsart->addRow(array("", $IOK));
     $IA = new HTMLInput("action", "hidden", "handleLieferung");
     $IA = new HTMLInput("GRLBMID", "hidden", $Beleg->getID());
     $html .= "\n\t\t\t<form id=\"posten\" style=\"border:0px;padding:0px;width:100%;\" >\n\t\t\t\t{$TPosten}\n\t\t\t\t{$IOK}{$IC}\n\t\t\t\t{$IA}\n\t\t\t</form>";
     return $html . OnEvent::script("\$('#contentLeft h1').html('Auftrag " . $Beleg->A("prefix") . $Beleg->A("nummer") . "');");
 }
Ejemplo n.º 7
0
 private function editIcon($aid)
 {
     $B = new Button("", "./images/i2/edit.png", "icon");
     $B->className("editButton");
     $onSuccessFunction = $this->JSOnEdit != null ? str_replace("%%VALUE%%", "{$aid}", "{$this->JSOnEdit}") : "";
     $B->loadFrame($this->editInDisplayModeTarget, $this->singularClass, $aid, 0, "", $onSuccessFunction);
     return "<td>{$B}</td>";
     /*
     * <img
     			onclick=\"
     				".($this->editInDisplayModeTarget == "contentLeft" ? "lastLoadedLeft = $aid;lastLoadedLeftPlugin = '$this->singularClass';" : "")."
     				new Ajax.Request('./interface/loadFrame.php?p=".$this->singularClass."&id=$aid'".($this->JSOnEdit != null ? str_replace("%%VALUE%%","$aid",",{onSuccess: $this->JSOnEdit}") : ",{onSuccess: function(transport){ if(checkResponse(transport)) $('$this->editInDisplayModeTarget').update(transport.responseText); }}").");\" src=\"./images/i2/edit.png\" class=\"mouseoverFade\" />
     */
 }
Ejemplo n.º 8
0
 function showWarenkorb()
 {
     $AC = anyC::get("Seminar");
     $AC->addAssocV3("SeminarVon", ">=", Util::parseDate("de_DE", Util::formatDate("de_DE", time())));
     $count = array();
     for ($i = 0; $i < 21; $i++) {
         $count[$i] = $i;
     }
     $T = new HTMLTable(3, "Events");
     $T->setTableStyle("width:100%;");
     while ($S = $AC->getNextEntry()) {
         $I = new HTMLInput("AnzahlKarten" . $S->getID(), "select", "0", $count);
         $I->style("width:80px;text-align:right;");
         $I->onchange("CustomerPage.rme('recalc', ['" . $S->getID() . "', this.value], function(response){ \$('#PreisGesamt" . $S->getID() . "').html(response) });");
         if (isset($_SESSION["ticketDataSelection"])) {
             $I->setValue($_SESSION["ticketDataSelection"][$S->getID()]);
         }
         $Adresse = new Adresse($S->A("SeminarAdresseID"));
         $T->addRow(array("<b>" . $S->A("SeminarName") . "</b>, " . Util::CLDateParser($S->A("SeminarVon")) . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr, " . $Adresse->A("ort")));
         $T->addRowColspan(1, 3);
         $T->addRow(array($I, Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * 1, true), Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * $I->getValue(), true)));
         $T->addCellStyle(1, "text-align:right;");
         $T->addCellStyle(2, "text-align:right;");
         $T->addCellStyle(3, "text-align:right;");
         $T->addCellID(3, "PreisGesamt" . $S->getID());
         $T->addRow(array("&nbsp;"));
         $T->addRowColspan(1, 3);
     }
     $I = new Button("Weiter", "");
     $I->onclick("CustomerPage.rme('handleForm', \$('#ticketShop').serialize(), function(){ document.location.reload(); })");
     $I->className("submitFormButton");
     $T->addRow($I);
     $T->addRowColspan(1, 3);
     $IA = new HTMLInput("action", "hidden", "handleSelection");
     return "<form id=\"ticketShop\">" . $T . $IA . "</form>";
 }
Ejemplo n.º 9
0
 public function __toString()
 {
     #$style = "";
     if ($this->type == "date" and strpos($this->style, "width:") === false) {
         $this->style .= "width:87%;";
     }
     #if($this->style != null) $style = " style=\"$this->style\"";
     switch ($this->type) {
         case "audio":
             return "<audio controls preload=\"auto\" autobuffer style=\"{$this->style}\"><source src=\"{$this->value}\"></audio>";
             break;
         case "HTMLEditor":
             $B = new Button("in HTML-Editor\nbearbeiten", "editor");
             $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->className("backgroundColor2");
             return $B->__toString();
             break;
         case "TextEditor":
             #return "<input ".(isset($this->events[$as]) ? $eve : "")." style=\"background-image:url(./images/navi/editor.png);".(isset($this->inputStyle[$as]) ? "".$this->inputStyle[$as]."" : "")."\" type=\"button\" class=\"bigButton backgroundColor2\" onclick=\"TextEditor.show('$as','$this->FormID');\" value=\"".$this->texts["in Editor bearbeiten"]."\" /><textarea style=\"display:none;\" name=\"".$as."\" id=\"".$as."\">".$this->attributes->$as."</textarea>";
             $B = new Button("in Editor\nbearbeiten", "editor");
             $B->className("backgroundColor2");
             $B->onclick("TextEditor.show('{$this->name}','{$this->options[0]}');");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             $ITA->id($this->name);
             $ITA->style("display:none;");
             return $B->__toString() . $ITA;
             break;
         case "tinyMCE":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->popup("", "Editor", "Wysiwyg", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "multiInput":
             return "<input\n\t\t\t\t\tclass=\"multiEditInput2\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tvalue=\"" . htmlspecialchars($this->value) . "\"\n\t\t\t\t\tonfocus=\"oldValue = this.value;\"\n\t\t\t\t\tid=\"" . $this->options[2] . "ID" . $this->options[1] . "\"\n\t\t\t\t\tonblur=\"if(oldValue != this.value) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"\n\t\t\t\t\tonkeydown=\"if(event.keyCode == 13) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"/>";
             break;
             /*case "customSelection":
             				$B = new Button("Eintrag auswählen...", "gutschrift");
             				$B->type("LPBig");
             				$B->style("float:right;margin-left:10px;");
             				#				 "contentRight"		"callingPluginID"  "selectPlugin"
             				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
             
             				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
             			break;*/
         /*case "customSelection":
         				$B = new Button("Eintrag auswählen...", "gutschrift");
         				$B->type("LPBig");
         				$B->style("float:right;margin-left:10px;");
         				#				 "contentRight"		"callingPluginID"  "selectPlugin"
         				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
         
         				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
         			break;*/
         case "textarea":
             if ($this->isDisplayMode) {
                 return nl2br($this->value);
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 $this->onfocus .= " oldValue = this.value;";
                 $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 if ($this->hasFocusEvent) {
                     $this->onfocus .= "focusMe(this);";
                     $this->onblur .= "blurMe(this);";
                 }
                 $this->hasFocusEvent = false;
             }
             return "<textarea\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->hasFocusEvent ? "onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">{$this->value}</textarea>";
             break;
         case "file":
             $currentId = ($this->id != null ? $this->id : $this->name) . rand(100, 100000000);
             return "\n\t\t\t\t\t<div id=\"progress_{$currentId}\" style=\"height:10px;width:95%;display:none;\" class=\"\">\n\t\t\t\t\t\t<div id=\"progressBar_{$currentId}\" style=\"height:10px;width:0%;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"{$currentId}\" style=\"width:100%;\"></div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tvar QQUploader = new qq.FileUploader({\n\t\t\t\t\t\t\tmaxSizePossible: '" . ini_get("upload_max_filesize") . "B',\n\t\t\t\t\t\t\telement: \$('{$currentId}'),\n\t\t\t\t\t\t\taction: './interface/set.php',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\t'class': '" . (($this->options == null or !isset($this->options["class"])) ? "TempFile" : $this->options["class"]) . "'\n\t\t\t\t\t\t\t\t,'id':'-1'\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["path"])) ? ",'path':'" . $this->options["path"] . "'" : "") . "\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonSubmit: function(id, fileName){ \$('progress_{$currentId}').style.display = 'block';},\n\t\t\t\t\t\t\tonComplete: function(id, fileName, transport){ \$('progress_{$currentId}').style.display = 'none'; if(checkResponse(transport)) { {$this->onchange} } },\n\t\t\t\t\t\t\tonProgress: function(id, fileName, loaded, total){ \$('progressBar_{$currentId}').style.width = Math.ceil((loaded / total) * 100)+'%'; }});\n\t\t\t\t\t</script>";
             break;
         case "radio1":
         case "date":
         case "text":
         case "hidden":
         case "submit":
         case "button":
         case "password":
         case "checkbox":
         case "readonly":
             $JS = "";
             if ($this->type == "radio1") {
                 $this->type = "radio";
             }
             if ($this->isDisplayMode) {
                 if ($this->type == "checkbox") {
                     return Util::catchParser($this->value);
                 }
                 if ($this->type == "hidden") {
                     return "";
                 }
                 return $this->value . "";
             }
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             $cal = "";
             $B2 = "";
             if ($this->type == "date") {
                 if ($this->id == null) {
                     $this->id = rand(10000, 90000);
                 }
                 $cal = new Button("", "./images/i2/calendar.gif");
                 $cal->onclick("\$j('#{$this->id}').focus();");
                 $cal->type("icon");
                 $cal->className("calendarIcon");
                 $JS = "<script type=\"text/javascript\">\$j('#{$this->id}').datepicker();</script>";
                 $this->type = "text";
             }
             $value = "value=\"" . htmlspecialchars($this->value) . "\"";
             if ($this->type == "checkbox") {
                 $value = $this->value == "1" ? "checked=\"checked\"" : "";
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 if ($this->type == "checkbox") {
                     $this->onchange = "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 } else {
                     $this->onfocus .= " oldValue = this.value;";
                     $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                     $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
             }
             if ($this->autocomplete != null) {
                 if ($this->id == null) {
                     $this->id = $this->name;
                 }
                 /*$this->onfocus .= " ACInputHasFocus=true; AC.start(this);";
                 		$this->onblur .= " ACInputHasFocus = false; AC.end(this);";
                 		$this->onkeyup .= " AC.update(event.keyCode, this, '".$this->autocomplete[0]."');";*/
                 $this->autocompleteBrowser = false;
                 $cal = new Button("Suche", "./images/i2/details.png");
                 $cal->onclick("\$('{$this->id}').style.display = ''; \$('{$this->id}').value = ''; \$('{$this->id}').focus();");
                 $cal->type("icon");
                 $cal->className("calendarIcon");
                 if ($this->autocomplete[4] != null) {
                     $B2 = $this->autocomplete[4];
                     $B2->style("float:right;margin-left:5px;");
                     $this->style .= "width:80%";
                 } else {
                     $this->style .= "width:87%";
                 }
                 if ($this->autocomplete[1] == null) {
                     $cal->onclick("\$('{$this->id}Display').style.display = ''; \$('{$this->id}Display').value = ''; \$('{$this->id}Display').focus();");
                     $IN = new HTMLInput($this->name, "hidden", htmlspecialchars($this->value));
                     $IN->id($this->name);
                     $JS .= $IN;
                     $this->autocomplete[1] = "function(selection){ \$('{$this->id}').value = selection.value; \$('{$this->id}Display').value = selection.label; return false; }";
                     if ($this->value != "") {
                         $C = substr($this->autocomplete[0], 1) . "GUI";
                         $C = new $C($this->value);
                         $value = "value=\"" . htmlspecialchars($C->ACLabel()) . "\"";
                     }
                     $this->id .= "Display";
                 }
                 $JS .= OnEvent::script("var OnSelectCallback{$this->id} = " . $this->autocomplete[1] . "; \$j(\"input#{$this->id}\").autocomplete({\n\t\t\t\t\t\tsource: function(request, response){ \n\t\t\t\t\t\t\t " . OnEvent::rme($this->autocomplete[0], "getACData", array("'{$this->name}'", "request.term", $this->autocomplete[3]), "function(transport){ response(jQuery.parseJSON(transport.responseText)); }") . "\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; }\n\t\t\t\t\t}).data(\"autocomplete\")._renderItem = function( ul, item ) {\n\t\t\t\t\t\treturn \$j( \"<li></li>\" )\n\t\t\t\t\t\t\t.data( \"item.autocomplete\", item )\n\t\t\t\t\t\t\t.append( \"<a>\" + item.label + (item.description ? \"<br /><small>\"+item.description+\"</small>\" : \"\")+\"</a>\" )\n\t\t\t\t\t\t\t.appendTo( ul );\n\t\t\t\t\t};");
             }
             return "{$B2}{$cal}<input\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\t" . (!$this->autocompleteBrowser ? "autocomplete=\"off\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onclick != null ? "onclick=\"{$this->onclick}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeydown != null ? "onkeydown=\"{$this->onkeydown}\"" : "") . "\n\t\t\t\t\t" . ($this->tabindex != null ? "tabindex=\"{$this->tabindex}\"" : "") . "\n\t\t\t\t\t" . ($this->isSelected ? "checked=\"checked\"" : "") . "\n\t\t\t\t\t" . ($this->type == "file" ? "size=\"1\"" : "") . "\n\t\t\t\t\t" . ($this->type == "readonly" ? "readonly=\"readonly\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\ttype=\"" . ($this->type != "readonly" ? $this->type : "text") . "\"\n\t\t\t\t\t" . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . "\n\t\t\t\t\t{$value} />{$this->requestFocus}{$JS}";
             break;
         case "option":
             return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>";
             break;
         case "radio":
             $html = "";
             foreach ($this->options as $k => $v) {
                 $html .= "<div style=\"margin-bottom:5px;\"><input name=\"{$this->name}\" value=\"{$k}\" " . ($k == $this->value ? "checked=\"checked\"" : "") . " style=\"float:left;margin-right:5px;\" type=\"radio\">{$v}</div>";
             }
             return $html;
             break;
         case "select":
         case "select-multiple":
             if ($this->type == "select-multiple") {
                 $values = trim($this->value) != "" ? explode(";:;", $this->value) : array();
             }
             if ($this->isDisplayMode) {
                 return is_object($this->options[$this->value]) ? $this->options[$this->value]->__toString() : $this->options[$this->value];
             }
             if ($this->multiEditOptions != null) {
                 $this->onchange("saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");");
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             $html = "<select " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->type == "select-multiple" ? " multiple=\"multiple\"" : "") . "" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . " name=\"{$this->name}\" " . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">";
             if ($this->options != null and is_array($this->options)) {
                 foreach ($this->options as $k => $v) {
                     if (!is_object($v)) {
                         if ($this->type == "select") {
                             $isThisIt = $this->value == $k;
                         } else {
                             $isThisIt = in_array($k, $values);
                         }
                         $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>";
                     } else {
                         if ($this->value == $k or $v->getValue() == $this->value) {
                             $v->isSelected(true);
                         }
                         $html .= $v;
                     }
                 }
             }
             $html .= "</select>";
             return $html;
             break;
     }
 }
Ejemplo n.º 10
0
    public function chatPopup($root = "")
    {
        $S = anyC::getFirst("Websocket", "WebsocketUseFor", "phim");
        $I = new HTMLInput("newMessage");
        $I->style("width:100%;background-color:white;");
        $I->onEnter("phimChat.send();");
        $IC = new HTMLInput("channel", "hidden", "0");
        $IC->id("channel");
        $B = new Button("Neue Nachricht", "star", "iconic");
        $B->style("color:orange;float:right;margin-top:-3px;");
        $B->className("newMessage");
        $BOn = new Button("Online", "{$root}../ubiquitous/phim/userOnline.png", "icon");
        $BOn->style("float:left;display:none;margin-right:3px;margin-top:-2px;");
        $BOn->className("online");
        $BOff = new Button("Offline", "{$root}../ubiquitous/phim/userOffline.png", "icon");
        $BOff->style("float:left;margin-right:3px;margin-top:-2px;");
        $BOff->className("offline");
        $AC = anyC::get("phimUserHidden");
        $hidden = array();
        while ($h = $AC->n()) {
            $hidden[$h->A("phimUserHiddenUserID")] = true;
        }
        $Users = Users::getUsersArray();
        $L = new HTMLList();
        $L->setListID("userList");
        $L->addListStyle("overflow:auto;box-sizing:border-box;");
        $L->noDots();
        $L->addItem($B . "Alle");
        $L->addItemEvent("onclick", "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatText0').show(); phimChat.scroll('chatText0'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0'); \$j('#channel').val('0');");
        $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
        $L->addItemClass("backgroundColor0");
        $L->setItemID("user0");
        $content = "";
        $AC = anyC::get("phim");
        $AC->addAssocV3("phimToUserID", "=", "0");
        $AC->addAssocV3("phimphimGruppeID", "=", "0");
        $AC->addOrderV3("phimID", "DESC");
        $AC->setLimitV3(50);
        while ($M = $AC->n()) {
            $content = "<div><span class=\"username\">" . (isset($Users[$M->A("phimFromUserID")]) ? $Users[$M->A("phimFromUserID")] : "Unbekannt") . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
        }
        $chatAll = "<div class=\"chatWindow\" id=\"chatText0\">{$content}</div>";
        $AC = anyC::get("phimGruppe");
        $AC->addAssocV3("INSTR(phimGruppeMembers, ';" . Session::currentUser()->getID() . ";')", ">", "0");
        $groups = array();
        $chatGroups = "";
        while ($G = $AC->n()) {
            $L->addItem($B . $G->A("phimGruppeName"));
            $L->addItemEvent("onclick", "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatTextg" . $G->getID() . "').show(); phimChat.scroll('chatTextg" . $G->getID() . "'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0'); \$j('#channel').val('g" . $G->getID() . "');");
            $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
            #$L->addItemClass("backgroundColor0");
            $L->setItemID("groupg" . $G->getID());
            $content = "";
            $ACS = anyC::get("phim");
            $ACS->addAssocV3("phimToUserID", "=", "0");
            $ACS->addAssocV3("phimphimGruppeID", "=", $G->getID());
            $ACS->addOrderV3("phimID", "DESC");
            $ACS->setLimitV3(50);
            while ($M = $ACS->n()) {
                $content = "<div><span class=\"username\">" . $Users[$M->A("phimFromUserID")] . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
            }
            $groups[] = $G->getID();
            $chatGroups .= "<div class=\"chatWindow\" style=\"display:none;\" id=\"chatTextg" . $G->getID() . "\">{$content}</div>";
        }
        asort($Users);
        $chatUsers = "";
        foreach ($Users as $ID => $U) {
            if ($ID == Session::currentUser()->getID()) {
                continue;
            }
            if (isset($hidden[$ID])) {
                continue;
            }
            $unread = false;
            $content = "";
            $AC = anyC::get("phim");
            $AC->addAssocV3("phimFromUserID", "=", Session::currentUser()->getID(), "AND", "1");
            $AC->addAssocV3("phimToUserID", "=", $ID, "AND", "1");
            $AC->addAssocV3("phimFromUserID", "=", $ID, "OR", "2");
            $AC->addAssocV3("phimToUserID", "=", Session::currentUser()->getID(), "AND", "2");
            $AC->addOrderV3("phimID", "DESC");
            $AC->setLimitV3(50);
            while ($M = $AC->n()) {
                $content = "<div><span class=\"username\">" . $Users[$M->A("phimFromUserID")] . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
                if (!$M->A("phimRead") and $M->A("phimToUserID") == Session::currentUser()->getID()) {
                    $unread = true;
                }
            }
            $L->addItem($BOn . $BOff . $B . $U);
            $L->addItemEvent("onclick", OnEvent::rme("phim", "setRead", $ID) . "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatText{$ID}').show(); phimChat.scroll('chatText{$ID}'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0');\$j('#channel').val('{$ID}');");
            $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
            $L->setItemID("user{$ID}");
            if ($unread) {
                $L->addItemClass("highlight");
            }
            $chatUsers .= "<div style=\"display:none;\" class=\"chatWindow\" id=\"chatText{$ID}\">{$content}</div>";
        }
        $content = "<div style=\"width:68%;display:inline-block;vertical-align:top;\">\n\t\t\t\t{$chatAll}\n\t\t\t\t{$chatUsers}\n\t\t\t\t{$chatGroups}\n\t\t\t\t<div>{$I}</div>\n\t\t\t</div><div style=\"width:32%;display:inline-block;vertical-align:top;\">{$L}{$IC}</div>";
        $rp = str_replace("interface/rme.php", "", $_SERVER["SCRIPT_NAME"]);
        if (strpos($_SERVER["SCRIPT_NAME"], "phim.php") !== false) {
            $rp = "../../";
        }
        $physion = "default";
        if (isset($_GET["physion"])) {
            $physion = $_GET["physion"];
        }
        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>phim</title>
		<script type="text/javascript" src="' . $root . '../libraries/jquery/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" src="' . $root . '../libraries/jquery/jquery-ui-1.10.1.custom.min.js"></script>
		<script type="text/javascript" src="' . $root . '../libraries/iconic/iconic.min.js"></script>
		<script type="text/javascript" src="' . $root . '../libraries/jquery/jquery.qtip.min.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/P2J.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/Aspect.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/handler.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/contentManager.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/Interface.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/Overlay.js"></script>
		<script type="text/javascript" src="' . $root . '../libraries/webtoolkit.base64.js"></script>
		
		<script type="text/javascript" src="' . $root . '../ubiquitous/phim/autobahn.min.js"></script>
		<script type="text/javascript" src="' . $root . '../ubiquitous/phim/phimChat.js"></script>
		<script type="text/javascript">
			contentManager.setRoot("' . $rp . '");
			$j(function(){
				Ajax.physion = "' . $physion . '";
					
				phimChat.init(
					"ws' . ($S->A("WebsocketSecure") ? "s" : "") . '://' . $S->A("WebsocketServer") . ":" . $S->A("WebsocketServerPort") . '/",
					"' . $S->A("WebsocketRealm") . '", 
					' . Session::currentUser()->getID() . ', 
					"' . Session::currentUser()->A("name") . '",
					"' . $S->A("WebsocketToken") . '",
					[' . implode(",", $groups) . '],
					"' . $root . '");
						
				phimChat.scroll("chatText0");
				$j("#userList").css("height", $j(window).height());
			});
		</script>
		<link rel="stylesheet" type="text/css" href="' . $root . '../libraries/jquery/jquery.qtip.min.css" />
		<link rel="stylesheet" type="text/css" href="' . $root . '../styles/' . (isset($_COOKIE["phynx_color"]) ? $_COOKIE["phynx_color"] : "standard") . '/colors.css"></link>
		<link rel="stylesheet" type="text/css" href="' . $root . '../styles/standard/general.css"></link>
		<style type="text/css">
			p {
				padding:5px;
			}
			
			body {
				background-color:#ddd;
			}
			
			html {
				overflow-y: auto;
			}

			.username {
				font-weight:bold;
			}
			
			.chatWindow {
				padding:5px;
				box-sizing:border-box;
				overflow-y: auto;
				height:270px;
				background-color:white;
				border-bottom:3px solid grey;
			}
			
			.newMessage {
				display:none;
			}
			
			.highlight .newMessage {
				display:block;
			}
			
			#darkOverlay {
				position:fixed;
				top:0;
				left:0;
			}
			
			#userList li {
				white-space: nowrap;
				overflow:hidden;
				margin-top:0;
			}
		</style>
	</head>
	<body>
		<div id="darkOverlay" style="background-color:rgba(0,0,0,.7);color:white;"></div>
		' . $content . '
	</body>
</html>';
    }
Ejemplo n.º 11
0
 public function __toString()
 {
     #$style = "";
     if ($this->type == "date" and strpos($this->style, "width:") === false) {
         $this->style .= "width:calc(100% - 28px)%;";
     }
     #if($this->style != null) $style = " style=\"$this->style\"";
     switch ($this->type) {
         /*case "JSONMultiText":
         			$data = json_decode($this->value);
         			
         			print_r($data);
         			
         			$L = new HTMLList();
         			$L->noDots();
         			$L->addListStyle("padding:0px;");
         			
         			foreach($data AS $k => $v){
         				$IL = new HTMLInput($this->name."_$k", "text", $v);
         				$BL = new Button("Element hinzufügen");
         				$L->addItem($IL);
         				$L->addItemStyle("margin-left:0px;");
         			}
         			
         			$I = new HTMLInput($this->name, "textarea", $this->value);
         			$I->id($this->name);
         			
         			return $L.$I;
         		break;*/
         case "audio":
             return "<audio controls preload=\"auto\" autobuffer style=\"{$this->style}\"><source src=\"{$this->value}\"></audio>";
             break;
         case "search":
             $currentId = $this->id != null ? $this->id : $this->name . rand(100, 100000000);
             $enter = "if(\$j('#{$currentId}').val() != ''){ \$j('#SB{$currentId}').fadeOut(200, function(){ \$j('#SA{$currentId}').fadeIn();}); } else { \$j('#SA{$currentId}').fadeOut(200, function(){ \$j('#SB{$currentId}').fadeIn(); }); }";
             $I = new HTMLInput($this->name, "text", $this->value, $this->options);
             $I->style($this->style);
             $I->placeholder($this->placeholder);
             $I->onEnter($this->onenter . $enter);
             #$I->onEnter(" ");
             $I->id($currentId);
             $BSearch = new Button("Suchen", "question_mark", "iconicG");
             $BSearch->style("margin-left:5px;");
             $BSearch->id("SB{$currentId}");
             $BSearch->onclick($this->onenter . $enter);
             #$BSearch->id("searchMailsInfo");
             $BSearchClear = new Button("Suche beenden", "x_alt", "iconicR");
             $BSearchClear->style("margin-left:5px;display:none;");
             $BSearchClear->id("SA{$currentId}");
             $BSearchClear->onclick("\$j('#{$currentId}').val('').trigger('blur'); {$this->onenter}{$enter}");
             #$BSearchClear->id("searchMailsClear");
             return $I . $BSearch . $BSearchClear . $this->requestFocus;
             break;
         case "HTMLEditor":
             $B = new Button("in HTML-Editor\nbearbeiten", "editor");
             $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->className("backgroundColor2");
             return $B->__toString();
             break;
         case "TextEditor":
             #return "<input ".(isset($this->events[$as]) ? $eve : "")." style=\"background-image:url(./images/navi/editor.png);".(isset($this->inputStyle[$as]) ? "".$this->inputStyle[$as]."" : "")."\" type=\"button\" class=\"bigButton backgroundColor2\" onclick=\"TextEditor.show('$as','$this->FormID');\" value=\"".$this->texts["in Editor bearbeiten"]."\" /><textarea style=\"display:none;\" name=\"".$as."\" id=\"".$as."\">".$this->attributes->$as."</textarea>";
             $B = new Button("in Editor\nbearbeiten", "editor");
             $B->className("backgroundColor2");
             $B->onclick("TextEditor.show('{$this->name}','{$this->options[0]}');");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             $ITA->id($this->name);
             $ITA->style("display:none;");
             return $B->__toString() . $ITA;
             break;
         case "nicEdit":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->doBefore("Overlay.showDark(); %AFTER");
             $B->popup("", "Editor", "nicEdit", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "hidden", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "tinyMCE":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             if (isset($this->options[3])) {
                 $BO[] = "'{$this->options[3]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->doBefore("Overlay.showDark(); %AFTER");
             $B->popup("", "Editor", "tinyMCE", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "hidden", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "multiInput":
             return "<input\n\t\t\t\t\tclass=\"multiEditInput2\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tvalue=\"" . htmlspecialchars($this->value) . "\"\n\t\t\t\t\tonfocus=\"oldValue = this.value;\"\n\t\t\t\t\tid=\"" . $this->options[2] . "ID" . $this->options[1] . "\"\n\t\t\t\t\tonblur=\"if(oldValue != this.value) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"\n\t\t\t\t\tonkeydown=\"if(event.keyCode == 13) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"/>";
             break;
             /*case "customSelection":
             				$B = new Button("Eintrag auswählen...", "gutschrift");
             				$B->type("LPBig");
             				$B->style("float:right;margin-left:10px;");
             				#				 "contentRight"		"callingPluginID"  "selectPlugin"
             				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
             
             				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
             			break;*/
         /*case "customSelection":
         				$B = new Button("Eintrag auswählen...", "gutschrift");
         				$B->type("LPBig");
         				$B->style("float:right;margin-left:10px;");
         				#				 "contentRight"		"callingPluginID"  "selectPlugin"
         				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
         
         				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
         			break;*/
         case "textarea":
             if ($this->isDisplayMode) {
                 return nl2br($this->value);
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 $this->onfocus .= " contentManager.oldValue = this.value;";
                 $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->onblur .= "if(contentManager.oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 if ($this->hasFocusEvent) {
                     $this->onfocus .= "focusMe(this);";
                     $this->onblur .= "blurMe(this);";
                 }
                 $this->hasFocusEvent = false;
             }
             return "<textarea\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . (!$this->autocorrect ? "autocorrect=\"off\"" : "") . "\n\t\t\t\t\t" . (!$this->spellcheck ? "spellcheck=\"false\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\t" . ($this->hasFocusEvent ? "onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">{$this->value}</textarea>";
             break;
         case "file":
             $physion = Session::physion();
             $currentId = ($this->id != null ? $this->id : $this->name) . rand(100, 100000000);
             if (isset($this->options["autoUpload"]) and !$this->options["autoUpload"]) {
                 $this->callback = "QQUploader{$currentId}.uploadStoredFiles();";
             }
             return "\n\t\t\t\t\t<div id=\"progress_{$currentId}\" style=\"height:10px;width:95%;display:none;\" class=\"\">\n\t\t\t\t\t\t<div id=\"progressBar_{$currentId}\" style=\"height:10px;width:0%;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"{$currentId}\" style=\"width:100%;{$this->style}\"></div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tQQUploader{$currentId} = new qq.FileUploader({\n\t\t\t\t\t\t\tmaxSizePossible: '" . ini_get("upload_max_filesize") . "B',\n\t\t\t\t\t\t\tsizeLimit: " . Util::toBytes(ini_get("upload_max_filesize")) . ",\n\t\t\t\t\t\t\telement: \$j('#{$currentId}')[0],\n\t\t\t\t\t\t\taction: '" . (($this->options != null and isset($this->options["action"])) ? $this->options["action"] : "./interface/set.php") . "',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\t'class': '" . (($this->options == null or !isset($this->options["class"])) ? "TempFile" : $this->options["class"]) . "'\n\t\t\t\t\t\t\t\t,'id':'-1'\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["path"])) ? ",'path':'" . $this->options["path"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["targetFilename"])) ? ",'targetFilename':'" . $this->options["targetFilename"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . ($physion ? ",'physion':'{$physion['0']}'" : "") . "\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t" . (isset($this->options["autoUpload"]) ? "autoUpload: " . ($this->options["autoUpload"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\t" . (isset($this->options["multiple"]) ? "multiple: " . ($this->options["multiple"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\tonSubmit: function(id, fileName){ \$j('#progress_{$currentId}').css('display', 'block');},\n\t\t\t\t\t\t\tonComplete: function(id, fileName, transport){ \$j('progress_{$currentId}').css('display', 'none'); {$this->onchange} },\n\t\t\t\t\t\t\tonProgress: function(id, fileName, loaded, total){ \$j('#progressBar_{$currentId}').css('width', Math.ceil((loaded / total) * 100)+'%'); }});\n\t\t\t\t\t</script>";
             break;
         case "time":
             $this->type = "text";
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             if (!$this->id) {
                 $this->id = rand(100000, 9999999) . $this->name;
             }
             #$this->onkeyup .= "if(\$j(this).val().length == 2 && \$j(this).val().lastIndexOf(':') == -1) \$j(this).val(\$j(this).val()+':'); ";
             if ($this->connectTo) {
                 $this->onkeyup .= "contentManager.connectedTimeInput(event, '{$this->id}', '{$this->connectTo}'); ";
             } else {
                 $this->onkeyup .= "contentManager.timeInput(event, '{$this->id}'); ";
             }
         case "time2":
             if ($this->type == "time2") {
                 $this->type = "time";
             }
         case "radio1":
         case "date":
         case "email":
         case "text":
         case "hidden":
         case "submit":
         case "number":
         case "button":
         case "password":
         case "checkbox":
         case "readonly":
         case "fileold":
         case "color":
             $JS = "";
             if ($this->type == "radio1") {
                 $this->type = "radio";
             }
             if ($this->type == "fileold") {
                 $this->type = "file";
             }
             if ($this->isDisplayMode) {
                 if ($this->type == "checkbox") {
                     return Util::catchParser($this->value);
                 }
                 if ($this->type == "hidden") {
                     return "";
                 }
                 if ($this->type == "password") {
                     return str_repeat("*", mb_strlen($this->value));
                 }
                 return $this->value . "";
             }
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 if ($this->type == "checkbox") {
                     $this->onchange = "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 } else {
                     $this->onfocus .= " oldValue = this.value;";
                     $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                     $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
                 if ($this->type == "date") {
                     $this->onchange .= "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
             }
             $cal = "";
             $B2 = "";
             if ($this->type == "date") {
                 if ($this->id == null) {
                     $this->id = rand(10000, 90000);
                 }
                 $cal = new Button("Kalender anzeigen", "calendar", "iconic");
                 $cal->onclick("\$j('#{$this->id}').focus();");
                 $cal->style("float:right;");
                 $JS = "<script type=\"text/javascript\">\$j('#{$this->id}').datepicker();</script>";
                 $this->type = "text";
             }
             $value = "value=\"" . htmlspecialchars($this->value) . "\"";
             if ($this->type == "checkbox") {
                 $value = $this->value == "1" ? "checked=\"checked\"" : "";
             }
             $data = "";
             foreach ($this->data as $k => $v) {
                 $data .= " data-{$k}=\"{$v}\"";
             }
             if ($this->autocomplete != null) {
                 if ($this->id == null) {
                     $this->id = $this->name;
                 }
                 /*$this->onfocus .= " ACInputHasFocus=true; AC.start(this);";
                 		$this->onblur .= " ACInputHasFocus = false; AC.end(this);";
                 		$this->onkeyup .= " AC.update(event.keyCode, this, '".$this->autocomplete[0]."');";*/
                 $this->autocompleteBrowser = false;
                 $cal = $this->autocomplete[5];
                 #new Button("Suche", "./images/i2/details.png");
                 $cal->onclick("\$('{$this->id}').style.display = ''; \$('{$this->id}').value = ''; \$('{$this->id}').focus();");
                 if ($cal->getStyle() == "") {
                     $cal->style("float:right;");
                 }
                 if ($this->autocomplete[4] != null) {
                     $B2 = $this->autocomplete[4];
                     $B2->style("float:right;margin-left:5px;");
                     if (strpos($this->style, "width") === false) {
                         $this->style .= "width:80%";
                     }
                 } else {
                     if (strpos($this->style, "width") === false) {
                         $this->style .= "width:90%";
                     }
                 }
                 if ($this->autocomplete[1] == null) {
                     $cal->onclick("\$('{$this->id}Display').style.display = ''; \$('{$this->id}Display').value = ''; \$('{$this->id}').value = ''; \$('{$this->id}Display').focus();");
                     $IN = new HTMLInput($this->name, "hidden", htmlspecialchars($this->value));
                     $IN->id($this->name);
                     if ($this->onchange) {
                         $IN->onchange($this->onchange);
                         $this->onchange = "";
                     }
                     $JS .= $IN;
                     $this->autocomplete[1] = "function(selection){ if(!selection) return false; var oldVal = \$j('#{$this->id}').val(); \$j('#{$this->id}').val(selection.value); if(\$j('#{$this->id}').val() != oldVal) \$j('#{$this->id}').trigger('change'); \$('{$this->id}Display').value = selection.label; return false; }";
                     if ($this->value != "") {
                         $C = substr($this->autocomplete[0], 1) . "GUI";
                         $C = new $C($this->value);
                         $value = "value=\"" . htmlspecialchars($C->ACLabel($this->value, is_array($this->autocomplete[3]) ? $this->autocomplete[3] : array($this->autocomplete[3]))) . "\"";
                     }
                     $this->onkeyup .= "if(\$j('[name={$this->name}Display]').val() == '') {  \$j('[name={$this->name}]').val(''); } ";
                     $this->id .= "Display";
                     $this->name .= "Display";
                     $this->onkeyup .= "\$j('[name={$this->name}]').val(this.value);";
                 }
                 $JS .= OnEvent::script("var OnSelectCallback{$this->id} = " . $this->autocomplete[1] . "; \$j(\"input#{$this->id}\").autocomplete({\n\t\t\t\t\t\tsource: function(request, response){ \n\t\t\t\t\t\t\t " . OnEvent::rme($this->autocomplete[0], "getACData", array("'{$this->name}'", "request.term", is_array($this->autocomplete[3]) ? "'" . json_encode($this->autocomplete[3]) . "'" : $this->autocomplete[3]), "function(transport){ response(jQuery.parseJSON(transport.responseText)); }") . "\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item, event); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; },\n\t\t\t\t\t\tchange: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item, event); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; }\n\t\t\t\t\t}).data(\"ui-autocomplete\")._renderItem = function( ul, item ) {\n\t\t\t\t\t\treturn \$j( \"<li>\" )\n\t\t\t\t\t\t\t.data( \"item.ui-autocomplete\", item )\n\t\t\t\t\t\t\t.append( \"<a>\" + item.label + (item.description ? \"<br /><small>\"+item.description+\"</small>\" : \"\")+\"</a>\" )\n\t\t\t\t\t\t\t.appendTo( ul );\n\t\t\t\t\t};");
             }
             return "{$B2}{$cal}<input\n\t\t\t\t\t" . ($this->maxlength != null ? " maxlength=\"{$this->maxlength}\"" : "") . "\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\t" . (!$this->autocompleteBrowser ? "autocomplete=\"off\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onclick != null ? "onclick=\"{$this->onclick}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeydown != null ? "onkeydown=\"{$this->onkeydown}\"" : "") . "\n\t\t\t\t\t" . ($this->tabindex != null ? "tabindex=\"{$this->tabindex}\"" : "") . "\n\t\t\t\t\t" . ($this->title != null ? "title=\"{$this->title}\"" : "") . "\n\t\t\t\t\t" . ($this->isSelected ? "checked=\"checked\"" : "") . "\n\t\t\t\t\t" . ($this->type == "file" ? "size=\"1\"" : "") . "\n\t\t\t\t\t" . ($this->type == "readonly" ? "readonly=\"readonly\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t{$data}\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\ttype=\"" . ($this->type != "readonly" ? $this->type : "text") . "\"\n\t\t\t\t\t" . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . "\n\t\t\t\t\t{$value} />{$this->requestFocus}{$JS}";
             break;
         case "option":
             $data = "";
             foreach ($this->data as $k => $v) {
                 $data .= " data-{$k}=\"{$v}\"";
             }
             return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " {$data} " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>";
             break;
         case "optgroup":
             $html = "<optgroup label=\"" . htmlentities($this->name) . "\">";
             foreach ($this->options as $k => $v) {
                 if (is_object($v)) {
                     $v->isSelected(false);
                     if ($this->parentValue == $k or $v->getValue() == $this->parentValue) {
                         $v->isSelected(true);
                     }
                 }
                 $html .= $v;
             }
             $html .= "</optgroup>";
             return $html;
             break;
         case "radio":
             $html = "";
             foreach ($this->options as $k => $v) {
                 $html .= "<div style=\"margin-bottom:5px;\"><input name=\"{$this->name}\" value=\"{$k}\" " . ($k == $this->value ? "checked=\"checked\"" : "") . " style=\"float:left;margin-right:5px;\" type=\"radio\">{$v}</div>";
             }
             return $html;
             break;
         case "select":
         case "select-multiple":
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             if ($this->type == "select-multiple") {
                 $values = trim($this->value) != "" ? explode(";:;", $this->value) : array();
             }
             if ($this->isDisplayMode) {
                 return is_object($this->options[$this->value]) ? $this->options[$this->value]->__toString() : $this->options[$this->value];
             }
             if ($this->multiEditOptions != null) {
                 $this->onchange .= "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             $html = "<select " . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . " " . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . " " . ($this->size ? "size=\"{$this->size}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->type == "select-multiple" ? " multiple=\"multiple\"" : "") . "" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . " name=\"{$this->name}\" " . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">";
             if ($this->options != null and is_array($this->options)) {
                 foreach ($this->options as $k => $v) {
                     if (!is_object($v)) {
                         if ($this->type == "select") {
                             $isThisIt = $this->value == $k;
                             if ($this->value . "" === "" and $k . "" === "0") {
                                 $isThisIt = false;
                             }
                         } else {
                             $isThisIt = in_array($k, $values);
                         }
                         $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>";
                     } else {
                         if ($v->getType() == "optgroup") {
                             $v->parentValue($this->value);
                         }
                         $v->isSelected(false);
                         if ($this->value == $k or $v->getValue() == $this->value) {
                             $v->isSelected(true);
                         }
                         $html .= $v;
                     }
                 }
             }
             $html .= "</select>";
             return $html;
             break;
     }
 }
Ejemplo n.º 12
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;
 }
Ejemplo n.º 13
0
 public function getWindow($redo = false)
 {
     register_shutdown_function('BackupManagerGUIFatalErrorShutdownHandler');
     $F = new File(Util::getRootPath() . "system/Backup");
     if (!$F->A("FileIsWritable")) {
         $B = new Button("Achtung", "restrictions");
         $B->type("icon");
         $B->style("float:left;margin-right:10px;");
         $T = new HTMLTable(1);
         $T->addRow($B . "Es können keine Backups von Ihrer Datenbank angelegt werden, da das Verzeichnis /system/Backup nicht durch den Webserver beschreibbar ist.");
         $T->addRow("Machen Sie das Verzeichnis mit einem FTP-Programm beschreibbar. Klicken Sie dazu mit der rechten Maustaste auf das Verzeichnis auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 777 an, damit es durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.");
         $BRefresh = new Button("Aktualisieren", "refresh");
         $BRefresh->rmePCR("BackupManager", "", "getWindow", "", "Popup.displayNamed('BackupManagerGUI','Backup-Manager',transport);");
         $BRefresh->style("float:right;");
         $T->addRow($BRefresh);
         $T->addRow("");
         $T->addRowClass("backgroundColor0");
         $T->addRow($this->noBackupButton());
         die($T);
     }
     $html = "";
     if (!BackupManagerGUI::checkForTodaysBackup() or $redo) {
         $T = new HTMLTable(1);
         if ($redo) {
             unlink(BackupManagerGUI::getNewBackupName());
         }
         $BOK = $this->makeBackupOfToday();
         $F = new File(BackupManagerGUI::getNewBackupName());
         $F->loadMe();
         if ($BOK === basename(BackupManagerGUI::getNewBackupName()) and $F->A("FileSize") > 100) {
             $B = new Button("Backup abgeschlossen", "okCatch");
             $B->type("icon");
             $B->style("float:left;margin-right:10px;");
             $T->addRow($B . "Das Backup wurde erfolgreich abgeschlossen!<br />Die Größe der Sicherungsdatei beträgt <strong>" . Util::formatByte($F->A("FileSize"), 2) . "</strong>");
             $T->addRowClass("backgroundColor0");
             try {
                 $ftpUpload = $this->FTPUpload(Util::getRootPath() . "system/Backup/{$BOK}");
                 if ($ftpUpload === true) {
                     $B = new Button("FTP-Upload erfolgreich", "okCatch");
                     $B->type("icon");
                     $B->style("float:left;margin-right:10px;");
                     $T->addRow(array($B . "Das Backup wurde erfolgreich auf den FTP-Server hochgeladen"));
                 }
             } catch (Exception $e) {
                 $T->addRow(array($B . $e->getMessage()));
             }
             $html .= $T;
         } else {
             $B = new Button("Es ist ein Fehler aufgetreten", "stop");
             $B->type("icon");
             $B->style("float:left;margin-right:10px;");
             $T->addRow($B . "Beim Erstellen des Backups ist ein Fehler aufgetreten: {$BOK}");
             $html .= $T;
         }
         $html .= OnEvent::script(OnEvent::frame("desktopLeft", "Desktop", "2"));
         #"<script type=\"text/javascript\">contentManager.reloadFrame('contentLeft');</script>";
     }
     $gesamt = 0;
     $data = $this->getBackupsList();
     $i = 0;
     $maxD = 5;
     if (count($data) < $maxD) {
         $maxD = count($data);
     }
     $TF = new HTMLTable(2, "Backups ({$maxD}/" . count($data) . ")");
     $TF->addColStyle(2, "text-align:right;");
     $TF->setColWidth(2, "80px");
     foreach ($data as $name => $size) {
         if ($i < 5) {
             if ($name == basename(BackupManagerGUI::getNewBackupName())) {
                 $name = "<span style=\"color:green;\">{$name}</span>";
             }
             $TF->addRow(array($name, Util::formatByte($size, 2)));
         }
         $i++;
         $gesamt += $size;
     }
     $TF->addRow("");
     $TF->addRowClass("backgroundColor0");
     $TF->addRow(array("<b>Gesamt:</b>", "<b>" . Util::formatByte($gesamt, 2) . "</b>"));
     $TF->addCellStyle(1, "text-align:right");
     $TF->addRow(array("Diese Backups können als Admin-Benutzer im Installation-Plugin heruntergeladen und wiederhergestellt werden."));
     $TF->addRowColspan(1, 2);
     $TF->addRow("");
     $TF->addRowClass("backgroundColor0");
     $TF->addRow(array($this->noBackupButton()));
     $TF->addRowColspan(1, 2);
     $BC = new Button("Fenster\nschließen", "bestaetigung");
     $BC->onclick(OnEvent::closePopup("", "BackupManagerGUI"));
     $BC->style("float:right;margin:10px;");
     $BD = new Button("Details\nanzeigen", "down");
     $BD->onclick("\$j('#BMMoreDetails').slideToggle();");
     $BD->style("margin:10px;");
     $BD->className("backgroundColor0");
     echo $html . $BC . $BD . "<div style=\"clear:both;\"></div><div id=\"BMMoreDetails\" style=\"display:none;\">" . $TF . "</div>";
 }
Ejemplo n.º 14
0
 public function getInvitees($TodoID)
 {
     $AC = anyC::get("TodoInvitation", "TodoInvitationTodoID", $TodoID);
     $AC->addOrderV3("TodoInvitationID", "DESC");
     $T = new HTMLTable(3, "Teilnehmer");
     $T->setColWidth(1, 20);
     $T->setColWidth(3, 20);
     $T->maxHeight(200);
     while ($I = $AC->n()) {
         $IH = new HTMLInput("TodoInvitationIsHead", "checkbox", $I->A("TodoInvitationIsHead"));
         $IH->activateMultiEdit("TodoInvitation", $I->getID());
         $IH->title("Moderator?");
         $BD = new Button("Teilnehmer entfernen", "trash_stroke", "iconic");
         $BD->rmePCR("mTodo", "-1", "removeInvitee", array($TodoID, $I->getID()), "function(t){ \$j('#eventSideContent').html(t.responseText); }");
         $T->addRow(array($IH, $I->A("TodoInvitationName") . "<br><small style=\"color:grey;\">&lt;" . $I->A("TodoInvitationUserEmail") . "&gt;</small>", $BD));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Keine Teilnehmer"));
         $T->addRowColspan(1, 2);
     }
     #$T->addRow(array("HI", "HO"));
     echo $T;
     $Todo = new Todo($TodoID);
     $BN = new Button("Neuer Teilnehmer", "new", "icon");
     $BN->className("highlight");
     $BN->style("padding:10px;");
     $BN->onclick("\$j('#containerButtons .highlight').removeClass('highlight'); \$j(this).addClass('highlight'); \$j('.teilnehmerContainer').hide(); \$j('#containerNew').show(); ");
     $BS = new Button("Systembenutzer", "users", "icon");
     $BS->style("padding:10px;");
     $BS->onclick("\$j('#containerButtons .highlight').removeClass('highlight'); \$j(this).addClass('highlight'); \$j('.teilnehmerContainer').hide(); \$j('#containerSystem').show(); ");
     $BA = "";
     if (Session::isPluginLoaded("mAnsprechpartner") and $Todo->A("TodoClass") == "WAdresse") {
         $BA = new Button("Ansprechpartner", "./ubiquitous/Ansprechpartner/Ansprechpartner.png", "icon");
         $BA->style("padding:10px;");
         $BA->onclick("\$j('#containerButtons .highlight').removeClass('highlight'); \$j(this).addClass('highlight'); \$j('.teilnehmerContainer').hide(); \$j('#containerAnsprech').show(); ");
     }
     echo "<div style=\"height:30px;\"></div><div id=\"containerButtons\">{$BN}{$BS}{$BA}</div>";
     $F = new HTMLForm("neuerTeilnehmer", array("TodoID", "name", "email"), " Neuer Teilnehmer");
     $F->getTable()->setColWidth(1, 120);
     $F->setValue("TodoID", $TodoID);
     $F->setLabel("email", "E-Mail");
     $F->setType("TodoID", "hidden");
     $F->setSaveRMEPCR("Hinzufügen", "", "mTodo", -1, "addInvitee", "function(t){ \$j('#eventSideContent').html(t.responseText); }");
     echo "<div id=\"containerNew\" class=\"teilnehmerContainer\" style=\"padding-bottom:10px;\">" . $F . "</div>";
     $S = new HTMLList();
     $AC = Users::getUsers();
     while ($U = $AC->n()) {
         $S->addItem("<a href=\"#\" onclick=\"" . OnEvent::rme(new mTodoGUI(-1), "addInvitee", array($TodoID, "'" . $U->A("name") . "'", "'" . $U->A("UserEmail") . "'"), "function(t){ \$j('#eventSideContent').html(t.responseText); }") . " return false;\">" . $U->A("name") . "</a>");
         if ($U->getID() == Session::currentUser()->getID()) {
             $S->addItemClass("confirm");
             $S->addItemStyle("padding-top:5px;padding-bottom:5px;");
         }
     }
     echo "<div id=\"containerSystem\" class=\"teilnehmerContainer\" style=\"display:none;padding-bottom:10px;\">" . $S . "</div>";
     $T = new HTMLTable(1);
     if ($Todo->A("TodoClass") == "WAdresse" and Session::isPluginLoaded("mAnsprechpartner")) {
         $S = new HTMLList();
         $AC = Ansprechpartner::getAllAnsprechpartnerToAdresse($Todo->A("TodoClassID"));
         while ($U = $AC->n()) {
             $S->addItem("<a href=\"#\" onclick=\"" . OnEvent::rme(new mTodoGUI(-1), "addInvitee", array($TodoID, "'" . $U->A("AnsprechpartnerVorname") . " " . $U->A("AnsprechpartnerNachname") . "'", "'" . $U->A("AnsprechpartnerEmail") . "'"), "function(t){ \$j('#eventSideContent').html(t.responseText); }") . " return false;\">" . $U->A("AnsprechpartnerVorname") . " " . $U->A("AnsprechpartnerNachname") . "</a>");
         }
         if ($AC->numLoaded() == 0) {
             $S->addItem("Keine Ansprechpartner");
         }
         echo "<div id=\"containerAnsprech\" class=\"teilnehmerContainer\" style=\"display:none;padding-bottom:10px;\">{$S}</div>";
     }
 }
Ejemplo n.º 15
0
 public function getSelectButton($onClick = null)
 {
     $B = new Button("Auswahl hinzufügen", "./images/i2/cart.png", "icon");
     $B->onclick(str_replace(array("%COLLECTIONNAME", "%CLASSNAME", "%CLASSID"), array($this->collectionName, $this->className, $this->classID), $this->functionSelect));
     if ($onClick != null) {
         $B->onclick($onClick);
     }
     $B->className("selectionButton");
     return $B;
 }
Ejemplo n.º 16
0
 public function buttonDone($data)
 {
     $IOK = new Button("Fertig");
     $IOK->className("submitFormButton");
     $IOK->onclick("\$('#frameSelect').show(); \$('#frameEdit').hide();");
     return $IOK;
 }
Ejemplo n.º 17
0
 public function getHTML($id)
 {
     if ($_SESSION["S"]->checkIfUserLoggedIn() == true) {
         return -1;
     }
     $es = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
     $ts = $_SESSION["CurrentAppPlugins"]->getMenuTargets();
     $icons = $_SESSION["CurrentAppPlugins"]->getIcons();
     $appIco = $_SESSION["applications"]->getApplicationIcon($_SESSION["applications"]->getActiveApplication());
     if (isset($_COOKIE["phynx_color"]) and $_COOKIE["phynx_color"] != "standard") {
         $suffix = strrchr($appIco, ".");
         $newLogo = str_replace($suffix, ucfirst($_COOKIE["phynx_color"]) . $suffix, $appIco);
         if (file_exists("." . $newLogo)) {
             $appIco = $newLogo;
         }
     }
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     $newAppIco = Aspect::joinPoint("appLogo", $this, __METHOD__);
     if ($newAppIco != null) {
         $appIco = $newAppIco;
     }
     // </editor-fold>
     $appMenuHidden = "";
     $appMenuDisplayed = "";
     $appMenuActive = (!$_SESSION["S"]->isUserAdmin() and (!isset($_COOKIE["phynx_layout"]) or $_COOKIE["phynx_layout"] == "fixed" or $_COOKIE["phynx_layout"] == "horizontal" or $_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical"));
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     $aspectAppMenuActive = Aspect::joinPoint("appMenuActive", $this, __METHOD__);
     if ($aspectAppMenuActive !== null) {
         $appMenuActive = $aspectAppMenuActive;
     }
     // </editor-fold>
     $appIco = Environment::getS("ApplicationIcon:" . Applications::activeApplication(), $appIco);
     if ($appIco != "") {
         if (count($_SESSION["applications"]->getApplicationsList()) > 1 and !$_SESSION["S"]->isAltUser()) {
             echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden/Anwendung wechseln\" title=\"Abmelden/Anwendung wechseln\" onclick=\"" . Environment::getS("onLogout", "phynxContextMenu.start(this, 'Menu','1','Anwendung wechseln:','right');") . "\" />";
         } else {
             echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden\" title=\"Abmelden\" onclick=\"" . Environment::getS("onLogout", "userControl.doLogout();") . "\" />";
         }
     }
     $bigWorld = false;
     if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical")) {
         $bigWorld = true;
     }
     if (!$_SESSION["S"]->isUserAdmin()) {
         $userHiddenPlugins = mUserdata::getHiddenPlugins();
         $U = new mUserdata();
         $U->addAssocV3("typ", "=", "TTP");
         $B = new Button(Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()), "application");
         $B->type("icon");
         $B->className($bigWorld ? "tabImg" : "smallTabImg");
         #".(($t == null OR $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"")."
         $B->hasMouseOverEffect(false);
         $B->id("busyBox");
         #$appMenuHidden = $this->getAppMenuOrder("appMenuHidden");
         $appMenuDisplayed = $this->getAppMenuOrder("appMenuDisplayed");
         #if($appMenuDisplayed != "" AND $appMenuHidden == "")
         #	$appMenuHidden = implode(";", array_diff(array_values($es), explode(";", $appMenuDisplayed)));
     }
     $appMenuH = "\n\t\t\t<li id=\"appMenu_emptyList\" style=\"height:auto;" . ($appMenuHidden != "emptyList" ? "display:none;" : "") . "\">Ziehen Sie Einträge auf diese Seite, um sie aus dem Menü auszublenden und nur hier anzuzeigen.</li>";
     $appMenuD = "";
     if ($appMenuActive) {
         $es = self::sort($es, $appMenuDisplayed);
     }
     #, $appMenuHidden);
     echo "\n\t\t\t<div id=\"navTabsWrapper\">";
     if ($appMenuActive) {
         echo "\n\t\t\t<div\n\t\t\t\tclass=\"navBackgroundColor navBorderColor " . ($bigWorld ? "" : " smallTab") . " navTab\"\n\t\t\t\tid=\"SpellbookMenuEntry\"\n\t\t\t>\n\t\t\t\t<div onclick=\"contentManager.loadPlugin('contentScreen', 'Spellbook', 'SpellbookGUI;-');\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\t\t\t\t{$B}" . ($bigWorld ? Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()) : "") . "\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     $collapsedTabs = Environment::getS("collapsedTabs", "0") == "1";
     foreach ($es as $key => $value) {
         if (isset($userHiddenPlugins[$value])) {
             continue;
         }
         $single = $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($value);
         $anyC = new anyC();
         $text = $anyC->loadLanguageClass($single);
         if ($text != null and $text->getMenuEntry() != "") {
             $key = $text->getMenuEntry();
         }
         $t = !$_SESSION["S"]->isUserAdmin() ? $U->getUDValueCached("ToggleTab{$value}") : "big";
         if ($t == null and $collapsedTabs) {
             $t = "small";
         }
         $key = Aspect::joinPoint("renameTab", $this, __METHOD__, array($key), $key);
         if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "vertical" or $_COOKIE["phynx_layout"] == "desktop")) {
             $t = "big";
         }
         #$emptyFrame = "contentLeft";
         #if(isset($ts[$value]) AND $ts[$value] == "contentLeft") $emptyFrame = "contentRight";
         #$onclick = "contentManager.emptyFrame('contentLeft'); contentManager.emptyFrame('contentRight'); contentManager.emptyFrame('contentScreen'); contentManager.loadFrame('".(isset($ts[$value]) ? $ts[$value] : "contentRight")."', '$value', -1, 0, '{$value}GUI;-');$('windows').update('');";
         $onclick = "contentManager.loadPlugin('" . (isset($ts[$value]) ? $ts[$value] : "contentRight") . "', '{$value}', '{$value}GUI;-');";
         $B = new Button($key, $icons[$value]);
         $B->type("icon");
         $B->style("float:left;margin-right:10px;");
         $BM = new Button("Reihenfolge ändern", "./images/i2/topdown.png");
         $BM->type("icon");
         $BM->style("float:right;margin-right:5px;");
         $BM->className("appMenuHandle");
         $appMenu = "\n\t\t\t<li\n\t\t\t\tid=\"appMenu_{$value}\"\n\t\t\t\tonmouseover = \"this.className = 'navBackgroundColor';\"\n\t\t\t\tonmouseout = \"this.className = '';\"\n\t\t\t>\n\t\t\t\t{$BM}\n\t\t\t\t<div\n\t\t\t\t\tonclick=\"appMenu.hide(); {$onclick}\"\n\t\t\t\t>\n\t\t\t\t{$B}<p>{$key}</p>\n\t\t\t\t</div>\n\t\t\t</li>";
         if (strpos($appMenuHidden, $value) !== false) {
             $appMenuH .= $appMenu;
         } else {
             $appMenuD .= $appMenu;
         }
         $style = (strpos($appMenuHidden, $value) !== false and $appMenuActive) ? "style=\"display:none;\"" : "";
         echo "\n\t\t\t\t\n\t\t\t\t<div\n\t\t\t\t\tid=\"" . $value . "MenuEntry\"\n\t\t\t\t\tclass=\"navBackgroundColor navBorderColor " . (($t == null or $t == "big") ? "" : " smallTab") . " navTab\"\n\t\t\t\t\t{$style}\n\t\t\t\t\t>\n\t\t\t\t\t<!--<img\n\t\t\t\t\t\tstyle=\"margin-top:-28px;float:left;\"\n\t\t\t\t\t\tid=\"" . $value . "TabMinimizer\"\n\t\t\t\t\t\tclass=\"navTabMinimizer\"\n\t\t\t\t\t\ttitle=\"Tab {$key} vergrößern/verkleinern\"\n\t\t\t\t\t\tonclick=\"toggleTab('{$value}');\"\n\t\t\t\t\t\tsrc=\"./images/i2/tabMinimize.png\" />-->\n\t\t\t\t\t\n\t\t\t\t\t<div onclick=\"{$onclick}\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tid=\"" . $value . "MenuImage\"\n\t\t\t\t\t\t\ttitle=\"{$key}\"\n\t\t\t\t\t\t\t" . (($t == null or $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"") . "\n\t\t\t\t\t\t\tsrc=\"{$icons[$value]}\" />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t" . (($t == null or $t == "big") ? $key : "") . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
     }
     echo "\n\t\t\t\t<div style=\"float:none;clear:both;border:0px;height:0px;width:0px;margin:0px;padding:0px;\"></div>\n\t\t\t</div>";
     /*
     			<div id=\"appMenuContainer\" class=\"backgroundColor0 navBorderColor\" style=\"display:none;\">
     				<ul style=\"min-height:50px;\" id=\"appMenuHidden\">$appMenuH</ul>
     				<p class=\"backgroundColor2\" style=\"cursor:pointer;background-image:url(./images/navi/down.png);background-repeat:no-repeat;background-position:95% 50%;\" onclick=\"if($('appMenuDisplayedContainer').style.display == 'none') new Effect.BlindDown('appMenuDisplayedContainer'); else new Effect.BlindUp('appMenuDisplayedContainer');\">Weitere Reiter</p>
     				<div id=\"appMenuDisplayedContainer\" style=\"display:none;\"><ul style=\"min-height:50px;\" id=\"appMenuDisplayed\">$appMenuD</ul><p>Um die Sortierung der Einträge zu übernehmen, muss die Anwendung <a href=\"#\" onclick=\"Installation.reloadApp(); return false;\">neu geladen werden</a>.</p></div>
     			</div>";*/
     #echo OnEvent::script("");
     if (!$_SESSION["S"]->isUserAdmin()) {
         $ud = new mUserdata();
         $al = $ud->getUDValue("noAutoLogout", "false");
         if ($al == "true") {
             echo "<script type=\"text/javascript\">contentManager.startAutoLogoutInhibitor();</script>";
         }
     }
     echo OnEvent::script("contentManager.isAltUser = "******"true" : "false") . ";");
     try {
         $c = get_class(Session::currentUser());
         $U = new $c(Session::currentUser()->getID());
         echo "<script type=\"text/javascript\">\$j.datepicker.setDefaults(\$j.datepicker.regional['" . $U->A("language") . "']); " . (Session::physion() ? "\$j('#navigation').hide();" : "") . "</script>";
     } catch (Exception $e) {
     }
 }
Ejemplo n.º 18
0
 private function getSelectButton()
 {
     $B = new Button("Auswahl hinzufügen", "./images/i2/cart.png");
     $B->onclick(str_replace(array("%COLLECTIONNAME", "%CLASSNAME", "%CLASSID"), array($this->collectionName, $this->className, $this->classID), $this->functionSelect));
     $B->type("icon");
     $B->className("selectionButton");
     return $B;
 }
Ejemplo n.º 19
0
 function settings($plugin, $identifier = "", $leftOrRight = "right")
 {
     $this->settings = $B = new Button("Einstellungen", "wrench", "iconic");
     if (strpos($this->style, "float:right;") !== false) {
         $B->style("float:right;margin-right:-22px;");
     } else {
         $B->style("margin-left:4px;margin-bottom:15px;");
     }
     $B->contextMenu($plugin, $identifier, "Einstellungen:", $leftOrRight);
     $B->className("buttonSettings iconicG");
     return $B;
 }
Ejemplo n.º 20
0
 function getCMSHTML()
 {
     registerClassPath("GSRaumgruppe", Util::getRootPath() . "FCalc/GSRaumgruppe/GSRaumgruppe.class.php");
     registerClassPath("GSRaumgruppe", Util::getRootPath() . "FCalc/GSRaumgruppe/GSRaumgruppe.class.php");
     registerClassPath("ObjektL", Util::getRootPath() . "personalKartei/ObjekteL/ObjektL.class.php");
     registerClassPath("mGSTaetigkeitGUI", Util::getRootPath() . "FCalc/GSTaetigkeit/mGSTaetigkeitGUI.class.php");
     registerClassPath("GSTaetigkeit", Util::getRootPath() . "FCalc/GSTaetigkeit/GSTaetigkeit.class.php");
     registerClassPath("GSQMPruefer", Util::getRootPath() . "FCalc/GSQM/GSQMPruefer.class.php");
     $html = "\n\t\t<script src=\"./lib/jquery.signaturepad.min.js\"></script>\n\t\t<style type=\"text/css\">\n\t\t\th3 {\n\t\t\t\tpadding:7px;\n\t\t\t\tmargin-top:30px;\n\t\t\t\tclear:both;\n\t\t\t\tborder-bottom:1px solid #97a652;\n\t\t\t\tmargin-left:-10px;\n\t\t\t\tmargin-right:-10px;\n\t\t\t\tbackground-color:rgb(" . mGSTaetigkeitGUI::$fillColor[0] . ", " . mGSTaetigkeitGUI::$fillColor[1] . ", " . mGSTaetigkeitGUI::$fillColor[2] . ");\n\t\t\t}\n\t\t\t\n\t\t\t.backgroundColor1 {\n\t\t\t\tbackground-color:rgb(" . mGSTaetigkeitGUI::$fillColor[0] . ", " . mGSTaetigkeitGUI::$fillColor[1] . ", " . mGSTaetigkeitGUI::$fillColor[2] . ");\n\t\t\t}\n\t\t\t\n\t\t\th4 {\n\t\t\t\tpadding-top:15px;\n\t\t\t\tpadding-bottom:15px;\n\t\t\t}\n\t\t\t\n\t\t\t.frameRight td {\n\t\t\t\tpadding-left:3px;\n\t\t\t\tpadding-top:3px;\n\t\t\t\tpadding-bottom:3px;\n\t\t\t\tcursor:pointer;\n\t\t\t}\n\t\t\t\n\t\t\t.frameRight tr:hover {\n\t\t\t\tbackground-color:rgb(" . mGSTaetigkeitGUI::$fillColor[0] . ", " . mGSTaetigkeitGUI::$fillColor[1] . ", " . mGSTaetigkeitGUI::$fillColor[2] . ");\n\t\t\t}\n\t\t\t\n\t\t\t.frameRight {\n\t\t\t\tborder-left:1px solid #97a652;\n\t\t\t\tpadding-left:10px;\n\t\t\t}\n\t\t\t\n\t\t\t.frameLeft td {\n\t\t\t\tpadding-top:3px;\n\t\t\t\tpadding-bottom:3px;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@media print { \n\t\t\t\t.frameRight {\n\t\t\t\t\tdisplay:none;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\th3 {\n\t\t\t\t\tpage-break-before:always;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\th2 + h3 {\n\t\t\t\t\t page-break-before:avoid;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t.buttonQuestion {\n\t\t\t\tfont-size:30px;\n\t\t\t\tpadding-top:40px;\n\t\t\t\tpadding-bottom:40px;\n\t\t\t\ttext-align:center;\n\t\t\t\twidth:120px;\n\t\t\t\tmargin-right:20px;\n\t\t\t}\n\t\t\t\n\t\t\t.box {\n\t\t\t\tmargin-top:20px;\n\t\t\t\twidth:420px;\n\t\t\t\tpadding:30px;\n\t\t\t\tborder-width:1px;\n\t\t\t\tborder-style:solid;\n\t\t\t\tborder-radius:5px;\n\t\t\t\tbox-shadow:2px 2px 2px #bbb;\n\t\t\t\tmargin-left:10px;\n\t\t\t\tmargin-bottom:20px;\n\t\t\t}\n\t\t\t\n\t\t\t#headerStep1 span, #headerStep2 span, #headerStep3 span, #headerStep4 span {\n\t\t\t\t/*-webkit-transform: translate(15px,200px) rotate(270deg);\n\t\t\t\t-moz-transform: translate(15px,200px) rotate(270deg);\n\t\t\t\t-o-transform: translate(15px,200px) rotate(270deg);\n\t\t\t\t-ms-transform: translate(15px,200px) rotate(270deg);\n\t\t\t\t-moz-transform-origin: top left;\n\t\t\t\t-webkit-transform-origin: top left;\n\t\t\t\t-o-transform-origin: top left;\n\t\t\t\t-ms-transform-origin: top left;*/\n\t\t\t}\n\t\t\t\n\t\t\t#headerStep1, #headerStep2, #headerStep3, #headerStep4 {\n\t\t\t\tborder-bottom-width:0px;\n\t\t\t\tborder-right-width:1px;\n\t\t\t\tborder-right-style:solid;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\twidth:30px;\n\t\t\t\theight:450px;\n\t\t\t\tmargin-right:20px;\n\t\t\t}\n\t\t\t\n\t\t\t#step1, #step2, #step3, #step4 {\n\t\t\t\twidth:600px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmargin-top:40px;\n\t\t\t\tvertical-align: top;\n\t\t\t}\n\t\t\t\n\t\t\t#selectPruefer {\n\t\t\t\tlist-style-type: none;\n\t\t\t}\n\n\t\t\t#selectPruefer li, #selectCategories li {\n\t\t\t\tfont-size:15px;\n\t\t\t\tpadding:10px;\n\t\t\t}\n\t\t</style>\n\t\t<script type=\"text/javascript\">\n\t\t\tvar CP_LV = {\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tvar CP_QM = {\n\t\t\t\tquestions: null,\n\t\t\t\tRaumGruppen: new Array(),\n\t\t\t\tqCounter: -1,\n\t\t\t\tcCounter: 0,\n\t\t\t\tcategories: null,\n\t\t\t\tanswers: {},\n\t\t\t\tauthor: null,\n\t\t\t\t\n\t\t\t\taddRaumGruppe: function(RaumGruppeID){\n\t\t\t\t\tif(\$.inArray(RaumGruppeID, CP_QM.RaumGruppen) >= 0){\n\t\t\t\t\t\tCP_QM.RaumGruppen.splice( \$.inArray(RaumGruppeID, CP_QM.RaumGruppen), 1 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tCP_QM.RaumGruppen.push(RaumGruppeID);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.updateOrderDisplay();\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tupdateOrderDisplay: function(){\n\t\t\t\t\t\$('.orderDisplay').html('&nbsp;');\n\t\t\t\t\t\n\t\t\t\t\tfor(var i = 0; i < CP_QM.RaumGruppen.length; i++){\n\t\t\t\t\t\t\$('#orderDisplay'+CP_QM.RaumGruppen[i]).html(i + 1);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tdoQuestionsAgain: function(){\n\t\t\t\t\t\$('#step3').show();\n\t\t\t\t\t\$('#step4').hide();\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.qCounter = 0;\n\t\t\t\t\tCP_QM.cCounter = 0;\n\t\t\t\t\tCP_QM.answers = {};\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.showQuestion();\n\t\t\t\t\t\n\t\t\t\t\t\$('#headerStep4').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep3').css('background-color', '');\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tsave: function(){\n\t\t\t\t\tvar value = \$.jStorage.get('QM');\n\t\t\t\t\tif(!value){\n\t\t\t\t\t\t\$.jStorage.set('QM', [{ 'answers': CP_QM.answers, 'signature' : \$('.sigPad input[name=output]').val(), 'author' : CP_QM.author, 'timestamp' : Math.round(+new Date()/1000) }])\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue.push({ 'answers': CP_QM.answers, 'signature' : \$('.sigPad input[name=output]').val(), 'author' : CP_QM.author, 'timestamp' : Math.round(+new Date()/1000) });\n\t\t\t\t\t\t\$.jStorage.set('QM', value)\n\t\t\t\t\t}\n\t\t\t\t\tCP_QM.view();\n\t\t\t\t\t//console.log(\$.jStorage.get('QM'));\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tupload: function(){\n\t\t\t\t\t\$.ajax({url: './index.php?CC=FCalc&M=checkConnection', success: function(transport){\n\t\t\t\t\t\tif(transport != '1')\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tCustomerPage.rme('saveData', 'data='+JSON.stringify(\$.jStorage.get('QM')), function(){ /*\$.jStorage.deleteKey('QM');*/ });\n\t\t\t\t\t\t\n\t\t\t\t\t},\n\t\t\t\t\t\n\t\t\t\t\terror: function(XMLHttpRequest, textStatus, errorThrown) {\n\t\t\t\t\t\tif(textStatus == 'timeout')\n\t\t\t\t\t\t\talert('Keine Verbindung zum Server!');\n\t\t\t\t\t\t\n\t\t\t\t\t},\n\t\t\t\t\t\n\t\t\t\t\ttype: 'GET'});\n\t\t\t\t\t\t\n/*\n\n\t\t\t\t\tvar value = \$.jStorage.get('QM');\n\t\t\t\t\tif(!value){\n\t\t\t\t\t\t\$('#view').html('Es wurden keine Prüfungen gespeichert');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor(var i = 0; i < value.length; i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}*/\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tview: function(){\n\t\t\t\t\tvar value = \$.jStorage.get('QM');\n\t\t\t\t\tif(!value){\n\t\t\t\t\t\t\$('#view').html('Es wurden keine Prüfungen gespeichert');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar s = '<ul>';\n\t\t\t\t\t\t\n\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\tfor(var i = 0; i < value.length; i++){\n\t\t\t\t\t\t\tvar date = new Date(value[i].timestamp*1000);\n\t\t\t\t\t\t\tvar hours = date.getHours();\n\t\t\t\t\t\t\tvar minutes = date.getMinutes();\n\t\t\t\t\t\t\t//var seconds = date.getSeconds();\n\t\t\t\t\t\t\tvar year = date.getFullYear();\n\t\t\t\t\t\t\tvar month = date.getMonth();\n\t\t\t\t\t\t\tvar day = date.getDate();\n\n\n\t\t\t\t\t\t\ts += '<li>Prüfung vom '+day+'.'+month+'.'+year+', '+hours+':'+minutes+' Uhr</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ts += '</ul>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\$('#view').html(s);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tnew: function(){\n\t\t\t\t\t\$('#step1').show();\n\t\t\t\t\t\$('#step4').hide();\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.qCounter = -1;\n\t\t\t\t\tCP_QM.cCounter = 0;\n\t\t\t\t\tCP_QM.answers = {};\n\t\t\t\t\t\n\t\t\t\t\t//CP_QM.showQuestion();\n\n\t\t\t\t\t\$('#headerStep4').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep1').css('background-color', '');\n\t\t\t\t},\n\n\t\t\t\tstep2: function(authorID){\n\t\t\t\t\t\$('#step1').hide();\n\t\t\t\t\t\$('#step2').show();\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.author = authorID;\n\t\t\t\t\t\n\t\t\t\t\t\$('#headerStep1').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep2').css('background-color', '');\n\t\t\t\t\t\n\t\t\t\t},\n\n\t\t\t\tstep3: function(){\n\t\t\t\t\t\$('#step1').hide();\n\t\t\t\t\t\$('#step2').hide();\n\t\t\t\t\t\$('#step3').show();\n\t\t\t\t\t\n\t\t\t\t\t\$('#headerStep2').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep3').css('background-color', '');\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.nextQuestion();\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tstep4: function(){\n\t\t\t\t\t\$('#step3').hide();\n\t\t\t\t\t\$('#step4').show();\n\t\t\t\t\t\n\t\t\t\t\t\$('#headerStep3').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep4').css('background-color', '');\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.view();\n\t\t\t\t\t\n\t\t\t\t\t//console.log(CP_QM.answers);\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tanswerQuestion: function(answer){\n\t\t\t\t\tif(typeof CP_QM.answers[CP_QM.cCounter] == 'undefined')\n\t\t\t\t\t\tCP_QM.answers[CP_QM.cCounter] = {};\n\t\t\t\t\t\t\n\t\t\t\t\tvar current = CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]][CP_QM.qCounter];\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.answers[CP_QM.cCounter][CP_QM.qCounter] = {'answer' : answer, 'object' : current };\n\t\t\t\t\t\n\t\t\t\t\t//console.log(CP_QM.answers);\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.nextQuestion();\n\t\t\t\t},\n\n\t\t\t\tnextQuestion: function(){\n\t\t\t\t\tCP_QM.qCounter++;\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.qCounter >= CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]].length) {\n\t\t\t\t\t\tCP_QM.qCounter = 0;\n\t\t\t\t\t\tCP_QM.cCounter++;\n\t\t\t\t\t\tCP_QM.showCategoryBox();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.cCounter >= CP_QM.RaumGruppen.length){\n\t\t\t\t\t\tCP_QM.step4();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.showQuestion();\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tpreviousQuestion: function(){\n\t\t\t\t\tCP_QM.qCounter--;\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.qCounter == -1) {\n\t\t\t\t\t\tCP_QM.cCounter--;\n\t\t\t\t\t\tCP_QM.qCounter = CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]].length - 1;\n\t\t\t\t\t\tCP_QM.showCategoryBox();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.cCounter == -1){\n\t\t\t\t\t\t//CP_QM.step4();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.showQuestion();\n\n\t\t\t\t\t\n\t\t\t\t},\n\n\t\t\t\tshowQuestion: function(){\n\t\t\t\t\t\$('#buttonPreviousQuestion').removeAttr('disabled');\n\t\t\t\t\t\$('.buttonQuestion').css('background-color', '');\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.qCounter == 0 && CP_QM.cCounter == 0)\n\t\t\t\t\t\t\$('#buttonPreviousQuestion').attr('disabled', 'disabled');\n\n\t\t\t\t\tif(typeof CP_QM.answers[CP_QM.cCounter] != 'undefined' && CP_QM.answers[CP_QM.cCounter][CP_QM.qCounter] != undefined){\n\t\t\t\t\t\tvar B = 'Nein';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(CP_QM.answers[CP_QM.cCounter][CP_QM.qCounter] == 1)\n\t\t\t\t\t\t\tB = 'Teils';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(CP_QM.answers[CP_QM.cCounter][CP_QM.qCounter] == 2)\n\t\t\t\t\t\t\tB = 'Ja';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\$('#button'+B).css('background-color', '#F5FFC5');\n\t\t\t\t\t}\n\n\t\t\t\t\t\$('#category').html(CP_QM.categories[CP_QM.RaumGruppen[CP_QM.cCounter]]);\n\t\t\t\t\t\$('#categoryInfo').html(CP_QM.categories[CP_QM.RaumGruppen[CP_QM.cCounter]]);\n\t\t\t\t\t\n\t\t\t\t\tvar current = CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]][CP_QM.qCounter];\n\t\t\t\t\tvar q = current.label;\n\t\t\t\t\tif(current.turnusWoechentlich > 0)\n\t\t\t\t\t\tq += ' '+current.turnusWoechentlich+'xW';\n\t\t\t\t\t\t\n\t\t\t\t\tif(current.turnusMonatlich > 0)\n\t\t\t\t\t\tq += ' '+current.turnusMonatlich+'xM';\n\t\t\t\t\t\t\n\t\t\t\t\tif(current.turnusJaehrlich > 0)\n\t\t\t\t\t\tq += ' '+current.turnusJaehrlich+'xJ';\n\t\t\t\t\t\t\n\t\t\t\t\t\$('#question').html(q);\n\t\t\t\t\t\n\t\t\t\t\t\$('#qCounter').html((CP_QM.qCounter + 1)+'/'+CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]].length);\n\t\t\t\t\t\$('#cCounter').html((CP_QM.cCounter + 1)+'/'+CP_QM.RaumGruppen.length);\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tcloseCategoryBox: function(){\n\t\t\t\t\t\$('#categoryBox').hide();\n\t\t\t\t\t\$('#questionBox').show();\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tshowCategoryBox: function(){\n\t\t\t\t\t\$('#categoryBox').show();\n\t\t\t\t\t\$('#questionBox').hide();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\$(document).ready(function(){\n\t\t\t\t\$('#selectPruefer').attr('size', 10);\n\t\t\t});\n\t\t</script>";
     $OID = $_GET["OBJ"] / GSRaumgruppe::$mult;
     $O = new ObjektL($OID);
     switch ($_GET["A"]) {
         case "LV":
             if (file_exists(Util::getRootPath() . "specifics/CPLogo.png")) {
                 $html .= "<img src=\"../../specifics/CPLogo.png\" style=\"float:right;\" />";
             }
             $html .= "<h1>Leistungsverzeichnis</h1>\n\t\t\t\t\t<h2>für " . $O->A("objektName") . "</h2>";
             $GSR = anyC::get("GSRaumgruppe", "GSRaumgruppeObjektLID", $OID);
             $GSR->addOrderV3("GSRaumgruppeKuerzel");
             while ($R = $GSR->getNextEntry()) {
                 $html .= "<h3>" . $R->A("GSRaumgruppeKuerzel") . " (" . $R->A("GSRaumgruppeName") . ")</h3>\n\t\t\t\t\t\t<div style=\"max-width:1200px;\">";
                 $leftFrame = "<div style=\"width:490px;float:left;\" class=\"frameLeft\" id=\"frameLeft" . $R->getID() . "\">" . $this->leftFrame($R) . "</div>";
                 $rightFrame = "<div style=\"float:right;width:490px;margin-bottom:20px;\" class=\"frameRight\" id=\"frameRight" . $R->getID() . "\">" . $this->rightFrame($R) . "</div>";
                 $html .= "{$rightFrame}{$leftFrame}<div style=\"clear:both;\"></div></div>";
             }
             break;
         case "QM":
             $html .= "<h1>Qualitätsmanagement</h1>\n\t\t\t\t\t<h2>für " . $O->A("objektName") . "</h2>";
             $html .= "<h3 id=\"headerStep1\" class=\"borderColor1\"><span>" . $this->getStringImage("Prüfer") . "</span></h3><div id=\"step1\">\n\t\t\t\t\t<p>Bitte wählen Sie den Prüfer:</p>";
             $L = new HTMLList();
             $L->setListID("selectPruefer");
             #$pruefer = array(0 => "bitte auswählen...");
             #$Users = Users::getUsers();
             $ACP = anyC::get("GSQMPruefer");
             $ACP->addJoinV3("Personal", "GSQMPrueferPersonalID", "=", "PersonalID");
             $ACP->addOrderV3("nachname");
             $ACP->addOrderV3("vorname");
             while ($U = $ACP->getNextEntry()) {
                 $L->addItem("<a href=\"#\" onclick=\"CP_QM.step2(" . $U->getID() . "); return false;\">" . $U->A("nachname") . " " . $U->A("vorname") . "</a>");
             }
             #$pruefer[$U->getID()] = $U->A("name");
             #$IU = new HTMLInput("pruefer", "select", "0", $pruefer);
             #$IU->onchange("if(this.value > 0) CP_QM.step2();");
             #$IU->id("selectPruefer");
             #$IU->style("width:400px;");
             $html .= $L;
             $html .= "</div>\n\t\t\t\t\t<h3 id=\"headerStep2\" style=\"background-color:white;\" class=\"borderColor1\"><span>" . $this->getStringImage("Kategorienauswahl") . "</span></h3>\n\t\t\t\t\t<div id=\"step2\" style=\"display:none;\">\n\t\t\t\t\t\n\t\t\t\t\t<p>Bitte wählen Sie die Kategorien in der Reihenfolge, in der Sie prüfen möchten:</p>\n\t\t\t\t\t<ul style=\"list-style-type:none;\" id=\"selectCategories\">";
             $GSR = anyC::get("GSRaumgruppe", "GSRaumgruppeObjektLID", $OID);
             $GSR->addOrderV3("GSRaumgruppeKuerzel");
             $data = array();
             $categories = array();
             while ($R = $GSR->getNextEntry()) {
                 $html .= "\n\t\t\t\t\t\t<li style=\"margin-bottom:10px;\">\n\t\t\t\t\t\t\t<div style=\"width:30px;float:left;margin-right:10px;text-align:right;font-weight:bold;\" class=\"orderDisplay\" id=\"orderDisplay" . $R->getID() . "\">&nbsp;</div>\n\t\t\t\t\t\t\t<div style=\"margin-left:40px;\"><a href=\"#\" onclick=\"CP_QM.addRaumGruppe(" . $R->getID() . "); return false;\">" . $R->A("GSRaumgruppeKuerzel") . "\n\t\t\t\t\t\t\t<span style=\"color:grey;\">(" . $R->A("GSRaumgruppeName") . ")</span></div></a>\n\t\t\t\t\t\t</li>";
                 $data[$R->getID()] = json_encode($R->getQuestions());
                 $categories[$R->getID()] = $R->A("GSRaumgruppeName");
             }
             $GSR->resetPointer();
             $BOK = new Button("Weiter", "");
             $BOK->onclick("CP_QM.step3();");
             $html .= "\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tCP_QM.questions = {";
             foreach ($data as $RGID => $D) {
                 $html .= "\n" . $RGID . ": {$D},";
             }
             $html .= "\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.categories = " . json_encode($categories) . ";\n\t\t\t\t</script>";
             $html .= "</ul>\n\t\t\t\t\t{$BOK}\n\t\t\t\t\t</div>";
             $BJa = new Button("Ja");
             $BJa->onclick("CP_QM.answerQuestion(2);");
             $BJa->id("buttonJa");
             $BJa->className("buttonQuestion");
             $BTeils = new Button("Teils");
             $BTeils->onclick("CP_QM.answerQuestion(1);");
             $BTeils->id("buttonTeils");
             $BTeils->className("buttonQuestion");
             $BNein = new Button("Nein");
             $BNein->onclick("CP_QM.answerQuestion(0);");
             $BNein->id("buttonNein");
             $BNein->className("buttonQuestion");
             $BP = new Button("vorherige Frage");
             $BP->onclick("CP_QM.previousQuestion(0);");
             $BP->id("buttonPreviousQuestion");
             $BN = new Button("nächste Frage");
             $BN->onclick("CP_QM.nextQuestion(0);");
             $BN->id("buttonNextQuestion");
             $BW = new Button("Weiter");
             $BW->onclick("CP_QM.closeCategoryBox();");
             $BW->style("float:right;");
             $html .= "\n\t\t\t\t\t\t<h3 id=\"headerStep3\" class=\"borderColor1\" style=\"background-color:white;\"><span>" . $this->getStringImage("Prüfen") . "</span></h3>\n\t\t\t\t\t\t<div id=\"step3\" style=\"display:none;\">\n\t\t\t\t\t\t<div id=\"questionBox\" style=\"display:none;\">\n\t\t\t\t\t\t\t<p>{$BP} {$BN}</p>\n\t\t\t\t\t\t\t<div class=\"box borderColor1\">\n\t\t\t\t\t\t\t\t<p style=\"\">Kategorie: <span id=\"category\"></span></p>\n\t\t\t\t\t\t\t\t<p style=\"font-size:20px;font-weight:bold;\" id=\"question\"></p>\n\t\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>{$BJa}</td>\n\t\t\t\t\t\t\t\t\t\t<td>{$BTeils}</td>\n\t\t\t\t\t\t\t\t\t\t<td>{$BNein}</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"borderColor1 box\" id=\"categoryBox\">\n\t\t\t\t\t\t\t<span style=\"font-size:30px;\">Kategorie:</span><br/><br/><span id=\"categoryInfo\" style=\"font-size:15px;\"></span><br /><br/>\n\t\t\t\t\t\t\t{$BW}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p>Fragen in dieser Kategorie: <span id=\"qCounter\"></span></p>\n\t\t\t\t\t\t<p>Kategorien: <span id=\"cCounter\"></span></p>\n\t\t\t\t\t</div>";
             $BNochmal = new Button("Fragen erneut\nausfüllen");
             $BNochmal->onclick("CP_QM.doQuestionsAgain();");
             $BSave = new Button("Prüfung\nspeichern");
             $BSave->onclick("CP_QM.save();");
             $BNew = new Button("Neue\nPrüfung");
             $BNew->onclick("CP_QM.new();");
             $BUpload = new Button("Daten\nhochladen");
             $BUpload->onclick("CP_QM.upload();");
             $html .= "\n\t\t\t\t\t<h3 id=\"headerStep4\" class=\"borderColor1\" style=\"background-color:white;\"><span>" . $this->getStringImage("Abschluss") . "</span></h3>\n\t\t\t\t\t<div id=\"step4\" style=\"display:none;\">\n\t\t\t\t\t\t<div class=\"backgroundColor1\" style=\"height:450px;width:290px;float:right;\">\n\t\t\t\t\t\t\t<div id=\"view\"></div>\n\t\t\t\t\t\t\t{$BUpload}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{$BNochmal}\n\t\t\t\t\n\t\t\t\t\t\t<div class=\"sigPad\" style=\"margin-top:20px;\">\n\t\t\t\t\t\t\t<p>Unterschrift des Kunden:</p>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<canvas style=\"border-width:1px;border-style:solid;width:300px;height:150px;\" class=\"pad borderColor1\"></canvas>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"output\" class=\"output\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{$BSave}\n\t\t\t\t\t\t\t<!--<a href=\"#clear\">Leeren</a>-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t{$BNew}\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\t<script type=\"text/javascript\">\$(document).ready(function() { \$('.sigPad').signaturePad({drawOnly:true}); });</script>";
             break;
     }
     return $html;
 }
Ejemplo n.º 21
0
 public function buttonDone($data)
 {
     $IOK = new Button("Belegdaten speichern");
     $IOK->className("submitFormButton");
     $IOK->onclick("CustomerPage.rme('saveService', \$('#contentLeft :input').serialize(), function(){ document.location.reload();/*\$('#frameSelect').show(); \$('#frameEdit').hide();*/ }, function(){}, 'POST');");
     return $IOK;
 }