RowCount() == 0) { echo ("BIG_ERROR_1"); } $line = $result->FetchRow(); $STORED_sex = "$line[0]"; //PALASX SET POSE $pose=rand(0,2); $pose_array = array('sit','sta','fig'); $pose=$pose_array[$pose]; if (!$POST_action) { EchoHead(80); echo " Character Roster Slot Name Info Equippment Inventory "; //ORIGINAL ROSTER-------------------------------------------------------------------------- $z_var = 0; $query = sprintf(GET_ROSTER_CHARS, $STORED_id); $result = execute_query($query, "roster.php"); if ($result->RowCount() == 0) { redir("index.php", "You must have at least 1 character to use the roster!"); } while ($line = $result->FetchRow()) { echo "\n"; foreach ($line as $display_index => $col_value) { if ($display_index == 0) { $char_slot = $col_value; if ($col_value > 100) { $col_value -= 100; } } elseif ($display_index == 1) { $A = $col_value; continue; } elseif ($display_index == 2) { $char_class = $col_value; if($char_class >= 4023 && $char_class <= 4044){$char_class -= 4023;} if($char_class == 4045){$char_class = 23;} $col_value = determine_class($col_value); $B = $col_value; continue; } elseif ($display_index == 3) { $C = $col_value; continue; } elseif ($display_index == 4) { $D = $col_value; continue; } elseif ($display_index == 5) { $E = $col_value; continue; } elseif ($display_index == 6) { $F = $col_value; continue; } elseif ($display_index == 7) { $G = $col_value; continue; } elseif ($display_index == 8) { $H = $col_value; continue; } elseif ($display_index == 9) { $I = $col_value; continue; } elseif ($display_index == 10) { $J = $col_value; continue; } elseif ($display_index == 11) { $K = $col_value; continue; } elseif ($display_index == 12) { $L = $col_value; continue; } elseif ($display_index == 13) { $M = $col_value; continue; } elseif ($display_index == 14) { $N = $col_value; continue; } elseif ($display_index == 15) { $O = $col_value; continue; } elseif ($display_index == 16) { $P = $col_value; continue; } elseif ($display_index == 17) { $Q = $col_value; $Guild_Name = GuildID_To_GuildName($F); echo '
Name: '.$A.' Lvl.'.$C.' / '.$B.' / Lvl.'.$D.' Zeny:'.$E.' '.$G.' '.$H.' '.$I.' '.$J.' '.$K.' '.$L.' '.$M.' '.$N.' '.$Guild_Name.' '.$O.' x: '.$P.', y: '.$Q.'
'; continue; } elseif ($display_index == 18) { $char_hair = $col_value; if($char_hair<1){$char_hair=1;} continue; } elseif ($display_index == 19) { $char_color = $col_value % 9; continue; } elseif ($display_index == 20) { $char_top = $col_value; continue; } elseif ($display_index == 21) { $char_mid = $col_value; continue; } elseif ($display_index == 22) { $char_bot = $col_value; continue; } elseif ($display_index == 23) { $char_id = $col_value; //fill $COL_VALUE with out image DIV/SPAN combo. $job_gif = sprintf(' ', $CONFIG['image_folder'], $STORED_sex, $char_class); $hair_gif = sprintf(' ', $CONFIG['image_folder'], $STORED_sex, $char_hair, $char_color); $top_gif = sprintf(' ', $CONFIG['image_folder'], $STORED_sex, $char_top); $mid_gif = sprintf(' ', $CONFIG['image_folder'], $STORED_sex, $char_mid); $bot_gif = sprintf(' ', $CONFIG['image_folder'], $STORED_sex, $char_bot); $head_x = 100; $head_y = 10; if($STORED_sex == 'F'){$head_x = 95;} if (!file_exists(sprintf('%s/char/%s/helm_01_%d.gif', $CONFIG['image_folder'], $STORED_sex, $char_top))){$top_gif=" ";} if (!file_exists(sprintf('%s/char/%s/helm_02_%d.gif', $CONFIG['image_folder'], $STORED_sex, $char_mid))){$mid_gif=" ";} if (!file_exists(sprintf('%s/char/%s/helm_03_%d.gif', $CONFIG['image_folder'], $STORED_sex, $char_bot))){$bot_gif=" ";} $col_value = '
Equipment '.$job_gif.' '.$hair_gif.' '.$top_gif.' '.$mid_gif.' '.$bot_gif.' '; echo "$col_value\n"; //---Inventory MGMT------------------------------------------------------------------------- $query_inv = sprintf(GET_INVENTORY, $char_id); $result_inv = execute_query($query_inv, "roster.php"); while ($line_inv = $result_inv->FetchRow()) { foreach ($line_inv as $display_index_inv => $col_value_inv) { if ($display_index_inv == 0) { $A = $col_value_inv; continue; } elseif ($display_index_inv == 1) { $B = $col_value_inv; continue; } elseif ($display_index_inv == 2) { $C = $col_value_inv; continue; } elseif ($display_index_inv == 3) { $D = $col_value_inv; continue; } elseif ($display_index_inv == 4) { $E = $col_value_inv; if ($E) { $E = "+$E"; } else { $E = ""; } $Inv_Name = ItemID_To_ItemName($B); $Inv_Name = str_replace("'", "\'", $Inv_Name); $inv_pic = ''; switch($D){ case 1: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 2: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 4: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 8: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 16: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 32: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 34: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 64: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 128: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 256: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 257: echo ''.$inv_pic.''.$E.' '.$Inv_Name.' '.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 512: echo ''.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 513: echo ' '.$inv_pic.''.$E.' '.$Inv_Name.' '.$inv_pic.''.$Inv_Name.''; break; case 768: echo ' '.$inv_pic.''.$E.' '.$Inv_Name.' '.$inv_pic.''.$E.' '.$Inv_Name.''; break; case 769: echo ' '.$inv_pic.''.$E.' '.$Inv_Name.' '.$inv_pic.''.$E.' '.$Inv_Name.' '.$inv_pic.''.$E.' '.$Inv_Name.''; break; default: $inv_array[] = $B; $amt_array[] = $C; $ref_array[] = $E; break; } } } } echo "\n
\n
"; echo '
'; echo "

