Changeset 178 for minimanager/scripts/get_lib.php
- Timestamp:
- Dec 23, 2007, 2:55:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/scripts/get_lib.php
r142 r178 49 49 $sql_1 = new SQL; 50 50 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 51 51 52 52 $result_1 = $sql_1->query("SELECT stat_type1,stat_value1,stat_type2,stat_value2,stat_type3,stat_value3,stat_type4, 53 53 stat_value4,stat_type5,stat_value5,stat_type6,stat_value6,stat_type7,stat_value7,stat_type8, … … 87 87 default: 88 88 } 89 89 90 90 $tooltip .= "<font color='white'>"; 91 91 92 92 switch ($item[53]) { 93 93 case 1: //Binds when Picked Up … … 107 107 108 108 if ($item[60]) $tooltip .= "{$lang_item['unique']}<br />"; 109 109 110 110 $tooltip .= "<br />"; 111 111 switch ($item[57]) { … … 172 172 default: 173 173 } 174 174 175 175 switch ($item[33]) { 176 176 case 0: //Consumable 177 $tooltip .= "{$lang_item['consumable']}<br />"; 178 break; 179 177 $tooltip .= "{$lang_item['consumable']}<br />"; 178 break; 179 180 180 case 2: //Weapon 181 181 switch ($item[34]) { … … 340 340 } 341 341 break; 342 342 343 343 case 12: //Quest 344 344 if ($item[53] != 4) $tooltip .= "{$lang_item['quest_item']}<br />"; 345 345 break; 346 346 347 347 case 13: //key 348 348 switch ($item[34]) { … … 358 358 default: 359 359 } 360 360 361 361 if ($item[20]) $tooltip .= "$item[20] {$lang_item['armor']}<br />"; 362 362 … … 365 365 $min_dmg_value = $item[$f]; 366 366 $max_dmg_value = $item[$f+1]; 367 367 368 368 if ($min_dmg_value && $max_dmg_value){ 369 369 switch ($dmg_type) { … … 389 389 $tooltip .= "$min_dmg_value - $max_dmg_value {$lang_item['arcane_dmg']}<br />"; 390 390 break; 391 391 392 392 default: 393 393 } … … 433 433 if ($item[24]) $tooltip .= "$item[24] {$lang_item['res_frost']}<br />"; 434 434 if ($item[26]) $tooltip .= "$item[26] {$lang_item['res_shadow']}<br />"; 435 435 436 436 //sockets 437 437 for($p=72;$p<=74;$p++){ … … 565 565 } 566 566 } 567 } 567 } 568 568 } 569 569 //add equip spellid to status … … 586 586 if ($item[$s1+40]) $tooltip.= abs($item[$s1+40])." {$lang_item['charges']}.<br />"; 587 587 } 588 } 588 } 589 589 } 590 590 591 591 $tooltip .= "</font>"; 592 592 593 593 if ($item[55]) { 594 594 include_once("itemset_tab.php"); 595 595 $tooltip .= "<br /><font color='orange'>{$lang_item['item_set']} : ".get_itemset_name($item[55])." ($item[55])</font>"; 596 596 } 597 if ($item[54]) $tooltip .= "<br /><font color='orange'>''".str_replace("\"", " '", $item[54])."' '</font>";597 if ($item[54]) $tooltip .= "<br /><font color='orange'>''".str_replace("\"", " '", $item[54])."'</font>"; 598 598 599 599 } else $tooltip = "Item ID: $item_id Not Found" ; … … 610 610 global $proxy_cfg, $get_icons_from_web; 611 611 if (file_exists("img/INV/$itemid.jpg")) return "img/INV/$itemid.jpg"; 612 612 613 613 if($get_icons_from_web){ 614 614 //only customitems have ids in this range. 615 615 if ($itemid > 35000) return "img/INV/INV_blank_32.gif"; 616 616 617 617 $xmlfilepath="http://www.wowhead.com/?item="; 618 618 $proxy = $proxy_cfg['addr']; … … 636 636 while ($fp && !feof($fp)) $temp .= fgets($fp, 4096); 637 637 fclose($fp); 638 638 639 639 preg_match("~(Icon.create\('(.*?)')~", $temp, $temp); 640 640 if (!isset($temp[2])) return "img/INV/INV_blank_32.gif"; 641 641 $temp[2] = strtolower($temp[2]); 642 642 643 643 //get the icon itself 644 644 $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.4); … … 647 647 $out = "GET $file HTTP/1.0\r\nHost: $proxy\r\n"; 648 648 if (!empty($proxy_cfg['user'])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg['user']}:{$proxy_cfg['pass']}")."\r\n"; 649 $out .="Connection: Close\r\n\r\n"; 649 $out .="Connection: Close\r\n\r\n"; 650 650 fwrite($fp, $out); 651 651 … … 660 660 fclose($fp); 661 661 fclose($img_file); 662 662 663 663 if (file_exists("img/INV/$itemid.jpg")) return "img/INV/$itemid.jpg"; 664 664 else return "img/INV/INV_blank_32.gif"; … … 666 666 } else return "img/INV/INV_blank_32.gif"; 667 667 } 668 669 //########################################################################################## 670 //generate item border from item_template.entry 671 function get_item_border($item_id){ 672 global $lang_global, $lang_id_tab, $mangos_db, $realm_id, $itemset_id; 673 if($item_id){ 674 $sql_2 = new SQL; 675 $sql_2->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 676 677 $result_2 = $sql_2->query("SELECT Quality FROM item_template WHERE entry = '$item_id'"); 678 $iborder = ($sql_2->num_rows($result_2) == 1) ? $sql_2->result($result_2, 0,"Quality"): "Quality: $iborder Not Found" ; 679 680 return "icon_border_$iborder"; 681 } 682 else 683 return "icon_border_0"; 684 } 668 685 ?>
Note:
See TracChangeset
for help on using the changeset viewer.