| | |
| | | <?php |
| | | |
| | | /* |
| | | Copyright (c) 2005, Till Brehm, projektfarm Gmbh |
| | | Copyright (c) 2007, Till Brehm, projektfarm Gmbh |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, |
| | |
| | | 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; |
| | |
| | | $field = $i['field']; |
| | | |
| | | //*TODO: comment = hat sich die suche ge�ndert |
| | | if(isset($_REQUEST[$search_prefix.$field]) and $_REQUEST[$search_prefix.$field] != $_SESSION['search'][$list_name][$search_prefix.$field]){ |
| | | if(isset($_REQUEST[$search_prefix.$field]) && isset($_SESSION['search'][$list_name][$search_prefix.$field]) && $_REQUEST[$search_prefix.$field] != $_SESSION['search'][$list_name][$search_prefix.$field]){ |
| | | $this->searchChanged = 1; |
| | | } |
| | | |
| | |
| | | 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; |