Changeset 207 for dev/common/search.php

Show
Ignore:
Timestamp:
04/23/07 13:06:35 (15 years ago)
Author:
ralle030583
Message:

- added system search
- added 12 new ship Signatures (thx to Arthur Ffrub)
- removed again some not needed includes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/search.php

    r206 r207  
    66$html .= "<td>Type:</td><td>Text: (3 letters minimum)</td>"; 
    77$html .= "</tr><tr>"; 
    8 $html .= "<td><select id=searchtype name=searchtype><option value=pilot>Pilot</option><option value=corp>Corporation</option><option value=alliance>Alliance</option></select></td>"; 
     8$html .= "<td><select id=searchtype name=searchtype><option value=pilot>Pilot</option><option value=corp>Corporation</option><option value=alliance>Alliance</option><option value=system>System</option></select></td>"; 
    99$html .= "<td><input id=searchphrase name=searchphrase type=text size=30/></td>"; 
    1010$html .= "<td><input type=submit name=submit value=Search></td>"; 
     
    3838                 order by ali.all_name"; 
    3939            $header = "<td>Alliance</td><td></td>"; 
     40            break; 
     41        case "system": 
     42            $sql = "select sys.sys_id, sys.sys_name 
     43                  from kb3_systems sys 
     44                 where lower( sys.sys_name ) like lower( '%".slashfix($_REQUEST['searchphrase'])."%' ) 
     45                 order by sys.sys_name"; 
     46            $header = "<td>System</td><td></td>"; 
    4047            break; 
    4148    } 
     
    7683                $html .= "<td><a href=\"$link\">".$row['all_name']."</a></td><td></td>"; 
    7784                break; 
     85            case "system": 
     86                $link = "?a=system_detail&sys_id=".$row['sys_id']; 
     87                $html .= "<td><a href=\"$link\">".$row['sys_name']."</a></td><td></td>"; 
     88                break; 
    7889        } 
    7990        $html .= "</tr>";