| | |
| | | <?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, |
| | |
| | | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| | | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| | | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | */ |
| | | |
| | | /** |
| | | * Listenbehandlung |
| | | * |
| | | * @package searchform |
| | | * @author Till Brehm |
| | | * @version 1.1 |
| | | */ |
| | | |
| | | class searchform { |
| | |
| | | $list_name = $this->listDef['name']; |
| | | $settings = $_SESSION['search'][$list_name]; |
| | | unset($settings['page']); |
| | | $data = mysql_real_escape_string(serialize($settings)); |
| | | $data = $app->db->quote(serialize($settings)); |
| | | |
| | | $userid = $_SESSION['s']['user']['userid']; |
| | | $groupid = $_SESSION['s']['user']['default_group']; |
| | |
| | | |
| | | public function encode($record) |
| | | { |
| | | global $app; |
| | | if(is_array($record)) { |
| | | foreach($this->listDef['item'] as $field) { |
| | | $key = $field['field']; |
| | |
| | | case 'VARCHAR': |
| | | case 'TEXT': |
| | | if(!is_array($record[$key])) { |
| | | $record[$key] = mysql_real_escape_string($record[$key]); |
| | | $record[$key] = $app->db->quote($record[$key]); |
| | | } else { |
| | | $record[$key] = implode($this->tableDef[$key]['separator'],$record[$key]); |
| | | } |
| | |
| | | break; |
| | | |
| | | case 'DOUBLE': |
| | | $record[$key] = mysql_real_escape_string($record[$key]); |
| | | $record[$key] = $app->db->quote($record[$key]); |
| | | break; |
| | | |
| | | case 'CURRENCY': |
| | |
| | | } |
| | | } |
| | | |
| | | ?> |
| | | ?> |