1 | <?php |
---|
2 | require_once("db.php"); |
---|
3 | function check_commenttable() |
---|
4 | { |
---|
5 | $qry = new DBQuery(); |
---|
6 | $query = 'select count(*) from kb3_comments'; |
---|
7 | $result = $qry->execute($query); |
---|
8 | if ($result) |
---|
9 | { |
---|
10 | check_commenttablerow(); |
---|
11 | return; |
---|
12 | } |
---|
13 | $query = 'CREATE TABLE `kb3_comments` ( |
---|
14 | `ID` INT NOT NULL AUTO_INCREMENT , |
---|
15 | `kll_id` INT NOT NULL , |
---|
16 | `comment` TEXT NOT NULL , |
---|
17 | `name` TINYTEXT NOT NULL , |
---|
18 | `posttime` TIMESTAMP DEFAULT \'0000-00-00 00:00:00\' NOT NULL, |
---|
19 | PRIMARY KEY ( `ID` ) |
---|
20 | ) TYPE = MYISAM'; |
---|
21 | $qry->execute($query); |
---|
22 | } |
---|
23 | |
---|
24 | function check_navigationtable(){ |
---|
25 | $qry = new DBQuery(); |
---|
26 | $query = 'select count(*) from kb3_navigation'; |
---|
27 | $result = mysql_query($query); |
---|
28 | if ($result) |
---|
29 | { |
---|
30 | $query = "select count(KBSITE) from kb3_navigation WHERE KBSITE = '".KB_SITE."'"; |
---|
31 | $result = @mysql_query($query); |
---|
32 | if ($result) |
---|
33 | { |
---|
34 | return; |
---|
35 | } |
---|
36 | $query = 'ALTER TABLE `kb3_navigation` ADD `KBSITE` VARCHAR( 16 ) NOT NULL'; |
---|
37 | $qry->execute($query); |
---|
38 | $query = 'UPDATE `kb3_navigation` SET KBSITE = "'.KB_SITE.'" WHERE KBSITE LIKE "";'; |
---|
39 | $qry->execute($query); |
---|
40 | return; |
---|
41 | } |
---|
42 | $query = 'CREATE TABLE `kb3_navigation` ( |
---|
43 | `ID` INT NOT NULL AUTO_INCREMENT , |
---|
44 | `nav_type` TINYTEXT NOT NULL, |
---|
45 | `intern` INT ( 1 ) NOT NULL, |
---|
46 | `descr` TINYTEXT NOT NULL , |
---|
47 | `url` TINYTEXT NOT NULL , |
---|
48 | `target` VARCHAR( 10 ) NOT NULL, |
---|
49 | `posnr` INT NOT NULL, |
---|
50 | `page` TINYTEXT NOT NULL, |
---|
51 | `KBSITE` VARCHAR ( 16 ) NOT NULL, |
---|
52 | PRIMARY KEY ( `ID` ) |
---|
53 | ) TYPE = MYISAM'; |
---|
54 | $qry->execute($query); |
---|
55 | if (CORP_ID) |
---|
56 | { |
---|
57 | $statlink = '?a=corp_detail&crp_id='.CORP_ID; |
---|
58 | } |
---|
59 | elseif (ALLIANCE_ID) |
---|
60 | { |
---|
61 | $statlink = '?a=alliance_detail&all_id='.ALLIANCE_ID; |
---|
62 | } |
---|
63 | $queries = "INSERT IGNORE INTO `kb3_navigation` VALUES (1,'top',1,'Home','?a=home','_self',1,'ALL_PAGES','".KB_SITE."'); |
---|
64 | INSERT IGNORE INTO `kb3_navigation` VALUES (2,'top',1,'Campaings','?a=campaigns','_self',2,'ALL_PAGES','".KB_SITE."'); |
---|
65 | INSERT IGNORE INTO `kb3_navigation` VALUES (3,'top',1,'Contracts','?a=contracts','_self',3,'ALL_PAGES','".KB_SITE."'); |
---|
66 | INSERT IGNORE INTO `kb3_navigation` VALUES (4,'top',1,'Kills','?a=home','_self',4,'ALL_PAGES','".KB_SITE."'); |
---|
67 | INSERT IGNORE INTO `kb3_navigation` VALUES (5,'top',1,'Losses','?a=losses','_self',5,'ALL_PAGES','".KB_SITE."'); |
---|
68 | INSERT IGNORE INTO `kb3_navigation` VALUES (6,'top',1,'Post Mail','?a=post','_self',6,'ALL_PAGES','".KB_SITE."'); |
---|
69 | INSERT IGNORE INTO `kb3_navigation` VALUES (7,'top',1,'Stats','$statlink','_self',7,'ALL_PAGES','".KB_SITE."'); |
---|
70 | INSERT IGNORE INTO `kb3_navigation` VALUES (8,'top',1,'Awards','?a=awards','_self',8,'ALL_PAGES','".KB_SITE."'); |
---|
71 | INSERT IGNORE INTO `kb3_navigation` VALUES (9,'top',1,'Standings','?a=standings','_self',9,'ALL_PAGES','".KB_SITE."'); |
---|
72 | INSERT IGNORE INTO `kb3_navigation` VALUES (10,'top',1,'Search','?a=search','_self',10,'ALL_PAGES','".KB_SITE."'); |
---|
73 | INSERT IGNORE INTO `kb3_navigation` VALUES (11,'top',1,'Admin','?a=admin','_self',11,'ALL_PAGES','".KB_SITE."'); |
---|
74 | INSERT IGNORE INTO `kb3_navigation` VALUES (12,'top',1,'About','?a=about','_self',12,'ALL_PAGES','".KB_SITE."');"; |
---|
75 | $query = explode("\n", $queries); |
---|
76 | foreach ($query as $querystring) |
---|
77 | { |
---|
78 | if ($string = trim(str_replace(');', ')', $querystring))) |
---|
79 | { |
---|
80 | $qry->execute($string); |
---|
81 | } |
---|
82 | } |
---|
83 | } |
---|
84 | |
---|
85 | function check_commenttablerow() |
---|
86 | { |
---|
87 | $qry = new DBQuery(); |
---|
88 | $query = 'select posttime from kb3_comments limit 1'; |
---|
89 | $result = mysql_query($query); |
---|
90 | if ($result) |
---|
91 | { |
---|
92 | $query = 'ALTER TABLE `kb3_comments` CHANGE `ID` `id` INT( 11 ) NOT NULL AUTO_INCREMENT'; |
---|
93 | $qry->execute($query); |
---|
94 | return; |
---|
95 | } |
---|
96 | $query = 'ALTER TABLE `kb3_comments` ADD `posttime` TIMESTAMP DEFAULT \'0000-00-00 00:00:00\' NOT NULL'; |
---|
97 | $qry->execute($query); |
---|
98 | } |
---|
99 | |
---|
100 | function check_shipvaltable() |
---|
101 | { |
---|
102 | $qry = new DBQuery(); |
---|
103 | $query = 'select count(*) from kb3_ships_values'; |
---|
104 | $result = mysql_query($query); |
---|
105 | if ($result) |
---|
106 | { |
---|
107 | return; |
---|
108 | } |
---|
109 | $query = 'CREATE TABLE `kb3_ships_values` ( |
---|
110 | `shp_id` INT( 11 ) NOT NULL , |
---|
111 | `shp_value` BIGINT( 4 ) NOT NULL , |
---|
112 | PRIMARY KEY ( `shp_id` ) |
---|
113 | ) TYPE = MYISAM ;'; |
---|
114 | $qry->execute($query); |
---|
115 | $qry->execute('UPDATE kb3_ships set shp_class = 8 WHERE shp_id=257 limit 1'); |
---|
116 | $qry->execute('UPDATE kb3_ships set shp_class = 8 WHERE shp_id=252 limit 1'); |
---|
117 | $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=266 limit 1'); |
---|
118 | $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=275 limit 1'); |
---|
119 | $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=272 limit 1'); |
---|
120 | $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=246 limit 1'); |
---|
121 | $qry->execute('UPDATE kb3_ships set shp_class = 4 WHERE shp_id=249 limit 1'); |
---|
122 | $qry->execute('UPDATE kb3_ships set shp_techlevel = 2 where shp_class = 22'); |
---|
123 | } |
---|
124 | |
---|
125 | function check_invdetail() |
---|
126 | { |
---|
127 | $qry = new DBQuery(); |
---|
128 | $query = 'select ind_sec_status from kb3_inv_detail limit 1'; |
---|
129 | $qry->execute($query); |
---|
130 | $len = mysql_field_len($qry->resid_,0); |
---|
131 | if ($len == 4) |
---|
132 | { |
---|
133 | $query = 'ALTER TABLE `kb3_inv_detail` CHANGE `ind_sec_status` `ind_sec_status` VARCHAR(5)'; |
---|
134 | $qry->execute($query); |
---|
135 | } |
---|
136 | } |
---|
137 | |
---|
138 | function check_pilots() |
---|
139 | { |
---|
140 | $qry = new DBQuery(); |
---|
141 | $query = 'select plt_name from kb3_pilots limit 1'; |
---|
142 | $qry->execute($query); |
---|
143 | $len = mysql_field_len($qry->resid_,0); |
---|
144 | if ($len == 32) |
---|
145 | { |
---|
146 | $query = 'ALTER TABLE `kb3_pilots` CHANGE `plt_name` `plt_name` VARCHAR(64) NOT NULL'; |
---|
147 | $qry->execute($query); |
---|
148 | } |
---|
149 | } |
---|
150 | |
---|
151 | function check_contracts() |
---|
152 | { |
---|
153 | $qry = new DBQuery(); |
---|
154 | $query = 'select ctd_sys_id from kb3_contract_details limit 1'; |
---|
155 | $result = mysql_query($query); |
---|
156 | if ($result) |
---|
157 | { |
---|
158 | return; |
---|
159 | } |
---|
160 | $qry->execute('ALTER TABLE `kb3_contract_details` ADD `ctd_sys_id` INT(11) NOT NULL DEFAULT \'0\''); |
---|
161 | |
---|
162 | $qry->execute('SHOW columns from `kb3_contract_details` like \'ctd_ctr_id\''); |
---|
163 | $arr = $qry->getRow(); |
---|
164 | if ($arr['Key'] == 'PRI') |
---|
165 | { |
---|
166 | return; |
---|
167 | } |
---|
168 | $qry->execute('ALTER TABLE `kb3_contract_details` ADD INDEX (`ctd_ctr_id`) '); |
---|
169 | } |
---|
170 | function check_index() |
---|
171 | { |
---|
172 | check_index_invcrp(); |
---|
173 | check_index_invall(); |
---|
174 | $qry = new DBQuery(); |
---|
175 | $qry->execute('SHOW columns from kb3_item_types like \'itt_id\''); |
---|
176 | $arr = $qry->getRow(); |
---|
177 | if ($arr['Key'] == 'PRI') |
---|
178 | { |
---|
179 | return; |
---|
180 | } |
---|
181 | $qry->execute('ALTER TABLE `kb3_item_types` ADD PRIMARY KEY ( `itt_id` ) '); |
---|
182 | } |
---|
183 | function check_index_invcrp() |
---|
184 | { |
---|
185 | $qry = new DBQuery(); |
---|
186 | $qry->execute('SHOW columns from kb3_inv_crp like \'inc_kll_id\''); |
---|
187 | $arr = $qry->getRow(); |
---|
188 | if ($arr['Key'] == 'MUL') |
---|
189 | { |
---|
190 | return; |
---|
191 | } |
---|
192 | $qry->execute('ALTER TABLE `kb3_inv_crp` ADD INDEX ( `inc_kll_id` ) '); |
---|
193 | } |
---|
194 | function check_index_invall() |
---|
195 | { |
---|
196 | $qry = new DBQuery(); |
---|
197 | $qry->execute('SHOW columns from kb3_inv_all like \'ina_kll_id\''); |
---|
198 | $arr = $qry->getRow(); |
---|
199 | if ($arr['Key'] == 'MUL') |
---|
200 | { |
---|
201 | return; |
---|
202 | } |
---|
203 | $qry->execute('ALTER TABLE `kb3_inv_all` ADD INDEX ( `ina_kll_id` ) '); |
---|
204 | } |
---|
205 | function check_tblstrct1() |
---|
206 | { |
---|
207 | $qry = new DBQuery(); |
---|
208 | $query = 'select shp_description from kb3_ships limit 1'; |
---|
209 | $result = mysql_query($query); |
---|
210 | if (!$result) |
---|
211 | { |
---|
212 | return; |
---|
213 | } |
---|
214 | $query = 'ALTER TABLE `kb3_ships` DROP `shp_description`'; |
---|
215 | $qry->execute($query); |
---|
216 | } |
---|
217 | function check_tblstrct2() |
---|
218 | { |
---|
219 | $qry = new DBQuery(); |
---|
220 | $query = 'select itm_description from kb3_items limit 1'; |
---|
221 | $result = mysql_query($query); |
---|
222 | if (!$result) |
---|
223 | { |
---|
224 | return; |
---|
225 | } |
---|
226 | $query = 'ALTER TABLE `kb3_items` DROP `itm_description`'; |
---|
227 | $qry->execute($query); |
---|
228 | } |
---|
229 | function check_tblstrct3() |
---|
230 | { |
---|
231 | $qry = new DBQuery(); |
---|
232 | $query = 'select Value from kb3_items limit 1'; |
---|
233 | $result = mysql_query($query); |
---|
234 | if ($result) |
---|
235 | { |
---|
236 | $query = 'ALTER TABLE `kb3_items` CHANGE `Value` `itm_value` INT( 11 ) NOT NULL DEFAULT \'0\''; |
---|
237 | $qry->execute($query); |
---|
238 | } |
---|
239 | } |
---|
240 | function check_tblstrct4() |
---|
241 | { |
---|
242 | $qry = new DBQuery(); |
---|
243 | $query = 'select itm_value from kb3_items limit 1'; |
---|
244 | $result = mysql_query($query); |
---|
245 | if ($result) |
---|
246 | { |
---|
247 | return; |
---|
248 | } |
---|
249 | $query = 'ALTER TABLE `kb3_items` ADD `itm_value` INT( 11 ) NOT NULL DEFAULT \'0\''; |
---|
250 | $qry->execute($query); |
---|
251 | $qry->execute('ALTER TABLE `kb3_items` CHANGE `itm_externalid` `itm_externalid` INT( 11 ) NOT NULL DEFAULT \'0\''); |
---|
252 | } |
---|
253 | |
---|
254 | function check_tblstrct5() |
---|
255 | { |
---|
256 | $qry = new DBQuery(); |
---|
257 | $query = 'select count(*) from kb3_standings'; |
---|
258 | $result = mysql_query($query); |
---|
259 | if ($result) |
---|
260 | { |
---|
261 | $query = 'select count(*) from kb3_standings where sta_from=1 and sta_to=1 and sta_from_type=\'a\' and |
---|
262 | sta_to_type=\'c\''; |
---|
263 | $result = mysql_query($query); |
---|
264 | if ($result) |
---|
265 | { |
---|
266 | return; |
---|
267 | } |
---|
268 | $qry->execute('drop table kb3_standings'); |
---|
269 | } |
---|
270 | $query = 'CREATE TABLE `kb3_standings` ( |
---|
271 | `sta_from` int(11) NOT NULL default \'0\', |
---|
272 | `sta_to` int(11) NOT NULL default \'0\', |
---|
273 | `sta_from_type` enum(\'a\',\'c\') NOT NULL default \'a\', |
---|
274 | `sta_to_type` enum(\'a\',\'c\') NOT NULL default \'a\', |
---|
275 | `sta_value` float NOT NULL default \'0\', |
---|
276 | `sta_comment` varchar(200) NOT NULL, |
---|
277 | KEY `sta_from` (`sta_from`) |
---|
278 | ) TYPE=MyISAM;'; |
---|
279 | $qry->execute($query); |
---|
280 | } |
---|
281 | |
---|
282 | function chk_kb3_items() |
---|
283 | { |
---|
284 | $qry = new DBQuery(); |
---|
285 | $query = 'select count(*) from kb3_item_types where itt_id = 787'; |
---|
286 | $result = mysql_query($query); |
---|
287 | $result = mysql_fetch_array($result); |
---|
288 | if ($result['cnt'] == 1) |
---|
289 | { |
---|
290 | return; |
---|
291 | } |
---|
292 | $queries = " |
---|
293 | INSERT IGNORE INTO `kb3_item_types` VALUES (737, 'Gas Cloud Harvester',1); |
---|
294 | INSERT IGNORE INTO `kb3_item_types` VALUES (762, 'Inertia Stabilizer',3); |
---|
295 | INSERT IGNORE INTO `kb3_item_types` VALUES (763, 'Nanofiber Internal Structure',3); |
---|
296 | INSERT IGNORE INTO `kb3_item_types` VALUES (764, 'Overdrive Injector System',3); |
---|
297 | INSERT IGNORE INTO `kb3_item_types` VALUES (765, 'Expanded Cargohold',3); |
---|
298 | INSERT IGNORE INTO `kb3_item_types` VALUES (766, 'Power Diagnostic System',3); |
---|
299 | INSERT IGNORE INTO `kb3_item_types` VALUES (767, 'Capacitor Power Relay',3); |
---|
300 | INSERT IGNORE INTO `kb3_item_types` VALUES (768, 'Capacitor Flux Coil',3); |
---|
301 | INSERT IGNORE INTO `kb3_item_types` VALUES (769, 'Reactor Control Unit',3); |
---|
302 | INSERT IGNORE INTO `kb3_item_types` VALUES (770, 'Shield Flux Coil',3); |
---|
303 | INSERT IGNORE INTO `kb3_item_types` VALUES (771, 'Missile Launcher Heavy Assault',1); |
---|
304 | INSERT IGNORE INTO `kb3_item_types` VALUES (738, 'Cyber Armor', 0); |
---|
305 | INSERT IGNORE INTO `kb3_item_types` VALUES (740, 'Cyber Electronics', 0); |
---|
306 | INSERT IGNORE INTO `kb3_item_types` VALUES (741, 'Cyber Engineering', 0); |
---|
307 | INSERT IGNORE INTO `kb3_item_types` VALUES (742, 'Cyber Gunnery', 0); |
---|
308 | INSERT IGNORE INTO `kb3_item_types` VALUES (743, 'Cyber Industry', 0); |
---|
309 | INSERT IGNORE INTO `kb3_item_types` VALUES (744, 'Cyber Leadership', 0); |
---|
310 | INSERT IGNORE INTO `kb3_item_types` VALUES (745, 'Cyber Learning', 0); |
---|
311 | INSERT IGNORE INTO `kb3_item_types` VALUES (746, 'Cyber Missile', 0); |
---|
312 | INSERT IGNORE INTO `kb3_item_types` VALUES (747, 'Cyber Navigation', 0); |
---|
313 | INSERT IGNORE INTO `kb3_item_types` VALUES (748, 'Cyber Science', 0); |
---|
314 | INSERT IGNORE INTO `kb3_item_types` VALUES (749, 'Cyber Shields', 0); |
---|
315 | INSERT IGNORE INTO `kb3_item_types` VALUES (772, 'Assault Missile', 0); |
---|
316 | INSERT IGNORE INTO `kb3_item_types` VALUES (773, 'Rig Armor', 5); |
---|
317 | INSERT IGNORE INTO `kb3_item_types` VALUES (774, 'Rig Shield', 5); |
---|
318 | INSERT IGNORE INTO `kb3_item_types` VALUES (775, 'Rig Energy Weapon', 5); |
---|
319 | INSERT IGNORE INTO `kb3_item_types` VALUES (776, 'Rig Hybrid Weapon', 5); |
---|
320 | INSERT IGNORE INTO `kb3_item_types` VALUES (777, 'Rig Projectile Weapon', 5); |
---|
321 | INSERT IGNORE INTO `kb3_item_types` VALUES (778, 'Rig Drones', 5); |
---|
322 | INSERT IGNORE INTO `kb3_item_types` VALUES (779, 'Rig Launcher', 5); |
---|
323 | INSERT IGNORE INTO `kb3_item_types` VALUES (780, 'Rig Electronics', 5); |
---|
324 | INSERT IGNORE INTO `kb3_item_types` VALUES (781, 'Rig Energy Grid', 5); |
---|
325 | INSERT IGNORE INTO `kb3_item_types` VALUES (782, 'Rig Astronautic', 5); |
---|
326 | INSERT IGNORE INTO `kb3_item_types` VALUES (783, 'Cyber X Specials', 0); |
---|
327 | INSERT IGNORE INTO `kb3_item_types` VALUES (785, 'Script', 0); |
---|
328 | INSERT IGNORE INTO `kb3_item_types` VALUES (786, 'Rig Electronics Superiority', 5); |
---|
329 | INSERT IGNORE INTO `kb3_item_types` VALUES (722, 'Advanced Hybrid Ammo Blueprint', 0); |
---|
330 | INSERT IGNORE INTO `kb3_item_types` VALUES (723, 'Tractor Beam Blueprint', 0); |
---|
331 | INSERT IGNORE INTO `kb3_item_types` VALUES (724, 'Implant Blueprints', 0); |
---|
332 | INSERT IGNORE INTO `kb3_item_types` VALUES (725, 'Advanced Projectile Ammo Blueprint', 0); |
---|
333 | INSERT IGNORE INTO `kb3_item_types` VALUES (726, 'Advanced Frequency Crystal Blueprint', 0); |
---|
334 | INSERT IGNORE INTO `kb3_item_types` VALUES (727, 'Mining Crystal Blueprint', 0); |
---|
335 | INSERT IGNORE INTO `kb3_item_types` VALUES (728, 'Decryptors - Amarr', 0); |
---|
336 | INSERT IGNORE INTO `kb3_item_types` VALUES (729, 'Decryptors - Minmatar', 0); |
---|
337 | INSERT IGNORE INTO `kb3_item_types` VALUES (730, 'Decryptors - Gallente', 0); |
---|
338 | INSERT IGNORE INTO `kb3_item_types` VALUES (731, 'Decryptors - Caldari', 0); |
---|
339 | INSERT IGNORE INTO `kb3_item_types` VALUES (732, 'Decryptors - Sleepers', 0); |
---|
340 | INSERT IGNORE INTO `kb3_item_types` VALUES (733, 'Decryptors - Yan Jung', 0); |
---|
341 | INSERT IGNORE INTO `kb3_item_types` VALUES (734, 'Decryptors - Takmahl', 0); |
---|
342 | INSERT IGNORE INTO `kb3_item_types` VALUES (735, 'Decryptors - Talocan', 0); |
---|
343 | INSERT IGNORE INTO `kb3_item_types` VALUES (754, 'Salvaged Materials', 0); |
---|
344 | INSERT IGNORE INTO `kb3_item_types` VALUES (784, 'Large Collidable Ship', 0); |
---|
345 | INSERT IGNORE INTO `kb3_item_types` VALUES (787, 'Rig Blueprint', 0); |
---|
346 | "; |
---|
347 | $query = explode("\n", $queries); |
---|
348 | foreach ($query as $querystring) |
---|
349 | { |
---|
350 | if ($string = trim(str_replace(');', ')', $querystring))) |
---|
351 | { |
---|
352 | $qry->execute($string); |
---|
353 | } |
---|
354 | } |
---|
355 | } |
---|
356 | function chk_kb3_items2() |
---|
357 | { |
---|
358 | $qry = new DBQuery(); |
---|
359 | $query = 'select itm_externalid from kb3_items where itm_name = \'Repair Drone\''; |
---|
360 | $result = mysql_query($query); |
---|
361 | $result = mysql_fetch_array($result); |
---|
362 | if ($result['itm_externalid'] == '9871') |
---|
363 | { |
---|
364 | return; |
---|
365 | } |
---|
366 | $queries = " |
---|
367 | update kb3_items set itm_externalid='10246' where itm_name='Mining Drone I'; |
---|
368 | update kb3_items set itm_externalid='10248' where itm_name='Mining Drone - Improved UNUSED'; |
---|
369 | update kb3_items set itm_externalid='10250' where itm_name='Mining Drone II'; |
---|
370 | update kb3_items set itm_externalid='1187' where itm_name='Mining Drone - Elite'; |
---|
371 | update kb3_items set itm_externalid='1201' where itm_name='Proximity Drone'; |
---|
372 | update kb3_items set itm_externalid='1202' where itm_name='Wasp I'; |
---|
373 | update kb3_items set itm_externalid='15508' where itm_name='Civilian Mining Drone'; |
---|
374 | update kb3_items set itm_externalid='15510' where itm_name='Vespa I'; |
---|
375 | update kb3_items set itm_externalid='16206' where itm_name='Valkyrie I'; |
---|
376 | update kb3_items set itm_externalid='17565' where itm_name='Hellhound I'; |
---|
377 | update kb3_items set itm_externalid='21050' where itm_name='Unanchoring Drone'; |
---|
378 | update kb3_items set itm_externalid='21638' where itm_name='Survey Drone'; |
---|
379 | update kb3_items set itm_externalid='21640' where itm_name='Vespa II'; |
---|
380 | update kb3_items set itm_externalid='2173' where itm_name='Valkyrie II'; |
---|
381 | update kb3_items set itm_externalid='2175' where itm_name='Infiltrator I'; |
---|
382 | update kb3_items set itm_externalid='2183' where itm_name='Infiltrator II'; |
---|
383 | update kb3_items set itm_externalid='2185' where itm_name='Hammerhead I'; |
---|
384 | update kb3_items set itm_externalid='2193' where itm_name='Hammerhead II'; |
---|
385 | update kb3_items set itm_externalid='2195' where itm_name='Praetor I'; |
---|
386 | update kb3_items set itm_externalid='2203' where itm_name='Praetor II'; |
---|
387 | update kb3_items set itm_externalid='2205' where itm_name='Acolyte I'; |
---|
388 | update kb3_items set itm_externalid='2205' where itm_name='Acolyte II'; |
---|
389 | update kb3_items set itm_externalid='22572' where itm_name='Praetor EV-900'; |
---|
390 | update kb3_items set itm_externalid='22574' where itm_name='Warp Scrambling Drone'; |
---|
391 | update kb3_items set itm_externalid='22713' where itm_name='10mn webscramblifying Drone'; |
---|
392 | update kb3_items set itm_externalid='22765' where itm_name='Heavy Shield Maintenance Bot I'; |
---|
393 | update kb3_items set itm_externalid='22780' where itm_name='Fighter Uno'; |
---|
394 | update kb3_items set itm_externalid='23055' where itm_name='Templar'; |
---|
395 | update kb3_items set itm_externalid='23057' where itm_name='Dragonfly'; |
---|
396 | update kb3_items set itm_externalid='23059' where itm_name='Firbolg'; |
---|
397 | update kb3_items set itm_externalid='23061' where itm_name='Einherji'; |
---|
398 | update kb3_items set itm_externalid='23473' where itm_name='Wasp EC-900'; |
---|
399 | update kb3_items set itm_externalid='23506' where itm_name='Ogre SD-900'; |
---|
400 | update kb3_items set itm_externalid='23510' where itm_name='Praetor TD-900'; |
---|
401 | update kb3_items set itm_externalid='23512' where itm_name='Berserker TP-900'; |
---|
402 | update kb3_items set itm_externalid='23523' where itm_name='Heavy Armor Maintenance Bot I'; |
---|
403 | update kb3_items set itm_externalid='23525' where itm_name='Curator I'; |
---|
404 | update kb3_items set itm_externalid='23559' where itm_name='Berserker SW-900'; |
---|
405 | update kb3_items set itm_externalid='23559' where itm_name='Warden I'; |
---|
406 | update kb3_items set itm_externalid='23561' where itm_name='Garde I'; |
---|
407 | update kb3_items set itm_externalid='23563' where itm_name='Bouncer I'; |
---|
408 | update kb3_items set itm_externalid='23659' where itm_name='Acolyte EV-300'; |
---|
409 | update kb3_items set itm_externalid='23702' where itm_name='Infiltrator EV-600'; |
---|
410 | update kb3_items set itm_externalid='23705' where itm_name='Vespa EC-600'; |
---|
411 | update kb3_items set itm_externalid='23707' where itm_name='Hornet EC-300'; |
---|
412 | update kb3_items set itm_externalid='23709' where itm_name='Medium Armor Maintenance Bot I'; |
---|
413 | update kb3_items set itm_externalid='23711' where itm_name='Light Armor Maintenance Bot I'; |
---|
414 | update kb3_items set itm_externalid='23713' where itm_name='Hammerhead SD-600'; |
---|
415 | update kb3_items set itm_externalid='23715' where itm_name='Hobgoblin SD-300'; |
---|
416 | update kb3_items set itm_externalid='23717' where itm_name='Medium Shield Maintenance Bot I'; |
---|
417 | update kb3_items set itm_externalid='23719' where itm_name='Light Shield Maintenance Bot I'; |
---|
418 | update kb3_items set itm_externalid='23721' where itm_name='Valkyrie TP-600'; |
---|
419 | update kb3_items set itm_externalid='23723' where itm_name='Warrior TP-300'; |
---|
420 | update kb3_items set itm_externalid='23725' where itm_name='Infiltrator TD-600'; |
---|
421 | update kb3_items set itm_externalid='23727' where itm_name='Acolyte TD-300'; |
---|
422 | update kb3_items set itm_externalid='23729' where itm_name='Valkyrie SW-600'; |
---|
423 | update kb3_items set itm_externalid='23731' where itm_name='Warrior SW-300'; |
---|
424 | update kb3_items set itm_externalid='23759' where itm_name='FA-14 Templar'; |
---|
425 | update kb3_items set itm_externalid='2436' where itm_name='Wasp II'; |
---|
426 | update kb3_items set itm_externalid='2444' where itm_name='Ogre I'; |
---|
427 | update kb3_items set itm_externalid='2446' where itm_name='Ogre II'; |
---|
428 | update kb3_items set itm_externalid='2454' where itm_name='Hobgoblin I'; |
---|
429 | update kb3_items set itm_externalid='2456' where itm_name='Hobgoblin II'; |
---|
430 | update kb3_items set itm_externalid='24618' where itm_name='horrible tracking drone'; |
---|
431 | update kb3_items set itm_externalid='2464' where itm_name='Hornet I'; |
---|
432 | update kb3_items set itm_externalid='2466' where itm_name='Hornet II'; |
---|
433 | update kb3_items set itm_externalid='2476' where itm_name='Berserker I'; |
---|
434 | update kb3_items set itm_externalid='2478' where itm_name='Berserker II'; |
---|
435 | update kb3_items set itm_externalid='2486' where itm_name='Warrior I'; |
---|
436 | update kb3_items set itm_externalid='2488' where itm_name='Warrior II'; |
---|
437 | update kb3_items set itm_externalid='3218' where itm_name='Harvester Mining Drone'; |
---|
438 | update kb3_items set itm_externalid='3549' where itm_name='Tutorial Attack Drone'; |
---|
439 | update kb3_items set itm_externalid='9871' where itm_name='Repair Drone'; |
---|
440 | "; |
---|
441 | $query = explode("\n", $queries); |
---|
442 | foreach ($query as $querystring) |
---|
443 | { |
---|
444 | if ($string = trim(str_replace(');', ')', $querystring))) |
---|
445 | { |
---|
446 | $qry->execute($string); |
---|
447 | } |
---|
448 | } |
---|
449 | } |
---|
450 | function check_tblstrct6() |
---|
451 | { |
---|
452 | $qry = new DBQuery(); |
---|
453 | $query = 'select all_img from kb3_alliances limit 1'; |
---|
454 | $result = mysql_query($query); |
---|
455 | if (!$result) |
---|
456 | { |
---|
457 | return; |
---|
458 | } |
---|
459 | $query = 'ALTER TABLE `kb3_alliances` DROP `all_img`'; |
---|
460 | $qry->execute($query); |
---|
461 | } |
---|
462 | ?> |
---|