Changeset 19 for minimanager/char.php
- Timestamp:
- Aug 13, 2007, 9:05:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/char.php
r5 r19 23 23 if (empty($_GET['id'])) error($lang_global['empty_fields']); 24 24 25 $ mysql = new MySQL;26 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);27 28 $id = $ mysql->quote_smart($_GET['id']);29 30 $result = $ mysql->query("SELECT account,race FROM `character` WHERE guid = $id LIMIT 1");31 32 if ($ mysql->num_rows($result)){25 $sql = new SQL; 26 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 27 28 $id = $sql->quote_smart($_GET['id']); 29 30 $result = $sql->query("SELECT account,race FROM `character` WHERE guid = $id LIMIT 1"); 31 32 if ($sql->num_rows($result)){ 33 33 //resrict by owner's gmlvl 34 $owner_acc_id = $ mysql->result($result, 0, 'account');35 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);36 $query = $ mysql->query("SELECT gmlevel,username FROM account WHERE id = $owner_acc_id");37 $owner_gmlvl = $ mysql->result($query, 0, 'gmlevel');38 $owner_name = $ mysql->result($query, 0, 'username');39 40 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);34 $owner_acc_id = $sql->result($result, 0, 'account'); 35 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 36 $query = $sql->query("SELECT gmlevel,username FROM account WHERE id = $owner_acc_id"); 37 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 38 $owner_name = $sql->result($query, 0, 'username'); 39 40 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 41 41 42 42 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 43 $side_p = (in_array($ mysql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2;44 $result_1 = $ mysql->query("SELECT race FROM `character` WHERE account = '$user_id' LIMIT 1");45 if ($ mysql->num_rows($result)){46 $side_v = (in_array($ mysql->result($result_1, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2;43 $side_p = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2; 44 $result_1 = $sql->query("SELECT race FROM `character` WHERE account = '$user_id' LIMIT 1"); 45 if ($sql->num_rows($result)){ 46 $side_v = (in_array($sql->result($result_1, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2; 47 47 } else $side_v = 0; 48 48 unset($result_1); … … 54 54 if ($user_lvl >= $owner_gmlvl && (($side_v == $side_p) || !$side_v)){ 55 55 56 $result = $ mysql->query("SELECT data,name,race,class,position_x,position_y,map,online,totaltime FROM `character` WHERE guid = '$id'");57 $char = $ mysql->fetch_row($result);56 $result = $sql->query("SELECT data,name,race,class,zone,map,online,totaltime FROM `character` WHERE guid = '$id'"); 57 $char = $sql->fetch_row($result); 58 58 $char_data = explode(' ',$char[0]); 59 59 60 $online = ($char[ 7]) ? $lang_char['online'] : $lang_char['offline'];60 $online = ($char[6]) ? $lang_char['online'] : $lang_char['offline']; 61 61 62 62 if($char_data[CHAR_DATA_OFFSET_GUILD_ID]){ 63 $query = $ mysql->query("SELECT name FROM guild WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}'");64 $guild_name = $ mysql->result($query, 0, 'name');63 $query = $sql->query("SELECT name FROM guild WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}'"); 64 $guild_name = $sql->result($query, 0, 'name'); 65 65 if ($user_lvl > 0 ) $guild_name = "<a href=\"guild.php?action=view_guild&error=3&id={$char_data[CHAR_DATA_OFFSET_GUILD_ID]}\" >$guild_name</a>"; 66 66 if ($char_data[CHAR_DATA_OFFSET_GUILD_RANK]){ 67 $guild_rank_query = $ mysql->query("SELECT rname FROM guild_rank WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}' AND rid='{$char_data[CHAR_DATA_OFFSET_GUILD_RANK]}'");68 $guild_rank = $ mysql->result($guild_rank_query, 0, 'rname');67 $guild_rank_query = $sql->query("SELECT rname FROM guild_rank WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}' AND rid='{$char_data[CHAR_DATA_OFFSET_GUILD_RANK]}'"); 68 $guild_rank = $sql->result($guild_rank_query, 0, 'rname'); 69 69 } else $guild_rank = $lang_char['guild_leader']; 70 70 } else { … … 128 128 else $output .= "<img src=\"img/INV/INV_empty_32.gif\" class=\"icon_border\" alt=\"\" />"; 129 129 $output .= "</td> 130 <td class=\"half_line\" colspan=\"4\">".get_map_name($char[ 6])." - ".get_zone_name($char[6], $char[4], $char[5])."</td>130 <td class=\"half_line\" colspan=\"4\">".get_map_name($char[5])." - ".get_zone_name($char[4])."</td> 131 131 <td width=\"6%\">"; 132 132 if (!empty($equiped_items[10][1])) $output .= maketooltip("<img src=\"{$equiped_items[10][1]}\" class=\"icon_border\" alt=\"\" />", "$item_datasite{$char_data[CHAR_DATA_OFFSET_EQU_GLOVES]}", $equiped_items[10][0], "item_tooltip", "target=\"_blank\""); … … 299 299 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 300 300 //total time played 301 $tot_time = $char[ 8];301 $tot_time = $char[7]; 302 302 $tot_days = (int)($tot_time/86400); 303 303 $tot_time = $tot_time - ($tot_days*86400); … … 333 333 } 334 334 } else { 335 $ mysql->close();335 $sql->close(); 336 336 error($lang_char['no_permission']); 337 337 } 338 338 339 339 } else error($lang_char['no_char_found']); 340 $ mysql->close();340 $sql->close(); 341 341 } 342 342 … … 351 351 if (empty($_GET['id'])) error($lang_global['empty_fields']); 352 352 353 $ mysql = new MySQL;354 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);355 356 $id = $ mysql->quote_smart($_GET['id']);357 358 $result = $ mysql->query("SELECT account FROM `character` WHERE guid = '$id' LIMIT 1");359 360 if ($ mysql->num_rows($result)){361 $owner_acc_id = $ mysql->result($result, 0, 'account');362 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);363 $query = $ mysql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'");364 $owner_gmlvl = $ mysql->result($query, 0, 'gmlevel');365 $owner_name = $ mysql->result($query, 0, 'username');353 $sql = new SQL; 354 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 355 356 $id = $sql->quote_smart($_GET['id']); 357 358 $result = $sql->query("SELECT account FROM `character` WHERE guid = '$id' LIMIT 1"); 359 360 if ($sql->num_rows($result)){ 361 $owner_acc_id = $sql->result($result, 0, 'account'); 362 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 363 $query = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 364 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 365 $owner_name = $sql->result($query, 0, 'username'); 366 366 367 367 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 368 368 369 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);370 371 $result = $ mysql->query("SELECT name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GOLD+1)."), ' ', -1) FROM `character` WHERE guid = '$id'");372 $char = $ mysql->fetch_row($result);373 374 $result = $ mysql->query("SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot");369 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 370 371 $result = $sql->query("SELECT name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GOLD+1)."), ' ', -1) FROM `character` WHERE guid = '$id'"); 372 $char = $sql->fetch_row($result); 373 374 $result = $sql->query("SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot"); 375 375 $bag = array( 376 376 0=>array(), … … 388 388 4=>array(), 389 389 5=>array(), 390 6=>array() 390 6=>array(), 391 7=>array() 391 392 ); 392 393 … … 394 395 $bag_id = array(); 395 396 $equiped_bag_id = array(0,0,0,0,0); 396 $equip_bnk_bag_id = array(0,0,0,0,0,0,0 );397 $equip_bnk_bag_id = array(0,0,0,0,0,0,0,0); 397 398 398 399 399 while ($slot = $ mysql->fetch_row($result))400 while ($slot = $sql->fetch_row($result)) 400 401 { 401 402 if ($slot[0] == 0 && $slot[1] > 18) … … 404 405 { 405 406 $bag_id[$slot[2]] = ($slot[1]-18); 406 $equiped_bag_id[$slot[1]-18] = array($slot[3], $ mysql->result($mysql->query("SELECT ContainerSlots FROM item_template WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots'));407 $equiped_bag_id[$slot[1]-18] = array($slot[3], $sql->result($sql->query("SELECT ContainerSlots FROM item_template WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots')); 407 408 } 408 409 elseif($slot[1] < 39) // SLOT 23 TO 38 (BackPack) … … 416 417 $bank[0][$slot[1]-39] = $slot[3]; 417 418 } 418 elseif($slot[1] < 7 3) // SLOT 67 TO 72(Bank Bags)419 elseif($slot[1] < 74) // SLOT 67 TO 73 (Bank Bags) 419 420 { 420 421 $bank_bag_id[$slot[2]] = ($slot[1]-66); 421 $equip_bnk_bag_id[$slot[1]-66] = array($slot[3], $ mysql->result($mysql->query("SELECT ContainerSlots FROM item_template WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots'));422 $equip_bnk_bag_id[$slot[1]-66] = array($slot[3], $sql->result($sql->query("SELECT ContainerSlots FROM item_template WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots')); 422 423 } 423 424 } … … 455 456 <table class=\"lined\" style=\"width: 700px;\"> 456 457 <tr> 457 <th><img class=\"bag_icon\" src=\"".get_icon(3960)."\" alt=\"\" />{$lang_char['backpack']}</th> 458 <th>"; 458 <th>"; 459 459 if($equiped_bag_id[1]){ 460 460 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[1][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[1][0]}", get_item_name($equiped_bag_id[1][0]), "item_tooltip", "target=\"_blank\""); 461 $output .= "{$lang_item['bag']} I ({$equiped_bag_id[1][1]} {$lang_item['slots']})";462 } 463 461 $output .= "{$lang_item['bag']} I<br /><font class=\"small\">({$equiped_bag_id[1][1]} {$lang_item['slots']})</font"; 462 } 463 $output .= "</th><th>"; 464 464 if($equiped_bag_id[2]){ 465 465 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[2][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[2][0]}", get_item_name($equiped_bag_id[2][0]), "item_tooltip", "target=\"_blank\""); 466 $output .= "{$lang_item['bag']} II ({$equiped_bag_id[2][1]} {$lang_item['slots']})"; 467 } 468 $output .= "</th> 466 $output .= "{$lang_item['bag']} II<br /><font class=\"small\">({$equiped_bag_id[2][1]} {$lang_item['slots']})</font>"; 467 } 468 $output .= "</th><th>"; 469 if($equiped_bag_id[3]){ 470 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[3][0]}", get_item_name($equiped_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 471 $output .= "{$lang_item['bag']} III<br /><font class=\"small\">({$equiped_bag_id[3][1]} {$lang_item['slots']})</font>"; 472 } 473 $output .= "</th><th>"; 474 if($equiped_bag_id[4]){ 475 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[4][0]}", get_item_name($equiped_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 476 $output .= "{$lang_item['bag']} IV<br /><font class=\"small\">({$equiped_bag_id[4][1]} {$lang_item['slots']})</font>"; 477 } 478 $output .= "</th> 469 479 </tr> 470 480 <tr>"; 471 481 472 $output .= "<td class=\"bag\" align=\"center\"><div style=\"width:".(4*43)."px;height:".(ceil(16/4)*41)."px;\">";473 foreach ($bag[0] as $pos => $item){474 $output .= "<div style=\"left:".($pos%4*42)."px;top:".(floor($pos/4)*41)."px;\">";475 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />".($item[1] ? ($item[1]+1) : ""), "$item_datasite{$item[0]}", get_item_name($item[0]), "item_tooltip", "target=\"_blank\"");476 $output .= "</div>";477 }478 $output .= "</div></td>";479 480 482 for($t = 1; $t < count($bag); $t++){ 481 if($t == 3){ 482 483 $money_gold = (int)($char[3]/10000); 484 $money_silver = (int)(($char[3]-$money_gold*10000)/100); 485 $money_cooper = (int)($char[3]-$money_gold*10000-$money_silver*100); 486 487 $output .= "<tr> 488 <td rowspan=\"2\" class=\"hidden\"> 489 {$lang_char['gold']}: 490 $money_gold <img src=\"img/gold.gif\" class=\"no_border\" alt=\"\" /> 491 $money_silver <img src=\"img/silver.gif\" class=\"no_border\" alt=\"\" /> 492 $money_cooper <img src=\"img/copper.gif\" class=\"no_border\" alt=\"\" /> 493 </td> 494 <th>"; 495 if($equiped_bag_id[3]){ 496 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[3][0]}", get_item_name($equiped_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 497 $output .= "{$lang_item['bag']} III ({$equiped_bag_id[3][1]} {$lang_item['slots']})"; 498 } 499 $output .= "</th><th>"; 500 if($equiped_bag_id[4]){ 501 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[4][0]}", get_item_name($equiped_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 502 $output .= "{$lang_item['bag']} IV ({$equiped_bag_id[4][1]} {$lang_item['slots']})"; 503 } 504 $output .= "</th> 505 </tr>"; 506 } 483 $output .= "<td class=\"bag\" valign=\"bottom\" align=\"center\"> 484 <div style=\"width:".(4*43)."px;height:".(ceil($equiped_bag_id[$t][1]/4)*41)."px;\">"; 507 485 508 $output .= "<td class=\"bag\" align=\"center\"><div style=\"width:".(4*43)."px;height:".(ceil($equiped_bag_id[$t][1]/4)*41)."px;\">";509 510 486 $dsp = $equiped_bag_id[$t][1]%4; 511 487 if ($dsp) $output .= "<div class=\"no_slot\" /></div>"; 512 513 foreach ($bag[$t] as $pos => $item){ 488 foreach ($bag[$t] as $pos => $item){ 514 489 $output .= "<div style=\"left:".(($pos+$dsp)%4*42)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 515 490 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />".($item[1] ? ($item[1]+1) : ""), "$item_datasite{$item[0]}", get_item_name($item[0]), "item_tooltip", "target=\"_blank\""); … … 519 494 } 520 495 521 $output .= "</tr></table> 522 523 <table class=\"lined\" style=\"width: 700px;\"> 524 <tr><th colspan=\"3\">{$lang_char['bank_items']}</th></tr> 525 <tr> 526 <td colspan=\"3\" width=\"700\" class=\"bag\" align=\"center\"> 527 <div style=\"width:".(14*43)."px;height:".(ceil(24/14)*41)."px;\">"; 528 529 foreach ($bank[0] as $pos => $item){ 530 $output .= "<div style=\"left:".($pos%14*43)."px;top:".(floor($pos/14)*41)."px;\">"; 531 $output .= maketooltip("<img src=\"".get_icon($item)."\" class=\"inv_icon\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 532 $output .= "</div>"; 533 } 534 $output .= "</div> 535 </td> 536 </tr> 537 <tr> 538 <th>"; 539 if($equip_bnk_bag_id[1]){ 540 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[1][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[1][0]}", get_item_name($equip_bnk_bag_id[1][0]), "item_tooltip", "target=\"_blank\""); 541 $output .= "{$lang_item['bag']} I<br />({$equip_bnk_bag_id[1][1]} {$lang_item['slots']})"; 542 } 543 $output .= "</th><th>"; 544 if($equip_bnk_bag_id[2]){ 545 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[2][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[2][0]}", get_item_name($equip_bnk_bag_id[2][0]), "item_tooltip", "target=\"_blank\""); 546 $output .= "{$lang_item['bag']} II<br />({$equip_bnk_bag_id[2][1]} {$lang_item['slots']})"; 547 } 548 $output .= "</th><th>"; 549 if($equip_bnk_bag_id[3]){ 550 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[3][0]}", get_item_name($equip_bnk_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 551 $output .= "{$lang_item['bag']} III<br />({$equip_bnk_bag_id[3][1]} {$lang_item['slots']})"; 552 } 553 $output .= "</th> 554 </tr> 555 <tr>"; 496 $output .= "</tr> 497 <tr> 498 <th colspan=\"2\" align=\"left\"> 499 <img class=\"bag_icon\" src=\"".get_icon(3960)."\" alt=\"\" align=\"absmiddle\" style=\"margin-left:100px;\" /> 500 <font style=\"margin-left:30px;\">{$lang_char['backpack']}</font> 501 </th> 502 <th colspan=\"2\"> 503 {$lang_char['bank_items']} 504 </th> 505 </tr> 506 <tr> 507 <td colspan=\"2\" class=\"bag\" align=\"center\" height=\"220px\"> 508 <div style=\"width:".(4*43)."px;height:".(ceil(16/4)*41)."px;\">"; 509 510 foreach ($bag[0] as $pos => $item){ 511 $output .= "<div style=\"left:".($pos%4*42)."px;top:".(floor($pos/4)*41)."px;\">"; 512 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />".($item[1] ? ($item[1]+1) : ""), "$item_datasite{$item[0]}", get_item_name($item[0]), "item_tooltip", "target=\"_blank\""); 513 $output .= "</div>"; 514 } 515 516 $money_gold = (int)($char[3]/10000); 517 $money_silver = (int)(($char[3]-$money_gold*10000)/100); 518 $money_cooper = (int)($char[3]-$money_gold*10000-$money_silver*100); 519 520 $output .= "</div> 521 <div style=\"text-align:right;width:168px;background-image:none;background-color:#393936;padding:2px;\"> 522 <b> 523 $money_gold <img src=\"img/gold.gif\" alt=\"\" align=\"absmiddle\" /> 524 $money_silver <img src=\"img/silver.gif\" alt=\"\" align=\"absmiddle\" /> 525 $money_cooper <img src=\"img/copper.gif\" alt=\"\" align=\"absmiddle\" /> 526 </b> 527 "; 528 529 $output .= "</div> 530 </td> 531 <td colspan=\"2\" class=\"bank\" align=\"center\"> 532 <div style=\"width:".(7*43)."px;height:".(ceil(24/7)*41)."px;\">"; 533 534 foreach ($bank[0] as $pos => $item){ 535 $output .= "<div style=\"left:".($pos%7*43)."px;top:".(floor($pos/7)*41)."px;\">"; 536 $output .= maketooltip("<img src=\"".get_icon($item)."\" class=\"inv_icon\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 537 $output .= "</div>"; 538 } 539 540 $output .= "</div> 541 </td> 542 </tr> 543 <tr> 544 <th>"; 545 if($equip_bnk_bag_id[1]){ 546 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[1][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[1][0]}", get_item_name($equip_bnk_bag_id[1][0]), "item_tooltip", "target=\"_blank\""); 547 $output .= "{$lang_item['bag']} I<br /><font class=\"small\">({$equip_bnk_bag_id[1][1]} {$lang_item['slots']})</font>"; 548 } 549 $output .= "</th><th>"; 550 if($equip_bnk_bag_id[2]){ 551 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[2][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[2][0]}", get_item_name($equip_bnk_bag_id[2][0]), "item_tooltip", "target=\"_blank\""); 552 $output .= "{$lang_item['bag']} II<br /><font class=\"small\">({$equip_bnk_bag_id[2][1]} {$lang_item['slots']})</font>"; 553 } 554 $output .= "</th><th>"; 555 if($equip_bnk_bag_id[3]){ 556 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[3][0]}", get_item_name($equip_bnk_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 557 $output .= "{$lang_item['bag']} III<br /><font class=\"small\">({$equip_bnk_bag_id[3][1]} {$lang_item['slots']})</font>"; 558 } 559 $output .= "</th><th>"; 560 if($equip_bnk_bag_id[4]){ 561 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[4][0]}", get_item_name($equip_bnk_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 562 $output .= "{$lang_item['bag']} IV<br /><font class=\"small\">({$equip_bnk_bag_id[4][1]} {$lang_item['slots']})</font>"; 563 } 564 $output .= "</th> 565 </tr> 566 <tr>"; 567 556 568 for($t=1; $t < count($bank); $t++){ 557 if($t== 4){569 if($t==5){ 558 570 $output .= "</tr> 559 571 <tr> 560 572 <th>"; 561 if($equip_bnk_bag_id[4]){ 562 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[4][0]}", get_item_name($equip_bnk_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 563 $output .= "{$lang_item['bag']} IV<br />({$equip_bnk_bag_id[4][1]} {$lang_item['slots']})"; 564 } 565 $output .= "</th><th>"; 566 if($equip_bnk_bag_id[5]){ 567 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[5][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[5][0]}", get_item_name($equip_bnk_bag_id[5][0]), "item_tooltip", "target=\"_blank\""); 568 $output .= "{$lang_item['bag']} V<br />({$equip_bnk_bag_id[5][1]} {$lang_item['slots']})"; 569 } 570 $output .= "</th><th>"; 571 if($equip_bnk_bag_id[6]){ 572 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[6][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[6][0]}", get_item_name($equip_bnk_bag_id[6][0]), "item_tooltip", "target=\"_blank\""); 573 $output .= "{$lang_item['bag']} VI<br />({$equip_bnk_bag_id[6][1]} {$lang_item['slots']})"; 574 } 575 $output .= "</th> 573 if($equip_bnk_bag_id[5]){ 574 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[5][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[5][0]}", get_item_name($equip_bnk_bag_id[5][0]), "item_tooltip", "target=\"_blank\""); 575 $output .= "{$lang_item['bag']} V<br /><font class=\"small\">({$equip_bnk_bag_id[5][1]} {$lang_item['slots']})</font>"; 576 } 577 $output .= "</th><th>"; 578 if($equip_bnk_bag_id[6]){ 579 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[6][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[6][0]}", get_item_name($equip_bnk_bag_id[6][0]), "item_tooltip", "target=\"_blank\""); 580 $output .= "{$lang_item['bag']} VI<br /><font class=\"small\">({$equip_bnk_bag_id[6][1]} {$lang_item['slots']})</font>"; 581 } 582 $output .= "</th><th>"; 583 if($equip_bnk_bag_id[7]){ 584 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[7][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[7][0]}", get_item_name($equip_bnk_bag_id[7][0]), "item_tooltip", "target=\"_blank\""); 585 $output .= "{$lang_item['bag']} VII<br /><font class=\"small\">({$equip_bnk_bag_id[7][1]} {$lang_item['slots']})</font>"; 586 } 587 $output .= "</th> 588 <th></th> 576 589 </tr> 577 590 <tr>"; 578 591 } 579 592 580 $output .= "<td class=\"bag\" align=\"center\"><div style=\"width:".(4*43)."px;height:".(ceil($equip_bnk_bag_id[$t][1]/4)*41)."px;\">"; 593 $output .= "<td class=\"bank\" align=\"center\"> 594 <div style=\"width:".(4*43)."px;height:".(ceil($equip_bnk_bag_id[$t][1]/4)*41)."px;\">"; 581 595 582 596 $dsp=$equip_bnk_bag_id[$t][1]%4; 583 597 if ($dsp) $output .= "<div class=\"no_slot\" /></div>"; 584 585 foreach ($bank[$t] as $pos => $item){ 586 $output .= "<div style=\"left:".(($pos+$dsp)%4*43)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 587 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($item)."\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 588 $output .= "</div>"; 589 } 590 $output .= "</td>"; 598 foreach ($bank[$t] as $pos => $item){ 599 $output .= "<div style=\"left:".(($pos+$dsp)%4*43)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 600 $output .= maketooltip("<img src=\"".get_icon($item)."\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 601 $output .= "</div>"; 602 } 603 $output .= "</td>"; 591 604 } 592 605 593 $output .= "< /tr>606 $output .= "<td class=\"bank\"></td></tr> 594 607 </table> 595 608 </div><br /> … … 609 622 610 623 } else { 611 $ mysql->close();624 $sql->close(); 612 625 error($lang_char['no_permission']); 613 626 } 614 627 615 628 } else error($lang_char['no_char_found']); 616 $ mysql->close();629 $sql->close(); 617 630 } 618 631 … … 627 640 if (empty($_GET['id'])) error($lang_global['empty_fields']); 628 641 629 $mysql = new MySQL; 630 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 631 632 $id = $mysql->quote_smart($_GET['id']); 633 $result = $mysql->query("SELECT account,name,race,class FROM `character` WHERE guid = '$id' LIMIT 1"); 634 635 if ($mysql->num_rows($result)){ 636 $char = $mysql->fetch_row($result); 642 $sql = new SQL; 643 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 644 645 $id = $sql->quote_smart($_GET['id']); 646 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : 1; 647 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 0; 648 $dir = ($dir) ? 0 : 1; 649 $result = $sql->query("SELECT account,name,race,class FROM `character` WHERE guid = '$id' LIMIT 1"); 650 651 if ($sql->num_rows($result)){ 652 $char = $sql->fetch_row($result); 637 653 638 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);639 $result = $ mysql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'");640 $owner_gmlvl = $ mysql->result($result, 0, 'gmlevel');641 $owner_name = $ mysql->result($result, 0, 'username');654 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 655 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'"); 656 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 657 $owner_name = $sql->result($result, 0, 'username'); 642 658 643 659 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 644 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);645 646 $result = $ mysql->query("SELECT quest,status FROM character_queststatus WHERE guid ='$id' AND ( status = 3 OR status = 1 ) ORDER BY status DESC");660 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 661 662 $result = $sql->query("SELECT quest,status FROM character_queststatus WHERE guid ='$id' AND ( status = 3 OR status = 1 ) ORDER BY status DESC"); 647 663 $output .= "<center> 648 664 <div id=\"tab\"> … … 660 676 <table class=\"lined\" style=\"width: 550px;\"> 661 677 <tr>"; 662 if ($user_lvl) $output .= "<th width=\"14%\">{$lang_char['quest_id']}</th>"; 663 $output .= "<th width=\"5%\"></th> 664 <th width=\"80%\">{$lang_char['quest_title']}</th> 665 <th width=\"1%\"></th>"; 666 667 if ($mysql->num_rows($result)){ 668 while ($quest = $mysql->fetch_row($result)){ 669 $query1 = $mysql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'"); 670 $quest_templ = $mysql->fetch_row($query1); 671 678 if ($user_lvl) $output .= "<th width=\"10%\"><a href=\"char.php?id=$id&action=char_quest&order_by=0&dir=$dir\">".($order_by==0 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['quest_id']}</a></th>"; 679 $output .= "<th width=\"7%\"><a href=\"char.php?id=$id&action=char_quest&order_by=1&dir=$dir\">".($order_by==1 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['quest_level']}</a></th> 680 <th width=\"78%\"><a href=\"char.php?id=$id&action=char_quest&order_by=2&dir=$dir\">".($order_by==2 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['quest_title']}</a></th> 681 <th width=\"5%\"><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" border=\"0\" /></a></th>"; 682 683 $quests_1 = array(); 684 $quests_3 = array(); 685 686 if ($sql->num_rows($result)){ 687 while ($quest = $sql->fetch_row($result)){ 688 $query1 = $sql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'"); 689 $quest_info = $sql->fetch_row($query1); 690 if($quest[1]==1) 691 array_push($quests_1, array($quest[0], $quest_info[0], $quest_info[1])); 692 else 693 array_push($quests_3, array($quest[0], $quest_info[0], $quest_info[1])); 694 } 695 aasort($quests_1, $order_by, $dir); 696 aasort($quests_3, $order_by, $dir); 697 698 foreach ($quests_3 as $data){ 672 699 $output .= "<tr>"; 673 if($user_lvl) $output .= "<td>$quest[0]</td>"; 674 $output .= "<td>($quest_templ[0])</td> 675 <td align=\"left\"><a href=\"$quest_datasite$quest[0]\" target=\"_blank\">$quest_templ[1]</a></td> 676 <td><img src=\"img/aff_".(($quest[1]==1) ? "tick" : "qst").".png\" width=\"14\" height=\"14\" /></td></tr>"; 677 } 678 } else $output .= "<tr><td colspan=\"3\"><p>{$lang_char['no_act_quests']}</p></td></tr>"; 700 if($user_lvl) $output .= "<td>$data[0]</td>"; 701 $output .= "<td>($data[1])</td> 702 <td align=\"left\"><a href=\"$quest_datasite$data[0]\" target=\"_blank\">$data[2]</a></td> 703 <td><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" /></td></tr>"; 704 } 705 706 if(count($quests_1)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "4" : "3")."\" align=\"left\"></th></tr>"; 707 foreach ($quests_1 as $data){ 708 $output .= "<tr>"; 709 if($user_lvl) $output .= "<td>$data[0]</td>"; 710 $output .= "<td>($data[1])</td> 711 <td align=\"left\"><a href=\"$quest_datasite$data[0]\" target=\"_blank\">$data[2]</a></td> 712 <td><img src=\"img/aff_tick.png\" width=\"14\" height=\"14\" /></td></tr>"; 713 } 714 715 } else $output .= "<tr><td colspan=\"".($user_lvl ? "4" : "3")."\"><p>{$lang_char['no_act_quests']}</p></td></tr>"; 679 716 680 717 $output .= "</table></div><br /> … … 697 734 else 698 735 { 699 $ mysql->close();736 $sql->close(); 700 737 error($lang_char['no_permission']); 701 738 } 702 739 } 703 740 else error($lang_char['no_char_found']); 704 $ mysql->close();741 $sql->close(); 705 742 } 706 743 … … 715 752 if (empty($_GET['id'])) error($lang_global['empty_fields']); 716 753 717 $ mysql = new MySQL;718 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);719 720 $id = $ mysql->quote_smart($_GET['id']);721 $result = $ mysql->query("SELECT account,name,race,class FROM `character` WHERE guid = '$id' LIMIT 1");722 723 if ($ mysql->num_rows($result)){724 $char = $ mysql->fetch_row($result);725 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);726 $result = $ mysql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'");727 $owner_gmlvl = $ mysql->result($result, 0, 'gmlevel');728 $owner_name = $ mysql->result($result, 0, 'username');754 $sql = new SQL; 755 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 756 757 $id = $sql->quote_smart($_GET['id']); 758 $result = $sql->query("SELECT account,name,race,class FROM `character` WHERE guid = '$id' LIMIT 1"); 759 760 if ($sql->num_rows($result)){ 761 $char = $sql->fetch_row($result); 762 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 763 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'"); 764 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 765 $owner_name = $sql->result($result, 0, 'username'); 729 766 730 767 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 731 768 732 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);733 $result = $ mysql->query("SELECT faction, standing, flags FROM character_reputation WHERE guid ='$id' AND (flags = 1 OR flags = 17)");769 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 770 $result = $sql->query("SELECT faction, standing, flags FROM character_reputation WHERE guid ='$id' AND (flags = 1 OR flags = 17)"); 734 771 735 772 $output .= "<center> … … 769 806 ); 770 807 771 if ($ mysql->num_rows($result)){772 while ($fact = $ mysql->fetch_row($result)){808 if ($sql->num_rows($result)){ 809 while ($fact = $sql->fetch_row($result)){ 773 810 $temp_out[get_faction_tree($fact[0])][0] .= "<tr><td width=\"60%\">".get_faction_name($fact[0])."</td> 774 811 <td width=\"40%\">$fact[1]</td></tr>"; … … 795 832 796 833 } else { 797 $ mysql->close();834 $sql->close(); 798 835 error($lang_char['no_permission']); 799 836 } 800 837 801 838 } else error($lang_char['no_char_found']); 802 $ mysql->close();839 $sql->close(); 803 840 804 841 } … … 814 851 if (empty($_GET['id'])) error($lang_global['empty_fields']); 815 852 816 $mysql = new MySQL; 817 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 818 819 $id = $mysql->quote_smart($_GET['id']); 820 $result = $mysql->query("SELECT account FROM `character` WHERE guid = '$id'"); 821 822 if ($mysql->num_rows($result) == 1){ 823 $owner_acc_id = $mysql->result($result, 0, 'account'); 824 $mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 825 $result = $mysql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 826 $owner_gmlvl = $mysql->result($result, 0, 'gmlevel'); 827 $owner_name = $mysql->result($result, 0, 'username'); 853 $sql = new SQL; 854 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 855 856 $id = $sql->quote_smart($_GET['id']); 857 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : 1; 858 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 859 $dir = ($dir) ? 0 : 1; 860 861 $result = $sql->query("SELECT account FROM `character` WHERE guid = '$id'"); 862 863 if ($sql->num_rows($result) == 1){ 864 $owner_acc_id = $sql->result($result, 0, 'account'); 865 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 866 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 867 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 868 $owner_name = $sql->result($result, 0, 'username'); 828 869 829 870 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 830 871 831 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);832 833 $result = $ mysql->query("SELECT data,name,race,class,CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` WHERE guid = '$id'");834 $char = $ mysql->fetch_row($result);872 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 873 874 $result = $sql->query("SELECT data,name,race,class,CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` WHERE guid = '$id'"); 875 $char = $sql->fetch_row($result); 835 876 $char_data = explode(' ',$char[0]); 836 877 … … 850 891 <table class=\"lined\" style=\"width: 550px;\"> 851 892 <tr> 852 <th colspan=\"3\" align=\"left\">{$lang_char['skills']}</th></tr>"; 893 <th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['skills']}</th></tr> 894 <tr>" 895 .($user_lvl ? "<th><a href=\"char.php?id=$id&action=char_skill&order_by=0&dir=$dir\">".($order_by==0 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['skill_id']}</a></th>" : "") 896 ."<th align=\"right\"><a href=\"char.php?id=$id&action=char_skill&order_by=1&dir=$dir\">".($order_by==1 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['skill_name']}</a></th> 897 <th><a href=\"char.php?id=$id&action=char_skill&order_by=2&dir=$dir\">".($order_by==2 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['skill_value']}</a></th> 898 </tr>"; 853 899 require_once("scripts/id_tab.php"); 854 900 … … 858 904 859 905 $skill_rank_array = array( 860 75 => 'Apprentice',861 150 => 'Journeyman',862 225 => 'Expert',863 300 => 'Artisan',864 350 => 'Master',865 375 => 'Inherent',866 385 => 'Wise'906 75 => $lang_char['apprentice'], 907 150 => $lang_char['journeyman'], 908 225 => $lang_char['expert'], 909 300 => $lang_char['artisan'], 910 350 => $lang_char['master'], 911 375 => $lang_char['inherent'], 912 385 => $lang_char['wise'] 867 913 ); 868 914 … … 870 916 if (($char_data[$i])&&(get_skill_name($char_data[$i] & 0x0000FFFF ))){ 871 917 $temp = unpack("S", pack("L", $char_data[$i+1])); 872 $skill = ($char_data[$i] & 0x0000FFFF);918 $skill = ($char_data[$i] & 0x0000FFFF); 873 919 874 920 if( $skill == 185 || $skill == 129 || $skill == 356 || $skill == 762) … … 891 937 unset($char_data); 892 938 893 a sort($skill_array);894 a sort($prof_1_array);895 a sort($prof_2_array);896 939 aasort($skill_array, $order_by, $dir); 940 aasort($prof_1_array, $order_by, $dir); 941 aasort($prof_2_array, $order_by, $dir); 942 897 943 foreach ($skill_array as $data){ 898 944 $max = ($data[2] < $char[4]*5) ? $char[4]*5 : $data[2]; 899 $output .= "<tr> 900 <td>$data[0]</td> 901 <td align=\"right\">$data[1]</td> 902 <td class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"><span>$data[2]/$max</span></td> 945 $output .= "<tr>" 946 .($user_lvl ? "<td>$data[0]</td>" : "") 947 ." <td align=\"right\">$data[1]</td> 948 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 949 <span>$data[2]/$max</span> 950 </td> 903 951 </tr>"; 904 952 } 905 953 906 if(count($prof_1_array)) $output .= "<tr><th c olspan=\"3\" align=\"left\">{$lang_char['professions']} 1º</th></tr>";954 if(count($prof_1_array)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['professions']} 1º</th></tr>"; 907 955 foreach ($prof_1_array as $data){ 908 956 $max = ($data[2]<76 ? 75 : ($data[2]<151 ? 150 : ($data[2]<226 ? 225 : ($data[2]<301 ? 300 : ($data[2]<351 ? 350 : ($data[2]<376 ? 375 : 385)))))); 909 $output .= "<tr> 910 <td>$data[0]</td>911 <td align=\"right\"><a href=\"{$skill_datasite}11.$data[0]\" target=\"_blank\">$data[1]</a></td>912 <td class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\">957 $output .= "<tr>" 958 .($user_lvl ? "<td>$data[0]</td>" : "") 959 ." <td align=\"right\"><a href=\"{$skill_datasite}11.$data[0]\" target=\"_blank\">$data[1]</a></td> 960 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 913 961 <span>$data[2]/$max ({$skill_rank_array[$max]})</span> 914 962 </td> 915 963 </tr>"; 916 964 } 917 if(count($prof_2_array)) $output .= "<tr><th c olspan=\"3\" align=\"left\">{$lang_char['professions']} 2º</th></tr>";965 if(count($prof_2_array)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['professions']} 2º</th></tr>"; 918 966 foreach ($prof_2_array as $data){ 919 967 $max = ($data[2]<76 ? 75 : ($data[2]<151 ? 150 : ($data[2]<226 ? 225 : ($data[2]<301 ? 300 : ($data[2]<351 ? 350 : ($data[2]<376 ? 375 : 385)))))); 920 $output .= "<tr> 921 <td>$data[0]</td>922 <td align=\"right\"><a href=\"{$skill_datasite}9.$data[0]\" target=\"_blank\">$data[1]</a></td>923 <td class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\">968 $output .= "<tr>" 969 .($user_lvl ? "<td>$data[0]</td>" : "") 970 ." <td align=\"right\"><a href=\"{$skill_datasite}9.$data[0]\" target=\"_blank\">$data[1]</a></td> 971 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 924 972 <span>$data[2]/$max ({$skill_rank_array[$max]})</span> 925 973 </td> … … 942 990 943 991 } else { 944 $ mysql->close();992 $sql->close(); 945 993 error($lang_char['no_permission']); 946 994 } 947 995 948 996 } else error($lang_char['no_char_found']); 949 $ mysql->close();997 $sql->close(); 950 998 } 951 999
Note:
See TracChangeset
for help on using the changeset viewer.