| | |
| | | private $module; |
| | | private $dateformat = 'd.m.Y'; |
| | | |
| | | public function loadListDef($file,$module = '') |
| | | public function loadListDef($file, $module = '') |
| | | { |
| | | global $app,$conf; |
| | | if(!is_file($file)) die("List-Definition: $file not found."); |
| | | if(!is_file($file)){ |
| | | die("List-Definition: $file not found."); |
| | | } |
| | | require_once($file); |
| | | $this->listDef = $liste; |
| | | $this->module = $module; |
| | |
| | | if(is_array($record)) { |
| | | foreach($this->listDef['item'] as $field){ |
| | | $key = $field['field']; |
| | | switch ($field['datatype']){ |
| | | |
| | | if(isset($record[$key])) { |
| | | switch ($field['datatype']){ |
| | | case 'VARCHAR': |
| | | case 'TEXT': |
| | | $record[$key] = stripslashes($record[$key]); |
| | |
| | | |
| | | default: |
| | | $record[$key] = stripslashes($record[$key]); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return $record; |