- Timestamp:
- 10/28/07 22:43:58 (15 years ago)
- Location:
- branch/rev3/common
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
branch/rev3/common/includes/class.db.php
r245 r248 32 32 class DBQuery 33 33 { 34 function DBQuery() 34 var $object; 35 36 function __construct() 35 37 { 36 38 if (DB_USE_QCACHE === true) 37 39 { 38 $ this= new DBCachedQuery();40 $object = new DBCachedQuery(); 39 41 } 40 42 else 41 43 { 42 $ this= new DBNormalQuery();44 $object = new DBNormalQuery(); 43 45 } 46 $this->object = $object; 47 } 48 49 function __call($name, $args) 50 { 51 return call_user_func_array(array($this->object, $name), $args); 52 } 53 54 function __set($name, $value) 55 { 56 $this->object->$name = $value; 57 } 58 59 function __unset($name) 60 { 61 unset($this->object->$name); 62 } 63 64 function __isset($name) 65 { 66 return isset($this->object->$name); 67 } 68 69 function __get($name) 70 { 71 return $this->object->$name; 72 } 73 74 function DBQuery() 75 { 76 $object = &$this->getRef($this); 77 if (DB_USE_QCACHE === true) 78 { 79 $object = new DBCachedQuery(); 80 } 81 else 82 { 83 $object = new DBNormalQuery(); 84 } 85 } 86 87 function &getRef(&$var) 88 { 89 return $var; 44 90 } 45 91 } -
branch/rev3/common/search.php
r207 r248 6 6 $html .= "<td>Type:</td><td>Text: (3 letters minimum)</td>"; 7 7 $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><option value=system>System</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><option value=item>Items</option></select></td>"; 9 9 $html .= "<td><input id=searchphrase name=searchphrase type=text size=30/></td>"; 10 10 $html .= "<td><input type=submit name=submit value=Search></td>"; … … 45 45 order by sys.sys_name"; 46 46 $header = "<td>System</td><td></td>"; 47 break; 48 case "item": 49 $sql = "select typeID, typeName from kb3_invtypes where typeName like ('%".slashfix($_REQUEST['searchphrase'])."%')"; 47 50 break; 48 51 } … … 87 90 $html .= "<td><a href=\"$link\">".$row['sys_name']."</a></td><td></td>"; 88 91 break; 92 case 'item': 93 $link = "?a=invtype&id=".$row['typeID']; 94 $html .= "<td><a href=\"$link\">".$row['typeName']."</a></td><td></td>"; 95 break; 89 96 } 90 97 $html .= "</tr>";