本文整理汇总了PHP中HTMLTable::setColClass方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLTable::setColClass方法的具体用法?PHP HTMLTable::setColClass怎么用?PHP HTMLTable::setColClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLTable
的用法示例。
在下文中一共展示了HTMLTable::setColClass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getEditHTML
public function getEditHTML()
{
if (BPS::getProperty($this->className . "GUI", "edit") == "ok") {
return $this->getEditTableHTML();
}
################################################################################
if ($this->name == null) {
$this->name = $this->className;
}
if ($this->attributes == null) {
$this->attributes = PMReflector::getAttributesArrayAnyObject($this->object->getA());
}
$widths = Aspect::joinPoint("changeWidths", $this, __METHOD__);
if ($widths == null) {
$widths = array(700, 132, 218);
}
$tab = new HTMLTable(2);
$tab->setTableStyle("width:{$widths['0']}px;margin-left:10px;");
$tab->setColWidth(1, "50%");
$tab->setColWidth(2, "50%");
$A = $this->object->getA();
$TSub = new HTMLTable(2);
$TSub->setColWidth(1, 120);
$TSub->setColClass(1, "");
$TSub->setColClass(2, "");
$TC = clone $TSub;
$row = array();
foreach ($this->attributes as $k => $v) {
if (isset($this->types[$v]) and $this->types[$v] == "hidden") {
continue;
}
if (isset($this->parsers[$v])) {
$A->{$v} = $this->invokeParser($this->parsers[$v], $A->{$v}, $this->object);
}
if (isset($this->types[$v]) and $this->types[$v] == "select") {
if (isset($this->options[$v]) and isset($this->options[$v][$A->{$v}])) {
$A->{$v} = $this->options[$v][$A->{$v}];
}
}
if (isset($this->spaces[$v]) and $this->spaces[$v] != "") {
if ($k > 0) {
$row[] = $TC;
}
if ($this->forceNewRow[$v]) {
$row[] = "";
$tab->addRow($row);
$tab->addRowClass("backgroundColor0");
$tab->addRowStyle("vertical-align:top;");
$row = array();
}
if (count($row) == 2) {
$tab->addRow($row);
$tab->addRowClass("backgroundColor0");
$tab->addRowStyle("vertical-align:top;");
$row = array();
}
$TC = clone $TSub;
if (trim($this->spaces[$v]) != "") {
$TC->addRow(array($this->spaces[$v]));
$TC->addRowClass("backgroundColor2");
$TC->addRowColspan(1, 2);
}
}
if ($A->{$v} != "") {
$B = "";
if (isset($this->fieldButtons[$v])) {
$B = $this->fieldButtons[$v];
$B->style("float:right;");
}
$TC->addLV($this->labels($v) . ":", $B . nl2br($A->{$v}));
$TC->addRowStyle("vertical-align:top;");
}
/*
$label = isset($this->labels[$v]) ? $this->labels[$v] : $v;
$row[] = "<label>".($label != "" ? ucfirst($label).":" : "")."</label>";
$row[] = nl2br($A->$v);*/
/*if(count($row) == 4){
$tab->addRow($row);
$row = array();
}*/
}
$row[] = $TC;
if (count($row) == 1) {
$row[] = "";
}
if (count($row) == 2) {
$tab->addRow($row);
$tab->addRowClass("backgroundColor0");
$tab->addRowStyle("vertical-align:top;");
}
$BE = new Button("Eintrag\nbearbeiten", "edit");
$BE->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionEdit));
$BE->style("float:left;margin-left:10px;");
$BD = new Button("Eintrag\nlöschen", "trash");
$BD->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionDelete));
$BD->style("float:left;margin-left:10px;");
//.........这里部分代码省略.........
示例2: getHTML
public function getHTML($id)
{
#$_SESSION["BPS"]->unregisterClass(get_class($this));
$defaultAnsicht = "monat";
if (Applications::activeApplication() == "personalKartei") {
$defaultAnsicht = "jahr";
}
$ansicht = mUserdata::getUDValueS("KalenderAnsicht", $defaultAnsicht);
#$ansicht = $ansicht->getUDValue("KalenderAnsicht");
#if($ansicht == null) $ansicht = "monat";
$display = mUserdata::getUDValueS("KalenderDisplay" . ucfirst($ansicht), "0");
$BThis = new Button("", "arrow_down", "iconicG");
$BThis->style("float:left;margin-top:-6px;margin-right:5px;");
$Calendars = "";
Registry::reset("Kalender");
while ($C = Registry::callNext("Kalender", "categories")) {
if (!$C) {
continue;
}
foreach ($C as $tab) {
$Calendars .= "<div onclick=\"{$tab->onclick}\">" . ($tab->isCurrent ? $BThis : "") . " {$tab->label}</div>";
}
}
// <editor-fold defaultstate="collapsed" desc="styles">
$html = "\n\t\t\n\t\t<style type=\"text/css\">\n\t\t.Day {\n\t\t\t-moz-user-select:none;\n\t\t\tborder-left:1px solid #EEE;\n\t\t\tborder-bottom:1px solid #EEE;\n\t\t}\n\t\t\n\t\t/*.Day:hover {\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tpadding:2px;\n\t\t}*/\n\n\t\t.dayOptions {\n\t\t\tdisplay:none;\n\t\t}\n\n\t\t.Day:hover .dayOptions {\n\t\t\tdisplay:inline;\n\t\t}\n\n\t\t.Termin {\n\t\t\tposition:relative;\n\t\t\tleft:44px;\n\t\t\tcursor:pointer;\n\t\t\twidth:150px;\n\t\t\tfloat:left;\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tmargin-right:3px;\n\t\t}\n\t\t\n\t\t.KalenderButton {\n\t\t\topacity:0.5;\n\t\t}\n\t\t\n\t\t.KalenderButton:hover {\n\t\t\topacity:1;\n\t\t}\n\t\t\n\t\t.KalenderUser {\n\t\t\tmargin-left:10px;\n\t\t}\n\t\t\n\t\t.KalenderUser div {\n\t\t\tpadding:10px;\n\t\t\tpadding-top:10px;\n\t\t\tpadding-bottom:5px;\n\t\t\tdisplay:inline-block;\n\t\t\tmargin-right:20px;\n\t\t\tcursor:pointer;\n\t\t\tmin-width:150px;\n\t\t}\n\t\t\n\t\t.cellHeight {\n\t\t}\n\t\t\n\t\t.ui-datepicker {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t#contentScreen tr:hover {\n\t\t\tbackground-color:inherit;\n\t\t}\n\n\t\t#calendar1stMonth .ui-datepicker-prev, #calendar1stMonth .ui-datepicker-next/*,\n\t\t#calendar2ndMonth .ui-datepicker-prev, #calendar2ndMonth .ui-datepicker-next */{\n\t\t\tdisplay:none;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-widget-content,\n\t\t#calendar2ndMonth .ui-widget-content, \n\t\t#calendar2ndMonth .ui-widget-content .ui-state-default,\n\t\t#calendar1stMonth .ui-widget-content .ui-state-default {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-datepicker-header,\n\t\t#calendar2ndMonth .ui-datepicker-header {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t/*@media only screen and (max-height: 820px) {\n\t\t\t.cellHeight {\n\t\t\t\theight:55px;\n\t\t\t}\n\t\t}*/\n\t\t</style>";
// </editor-fold>
$BLeft = new Button("Zurück", "back", "icon");
$BLeft->rmePCR("mKalender", "", "setDisplay", $display - 1, "contentManager.loadFrame('contentScreen','mKalender');");
$BLeft->style("margin-right:10px;");
$BRight = new Button("Weiter", "navigation", "icon");
$BRight->rmePCR("mKalender", "", "setDisplay", $display + 1, "contentManager.loadFrame('contentScreen','mKalender');");
$BRight->style("margin-right:10px;");
$BToday = new Button("Aktuelles Datum", "down", "icon");
$BToday->rmePCR("mKalender", "", "setToday", '', "contentManager.loadFrame('contentScreen','mKalender');");
$BToday->style("margin-right:10px;");
$BJahr = new Button("Jahr", "./ubiquitous/Kalender/month.png", "icon");
$BJahr->rmePCR("mKalender", "", "setView", "jahr", "contentManager.loadFrame('contentScreen','mKalender');");
$BJahr->style("margin-right:10px;" . ($ansicht != "jahr" ? "opacity:0.5;" : ""));
$BJahr->id("jahrButton");
$BMonat = new Button("Monat", "./ubiquitous/Kalender/month.png", "icon");
$BMonat->rmePCR("mKalender", "", "setView", "monat", "contentManager.loadFrame('contentScreen','mKalender');");
$BMonat->style("margin-right:10px;" . ($ansicht != "monat" ? "opacity:0.5;" : ""));
$BMonat->id("monatButton");
$BWoche = new Button("Woche", "./ubiquitous/Kalender/workweek.png", "icon");
$BWoche->rmePCR("mKalender", "", "setView", "woche", "contentManager.loadFrame('contentScreen','mKalender');");
$BWoche->style("margin-right:10px;" . ($ansicht != "woche" ? "opacity:0.5;" : ""));
$BWoche->id("wocheButton");
$BTag = new Button("Tag", "./ubiquitous/Kalender/day.png", "icon");
$BTag->rmePCR("mKalender", "", "setView", "tag", "contentManager.loadFrame('contentScreen','mKalender');");
$BTag->style("margin-right:10px;" . ($ansicht != "tag" ? "opacity:0.5;" : ""));
$BTag->id("tagButton");
if (Applications::activeApplication() == "personalKartei") {
$BTag = "";
$BWoche = "";
$BMonat = "";
}
if (Applications::activeApplication() != "personalKartei") {
$BJahr = "";
}
$ST = new HTMLTable(1);
$ST->setColClass(1, "");
#$ST->setTableStyle("width:40px;margin:0px;margin-right:-215px;float:right;/*margin-right:-50px;margin-top:95px;*/");
$newWindow = new Button("Kalender in neuem Fenster öffnen", "new_window", "iconicL");
$newWindow->style("margin-right:10px;");
$newWindow->newSession("Mail", Applications::activeApplication(), "mKalender", "Kalender");
if (Session::physion()) {
$newWindow = "";
}
$reminder = "";
if (Session::isPluginLoaded("mReminder")) {
$reminder = Reminder::getButton();
$reminder->style("margin-right:10px;");
}
$ST->addRow("<div id=\"calendar1stMonth\"></div>");
$ST->addRow("<div id=\"calendar2ndMonth\"></div>");
$TC = "KalenderView" . ucfirst($ansicht);
$TC = new $TC();
$TCalendars = "<div>";
if (trim($Calendars) != "") {
$TCalendars .= "<div class=\"KalenderUser\">" . $Calendars . "</div>";
}
$TCalendars .= "</div>";
$pCalButton = "";
if (Session::isPluginLoaded("mpCal")) {
$pCalButton = pCal::getTBButton();
$pCalButton->type("icon");
$pCalButton->style("margin-right:10px;");
}
$GoogleButton = "";
$GoogleDLButton = "";
if (Session::isPluginLoaded("mGoogle")) {
$GoogleButton = LoginData::getButtonU("GoogleAccountUserPass", "Google-Daten bearbeiten", "./ubiquitous/Google/google.png");
$GoogleButton->type("icon");
$GoogleButton->style("margin-right:10px;");
$GoogleDLButton = new Button("Daten herunterladen", "./ubiquitous/Google/googleDL.png", "icon");
$GoogleDLButton->popup("", "Daten herunterladen", "Google", "-1", "syncByDateRange", array("'" . date("Y-m-d", $TC->getFirst()) . "'", "'" . date("Y-m-d", $TC->getLast()) . "'"));
$GoogleDLButton->style("margin-right:10px;");
}
$xCalButton = "";
if (Session::isPluginLoaded("mxCal")) {
//.........这里部分代码省略.........
示例3: getBrowserHTML
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<img class=\"mouseoverFade\" 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?"]) . "');\" src=\"./images/i2/delete.gif\" />";
} 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");
if ($this->JSOnEdit == null) {
$EB->onclick("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->onlyDisplayMode ? $singularLanguageClass == null ? "Bitte " . $this->name . " auswählen:" : $singularLanguageClass->getBrowserCaption() . ":" : ($singularLanguageClass == null ? $this->name : $singularLanguageClass->getPlural()) . ":" : null);
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("backgroundColor2");
}
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();
//.........这里部分代码省略.........