function __construct($ptype = false, $pid = false) { $fields = array('id', 'ptype', 'pid', 'name', 'content', 'owner', 'created'); $this->_fieldsCreate = array('ptype', 'pid', 'name', 'content', 'owner', 'created'); $this->_fieldsUpdate = array('name', 'content'); $this->_keyFields = array('id'); parent::__construct(); $this->_db = 'notes'; $this->_addField($fields, $this->_from()); if ($ptype && $pid) { $this->findBy(array("ptype='{$ptype}'", "pid='{$pid}'")); $this->_execute(); } }
function range($date, $interval) { parent::timeRange($date, $interval, 'start'); }
function __construct($id = false) { $fields = array('id', 'cid', 'name', 'text', 'pid'); $this->_fieldsCreate = array('cid', 'name', 'text', 'pid'); $this->_fieldsUpdate = array('cid', 'name', 'text', 'pid'); $this->_keyFields = array('id'); //5.2.0 parent::__construct(); $this->_db = OREQ_CLASSES; $this->_addField($fields, $this->_from()); if ($id) { $this->where("id='{$id}'"); $this->_execute(); } else { $this->orderBy(''); } }
function tplTableRow($var, $tds) { $this->_tpl->assign('TR_CHECKBOX_TEXT', ''); $this->_tpl->assign('TR_CHECKBOX_VALUE', $tds[0]['field'] . '.' . $tds[0]['value']); parent::tplTableRow($var, $tds); }
function update() { $name = $this->name[0]; $this->value[0] = $this->{$name}; parent::update('name'); }