summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorSimon2011-04-05 12:50:50 +0200
committerSimon2011-04-05 12:50:50 +0200
commitcbd4bc81de03189d3c774e71223478cf5d0ce401 (patch)
tree79cc6c8ade24d69cebf642c0a7fdb0b8e2ec93c7 /library
parentSuche in Bootmenu & Bootiso (diff)
downloadpbs2-cbd4bc81de03189d3c774e71223478cf5d0ce401.tar.gz
pbs2-cbd4bc81de03189d3c774e71223478cf5d0ce401.tar.xz
pbs2-cbd4bc81de03189d3c774e71223478cf5d0ce401.zip
suche in Config, Filter, Pool und Preboot
Diffstat (limited to 'library')
-rw-r--r--library/Pbs/Search.php30
1 files changed, 15 insertions, 15 deletions
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{
<button type='submit' class='searchbutton' value='search'> Search</button>";
$highlight = array();
if($this->searchTerm != ''){
- $str .= "<a href='/user/client/'><img src='/media/img/delete.png' alt='Delete Client'/></a>
+ $str .= "<a href='/user/".$this->module."/'><img src='/media/img/delete.png' alt='Delete Client'/></a>
<script type='text/javascript' src='/media/js/jquery.highlight-3.js'></script>";
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 .= "});
</script>";
$str .= "</form>";
@@ -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];