Exemplo n.º 1
0
 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();
     }
 }
Exemplo n.º 2
0
 function range($date, $interval)
 {
     parent::timeRange($date, $interval, 'start');
 }
Exemplo n.º 3
0
 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('');
     }
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 function update()
 {
     $name = $this->name[0];
     $this->value[0] = $this->{$name};
     parent::update('name');
 }