columns = array(); $col = new DbColumn('name'); $col->width = "20%"; $col->minWidth = "200px"; $col->noEdit = false; $col->heading = "Option"; $this->columns[$col->dbCol] = $col; $col = new DbColumn('value'); $col->width = "70%"; $col->noEdit = false; $col->heading = "Value"; $this->columns[$col->dbCol] = $col; $col = new DbColumn('help'); $col->width = "10%"; $col->minWidth = "50px"; $col->noEdit = true; $col->heading = "Help"; $this->columns[$col->dbCol] = $col; $this->table = 'options_meta'; global $db; $optionsDB = $db->getMetaData($this->table); foreach ($options as $pk => $o) { $options[$pk]['pk'] = $pk; if (isset($optionsDB[$pk])) { $options[$pk]['value'] = $optionsDB[$pk]; } } $this->rows = $options; $this->ajaxHandler = 'ajax/options.php'; $this->needCreate = false; $this->needEdit = false; $this->useDataTable = false; $this->showActions = false; } function __destruct() { } function OptionTable($options) { if (version_compare(PHP_VERSION, "5.0.0", "<")) { $this->__construct($options); register_shutdown_function(array($this, "__destruct")); } } // It cannot be private because when DbTable::rennder() calls it, the scope // would be DbTable, not OptionTable function _printRow($row, $create = false) { echo EZ::renderRow($row['pk'], $row); } function _printJS() { if (self::$renderedJS) { return; } self::$renderedJS = true; ?>