getAttrSetting('mand')) $defval = date('Y-m-d'); else $defval = ''; $cv = $this->getCurVal(); $tpl = ''; return $tpl; } function lPost() { $time = strtotime($_POST[$this->attr_name] . ' 00:00:00'); if ( $time == false ) { $time = $_POST[$this->attr_name]; } if (empty($_POST[$this->attr_name]) && !$this->getAttrSetting('mand') ) { $time = 0; } $this->obj->set($this->attr_name, date('Y-m-d', $time)); } function render_text( $crop = false ) { if ( $this->getCurVal() ) { return $this->getCurVal(); } else { return ''; } } } ?>