Changeset 19 for minimanager/scripts/get_lib.php
- Timestamp:
- Aug 13, 2007, 9:05:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/scripts/get_lib.php
r5 r19 14 14 global $lang_global, $realm_db; 15 15 16 $ mysql_0 = new MySQL;17 $ mysql_0->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);18 19 $result = $ mysql_0->query("SELECT name FROM `realmlist` WHERE id = '$realm_id'");20 $realm_name = $ mysql_0->result($result, 0);21 22 $ mysql_0->close();16 $sql_0 = new SQL; 17 $sql_0->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 18 19 $result = $sql_0->query("SELECT name FROM `realmlist` WHERE id = '$realm_id'"); 20 $realm_name = $sql_0->result($result, 0); 21 22 $sql_0->close(); 23 23 return $realm_name; 24 24 } … … 30 30 global $lang_global, $mangos_db, $realm_id; 31 31 if($item_id){ 32 $ mysql_1 = new MySQL;33 $ mysql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);34 35 $result = $ mysql_1->query("SELECT name FROM item_template WHERE entry = '$item_id'");36 $item_name = ($ mysql_1->num_rows($result) == 1) ? $mysql_1->result($result, 0,"name") : "ItemID: $item_id Not Found" ;37 38 $ mysql_1->close();32 $sql_1 = new SQL; 33 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 34 35 $result = $sql_1->query("SELECT name FROM item_template WHERE entry = '$item_id'"); 36 $item_name = ($sql_1->num_rows($result) == 1) ? $sql_1->result($result, 0,"name") : "ItemID: $item_id Not Found" ; 37 38 $sql_1->close(); 39 39 return $item_name; 40 40 } else return NULL; … … 47 47 global $lang_global, $lang_item, $lang_id_tab, $mangos_db, $realm_id, $itemset_id; 48 48 if($item_id){ 49 $ mysql_1 = new MySQL;50 $ mysql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);49 $sql_1 = new SQL; 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 $result_1 = $ mysql_1->query("SELECT stat_type1,stat_value1,stat_type2,stat_value2,stat_type3,stat_value3,stat_type4,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, 54 54 stat_value8,stat_type9,stat_value9,stat_type10,stat_value10,armor,holy_res,fire_res,nature_res, … … 60 60 spellcharges_4,spellcharges_5,AllowableClass,socketColor_1,socketColor_2,socketColor_3,RandomProperty,RandomSuffix 61 61 FROM item_template WHERE entry = '$item_id' LIMIT 1"); 62 if ($item = $ mysql_1->fetch_row($result_1)) {62 if ($item = $sql_1->fetch_row($result_1)) { 63 63 $tooltip = ""; 64 64 … … 439 439 switch ($item[$p]) { 440 440 case 1: 441 $tooltip .= "<img src='img/socket_meta.gif' class='no_border'alt='' /><font color='gray'> {$lang_item['socket_meta']}</font><br />";441 $tooltip .= "<img src='img/socket_meta.gif' alt='' /><font color='gray'> {$lang_item['socket_meta']}</font><br />"; 442 442 break; 443 443 case 2: 444 $tooltip .= "<img src='img/socket_red.gif' class='no_border'alt='' /><font color='red'> {$lang_item['socket_red']}</font><br />";444 $tooltip .= "<img src='img/socket_red.gif' alt='' /><font color='red'> {$lang_item['socket_red']}</font><br />"; 445 445 break; 446 446 case 4: 447 $tooltip .= "<img src='img/socket_yellow.gif' class='no_border'alt='' /><font color='yellow'> {$lang_item['socket_yellow']}</font><br />";447 $tooltip .= "<img src='img/socket_yellow.gif' alt='' /><font color='yellow'> {$lang_item['socket_yellow']}</font><br />"; 448 448 break; 449 449 case 8: 450 $tooltip .= "<img src='img/socket_blue.gif' class='no_border'alt='' /><font color='blue'> {$lang_item['socket_blue']}</font><br />";450 $tooltip .= "<img src='img/socket_blue.gif' alt='' /><font color='blue'> {$lang_item['socket_blue']}</font><br />"; 451 451 break; 452 452 default: … … 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'>'' $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" ; 600 600 601 $ mysql_1->close();601 $sql_1->close(); 602 602 return $tooltip; 603 603 } else return(NULL);
Note:
See TracChangeset
for help on using the changeset viewer.