| [ PHPXref.com ] | [ Generated: Sun Jul 20 18:37:24 2008 ] | [ MetaBB 5.0 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /*************************************************************************** 3 * adr_character_skills.php 4 * ------------------------ 5 * begin : 03/02/2004 6 * copyright : Malicious Rabbit / Dr DLP 7 * 8 * 9 ***************************************************************************/ 10 11 /*************************************************************************** 12 * 13 * This program is free software; you can redistribute it and/or modify 14 * it under the terms of the GNU General Public License as published by 15 * the Free Software Foundation; either version 2 of the License, or 16 * (at your option) any later version. 17 * 18 * 19 ***************************************************************************/ 20 21 define('IN_PHPBB', true); 22 define('IN_ADR_CHARACTER', true); 23 define('IN_ADR_SKILLS', true); 24 $phpbb_root_path = './'; 25 include ($phpbb_root_path . 'extension.inc'); 26 include($phpbb_root_path . 'common.'.$phpEx); 27 28 $loc = 'character'; 29 $sub_loc = 'adr_character_skills'; 30 31 // 32 // Start session management 33 $userdata = session_pagestart($user_ip, PAGE_INDEX); 34 init_userprefs($userdata); 35 // End session management 36 // 37 38 include($phpbb_root_path . 'adr/includes/adr_global.'.$phpEx); 39 40 // Sorry , only logged users ... 41 if ( !$userdata['session_logged_in'] ) 42 { 43 $redirect = "adr_character.$phpEx"; 44 $redirect .= ( isset($user_id) ) ? '&user_id=' . $user_id : ''; 45 header('Location: ' . append_sid("login.$phpEx?redirect=$redirect", true)); 46 } 47 48 // Includes the tpl and the header 49 adr_template_file('adr_character_skills_body.tpl'); 50 51 include($phpbb_root_path . 'includes/page_header.'.$phpEx); 52 53 // Define the points name , adds it if not defined ( Cash Mod compliance ) 54 $board_config['points_name'] = $board_config['points_name'] ? $board_config['points_name'] : $lang['Adr_default_points_name'] ; 55 56 // Who is looking at this page ? 57 $user_id = $userdata['user_id']; 58 if ( (!( isset($HTTP_POST_VARS[POST_USERS_URL]) || isset($HTTP_GET_VARS[POST_USERS_URL]))) || ( empty($HTTP_POST_VARS[POST_USERS_URL]) && empty($HTTP_GET_VARS[POST_USERS_URL]))) 59 { 60 $view_userdata = $userdata; 61 } 62 else 63 { 64 $view_userdata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL])); 65 } 66 $searchid = $view_userdata['user_id']; 67 68 // Get the general settings 69 $adr_general = adr_get_general_config(); 70 71 adr_enable_check(); 72 adr_ban_check($user_id); 73 adr_character_created_check($user_id); 74 75 // See if the user has ever created a character or no 76 $row = adr_get_user_infos($searchid); 77 78 // If someone is looking at a character's user that doesn't exist , let's display an error message 79 if ( !( $row['character_class'] ) && ($searchid != $user_id) ) 80 { 81 message_die(GENERAL_MESSAGE, $lang['Adr_character_lack']); 82 } 83 else 84 { 85 $skills = adr_get_skill_data(''); 86 87 list($mining_percent_width, $mining_percent_empty) = adr_make_bars($row['character_skill_mining_uses'], $skills[1]['skill_req'], '250'); 88 list($stone_percent_width, $stone_percent_empty) = adr_make_bars($row['character_skill_stone_uses'], $skills[2]['skill_req'], '250'); 89 list($forge_percent_width, $forge_percent_empty) = adr_make_bars($row['character_skill_forge_uses'], $skills[3]['skill_req'], '250'); 90 list($enchantment_percent_width, $enchantment_percent_empty) = adr_make_bars($row['character_skill_enchantment_uses'], $skills[4]['skill_req'], '250'); 91 list($thief_percent_width, $thief_percent_empty) = adr_make_bars($row['character_skill_thief_uses'], $skills[1]['skill_req'], '250'); 92 93 $template->assign_vars(array( 94 'MINING' => $row['character_skill_mining'], 95 'MINING_IMG' => $skills[1]['skill_img'], 96 'MINING_MIN' => $row['character_skill_mining_uses'], 97 'MINING_MAX' => $skills[1]['skill_req'], 98 'MINING_BAR' => $mining_percent_width, 99 'MINING_BAR_EMPTY' => $mining_percent_empty, 100 'STONE' => $row['character_skill_stone'], 101 'STONE_IMG' => $skills[2]['skill_img'], 102 'STONE_MIN' => $row['character_skill_stone_uses'], 103 'STONE_MAX' => $skills[2]['skill_req'], 104 'STONE_BAR' => $stone_percent_width, 105 'STONE_BAR_EMPTY' => $stone_percent_empty, 106 'FORGE' => $row['character_skill_forge'], 107 'FORGE_IMG' => $skills[3]['skill_img'], 108 'FORGE_MIN' => $row['character_skill_forge_uses'], 109 'FORGE_MAX' => $skills[3]['skill_req'], 110 'FORGE_BAR' => $forge_percent_width, 111 'FORGE_BAR_EMPTY' => $forge_percent_empty, 112 'ENCHANTMENT' => $row['character_skill_enchantment'], 113 'ENCHANTMENT_IMG' => $skills[4]['skill_img'], 114 'ENCHANTMENT_MIN' => $row['character_skill_enchantment_uses'], 115 'ENCHANTMENT_MAX' => $skills[4]['skill_req'], 116 'ENCHANTMENT_BAR' => $enchantment_percent_width, 117 'ENCHANTMENT_BAR_EMPTY' => $enchantment_percent_empty, 118 'THIEF' => $row['character_skill_thief'], 119 'THIEF_IMG' => $skills[6]['skill_img'], 120 'THIEF_MIN' => $row['character_skill_thief_uses'], 121 'THIEF_MAX' => $skills[6]['skill_req'], 122 'THIEF_BAR' => $thief_percent_width, 123 'THIEF_BAR_EMPTY' => $thief_percent_empty, 124 'L_MINING' => $lang['Adr_mining'], 125 'L_MINING_DESC' => adr_get_lang($skills[1]['skill_desc']), 126 'L_STONE' => $lang['Adr_stone'], 127 'L_STONE_DESC' => adr_get_lang($skills[2]['skill_desc']), 128 'L_FORGE' => $lang['Adr_forge'], 129 'L_FORGE_DESC' => adr_get_lang($skills[3]['skill_desc']), 130 'L_ENCHANTMENT' => $lang['Adr_enchantment'], 131 'L_ENCHANTMENT_DESC' => adr_get_lang($skills[4]['skill_desc']), 132 'L_TRADING' => $lang['Adr_trading'], 133 'L_TRADING_DESC' => adr_get_lang($skills[5]['skill_desc']), 134 'L_THIEF' => $lang['Adr_thief'], 135 'L_THIEF_DESC' => adr_get_lang($skills[6]['skill_desc']), 136 )); 137 } 138 139 $template->assign_vars(array( 140 'L_NAME' => $lang['Adr_races_name'], 141 'L_DESC' => $lang['Adr_races_desc'], 142 'L_IMG' => $lang['Adr_races_image'], 143 'L_LEVEL' => $lang['Adr_character_level'], 144 'L_PROGRESS' => $lang['Adr_character_progress'], 145 'L_CHARACTER_OF' => sprintf ( $lang['Adr_character_of'], $view_userdata['username'] ), 146 'L_NEW_CHARACTER_CLASS' => $lang['Adr_character_new_class'], 147 'L_SKILLS' => $lang['Adr_character_skills'], 148 'S_CHARACTER_ACTION' => append_sid("adr_character_skills.$phpEx"), 149 )); 150 151 include($phpbb_root_path . 'adr/includes/adr_header.'.$phpEx); 152 153 $template->pparse('body'); 154 include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 155 156 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |