当前位置: 首页>>代码示例>>PHP>>正文


PHP HTMLTable::setColWidth方法代码示例

本文整理汇总了PHP中HTMLTable::setColWidth方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTable::setColWidth方法的具体用法?PHP HTMLTable::setColWidth怎么用?PHP HTMLTable::setColWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTMLTable的用法示例。


在下文中一共展示了HTMLTable::setColWidth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getService

 public function getService($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(4);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 200);
     $T->setColWidth(4, 200);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isWhat", "S");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     #$AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("isPrinted", "=", "0");
     $AC->addAssocV3("isEMailed", "=", "0");
     $AC->addAssocV3("isPixelLetteredTime", "=", "0");
     #$AC->addAssocV3("status", "=", "delivered");
     $AC->addAssocV3("GRLBMServiceMitarbeiter", "=", Session::currentUser()->getID(), "AND", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter2", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter3", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter4", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addOrderV3("datum", "DESC");
     #$AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $BPDF = new Button("PDF anzeigen");
         $BPDF->className("submitFormButton");
         $BPDF->style("background-color:#DDD;color:grey;float:right;");
         $BPDF->onclick("CustomerPage.popup('Service PDF', 'getPDFViewer', {GRLBMID: '" . $B->getID() . "'}, {width:'800px'});");
         $BOK = "";
         if ($B->A("GRLBMServiceSigAG") != "" and $B->A("GRLBMServiceSigAG") != "[]") {
             $BOK = new Button("Kunde hat unterschrieben", "check", "iconic");
             $BOK->style("font-size:55px;");
         }
         $Adresse = new Adresse($B->A("AdresseID"));
         $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress(), $BOK, $BPDF));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $event = "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\tCCAuftrag.lastTextbausteinUnten = null;\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');";
         if ($B->A("GRLBMServiceSigAG") == "" or $B->A("GRLBMServiceSigAG") == "[]") {
             $T->addCellEvent(1, "click", $event);
             $T->addCellEvent(2, "click", $event);
             $T->addRowStyle("cursor:pointer;");
         } else {
             $T->addRowStyle("cursor:default;");
         }
         $i++;
     }
     $html .= $T;
     return $html;
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:58,代码来源:CCService.class.php

示例2: browser

 public function browser()
 {
     $BA = new Button("Eintrag\nhinzufügen", "new");
     $BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass()));
     $BA->style("margin:10px;");
     $cols = 3 + count($this->colsLeft) + count($this->colsRight);
     $TE = new HTMLTable($cols, "Einträge");
     $TE->setColWidth(1, 20);
     $TE->setColWidth($cols, 20);
     $TE->useForSelection(false);
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     while ($A = $this->object->getNextEntry()) {
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');");
         $isEmpty = false;
         if ($this->emptyCheckField != null and $A->A($this->emptyCheckField) == "") {
             $autoLoad = $A->getID();
             $isEmpty = true;
         }
         if (!$isEmpty) {
             $div = Util::invokeStaticMethod(get_class($this->object), $this->parsers["main"], array($A));
         } else {
             $div = "Neuer Eintrag";
         }
         $row = array();
         $row[] = $BD;
         $row[] = $div;
         foreach ($this->colsRight as $col) {
             $c = Util::invokeStaticMethod(get_class($this->object), $col[0], array($A));
             $row[] = $c;
         }
         $row[] = $BE;
         $TE->addRow($row);
         $action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });";
         $TE->addCellEvent(2, "click", $action);
         $TE->addCellID(2, "popupEntryID" . $A->getID());
         $TE->addCellEvent(count($row), "click", $action);
     }
     if ($this->object->numLoaded() == 0) {
         $TE->addRow("Keine Einträge");
         $TE->addRowColspan(1, 3);
     }
     return "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#popupEntryID" . $autoLoad . "').trigger(Touch.trigger);") : "");
 }
开发者ID:nemiah,项目名称:trinityDB,代码行数:49,代码来源:HTMLPopupGUI.class.php

示例3: getAngebote

 public function getAngebote($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(2);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 130);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isA", "1");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     $AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("status", "=", "open");
     #$AC->addOrderV3("datum", "DESC");
     $AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $Adresse = new Adresse($B->A("AdresseID"));
         $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress()));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("cursor:pointer;border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $T->addRowEvent("click", "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');");
         $i++;
     }
     $html .= $T;
     return $html;
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:34,代码来源:CCAngebot.class.php

示例4: details

 public function details($UserID)
 {
     $p = mUserdata::getPluginSpecificData("mStatistik");
     $ps = mUserdata::getPluginSpecificData("mAkquise");
     if (!isset($p["pluginSpecificCanUseControlling"]) and $UserID != Session::currentUser()->getID() and !isset($ps["pluginSpecificCanSeeFrom{$UserID}"])) {
         return "";
     }
     $U = Users::getUsersArray(null, true);
     $AC = $this->data();
     $AC->setOrderV3("anzahl", "DESC");
     $AC->addJoinV3("Adresse", "TodoClassID", "=", "AdresseID");
     $AC->setGroupV3("CONCAT(TodoClass, TodoClassID)");
     $AC->addAssocV3("TodoUserID", "=", $UserID);
     $AC->setFieldsV3(array("firma", "vorname", "nachname", "COUNT(*) AS anzahl", "AdresseID", "TodoClass"));
     $T = new HTMLTable(2, "Termine " . $U[$UserID] . " vom {$this->startDatum} bis {$this->endDatum}");
     $T->setColWidth(1, 30);
     #$T->setColWidth(3, 20);
     $T->addColStyle(1, "text-align:right;");
     #$T->setTableID("termineTable");
     while ($A = $AC->n()) {
         #$B = new Button("Akquise anzeigen", "./images/i2/telephone.png", "icon");
         #$B->onclick("\$j('#termineTable .lastSelected').removeClass('lastSelected'); \$j(this).parent().parent().addClass('lastSelected'); ".Akquise::getWindowAction($A->A("AdresseID"), 0));
         #onclick="Popup.load('Akquise', 'mAkquise', '-1', 'showMinTelPopup', Array('65143','0'), '', 'edit', '{width: 730, top:$j(\'#navTabsWrapper\').outerHeight() + 20, left: contentManager.maxWidth() < 800 + 730 ? contentManager.maxWidth() - 740 : 800}');"
         if ($A->A("TodoClass") != "WAdresse") {
             $T->addRow(array($A->A("anzahl") . "x", "Ohne Adresse"));
             continue;
         }
         if ($A->A("TodoClass") == "WAdresse" and !$A->A("AdresseID")) {
             $T->addRow(array($A->A("anzahl") . "x", "Adresse gelöscht"));
             continue;
         }
         $T->addRow(array($A->A("anzahl") . "x", $A->A("firma") != "" ? $A->A("firma") : $A->A("vorname") . " " . $A->A("nachname")));
     }
     echo $T;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:35,代码来源:StatistikTodoGUI.class.php

示例5: addSettingPopup

 public function addSettingPopup()
 {
     $T = new HTMLTable(2);
     $T->setColWidth(1, 20);
     $T->useForSelection(false);
     $S = new System(1);
     $B = new Button("Eintrag erstellen", "./images/i2/cart.png", "icon");
     foreach ($S->types as $k => $v) {
         $T->addRow(array($B, $v->name));
         $T->addRowEvent("click", OnEvent::rme($this, "addSettingNew", array("'{$k}'"), "function(t){ " . OnEvent::closePopup("mSystem") . OnEvent::reload("Right") . " contentManager.loadFrame('contentLeft', 'System', t.responseText); }"));
     }
     echo $T;
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:13,代码来源:mSystemGUI.class.php

示例6: bricklets

 public function bricklets()
 {
     $BA = new Button("Bricklet\nhinzufügen", "new");
     $BA->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR("Tinkerforge", $this->getID(), "createNew", "", OnEvent::reloadPopup("Tinkerforge"));
     $BA->style("margin:10px;");
     $TE = new HTMLTable(4, "Bricklets");
     $TE->setColWidth(1, 20);
     $TE->setColWidth(2, 35);
     $TE->setColWidth(4, 20);
     $TE->useForSelection(false);
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     $AC = anyC::get("TinkerforgeBricklet", "TinkerforgeBrickletTinkerforgeID", $this->getID());
     while ($A = $AC->getNextEntry()) {
         $B = new Button("Master", "bars", "iconicL");
         $B->popup("", "Plot", "TinkerforgeBricklet", $A->getID(), "getControls", "", "", "{width:820}");
         $B->style("float:right;");
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('TinkerforgeBricklet','" . $A->getID() . "', function() { Popup.refresh('Tinkerforge'); },'Eintrag wirklich löschen?');");
         if ($A->A("TinkerforgeBrickletUID") == "") {
             $autoLoad = $A->getID();
         }
         $div = "<span id=\"TinkerforgeBrickletUID" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neues Bricklet") . "</span>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"TinkerforgeBrickletType" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletType") != "" ? TinkerforgeBricklet::$types[$A->A("TinkerforgeBrickletType")] : "") . "</small>";
         $TE->addRow(array($BD, $B, $div, $BE));
         $TE->addCellEvent(3, "click", "contentManager.selectRow(this); \$j('#editDetailsTinkerforge').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("editAP", "TinkerforgeBricklet", $A->getID(), "0", "function(){ \$j('#editAP').fadeIn(); }") . " });");
     }
     if ($AC->numLoaded() == 0) {
         $TE->addRow("Keine Bricklets eingetragen");
         $TE->addRowColspan(1, 3);
     }
     echo "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"editAP\"></div>\n\t\t\t<div id=\"listAP\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#TinkerforgeBrickletUID" . $autoLoad . "').parent().trigger(Touch.trigger);") : "");
 }