\n\n\n"; echo '

'; if($inv_array){ $j = 0; foreach ($inv_array as $inv_value) { $Inv_Name = ItemID_To_ItemName($inv_value); $Inv_Name = str_replace("'", "\'", $Inv_Name); $inv_pic = ''; echo '' . $inv_pic . ''; echo "\n"; $j++; } } echo "\n
\n\n\n\n\n"; unset($inv_array); unset($amt_array); unset($ref_array); continue; } if ($char_slot >= 0 && $char_slot <= 9) { echo "$col_value\n"; } else { echo "$col_value\n"; } } echo "\n"; //------------------------------------------------------------------------------------------ echo "\n"; } echo "\n"; EchoHead(80); echo " What would you like to do?
Switch Slot with slot "; } elseif ($POST_action == "Swap!") { if ((!$POST_slot1) || (!$POST_slot2)) { redir("roster.php", "Both character slots not entered"); } elseif ($POST_slot1 == $POST_slot2) { redir("roster.php", "Both character slots are the same"); } elseif (!is_numeric($POST_slot1) || !is_numeric($POST_slot2)) { add_exploit_entry("Used $POST_slot1 & $POST_slot2 as illegal input!"); redir("roster.php", "Invalid character slots selected"); } elseif (($POST_slot1 > $CONFIG_max_characters) || ($POST_slot2 > $CONFIG_max_characters)) { add_exploit_entry("Used $POST_slot1 & $POST_slot2 as illegal input!"); redir("roster.php", "Invalid character slots selected"); } //Check for GID of first char $query = sprintf(GET_ROSTER_GID, $POST_slot1, $STORED_id); $result = execute_query($query, "roster.php"); if ($result->RowCount() > 0) { $GID1 = $result->fields[0]; } else { $GID1 = 0; } //Check for GID of second char $query = sprintf(GET_ROSTER_GID, $POST_slot2, $STORED_id); $result = execute_query($query, "roster.php"); if ($result->RowCount() > 0) { $GID2 = $result->fields[0]; } else { $GID2 = 0; } if ($GID1 == 0 AND $GID2 == 0) { // Swapping two empty slots redir("roster.php", "You can't swap two empty slots!"); } elseif ($GID1 > 0 AND $GID2 == 0) { // Swapping active character to blank spot $query = sprintf(MOVE_ROSTER, $POST_slot2, $GID1, $STORED_id); $result = execute_query($query, "roster.php"); add_user_entry("Switched Slot $POST_slot1 with $POST_slot2"); redir("roster.php", "Character moved from active to reserve roster successfully"); } elseif ($GID1 == 0 AND $GID2 > 0) { // Swapping inactive character to blank spot $query = sprintf(MOVE_ROSTER, $POST_slot1, $GID2, $STORED_id); $result = execute_query($query, "roster.php"); add_user_entry("Switched Slot $POST_slot1 with $POST_slot2"); redir("roster.php", "Character moved from reserve to active roster successfully"); } elseif ($GID1 > 0 AND $GID2 > 0) { // Swapping active character with another active character $query = sprintf(MOVE_ROSTER, $POST_slot2, $GID1, $STORED_id); $result = execute_query($query, "roster.php"); $query = sprintf(MOVE_ROSTER, $POST_slot1, $GID2, $STORED_id); $result = execute_query($query, "roster.php"); add_user_entry("Switched Slot $POST_slot1 with $POST_slot2"); redir("roster.php", "Characters swapped between active and reserve successfully"); } else { add_exploit_entry("Used $POST_slot1 & $POST_slot2 as illegal input!"); redir("roster.php", "Invalid character slots selected"); } } elseif ($POST_action == "Unequip Everything!") { $query = sprintf(UNEQUIP_ALL, $POST_charid); $result = execute_query($query, "roster.php"); $queryA = sprintf(UNHATVIEW_ALL, $POST_charid); $resultA = execute_query($queryA, "roster.php"); redir("roster.php", "Your character is now naked."); } require 'footer.inc'; ?>