Changeset 50
- Timestamp:
- 11/04/06 15:37:36 (16 years ago)
- Location:
- dev/common
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/admin_shp_val.php
r47 r50 31 31 { 32 32 $search = true; 33 $searchstr = ' where shp.shp_class != 18 and shp.shp_id='.$id;33 $searchstr = ' where ksb.shp_value is null and shp.shp_class != 18 and shp.shp_id='.$id; 34 34 } 35 35 } … … 37 37 { 38 38 $search = true; 39 $searchstr = " where shp.shp_class != 18 and shp.shp_name like '%{$name}%'";39 $searchstr = " where ksb.shp_value is null and shp.shp_class != 18 and shp.shp_name like '%{$name}%'"; 40 40 } 41 41 else … … 47 47 { 48 48 $query = 'select shp.shp_id as id, shp.shp_externalid as ext, shp.shp_name, shp.shp_class, 49 shp.shp_baseprice, scl.scl_class, shp.shp_techlevel, scl.scl_value 50 from kb3_ships shp inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id)'; 49 shp.shp_baseprice, scl.scl_class, shp.shp_techlevel, scl.scl_value, ksb.shp_value 50 from kb3_ships shp inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id) 51 left join kb3_ships_values ksb on (shp.shp_id = ksb.shp_id)'; 52 $order = ' order by shp.shp_name asc'; 51 53 $qry = new DBQuery(); 52 $qry->execute($query.$searchstr );54 $qry->execute($query.$searchstr.$order); 53 55 while ($data = $qry->getRow()) 54 56 { … … 95 97 $html .= '</form>'; 96 98 } 99 else 100 { 101 $html .= 'No Ships found to be added.<br/>'; 102 unset($_REQUEST['opt']); 103 } 97 104 } 98 105 } … … 143 150 $page->setTitle("Administration - Shipvalues"); 144 151 152 $html .= '<div class=block-header2>Add a Shipvalue</div>'; 153 $html .= '<form id="search" action="?a=admin_shp_val" method=post>'; 154 $html .= '<input type="hidden" name="opt" value="search"/>'; 155 $html .= '<table class="kb-subtable"><tr>'; 156 $html .= '<td>ShipID</td><td>or Shipname</td>'; 157 $html .= '</tr><tr>'; 158 $html .= '<td><input id="searchid" name="searchid" type="text" size="4"/></td>'; 159 $html .= '<td><input id="searchname" name="searchname" type="text" size="30"/></td>'; 160 $html .= '<td><input type="submit" name="submit" value="Search"/></td>'; 161 $html .= '</tr></table>'; 162 $html .= '</form><br/>'; 163 145 164 $html .= "<div class=block-header2>View/Change Shipvalues</div>"; 146 165 $qry = new DBQuery(); … … 149 168 from kb3_ships_values kbs 150 169 inner join kb3_ships shp on (kbs.shp_id = shp.shp_id) 151 inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id) ';170 inner join kb3_ship_classes scl on (shp.shp_class = scl.scl_id) order by shp.shp_name asc'; 152 171 $qry->execute($query); 153 172 while ($data = $qry->getRow()) … … 215 234 $html .= 'No Data.<br/>'; 216 235 } 217 218 $html .= '<br/><br/><div class=block-header2>Add a Shipvalue</div>';219 $html .= '<form id="search" action="?a=admin_shp_val" method=post>';220 $html .= '<input type="hidden" name="opt" value="search"/>';221 $html .= '<table class="kb-subtable"><tr>';222 $html .= '<td>ShipID</td><td>or Shipname</td>';223 $html .= '</tr><tr>';224 $html .= '<td><input id="searchid" name="searchid" type="text" size="4"/></td>';225 $html .= '<td><input id="searchname" name="searchname" type="text" size="30"/></td>';226 $html .= '<td><input type="submit" name="submit" value="Search"/></td>';227 $html .= '</tr></table>';228 $html .= '</form>';229 236 } 230 237 $page->addContext($menubox->generate()); -
dev/common/class.http.php
r44 r50 77 77 $data .="--$boundary\r\n"; 78 78 } 79 $request_string .= "Content-Length: ".strlen( &$data)."\r\n";79 $request_string .= "Content-Length: ".strlen($data)."\r\n"; 80 80 $request_string .= "Content-Type: multipart/form-data, boundary=$boundary\r\n"; 81 81 } … … 87 87 88 88 fputs($fp, $request_string.$data); 89 $this->sent = strlen( &$header)+strlen(&$data);89 $this->sent = strlen($header)+strlen($data); 90 90 91 91 $header = 1; … … 109 109 $this->header = $http_header; 110 110 $this->content = $file; 111 $this->recv = strlen( &$http_header)+strlen(&$file);111 $this->recv = strlen($http_header)+strlen($file); 112 112 $this->requested = true; 113 113 }