From cbd4bc81de03189d3c774e71223478cf5d0ce401 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 5 Apr 2011 12:50:50 +0200 Subject: suche in Config, Filter, Pool und Preboot --- library/Pbs/Search.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'library') diff --git a/library/Pbs/Search.php b/library/Pbs/Search.php index 709651a..b041c3b 100644 --- a/library/Pbs/Search.php +++ b/library/Pbs/Search.php @@ -13,7 +13,7 @@ class Pbs_Search{ "; $highlight = array(); if($this->searchTerm != ''){ - $str .= "Delete Client + $str .= "Delete Client "; foreach($this->getSearchTerms() as $term){ $highlight[] = "$('table').highlight('".$term."');"; @@ -24,14 +24,14 @@ class Pbs_Search{ $(document).ready(function(){"; $str .= implode("\n",$highlight); $str .= "$('#search') - .focus(function() { - $('table th .code').show(); - }).focusout(function() { - $('table th .code').hide(); - }); - $('table th').click(function(){ - $('#search').val($('#search').val()+' '+$(this).find('.code').text()+':'); - });"; + .focus(function() { + $('table th .code').show(); + }).focusout(function() { + $('table th .code').hide(); + }); + $('table th').click(function(){ + $('#search').val($('#search').val()+' '+$(this).find('.code').text()+':'); + });"; $str .= "}); "; $str .= ""; @@ -44,10 +44,10 @@ class Pbs_Search{ $this->searchTerm = trim($search); $parts = explode(" ",$this->searchTerm); - foreach($parts as $this->searchTerm){ - if(stristr($this->searchTerm,":") && ctype_alpha(substr($this->searchTerm,0,strpos($this->searchTerm,":")))){ - $key = substr($this->searchTerm,0,strpos($this->searchTerm,":")); - $value = substr($this->searchTerm,strpos($this->searchTerm,":")+1); + foreach($parts as $search){ + if(stristr($search,":") && ctype_alpha(substr($search,0,strpos($search,":")))){ + $key = substr($search,0,strpos($search,":")); + $value = substr($search,strpos($search,":")+1); $searcha[$key] = $value; } else{ @@ -64,7 +64,7 @@ class Pbs_Search{ $beta = $this->searcha; foreach($this->searchb as $b) $beta[] = $b; - return $beta; + return $beta; } public function search($array){ @@ -102,7 +102,7 @@ class Pbs_Search{ } if (count($this->searcha) > 0 && count($this->searchb) > 0){ $data = array_intersect($com1,$com2); - } + } $data = array_unique($data); foreach( $data as $c) $ges[] = $array[$c]; -- cgit v1.2.3-55-g7522