开发者ID:nemiah,项目名称:fheME,代码行数:36,代码来源:TinkerforgeGUI.class.php

示例7: getHTML

 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("mTool");
     $FB = new FileBrowser();
     $FB->addDir("../PM/GoD");
     $files = $FB->getAsLabeledArray("iPMTool", ".class.php", true);
     $tab = new HTMLTable(2, "Tools");
     $tab->setColWidth(1, "20px");
     foreach ($files as $key => $value) {
         $B = new Button("", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("loadFrameV2('contentLeft','{$value}');");
         $tab->addRow(array($B, $key));
     }
     return $tab;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:17,代码来源:mToolGUI.class.php

示例8: calc

 function calc($land, $kontonummer, $bankleitzahl, $ibanField, $bicField)
 {
     if ($kontonummer == "" or $bankleitzahl == "") {
         Red::alertD("Bitte tragen Sie Bankleitzahl und Kontonummer ein");
     }
     $url = "http://www.iban.de/iban-berechnen.html";
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_HTTPHEADER, array('User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0', 'Referer: http://www.iban.de/iban-berechnen.html', 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 'X-Requested-With: XMLHttpRequest'));
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, "ibanrechnerCountry={$land}&ibanrechnerBlz={$bankleitzahl}&ibanrechnerKonto={$kontonummer}&ibanToolkit=ibanrechner");
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $result = curl_exec($ch);
     curl_close($ch);
     $I = new IBAN(trim(str_replace("Die IBAN lautet: ", "", strip_tags($result))));
     $iban = $I->MachineFormat();
     $url = "https://www.s-bausparkasse.at/portal/if_ajax.asp";
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, "mode=calc.ibanbic.listofbic&cuid=&alt_iban=&iban={$iban}&rechnername=IBAN%2FBIC-Rechner&currentpageid=87&berechnungsdaten=&autocalc=&getresult=&country={$land}&bank={$bankleitzahl}&account=" . str_pad($kontonummer, 10, "0", STR_PAD_LEFT));
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     $result = curl_exec($ch);
     curl_close($ch);
     $ex = explode("&&&", $result);
     $ex[0] = str_replace("listofbic==", "", strip_tags(trim($ex[0])));
     $ex[1] = str_replace("iban==", "", trim($ex[1]));
     $T = new HTMLTable(3, "Gefundene Ergebnisse");
     $T->weight("light");
     $T->maxHeight(400);
     $T->useForSelection(false);
     $T->setColWidth(1, 20);
     $T->addHeaderRow(array("", "BIC", "IBAN"));
     foreach (explode("\n", $ex[0]) as $bic) {
         $B = new Button("Diese Kombination verwenden", "arrow_right", "iconic");
         $T->addRow(array($B, trim($bic), $ex[1]));
         $T->addRowEvent("click", "\$j('[name={$ibanField}]').val('{$ex['1']}'); \$j('[name={$bicField}]').val('" . trim($bic) . "'); " . OnEvent::closePopup("IBANCalc"));
     }
     echo $T;
     #echo "<pre>";
     #echo htmlentities(print_r($ex, true));
     #echo($result);
     #echo "</pre>";
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:44,代码来源:IBANCalcGUI.class.php

