/** * Return the data for a single customer */ public function getData($id = null) { $db = ezcDbInstance::get(); if ($this->act == 'open') { // open/download the document $this->deliver($this->documentType); die; } $db = ezcDbInstance::get(); if ($this->act == 'add') { $sep = R3Locale::getDateSeparator(); $vlu = array(); $vlu['doc_date'] = date('Y-m-d'); } else { $q = $db->createSelectQuery(); $q->select('*')->from('document_data')->where('doc_id=' . (int) $this->id); $vlu = $db->query($q)->fetch(PDO::FETCH_ASSOC); $vlu = array_merge($vlu, R3EcoGisHelper::getChangeLogData('document', $vlu['doc_id'])); } $this->data = $vlu; // Save the data (prevent multiple sql) return $vlu; }
public function getJSVars() { return array('date_format' => R3Locale::getJQueryDateFormat(), 'date_separator' => R3Locale::getDateSeparator()); }