本文整理汇总了PHP中HiddenField::setReadOnly方法的典型用法代码示例。如果您正苦于以下问题:PHP HiddenField::setReadOnly方法的具体用法?PHP HiddenField::setReadOnly怎么用?PHP HiddenField::setReadOnly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HiddenField
的用法示例。
在下文中一共展示了HiddenField::setReadOnly方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSingleUpdateMask
//.........这里部分代码省略.........
$rowEdit = mysql_fetch_array($result);
for ($i = 0; $i < mysql_num_fields($result) - 1; $i++) {
$fieldName = mysql_field_name($result, $i);
$arrChk = array_search($fieldName, $this->NOUPDATECOLS);
if (strlen($arrChk) == 0) {
$r = $table->createRow();
$o = "";
$lookups = getLookupWerte($_SESSION['config']->DBCONNECT, $this->TABLENAME, $fieldName);
// in der Datenbank für dieses Datenbankfeld
// definierte Combobox laden (wenn vorhanden)
$dbCombo = getDbComboArray($this->TABLENAME, $fieldName, $rowEdit);
$val = "";
if (isset($rowEdit[$fieldName]) && strlen($rowEdit[$fieldName]) > 0) {
$val = $rowEdit[$fieldName];
}
if (mysql_num_rows($lookups) == 0 && !$this->isDbComboSet($this->TABLENAME, $fieldName)) {
/*if (strpos(" " . $this->DEFAULTS, $fieldName) > 0) {
$tmpval = substr($this->DEFAULTS, strpos($this->DEFAULTS, "=") + 1);
$o = new HiddenField($fieldName, $tmpval);
} else*/
if (strpos(mysql_field_flags($result, $i), "enum") > 0) {
$ev = $this->getEnumValues($fieldName);
if (count($ev) == 2 && (in_array('J', $ev) && in_array('N', $ev))) {
$o = new Checkbox($fieldName . $rowId, "", "J");
if ($rowEdit[$fieldName] == "J") {
$o->setSelected(true);
}
} else {
$o = new ComboBox($fieldName . $rowId, $this->getComboboxEnumArray($fieldName));
}
} else {
if (mysql_field_type($result, $i) == "blob") {
$o = new TextArea($fieldName . $rowId, $val, 80, 10);
$o->setTextEditor($this->TEXTEDITOR_ENABLED);
} else {
if (mysql_field_type($result, $i) == "date") {
$o = new DateTextfield($fieldName . $rowId, $val);
$o->setToolTip("Bitte im Format: <b>YYYY-MM-TT</b> angeben");
} else {
if (mysql_field_type($result, $i) == "int") {
$o = new TextField($fieldName . $rowId, $val);
} else {
if (mysql_field_type($result, $i) == "timestamp") {
$o = new TextField($fieldName . $rowId, $val);
} else {
$o = new TextField($fieldName . $rowId, $val);
}
}
}
}
}
} else {
if (mysql_num_rows($lookups) > 0) {
$o = new LookupCombo($_SESSION['config']->DBCONNECT, $fieldName . $rowId, $this->TABLENAME, $fieldName, $rowEdit[$fieldName]);
} else {
if (count($dbCombo) > 0) {
if (!strpos(" " . $this->DEFAULTS, $fieldName) > 0) {
$o = new ComboBox($fieldName . $rowId, $dbCombo, $val);
} else {
$o = new HiddenField($fieldName . $rowId, $val);
}
}
}
}
if ($i < count($this->LABELS)) {
$r->setAttribute(0, $this->LABELS[$i]);
} else {
$r->setAttribute(0, "");
}
$arrChk = array_search($fieldName, $this->READONLYCOLS);
if (strlen($arrChk) != 0) {
$o->setReadOnly(true);
}
$r->setAttribute(1, $o);
$table->addRow($r);
}
}
foreach ($this->ADDITIONAL_UPDATE_FIELDS as $label => $field) {
$r = $table->createRow();
$r->setAttribute(0, $label);
$r->setAttribute(1, $field);
$table->addRow($r);
}
$okButton = new Button("DbTableUpdate" . $this->TABLENAME, "Speichern");
$r = $table->createRow();
$r->setSpawnAll(true);
$r->setAttribute(0, $okButton);
$table->addRow($r);
$rowAll1 = $tblAll->createRow();
$rowAll2 = $tblAll->createRow();
$rowAll1->setAttribute(0, $table);
$tblAll->addRow($rowAll1);
$tblAll->addRow($rowAll2);
$f = new Form($_SERVER['SCRIPT_NAME']);
$f->add($tblAll);
$f->add(new Hiddenfield("SingleUpdateRowId", $rowId));
$f->add($this->DEFAULT_HIDDEN_FIELDS);
return $f;
}