示例9: ldapUsersPopup

 function ldapUsersPopup()
 {
     $T = "";
     try {
         $AD = new LoginAD();
         $AD->getUsers();
         $T = new HTMLTable(2);
         $T->setColWidth(1, 20);
         $T->maxHeight(400);
         $T->useForSelection(false);
         $B = new Button("Eintrag bearbeiten", "./images/i2/edit.png", "icon");
         while ($U = $AD->n()) {
             $T->addRow(array($B, $U->A("name")));
             $T->addRowEvent("click", OnEvent::frame("contentLeft", "User", $U->getID()));
         }
     } catch (Exception $e) {
     }
     echo $T;
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:19,代码来源:UsersGUI.class.php

示例10: searchCity

 public function searchCity($name)
 {
     $data = file_get_contents("http://api.openweathermap.org/data/2.5/find?q=" . urlencode($name) . ",de&type=like&mode=json&APPID=" . $this->apiKey());
     $data = json_decode($data);
     if ($data->count == 0) {
         die("<p>Kein Ergebnis</p>");
     }
     $T = new HTMLTable(2);
     $T->weight("light");
     $T->useForSelection();
     $T->setColWidth(1, 20);
     foreach ($data->list as $I) {
         $B = new Button("Übernehmen", "arrow_left", "iconic");
         $T->addRow(array($B, $I->name));
         $T->addRowEvent("click", "\$j('[name=OpenWeatherMapCityID]').val('{$I->id}');");
     }
     echo $T;
     #echo "<pre>";
     #print_r($data);
     #echo "</pre>";
 }
开发者ID:nemiah,项目名称:fheME,代码行数:21,代码来源:OpenWeatherMapGUI.class.php

示例11: getHTML

 public function getHTML($id)
 {
     $tab = new HTMLTable(3, "Koordinaten");
     $tab->setColWidth(1, "20px");
     for ($i = 0; $i < 200; $i++) {
         $x = round(($i + 1) * 1000 * sin(($i + mt_rand(-0.9, 0.9)) * pi() / 5));
         $y = round(($i + 1) * 1000 * cos(($i + mt_rand(-1.2, 1.2)) * pi() / 3));
         $tab->addRow(array($i . ": ", "{$x}", "{$y}"));
         $tab->addCellStyle(1, "text-align:right");
         $tab->addCellStyle(2, "text-align:right");
         $S = new Starsystem(-1);
         $SA = $S->newAttributes();
         $SA->StarsystemName = "Starsystem " . ($i + 1);
         $SA->StarsystemX = $x;
         $SA->StarsystemY = $y;
         $SA->StarsystemRotation = rand(0, 180);
         $S->setA($SA);
         $S->newMe();
     }
     return $tab;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:21,代码来源:PMToolStarsystemCreatorGUI.class.php

示例12: EMailPopup

 /**
  * Method to display an E-Mail popup for easy E-Mail sending
  * 
  * Requires a method named "getEMailData" in $dataClass which returns an array:
  * array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
  * 
  * Will call $dataClass($dataClassID)::sendEmail afterwards
  * 
  * @param string $dataClass
  * @param string $dataClassID 
  */
 public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null)
 {
     $c = new $dataClass($dataClassID);
     $data = $c->getEMailData($callbackParameter);
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     $tab->addLV("Absender:", "{$data['fromName']}<br /><small>&lt;{$data['fromAddress']}&gt;</small>");
     if (count($data["recipients"]) == 1) {
         $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small>&lt;" . $data["recipients"][0][1] . "&gt;</small>");
     } else {
         $recipients = array();
         foreach ($data["recipients"] as $ID => $Rec) {
             $recipients[$ID] = new HTMLInput($Rec[0] . " &lt;" . $Rec[1] . "&gt;", "option", $ID);
         }
         $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", "0", $recipients);
         $IS->id("EMailRecipient{$dataClassID}");
         $tab->addLV("Empfänger:", $IS);
     }
     $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
     $tab->addRow(array("<textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea>"));
     $tab->addRowColspan(1, 2);
     $tab->addRowClass("backgroundColor0");
     if ($onSuccessFunction == null) {
         $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
     }
     $BAbort = new Button("Abbrechen", "stop");
     $BAbort->onclick("Popup.close('Util', 'edit');");
     $BAbort->style("margin-bottom:10px;margin-top:10px;");
     $BGo = new Button("E-Mail\nsenden", "okCatch");
     $BGo->style("float:right;margin-top:10px;");
     $BGo->rmePCR($dataClass, $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", count($data["recipients"]) == 1 ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
     #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
     $tab->addRow(array($BGo . $BAbort));
     $tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     echo $tab;
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:48,代码来源:UtilGUI.class.php

示例13: getListTable

 public function getListTable()
 {
     $T = new HTMLTable(2, "Gerichte");
     $T->maxHeight(480);
     $T->setColWidth(2, 30);
     $T->weight("light");
     $T->useForSelection(false);
     $AC = anyC::get("Gericht");
     $AC->addAssocV3("GerichtAdded", ">", "0");
     while ($E = $AC->getNextEntry()) {
         $BT = new Button("Löschen", "trash_stroke", "iconicL");
         $BT->onclick(OnEvent::rme($this, "reMoveItem", $E->getID(), OnEvent::reloadPopup("mGericht")));
         $T->addRow(array($E->A("GerichtName"), $BT));
         $T->addRowStyle("font-size:20px;");
         #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }"));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Die Liste enthält keine Einträge."));
         $T->addRowColspan(1, 2);
     }
     return $T;
 }
开发者ID:nemiah,项目名称:fheME,代码行数:22,代码来源:mGerichtGUI.class.php

示例14: getContextMenuHTML

 public function getContextMenuHTML($identifier)
 {
     $deTexts = array();
     $deTexts["pluginSupport"] = "Bitte beachten Sie, dass ein Plugin diese Einstellungen unterstützen muss, selbst wenn es hier angezeigt wird!";
     $deTexts["selectPlugin"] = "Bitte Plugin wählen";
     $deTexts["add"] = "hinzufügen";
     $deTexts["selectPluginButton"] = "Plugin auswählen";
     $deTexts["save"] = "speichern";
     $deTexts["select"] = "auswählen";
     $deTexts["noPsOptions"] = "keine plugin-spezifischen Optionen vorhanden";
     $deTexts["newFieldName"] = "Neuer Feldname";
     $deTexts["maybeHidden"] = "Bitte beachten Sie, dass hier interne Namen angezeigt werden, die von der Feldbeschriftung abweichen können!<br />Manche internen Felder werden möglichweise gar nicht angezeigt.";
     $ac = new anyC();
     $singularLanguageClass = $ac->loadLanguageClass("Userdata");
     $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : $deTexts;
     $opts = "";
     $ps = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins());
     $ms = $_SESSION["CurrentAppPlugins"]->getAllMenuEntries();
     #print_r($ms);
     foreach ($ps as $key => $value) {
         if ($key == "mUserdata") {
             continue;
         }
         if ($identifier == "4" and !PMReflector::implementsInterface($key, "iPluginSpecificRestrictions")) {
             continue;
         }
         if ($identifier == "4") {
             $c = new $key();
             if (!$c->getPluginSpecificRestrictions()) {
                 continue;
             }
         }
         if ($identifier == "5" and !in_array($key, $ms)) {
             continue;
         }
         if ($value == "Kunde") {
             continue;
         }
         if (!$_SESSION["CurrentAppPlugins"]->getIsAdminOnly($key) and $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) != "") {
             $opts .= "<option value=\"{$key}:" . $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) . "\">{$value}</option>";
         }
     }
     $s = explode(":", $identifier);
     if (isset($s[1])) {
         $identifier = $s[0];
     }
     switch ($identifier) {
         case "1":
             $c = isset($text["kann nicht erstellen"]) ? $text["kann nicht erstellen"] : "kann nicht\nerstellen";
             $b = isset($text["kann nicht bearbeiten"]) ? $text["kann nicht bearbeiten"] : "kann nicht\nbearbeiten";
             $l = isset($text["kann nicht löschen"]) ? $text["kann nicht löschen"] : "kann nicht\nlöschen";
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $c . "\" style=\"background-image:url(./images/navi/new.png);\" onclick=\"phynxContextMenu.update('mUserdata','Create','" . str_replace(array("\n", "'"), array(" ", "\\'"), $c) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $b . "\" style=\"background-image:url(./images/navi/editb.png);\" onclick=\"phynxContextMenu.update('mUserdata','Edit','" . str_replace(array("\n", "'"), array(" ", "\\'"), $b) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $l . "\" style=\"background-image:url(./images/navi/trash.png);\" onclick=\"phynxContextMenu.update('mUserdata','Delete','" . str_replace(array("\n", "'"), array(" ", "\\'"), $l) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["pluginSupport"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "Edit":
         case "Delete":
         case "Create":
             echo "\n\t\t\t\t<input type=\"hidden\" id=\"uRestAction\" value=\"{$identifier}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"cant{$identifier}\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["add"] . "\" onclick=\"addUserRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "3":
         case "2":
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["select"] . "\" onclick=\"phynxContextMenu.update('mUserdata','" . ($identifier == "2" ? "relabel" : "hide") . ":'+\$('relabelPlugin').value.split(':')[1], \$('relabelPlugin').value.split(':')[1]);\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["maybeHidden"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "5":
         case "4":
             if ($opts == "") {
                 die("<p>" . $text["noPsOptions"] . "</p>");
             }
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == 4 ? "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"phynxContextMenu.update('mUserdata','pS:'+\$('relabelPlugin').value.split(':')[0], \$('relabelPlugin').value.split(':')[0]);\" /></td>\n\t\t\t\t\t</tr>" : "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"addHidePlugin();\" /></td>\n\t\t\t\t\t</tr>") . "\n\t\t\t\t</table>";
             break;
         case "pS":
             $c = new $s[1]();
             $pSs = $c->getPluginSpecificRestrictions();
             $pSopts = "";
             foreach ($pSs as $key => $value) {
                 $pSopts .= "<option value=\"{$key}:{$s['1']}\">{$value}</option>";
             }
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"pSSelect\">{$pSopts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"savePluginSpecificRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "hide":
         case "relabel":
             try {
                 $c = new $s[1](-1);
                 $c = $c->newAttributes();
                 echo "\n\t\t\t\t<input type=\"hidden\" id=\"" . $identifier . "Plugin\" value=\"{$s['1']}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"" . $identifier . "Field\"><option>" . implode("</option><option>", PMReflector::getAttributesArray($c)) . "</option></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == "relabel" ? "<tr>\n\t\t\t\t\t\t<td>" . $text["newFieldName"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input id=\"relabelTo\" type=\"text\" /></td>\n\t\t\t\t\t</tr>" : "") . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"" . ($identifier == "relabel" ? "saveFieldRelabeling();" : "saveFieldHiding();") . "\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             } catch (ClassNotFoundException $e) {
                 echo "<p>Diese Option steht bei diesem Plugin leider nicht zur Verfügung</p>";
             }
             break;
         case "copyFromUser":
             $T = new HTMLTable(2);
             $T->useForSelection();
             $T->setColWidth(1, 20);
             $T->maxHeight(200);
             $G = new Users();
             $G->addAssocV3("isAdmin", "=", "0");
             $G->setLimitV3("10");
             $G->lCV3();
             while ($t = $G->getNextEntry()) {
                 $T->addRow(array(new Button("", "./images/i2/copy.png", "icon"), $t->A("username")));
                 $T->addRowEvent("click", "copyFromOtherUser('" . $t->getID() . "');");
//.........这里部分代码省略.........
开发者ID:nemiah,项目名称:fheME,代码行数:101,代码来源:mUserdataGUI.class.php

示例15: getInfo

 function getInfo($time)
 {
     $BE = "";
     $BD = "";
     $BDS = "";
     if ($this->editable != null) {
         if ($this->editable[0] != null) {
             $BE = new Button("Bearbeiten", "edit", "icon");
             $BE->style("margin:10px;float:right;");
             $BE->popup("", "Kalendereintrag bearbeiten", "mKalender", $this->classID, "editInPopup", array("'" . $this->className . "'", $this->classID, "'{$this->editable[0]}'"));
         }
         $BD = new Button("Dieses Event löschen", "trash", "icon");
         $BD->style("float:right;margin:10px;");
         $BD->doBefore("if(confirm('Löschen?')) %AFTER");
         $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentScreen'); Popup.close('mKalender', 'edit');");
         if ($this->repeat() !== false) {
             $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], array($this->classID, $time + Kalender::parseTime($this->time) - 60), "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
             $BDS = new Button("Alle Events Löschen", "./ubiquitous/Kalender/deleteSeries.png", "icon");
             $BDS->style("float:right;margin:10px;");
             $BDS->doBefore("if(confirm('Löschen?')) %AFTER");
             $BDS->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
         }
     }
     $T = new HTMLTable(2, "Eventdetails");
     $T->setColWidth(1, 120);
     $T->addColStyle(1, "vertical-align:top;");
     $T->addLV("Betreff", $this->title);
     $T->addLV("Tag", Util::CLDateParser($time));
     if (!$this->allDay) {
         $T->addLV("Uhrzeit", $this->formatTime($this->time));
     } else {
         $T->addLV("Uhrzeit", "Ganzer Tag");
     }
     $T->addLV("Details", "<div style=\"max-height:300px;overflow:auto;\">" . $this->summary . "</div>");
     if ($this->organizer) {
         $T->addLV("Organisator", $this->organizer);
     }
     if (count($this->values) > 0) {
         $T->insertSpaceAbove();
     }
     foreach ($this->values as $label => $value) {
         $T->addLV($label, $value);
     }
     $BN = "";
     if ($this->canNotify) {
         // TODO: Entfernen sobald Einladungen funktionieren
         $BN = new Button("Terminbestätigung", "mail" . ($this->notified ? "ed" : ""), "icon");
         $BN->style("margin-top:10px;margin-left:10px;");
         $BN->popup("", "Terminbestätigung", "Util", "-1", "EMailPopup", array("'mKalender'", "-1", "'notification::{$this->className}::{$this->classID}::{$time}'", "'function(){ Kalender.refreshInfoPopup(); }'"));
     }
     $BR = "";
     if ($this->isRepeatable and $this->getException() === false) {
         $BR = new Button("Wiederholungen", "refresh", "icon");
         $BR->style("margin:10px;float:right;");
         $BR->rmePCR("mKalender", "-1", "getRepeatable", array("'{$this->className}'", "'{$this->classID}'", "'{$this->isRepeatable}'"), "function(transport){ \$j('#eventSideContent').html(''); \$j('#editDetailsmKalender').animate({'width':'400px'}, 200, 'swing'); \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }");
     }
     $BI = new Button("Teilnehmer", "./ubiquitous/Kalender/einladungen.png", "icon");
     $BI->style("margin: 10px; float: right;");
     $BI->rmePCR("mKalender", "-1", "getInvitees", array("'{$this->className}'", "'{$this->classID}'"), "function(t){ \$j('#eventAdditionalContent').html(''); \$j('#editDetailsmKalender').animate({'width':'800px'}, 200, 'swing', function(){ \$j('#eventSideContent').html(t.responseText).fadeIn(); }); }");
     if (!$this->canInvite) {
         $BI = "";
     }
     $closed = "";
     if ($this->closeable) {
         $BC = new Button("Termin abschließen", "bestaetigung", "icon");
         $BC->style("margin: 10px; float: right;");
         $BC->rmePCR("mKalender", "-1", "getClose", array("'{$this->className}'", "'{$this->classID}'"), "function(t){ \$j('#editDetailsContentmKalender').html(t.responseText); }");
         if ($this->closed[0]) {
             $BC = "";
             $closed = "<p>Termin abgeschlossen am " . Util::CLDateParser($this->closed[0]) . ($this->closed[1] != "" ? ":<br>" . nl2br($this->closed[1]) : "") . "</p>";
         }
     }
     $topButtons = "";
     foreach ($this->topButtons as $B) {
         $B->type("icon");
         $B->style("margin-top:10px;margin-left:10px;");
         $topButtons .= $B;
     }
     return "<div style=\"width:400px;\">" . $BDS . $BD . $BE . $BN . $topButtons . $BR . $BI . $BC . $closed . "</div><div style=\"clear:both;\"></div><div style=\"display:none;\" id=\"eventAdditionalContent\"></div><div style=\"display:none;width:400px;float:right;\" id=\"eventSideContent\"></div><div style=\"width:400px;float:left;\" id=\"eventDefaultContent\"{$T}</div>";
 }
开发者ID:nemiah,项目名称:fheME,代码行数:80,代码来源:KalenderEvent.class.php


注:本文中的HTMLTable::setColWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。