Changeset 19 for minimanager/item.php
- Timestamp:
- Aug 13, 2007, 9:05:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/item.php
r5 r19 22 22 global $lang_global, $lang_item, $lang_item_edit, $lang_id_tab, $output, $mangos_db, $realm_id, $itemset_id; 23 23 24 $ mysql = new MySQL;25 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);26 27 $result = $ mysql->query("SELECT count(*) FROM item_template");28 $tot_items = $ mysql->result($result, 0);29 $ mysql->close();24 $sql = new SQL; 25 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 26 27 $result = $sql->query("SELECT count(*) FROM item_template"); 28 $tot_items = $sql->result($result, 0); 29 $sql->close(); 30 30 31 31 $output .= "<center> … … 170 170 &&(!isset($_POST['ItemLevel'])||$_POST['ItemLevel'] === '')&&(!isset($_POST['itemset'])||$_POST['itemset'] === '')&&(!isset($_POST['Flags'])||$_POST['Flags'] === '') 171 171 &&(!isset($_POST['custom_search'])||$_POST['custom_search'] === '')) 172 {173 172 redirect("item.php?error=1"); 174 } 175 176 $mysql = new MySQL; 177 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 178 179 $class = $mysql->quote_smart($_POST['class']); 180 $Quality = $mysql->quote_smart($_POST['Quality']); 181 $InventoryType = $mysql->quote_smart($_POST['InventoryType']); 182 $bonding = $mysql->quote_smart($_POST['bonding']); 183 184 if ($_POST['entry'] != '') $entry = $mysql->quote_smart($_POST['entry']); 185 if ($_POST['name'] != '') $name = $mysql->quote_smart($_POST['name']); 186 if ($_POST['displayid'] != '') $displayid = $mysql->quote_smart($_POST['displayid']); 187 if ($_POST['RequiredLevel'] != '') $RequiredLevel = $mysql->quote_smart($_POST['RequiredLevel']); 188 if ($_POST['spellid_1'] != '') $spellid_1 = $mysql->quote_smart($_POST['spellid_1']); 189 if ($_POST['spellid_2'] != '') $spellid_2 = $mysql->quote_smart($_POST['spellid_2']); 190 if ($_POST['spellid_3'] != '') $spellid_3 = $mysql->quote_smart($_POST['spellid_3']); 191 if ($_POST['spellid_4'] != '') $spellid_4 = $mysql->quote_smart($_POST['spellid_4']); 192 if ($_POST['ItemLevel'] != '') $ItemLevel = $mysql->quote_smart($_POST['ItemLevel']); 193 if ($_POST['itemset'] != '') $itemset = $mysql->quote_smart($_POST['itemset']); 194 if ($_POST['Flags'] != '') $Flags = $mysql->quote_smart($_POST['Flags']); 195 if ($_POST['custom_search'] != '') $custom_search = $mysql->quote_smart($_POST['custom_search']); 173 174 $sql = new SQL; 175 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 176 177 $class = $sql->quote_smart($_POST['class']); 178 $Quality = $sql->quote_smart($_POST['Quality']); 179 $InventoryType = $sql->quote_smart($_POST['InventoryType']); 180 $bonding = $sql->quote_smart($_POST['bonding']); 181 182 if ($_POST['entry'] != '') $entry = $sql->quote_smart($_POST['entry']); 183 if ($_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 184 if ($_POST['displayid'] != '') $displayid = $sql->quote_smart($_POST['displayid']); 185 if ($_POST['RequiredLevel'] != '') $RequiredLevel = $sql->quote_smart($_POST['RequiredLevel']); 186 if ($_POST['spellid_1'] != '') $spellid_1 = $sql->quote_smart($_POST['spellid_1']); 187 if ($_POST['spellid_2'] != '') $spellid_2 = $sql->quote_smart($_POST['spellid_2']); 188 if ($_POST['spellid_3'] != '') $spellid_3 = $sql->quote_smart($_POST['spellid_3']); 189 if ($_POST['spellid_4'] != '') $spellid_4 = $sql->quote_smart($_POST['spellid_4']); 190 if ($_POST['ItemLevel'] != '') $ItemLevel = $sql->quote_smart($_POST['ItemLevel']); 191 if ($_POST['itemset'] != '') $itemset = $sql->quote_smart($_POST['itemset']); 192 if ($_POST['Flags'] != '') $Flags = $sql->quote_smart($_POST['Flags']); 193 if ($_POST['custom_search'] != '') $custom_search = $sql->quote_smart($_POST['custom_search']); 196 194 else $custom_search = ""; 197 195 … … 218 216 if($where == "WHERE entry > 0 ") redirect("item.php?error=1"); 219 217 220 $result = $ mysql->query("SELECT entry,displayid,name,RequiredLevel,ItemLevel FROM item_template $where ORDER BY entry LIMIT $sql_search_limit");221 $total_items_found = $ mysql->num_rows($result);218 $result = $sql->query("SELECT entry,displayid,name,RequiredLevel,ItemLevel FROM item_template $where ORDER BY entry LIMIT $sql_search_limit"); 219 $total_items_found = $sql->num_rows($result); 222 220 223 221 $output .= "<center> … … 231 229 $output .= "<table class=\"lined\"> 232 230 <tr> 233 <t d width=\"15%\" class=\"head\">{$lang_item_edit['entry']}</td>234 <t d width=\"10%\" class=\"head\">{$lang_item_edit['display_id']}</td>235 <t d width=\"55%\" class=\"head\">{$lang_item_edit['item_name']}</td>236 <t d width=\"10%\" class=\"head\">{$lang_item_edit['req_level']}</td>237 <t d width=\"10%\" class=\"head\">{$lang_item_edit['item_level']}</td>231 <th width=\"15%\">{$lang_item_edit['entry']}</th> 232 <th width=\"10%\">{$lang_item_edit['display_id']}</th> 233 <th width=\"55%\">{$lang_item_edit['item_name']}</th> 234 <th width=\"10%\">{$lang_item_edit['req_level']}</th> 235 <th width=\"10%\">{$lang_item_edit['item_level']}</th> 238 236 </tr>"; 239 237 … … 241 239 242 240 for ($i=1; $i<=$total_items_found; $i++){ 243 $item = $ mysql->fetch_row($result);241 $item = $sql->fetch_row($result); 244 242 245 243 $tooltip = get_item_tooltip($item[0]); … … 257 255 $output .= "</table></center><br />"; 258 256 259 $ mysql->close();257 $sql->close(); 260 258 } 261 259 … … 1448 1446 if (!isset($_GET['entry'])) redirect("item.php?error=1"); 1449 1447 1450 $ mysql = new MySQL;1451 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);1452 1453 $entry = $ mysql->quote_smart($_GET['entry']);1454 $result = $ mysql->query("SELECT * FROM item_template WHERE entry = '$entry'");1448 $sql = new SQL; 1449 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 1450 1451 $entry = $sql->quote_smart($_GET['entry']); 1452 $result = $sql->query("SELECT * FROM item_template WHERE entry = '$entry'"); 1455 1453 1456 1454 if ($result){ 1457 $item = $ mysql->fetch_assoc($result);1455 $item = $sql->fetch_assoc($result); 1458 1456 require_once("scripts/get_lib.php"); 1459 1457 $tooltip = get_item_tooltip($entry); … … 2856 2854 <tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['dropped_by']}: {$lang_item_edit['top_x']}</td></tr> 2857 2855 <tr> 2858 <t d width=\"35%\" class=\"head\">{$lang_item_edit['mob_name']}</td>2859 <t d width=\"15%\" class=\"head\">{$lang_item_edit['mob_level']}</td>2860 <t d width=\"25%\" class=\"head\">{$lang_item_edit['mob_drop_chance']}</td>2861 <t d width=\"25%\" class=\"head\">{$lang_item_edit['mob_quest_drop_chance']}</td>2856 <th width=\"35%\">{$lang_item_edit['mob_name']}</th> 2857 <th width=\"15%\">{$lang_item_edit['mob_level']}</th> 2858 <th width=\"25%\">{$lang_item_edit['mob_drop_chance']}</th> 2859 <th width=\"25%\">{$lang_item_edit['mob_quest_drop_chance']}</th> 2862 2860 </tr>"; 2863 2861 2864 $result2 = $ mysql->query("SELECT entry,ChanceOrRef,QuestChanceOrGroup FROM creature_loot_template WHERE item = {$item['entry']} ORDER BY QuestChanceOrGroup,ChanceOrRef DESC LIMIT 5");2865 while ($info = $ mysql->fetch_row($result2)){2866 $result3 = $ mysql->query("SELECT entry,name,maxlevel FROM creature_template WHERE lootid = {$info[0]} LIMIT 1");2867 while ($mob = $ mysql->fetch_row($result3)){2862 $result2 = $sql->query("SELECT entry,ChanceOrRef,QuestChanceOrGroup FROM creature_loot_template WHERE item = {$item['entry']} ORDER BY QuestChanceOrGroup,ChanceOrRef DESC LIMIT 5"); 2863 while ($info = $sql->fetch_row($result2)){ 2864 $result3 = $sql->query("SELECT entry,name,maxlevel FROM creature_template WHERE lootid = {$info[0]} LIMIT 1"); 2865 while ($mob = $sql->fetch_row($result3)){ 2868 2866 $output .= "<tr><td><a class=\"tooltip\" href=\"creature.php?action=edit&entry=$mob[0]&error=4\" target=\"_blank\">$mob[1]</a></td> 2869 2867 <td>$mob[2]</td> … … 2873 2871 } 2874 2872 2875 $result2 = $ mysql->query("SELECT entry,name,maxlevel FROM creature_template WHERE entry IN (SELECT entry FROM npc_vendor WHERE item = {$item['entry']}) ORDER BY maxlevel DESC LIMIT 5");2876 if ($ mysql->num_rows($result2)){2873 $result2 = $sql->query("SELECT entry,name,maxlevel FROM creature_template WHERE entry IN (SELECT entry FROM npc_vendor WHERE item = {$item['entry']}) ORDER BY maxlevel DESC LIMIT 5"); 2874 if ($sql->num_rows($result2)){ 2877 2875 $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['soled_by']}: {$lang_item_edit['limit_x']}</td></tr>"; 2878 while ($mob = $ mysql->fetch_row($result2)){2876 while ($mob = $sql->fetch_row($result2)){ 2879 2877 $output .= "<tr><td width=\"20%\">$mob[2]</td> 2880 2878 <td width=\"80%\" colspan=\"3\" align=\"left\"><a class=\"tooltip\" href=\"creature.php?action=edit&entry=$mob[0]&error=4\" target=\"_blank\">$mob[1]</a></td></tr>"; … … 2882 2880 } 2883 2881 2884 $result2 = $ mysql->query("SELECT entry,title,QuestLevel FROM quest_template WHERE ( SrcItemId = {$item['entry']} OR ReqItemId1 = {$item['entry']} OR2882 $result2 = $sql->query("SELECT entry,title,QuestLevel FROM quest_template WHERE ( SrcItemId = {$item['entry']} OR ReqItemId1 = {$item['entry']} OR 2885 2883 ReqItemId2 = {$item['entry']} OR ReqItemId3 = {$item['entry']} OR ReqItemId4 = {$item['entry']} OR RewItemId1 = {$item['entry']} OR 2886 2884 RewItemId2 = {$item['entry']} OR RewItemId3 = {$item['entry']} OR RewItemId4 = {$item['entry']} ) ORDER BY QuestLevel DESC"); 2887 if ($ mysql->num_rows($result2)){2885 if ($sql->num_rows($result2)){ 2888 2886 $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['involved_in_quests']}:</td></tr>"; 2889 while ($quest = $ mysql->fetch_row($result2)){2887 while ($quest = $sql->fetch_row($result2)){ 2890 2888 $output .= "<tr><td width=\"20%\">id: $quest[0]</td> 2891 2889 <td width=\"80%\" colspan=\"3\" align=\"left\"><a class=\"tooltip\" href=\"$quest_datasite$quest[0]\" target=\"_blank\">($quest[2]) $quest[1]</a></td></tr>"; … … 2894 2892 } 2895 2893 2896 $result2 = $ mysql->query("SELECT entry,title,QuestLevel FROM quest_template WHERE ( RewChoiceItemId1 = {$item['entry']} OR RewChoiceItemId2 = {$item['entry']} OR2894 $result2 = $sql->query("SELECT entry,title,QuestLevel FROM quest_template WHERE ( RewChoiceItemId1 = {$item['entry']} OR RewChoiceItemId2 = {$item['entry']} OR 2897 2895 RewChoiceItemId3 = {$item['entry']} OR RewChoiceItemId4 = {$item['entry']} OR RewChoiceItemId5 = {$item['entry']} OR RewChoiceItemId6 = {$item['entry']} ) 2898 2896 ORDER BY QuestLevel DESC"); 2899 if ($ mysql->num_rows($result2)){2897 if ($sql->num_rows($result2)){ 2900 2898 $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['reward_from_quest']}:</td></tr>"; 2901 while ($quest = $ mysql->fetch_row($result2)){2899 while ($quest = $sql->fetch_row($result2)){ 2902 2900 $output .= "<tr><td width=\"20%\">id: $quest[0]</td> 2903 2901 <td width=\"80%\" colspan=\"3\" align=\"left\"><a class=\"tooltip\" href=\"$quest_datasite$quest[0]\" target=\"_blank\">($quest[2]) $quest[1]</a></td></tr>"; … … 2916 2914 $row_flag = 0; 2917 2915 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 2918 $result1 = $ mysql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM disenchant_loot_template WHERE entry = {$item['DisenchantID']} ORDER BY ChanceOrRef DESC");2919 while ($item = $ mysql->fetch_row($result1)){2916 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM disenchant_loot_template WHERE entry = {$item['DisenchantID']} ORDER BY ChanceOrRef DESC"); 2917 while ($item = $sql->fetch_row($result1)){ 2920 2918 $cel_counter++; 2921 2919 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_item_edit['drop_chance']}: $item[1]%<br />{$lang_item_edit['quest_drop_chance']}: $item[2]%<br />{$lang_item_edit['drop_chance']}: $item[3]-$item[4]<br />{$lang_item_edit['quest_freeforall']}: $item[5]"; … … 2973 2971 2974 2972 2975 $ mysql->close();2973 $sql->close(); 2976 2974 } else { 2977 $ mysql->close();2975 $sql->close(); 2978 2976 error($lang_item_edit['item_not_found']); 2979 2977 exit(); … … 2991 2989 if (!isset($_POST['entry']) || $_POST['entry'] === '') redirect("item.php?error=1"); 2992 2990 2993 $ mysql = new MySQL;2994 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);2995 2996 $entry = $ mysql->quote_smart($_POST['entry']);2997 if (isset($_POST['class']) && $_POST['class'] != '') $class = $ mysql->quote_smart($_POST['class']);2991 $sql = new SQL; 2992 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 2993 2994 $entry = $sql->quote_smart($_POST['entry']); 2995 if (isset($_POST['class']) && $_POST['class'] != '') $class = $sql->quote_smart($_POST['class']); 2998 2996 else $class = 0; 2999 if (isset($_POST['subclass']) && $_POST['subclass'] != '') $subclass = $ mysql->quote_smart($_POST['subclass']);2997 if (isset($_POST['subclass']) && $_POST['subclass'] != '') $subclass = $sql->quote_smart($_POST['subclass']); 3000 2998 else $subclass = 0; 3001 if (isset($_POST['name']) && $_POST['name'] != '') $name = $ mysql->quote_smart($_POST['name']);2999 if (isset($_POST['name']) && $_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 3002 3000 else $name = 0; 3003 if (isset($_POST['displayid']) && $_POST['displayid'] != '') $displayid = $ mysql->quote_smart($_POST['displayid']);3001 if (isset($_POST['displayid']) && $_POST['displayid'] != '') $displayid = $sql->quote_smart($_POST['displayid']); 3004 3002 else $displayid = 0; 3005 if (isset($_POST['Quality']) && $_POST['Quality'] != '') $Quality = $ mysql->quote_smart($_POST['Quality']);3003 if (isset($_POST['Quality']) && $_POST['Quality'] != '') $Quality = $sql->quote_smart($_POST['Quality']); 3006 3004 else $Quality = 0; 3007 if (isset($_POST['Flags']) && $_POST['Flags'] != '') $Flags = $ mysql->quote_smart($_POST['Flags']);3005 if (isset($_POST['Flags']) && $_POST['Flags'] != '') $Flags = $sql->quote_smart($_POST['Flags']); 3008 3006 else $Flags = 0; 3009 if (isset($_POST['BuyCount']) && $_POST['BuyCount'] != '') $BuyCount = $ mysql->quote_smart($_POST['BuyCount']);3007 if (isset($_POST['BuyCount']) && $_POST['BuyCount'] != '') $BuyCount = $sql->quote_smart($_POST['BuyCount']); 3010 3008 else $BuyCount = 0; 3011 if (isset($_POST['BuyPrice']) && $_POST['BuyPrice'] != '') $BuyPrice = $ mysql->quote_smart($_POST['BuyPrice']);3009 if (isset($_POST['BuyPrice']) && $_POST['BuyPrice'] != '') $BuyPrice = $sql->quote_smart($_POST['BuyPrice']); 3012 3010 else $BuyPrice = 0; 3013 if (isset($_POST['SellPrice']) && $_POST['SellPrice'] != '') $SellPrice = $ mysql->quote_smart($_POST['SellPrice']);3011 if (isset($_POST['SellPrice']) && $_POST['SellPrice'] != '') $SellPrice = $sql->quote_smart($_POST['SellPrice']); 3014 3012 else $SellPrice = 0; 3015 if (isset($_POST['InventoryType']) && $_POST['InventoryType'] != '') $InventoryType = $ mysql->quote_smart($_POST['InventoryType']);3013 if (isset($_POST['InventoryType']) && $_POST['InventoryType'] != '') $InventoryType = $sql->quote_smart($_POST['InventoryType']); 3016 3014 else $AllowableClass = 0; 3017 if (isset($_POST['AllowableClass'])) $AllowableClass = $ mysql->quote_smart($_POST['AllowableClass']);3015 if (isset($_POST['AllowableClass'])) $AllowableClass = $sql->quote_smart($_POST['AllowableClass']); 3018 3016 else $AllowableClass = -1; 3019 if (isset($_POST['AllowableRace'])) $AllowableRace = $ mysql->quote_smart($_POST['AllowableRace']);3017 if (isset($_POST['AllowableRace'])) $AllowableRace = $sql->quote_smart($_POST['AllowableRace']); 3020 3018 else $AllowableRace = -1; 3021 if (isset($_POST['ItemLevel']) && $_POST['ItemLevel'] != '') $ItemLevel = $ mysql->quote_smart($_POST['ItemLevel']);3019 if (isset($_POST['ItemLevel']) && $_POST['ItemLevel'] != '') $ItemLevel = $sql->quote_smart($_POST['ItemLevel']); 3022 3020 else $ItemLevel = 1; 3023 if (isset($_POST['RequiredLevel']) && $_POST['RequiredLevel'] != '') $RequiredLevel = $ mysql->quote_smart($_POST['RequiredLevel']);3021 if (isset($_POST['RequiredLevel']) && $_POST['RequiredLevel'] != '') $RequiredLevel = $sql->quote_smart($_POST['RequiredLevel']); 3024 3022 else $RequiredLevel = 0; 3025 if (isset($_POST['RequiredSkill']) && $_POST['RequiredSkill'] != '') $RequiredSkill = $ mysql->quote_smart($_POST['RequiredSkill']);3023 if (isset($_POST['RequiredSkill']) && $_POST['RequiredSkill'] != '') $RequiredSkill = $sql->quote_smart($_POST['RequiredSkill']); 3026 3024 else $RequiredSkill = 0; 3027 if (isset($_POST['RequiredSkillRank']) && $_POST['RequiredSkillRank'] != '') $RequiredSkillRank = $ mysql->quote_smart($_POST['RequiredSkillRank']);3025 if (isset($_POST['RequiredSkillRank']) && $_POST['RequiredSkillRank'] != '') $RequiredSkillRank = $sql->quote_smart($_POST['RequiredSkillRank']); 3028 3026 else $RequiredSkillRank = 0; 3029 if (isset($_POST['requiredspell']) && $_POST['requiredspell'] != '') $requiredspell = $ mysql->quote_smart($_POST['requiredspell']);3027 if (isset($_POST['requiredspell']) && $_POST['requiredspell'] != '') $requiredspell = $sql->quote_smart($_POST['requiredspell']); 3030 3028 else $requiredspell = 0; 3031 if (isset($_POST['requiredhonorrank']) && $_POST['requiredhonorrank'] != '') $requiredhonorrank = $ mysql->quote_smart($_POST['requiredhonorrank']);3029 if (isset($_POST['requiredhonorrank']) && $_POST['requiredhonorrank'] != '') $requiredhonorrank = $sql->quote_smart($_POST['requiredhonorrank']); 3032 3030 else $requiredhonorrank = 0; 3033 if (isset($_POST['RequiredCityRank']) && $_POST['RequiredCityRank'] != '') $RequiredCityRank = $ mysql->quote_smart($_POST['RequiredCityRank']);3031 if (isset($_POST['RequiredCityRank']) && $_POST['RequiredCityRank'] != '') $RequiredCityRank = $sql->quote_smart($_POST['RequiredCityRank']); 3034 3032 else $RequiredCityRank = 0; 3035 if (isset($_POST['RequiredReputationFaction']) && $_POST['RequiredReputationFaction'] != '') $RequiredReputationFaction = $ mysql->quote_smart($_POST['RequiredReputationFaction']);3033 if (isset($_POST['RequiredReputationFaction']) && $_POST['RequiredReputationFaction'] != '') $RequiredReputationFaction = $sql->quote_smart($_POST['RequiredReputationFaction']); 3036 3034 else $RequiredReputationFaction = 0; 3037 if (isset($_POST['RequiredReputationRank']) && $_POST['RequiredReputationRank'] != '') $RequiredReputationRank = $ mysql->quote_smart($_POST['RequiredReputationRank']);3035 if (isset($_POST['RequiredReputationRank']) && $_POST['RequiredReputationRank'] != '') $RequiredReputationRank = $sql->quote_smart($_POST['RequiredReputationRank']); 3038 3036 else $RequiredReputationRank = 0; 3039 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $ mysql->quote_smart($_POST['maxcount']);3037 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']); 3040 3038 else $maxcount = 0; 3041 if (isset($_POST['stackable']) && $_POST['stackable'] != '') $stackable = $ mysql->quote_smart($_POST['stackable']);3039 if (isset($_POST['stackable']) && $_POST['stackable'] != '') $stackable = $sql->quote_smart($_POST['stackable']); 3042 3040 else $description = 0; 3043 if (isset($_POST['ContainerSlots']) && $_POST['ContainerSlots'] != '') $ContainerSlots = $ mysql->quote_smart($_POST['ContainerSlots']);3041 if (isset($_POST['ContainerSlots']) && $_POST['ContainerSlots'] != '') $ContainerSlots = $sql->quote_smart($_POST['ContainerSlots']); 3044 3042 else $ContainerSlots = 0; 3045 if (isset($_POST['stat_type1']) && $_POST['stat_type1'] != '') $stat_type1 = $ mysql->quote_smart($_POST['stat_type1']);3043 if (isset($_POST['stat_type1']) && $_POST['stat_type1'] != '') $stat_type1 = $sql->quote_smart($_POST['stat_type1']); 3046 3044 else $stat_type1 = 0; 3047 if (isset($_POST['stat_value1']) && $_POST['stat_value1'] != '') $stat_value1 = $ mysql->quote_smart($_POST['stat_value1']);3045 if (isset($_POST['stat_value1']) && $_POST['stat_value1'] != '') $stat_value1 = $sql->quote_smart($_POST['stat_value1']); 3048 3046 else $stat_value1 = 0; 3049 if (isset($_POST['stat_type2']) && $_POST['stat_type2'] != '') $stat_type2 = $ mysql->quote_smart($_POST['stat_type2']);3047 if (isset($_POST['stat_type2']) && $_POST['stat_type2'] != '') $stat_type2 = $sql->quote_smart($_POST['stat_type2']); 3050 3048 else $stat_type2 = 0; 3051 if (isset($_POST['stat_value2']) && $_POST['stat_value2'] != '') $stat_value2 = $ mysql->quote_smart($_POST['stat_value2']);3049 if (isset($_POST['stat_value2']) && $_POST['stat_value2'] != '') $stat_value2 = $sql->quote_smart($_POST['stat_value2']); 3052 3050 else $stat_value2 = 0; 3053 if (isset($_POST['stat_type3']) && $_POST['stat_type3'] != '') $stat_type3 = $ mysql->quote_smart($_POST['stat_type3']);3051 if (isset($_POST['stat_type3']) && $_POST['stat_type3'] != '') $stat_type3 = $sql->quote_smart($_POST['stat_type3']); 3054 3052 else $stat_type3 = 0; 3055 if (isset($_POST['stat_value3']) && $_POST['stat_value3'] != '') $stat_value3 = $ mysql->quote_smart($_POST['stat_value3']);3053 if (isset($_POST['stat_value3']) && $_POST['stat_value3'] != '') $stat_value3 = $sql->quote_smart($_POST['stat_value3']); 3056 3054 else $stat_value3 = 0; 3057 if (isset($_POST['stat_type4']) && $_POST['stat_type4'] != '') $stat_type4 = $ mysql->quote_smart($_POST['stat_type4']);3055 if (isset($_POST['stat_type4']) && $_POST['stat_type4'] != '') $stat_type4 = $sql->quote_smart($_POST['stat_type4']); 3058 3056 else $stat_type4 = 0; 3059 if (isset($_POST['stat_value4']) && $_POST['stat_value4'] != '') $stat_value4 = $ mysql->quote_smart($_POST['stat_value4']);3057 if (isset($_POST['stat_value4']) && $_POST['stat_value4'] != '') $stat_value4 = $sql->quote_smart($_POST['stat_value4']); 3060 3058 else $stat_value4 = 0; 3061 if (isset($_POST['stat_type5']) && $_POST['stat_type5'] != '') $stat_type5 = $ mysql->quote_smart($_POST['stat_type5']);3059 if (isset($_POST['stat_type5']) && $_POST['stat_type5'] != '') $stat_type5 = $sql->quote_smart($_POST['stat_type5']); 3062 3060 else $stat_type5 = 0; 3063 if (isset($_POST['stat_value5']) && $_POST['stat_value5'] != '') $stat_value5 = $ mysql->quote_smart($_POST['stat_value5']);3061 if (isset($_POST['stat_value5']) && $_POST['stat_value5'] != '') $stat_value5 = $sql->quote_smart($_POST['stat_value5']); 3064 3062 else $stat_value5 = 0; 3065 if (isset($_POST['stat_type6']) && $_POST['stat_type6'] != '') $stat_type6 = $ mysql->quote_smart($_POST['stat_type6']);3063 if (isset($_POST['stat_type6']) && $_POST['stat_type6'] != '') $stat_type6 = $sql->quote_smart($_POST['stat_type6']); 3066 3064 else $stat_type6 = 0; 3067 if (isset($_POST['stat_value6']) && $_POST['stat_value6'] != '') $stat_value6 = $ mysql->quote_smart($_POST['stat_value6']);3065 if (isset($_POST['stat_value6']) && $_POST['stat_value6'] != '') $stat_value6 = $sql->quote_smart($_POST['stat_value6']); 3068 3066 else $stat_value6 = 0; 3069 if (isset($_POST['stat_type7']) && $_POST['stat_type7'] != '') $stat_type7 = $ mysql->quote_smart($_POST['stat_type7']);3067 if (isset($_POST['stat_type7']) && $_POST['stat_type7'] != '') $stat_type7 = $sql->quote_smart($_POST['stat_type7']); 3070 3068 else $stat_type7 = 0; 3071 if (isset($_POST['stat_value7']) && $_POST['stat_value7'] != '') $stat_value7 = $ mysql->quote_smart($_POST['stat_value7']);3069 if (isset($_POST['stat_value7']) && $_POST['stat_value7'] != '') $stat_value7 = $sql->quote_smart($_POST['stat_value7']); 3072 3070 else $stat_value7 = 0; 3073 if (isset($_POST['stat_type8']) && $_POST['stat_type8'] != '') $stat_type8 = $ mysql->quote_smart($_POST['stat_type8']);3071 if (isset($_POST['stat_type8']) && $_POST['stat_type8'] != '') $stat_type8 = $sql->quote_smart($_POST['stat_type8']); 3074 3072 else $stat_type8 = 0; 3075 if (isset($_POST['stat_value8']) && $_POST['stat_value8'] != '') $stat_value8 = $ mysql->quote_smart($_POST['stat_value8']);3073 if (isset($_POST['stat_value8']) && $_POST['stat_value8'] != '') $stat_value8 = $sql->quote_smart($_POST['stat_value8']); 3076 3074 else $stat_value8 = 0; 3077 if (isset($_POST['stat_type9']) && $_POST['stat_type9'] != '') $stat_type9 = $ mysql->quote_smart($_POST['stat_type9']);3075 if (isset($_POST['stat_type9']) && $_POST['stat_type9'] != '') $stat_type9 = $sql->quote_smart($_POST['stat_type9']); 3078 3076 else $stat_type9 = 0; 3079 if (isset($_POST['stat_value9']) && $_POST['stat_value9'] != '') $stat_value9 = $ mysql->quote_smart($_POST['stat_value9']);3077 if (isset($_POST['stat_value9']) && $_POST['stat_value9'] != '') $stat_value9 = $sql->quote_smart($_POST['stat_value9']); 3080 3078 else $stat_value9 = 0; 3081 if (isset($_POST['stat_type10']) && $_POST['stat_type10'] != '') $stat_type10 = $ mysql->quote_smart($_POST['stat_type10']);3079 if (isset($_POST['stat_type10']) && $_POST['stat_type10'] != '') $stat_type10 = $sql->quote_smart($_POST['stat_type10']); 3082 3080 else $stat_type10 = 0; 3083 if (isset($_POST['stat_value10']) && $_POST['stat_value10'] != '') $stat_value10 = $ mysql->quote_smart($_POST['stat_value10']);3081 if (isset($_POST['stat_value10']) && $_POST['stat_value10'] != '') $stat_value10 = $sql->quote_smart($_POST['stat_value10']); 3084 3082 else $stat_value10 = 0; 3085 if (isset($_POST['dmg_min1']) && $_POST['dmg_min1'] != '') $dmg_min1 = $ mysql->quote_smart($_POST['dmg_min1']);3083 if (isset($_POST['dmg_min1']) && $_POST['dmg_min1'] != '') $dmg_min1 = $sql->quote_smart($_POST['dmg_min1']); 3086 3084 else $dmg_min1 = 0; 3087 if (isset($_POST['dmg_max1']) && $_POST['dmg_max1'] != '') $dmg_max1 = $ mysql->quote_smart($_POST['dmg_max1']);3085 if (isset($_POST['dmg_max1']) && $_POST['dmg_max1'] != '') $dmg_max1 = $sql->quote_smart($_POST['dmg_max1']); 3088 3086 else $dmg_max1 = 0; 3089 if (isset($_POST['dmg_type1']) && $_POST['dmg_type1'] != '') $dmg_type1 = $ mysql->quote_smart($_POST['dmg_type1']);3087 if (isset($_POST['dmg_type1']) && $_POST['dmg_type1'] != '') $dmg_type1 = $sql->quote_smart($_POST['dmg_type1']); 3090 3088 else $dmg_type1 = 0; 3091 if (isset($_POST['dmg_min2']) && $_POST['dmg_min2'] != '') $dmg_min2 = $ mysql->quote_smart($_POST['dmg_min2']);3089 if (isset($_POST['dmg_min2']) && $_POST['dmg_min2'] != '') $dmg_min2 = $sql->quote_smart($_POST['dmg_min2']); 3092 3090 else $dmg_min2 = 0; 3093 if (isset($_POST['dmg_max2']) && $_POST['dmg_max2'] != '') $dmg_max2 = $ mysql->quote_smart($_POST['dmg_max2']);3091 if (isset($_POST['dmg_max2']) && $_POST['dmg_max2'] != '') $dmg_max2 = $sql->quote_smart($_POST['dmg_max2']); 3094 3092 else $dmg_max2 = 0; 3095 if (isset($_POST['dmg_type2']) && $_POST['dmg_type2'] != '') $dmg_type2 = $ mysql->quote_smart($_POST['dmg_type2']);3093 if (isset($_POST['dmg_type2']) && $_POST['dmg_type2'] != '') $dmg_type2 = $sql->quote_smart($_POST['dmg_type2']); 3096 3094 else $dmg_type2 = 0; 3097 if (isset($_POST['dmg_min3']) && $_POST['dmg_min3'] != '') $dmg_min3 = $ mysql->quote_smart($_POST['dmg_min3']);3095 if (isset($_POST['dmg_min3']) && $_POST['dmg_min3'] != '') $dmg_min3 = $sql->quote_smart($_POST['dmg_min3']); 3098 3096 else $dmg_min3 = 0; 3099 if (isset($_POST['dmg_max3']) && $_POST['dmg_max3'] != '') $dmg_max3 = $ mysql->quote_smart($_POST['dmg_max3']);3097 if (isset($_POST['dmg_max3']) && $_POST['dmg_max3'] != '') $dmg_max3 = $sql->quote_smart($_POST['dmg_max3']); 3100 3098 else $dmg_max3 = 0; 3101 if (isset($_POST['dmg_type3']) && $_POST['dmg_type3'] != '') $dmg_type3 = $ mysql->quote_smart($_POST['dmg_type3']);3099 if (isset($_POST['dmg_type3']) && $_POST['dmg_type3'] != '') $dmg_type3 = $sql->quote_smart($_POST['dmg_type3']); 3102 3100 else $dmg_type3 = 0; 3103 if (isset($_POST['dmg_min4']) && $_POST['dmg_min4'] != '') $dmg_min4 = $ mysql->quote_smart($_POST['dmg_min4']);3101 if (isset($_POST['dmg_min4']) && $_POST['dmg_min4'] != '') $dmg_min4 = $sql->quote_smart($_POST['dmg_min4']); 3104 3102 else $dmg_min4 = 0; 3105 if (isset($_POST['dmg_max4']) && $_POST['dmg_max4'] != '') $dmg_max4 = $ mysql->quote_smart($_POST['dmg_max4']);3103 if (isset($_POST['dmg_max4']) && $_POST['dmg_max4'] != '') $dmg_max4 = $sql->quote_smart($_POST['dmg_max4']); 3106 3104 else $dmg_max4 = 0; 3107 if (isset($_POST['dmg_type4']) && $_POST['dmg_type4'] != '') $dmg_type4 = $ mysql->quote_smart($_POST['dmg_type4']);3105 if (isset($_POST['dmg_type4']) && $_POST['dmg_type4'] != '') $dmg_type4 = $sql->quote_smart($_POST['dmg_type4']); 3108 3106 else $dmg_type4 = 0; 3109 if (isset($_POST['dmg_min5']) && $_POST['dmg_min5'] != '') $dmg_min5 = $ mysql->quote_smart($_POST['dmg_min5']);3107 if (isset($_POST['dmg_min5']) && $_POST['dmg_min5'] != '') $dmg_min5 = $sql->quote_smart($_POST['dmg_min5']); 3110 3108 else $dmg_min5 = 0; 3111 if (isset($_POST['dmg_max5']) && $_POST['dmg_max5'] != '') $dmg_max5 = $ mysql->quote_smart($_POST['dmg_max5']);3109 if (isset($_POST['dmg_max5']) && $_POST['dmg_max5'] != '') $dmg_max5 = $sql->quote_smart($_POST['dmg_max5']); 3112 3110 else $dmg_max5 = 0; 3113 if (isset($_POST['dmg_type5']) && $_POST['dmg_type5'] != '') $dmg_type5 = $ mysql->quote_smart($_POST['dmg_type5']);3111 if (isset($_POST['dmg_type5']) && $_POST['dmg_type5'] != '') $dmg_type5 = $sql->quote_smart($_POST['dmg_type5']); 3114 3112 else $dmg_type5 = 0; 3115 if (isset($_POST['armor']) && $_POST['armor'] != '') $armor = $ mysql->quote_smart($_POST['armor']);3113 if (isset($_POST['armor']) && $_POST['armor'] != '') $armor = $sql->quote_smart($_POST['armor']); 3116 3114 else $armor = 0; 3117 if (isset($_POST['holy_res']) && $_POST['holy_res'] != '') $holy_res = $ mysql->quote_smart($_POST['holy_res']);3115 if (isset($_POST['holy_res']) && $_POST['holy_res'] != '') $holy_res = $sql->quote_smart($_POST['holy_res']); 3118 3116 else $holy_res = 0; 3119 if (isset($_POST['fire_res']) && $_POST['fire_res'] != '') $fire_res = $ mysql->quote_smart($_POST['fire_res']);3117 if (isset($_POST['fire_res']) && $_POST['fire_res'] != '') $fire_res = $sql->quote_smart($_POST['fire_res']); 3120 3118 else $fire_res = 0; 3121 if (isset($_POST['nature_res']) && $_POST['nature_res'] != '') $nature_res = $ mysql->quote_smart($_POST['nature_res']);3119 if (isset($_POST['nature_res']) && $_POST['nature_res'] != '') $nature_res = $sql->quote_smart($_POST['nature_res']); 3122 3120 else $nature_res = 0; 3123 if (isset($_POST['frost_res']) && $_POST['frost_res'] != '') $frost_res = $ mysql->quote_smart($_POST['frost_res']);3121 if (isset($_POST['frost_res']) && $_POST['frost_res'] != '') $frost_res = $sql->quote_smart($_POST['frost_res']); 3124 3122 else $frost_res = 0; 3125 if (isset($_POST['shadow_res']) && $_POST['shadow_res'] != '') $shadow_res = $ mysql->quote_smart($_POST['shadow_res']);3123 if (isset($_POST['shadow_res']) && $_POST['shadow_res'] != '') $shadow_res = $sql->quote_smart($_POST['shadow_res']); 3126 3124 else $shadow_res = 0; 3127 if (isset($_POST['arcane_res']) && $_POST['arcane_res'] != '') $arcane_res = $ mysql->quote_smart($_POST['arcane_res']);3125 if (isset($_POST['arcane_res']) && $_POST['arcane_res'] != '') $arcane_res = $sql->quote_smart($_POST['arcane_res']); 3128 3126 else $arcane_res = 0; 3129 if (isset($_POST['delay']) && $_POST['delay'] != '') $delay = $ mysql->quote_smart($_POST['delay']);3127 if (isset($_POST['delay']) && $_POST['delay'] != '') $delay = $sql->quote_smart($_POST['delay']); 3130 3128 else $delay = 0; 3131 if (isset($_POST['ammo_type']) && $_POST['ammo_type'] != '') $ammo_type = $ mysql->quote_smart($_POST['ammo_type']);3129 if (isset($_POST['ammo_type']) && $_POST['ammo_type'] != '') $ammo_type = $sql->quote_smart($_POST['ammo_type']); 3132 3130 else $ammo_type = 0; 3133 if (isset($_POST['RangedModRange']) && $_POST['RangedModRange'] != '') $RangedModRange = $ mysql->quote_smart($_POST['RangedModRange']);3131 if (isset($_POST['RangedModRange']) && $_POST['RangedModRange'] != '') $RangedModRange = $sql->quote_smart($_POST['RangedModRange']); 3134 3132 else $RangedModRange = 0; 3135 if (isset($_POST['spellid_1']) && $_POST['spellid_1'] != '') $spellid_1 = $ mysql->quote_smart($_POST['spellid_1']);3133 if (isset($_POST['spellid_1']) && $_POST['spellid_1'] != '') $spellid_1 = $sql->quote_smart($_POST['spellid_1']); 3136 3134 else $spellid_1 = 0; 3137 if (isset($_POST['spelltrigger_1']) && $_POST['spelltrigger_1'] != '') $spelltrigger_1 = $ mysql->quote_smart($_POST['spelltrigger_1']);3135 if (isset($_POST['spelltrigger_1']) && $_POST['spelltrigger_1'] != '') $spelltrigger_1 = $sql->quote_smart($_POST['spelltrigger_1']); 3138 3136 else $spelltrigger_1 = 0; 3139 if (isset($_POST['spellcharges_1']) && $_POST['spellcharges_1'] != '') $spellcharges_1 = $ mysql->quote_smart($_POST['spellcharges_1']);3137 if (isset($_POST['spellcharges_1']) && $_POST['spellcharges_1'] != '') $spellcharges_1 = $sql->quote_smart($_POST['spellcharges_1']); 3140 3138 else $spellcharges_1 = 0; 3141 if (isset($_POST['spellcooldown_1']) && $_POST['spellcooldown_1'] != '') $spellcooldown_1 = $ mysql->quote_smart($_POST['spellcooldown_1']);3139 if (isset($_POST['spellcooldown_1']) && $_POST['spellcooldown_1'] != '') $spellcooldown_1 = $sql->quote_smart($_POST['spellcooldown_1']); 3142 3140 else $spellcooldown_1 = -1; 3143 if (isset($_POST['spellcategory_1']) && $_POST['spellcategory_1'] != '') $spellcategory_1 = $ mysql->quote_smart($_POST['spellcategory_1']);3141 if (isset($_POST['spellcategory_1']) && $_POST['spellcategory_1'] != '') $spellcategory_1 = $sql->quote_smart($_POST['spellcategory_1']); 3144 3142 else $description = 0; 3145 if (isset($_POST['spellcategorycooldown_1']) && $_POST['spellcategorycooldown_1'] != '') $spellcategorycooldown_1 = $ mysql->quote_smart($_POST['spellcategorycooldown_1']);3143 if (isset($_POST['spellcategorycooldown_1']) && $_POST['spellcategorycooldown_1'] != '') $spellcategorycooldown_1 = $sql->quote_smart($_POST['spellcategorycooldown_1']); 3146 3144 else $spellcategorycooldown_1 = -1; 3147 if (isset($_POST['spellid_2']) && $_POST['spellid_2'] != '') $spellid_2 = $ mysql->quote_smart($_POST['spellid_2']);3145 if (isset($_POST['spellid_2']) && $_POST['spellid_2'] != '') $spellid_2 = $sql->quote_smart($_POST['spellid_2']); 3148 3146 else $spellid_2 = 0; 3149 if (isset($_POST['spelltrigger_2']) && $_POST['spelltrigger_2'] != '') $spelltrigger_2 = $ mysql->quote_smart($_POST['spelltrigger_2']);3147 if (isset($_POST['spelltrigger_2']) && $_POST['spelltrigger_2'] != '') $spelltrigger_2 = $sql->quote_smart($_POST['spelltrigger_2']); 3150 3148 else $spelltrigger_2 = 0; 3151 if (isset($_POST['spellcharges_2']) && $_POST['spellcharges_2'] != '') $spellcharges_2 = $ mysql->quote_smart($_POST['spellcharges_2']);3149 if (isset($_POST['spellcharges_2']) && $_POST['spellcharges_2'] != '') $spellcharges_2 = $sql->quote_smart($_POST['spellcharges_2']); 3152 3150 else $spellcharges_2 = 0; 3153 if (isset($_POST['spellcooldown_2']) && $_POST['spellcooldown_2'] != '') $spellcooldown_2 = $ mysql->quote_smart($_POST['spellcooldown_2']);3151 if (isset($_POST['spellcooldown_2']) && $_POST['spellcooldown_2'] != '') $spellcooldown_2 = $sql->quote_smart($_POST['spellcooldown_2']); 3154 3152 else $spellcooldown_2 = -1; 3155 if (isset($_POST['spellcategory_2']) && $_POST['spellcategory_2'] != '') $spellcategory_2 = $ mysql->quote_smart($_POST['spellcategory_2']);3153 if (isset($_POST['spellcategory_2']) && $_POST['spellcategory_2'] != '') $spellcategory_2 = $sql->quote_smart($_POST['spellcategory_2']); 3156 3154 else $spellcategory_2 = 0; 3157 if (isset($_POST['spellcategorycooldown_2']) && $_POST['spellcategorycooldown_2'] != '') $spellcategorycooldown_2 = $ mysql->quote_smart($_POST['spellcategorycooldown_2']);3155 if (isset($_POST['spellcategorycooldown_2']) && $_POST['spellcategorycooldown_2'] != '') $spellcategorycooldown_2 = $sql->quote_smart($_POST['spellcategorycooldown_2']); 3158 3156 else $spellcategorycooldown_2 = -1; 3159 if (isset($_POST['spellid_3']) && $_POST['spellid_3'] != '') $spellid_3 = $ mysql->quote_smart($_POST['spellid_3']);3157 if (isset($_POST['spellid_3']) && $_POST['spellid_3'] != '') $spellid_3 = $sql->quote_smart($_POST['spellid_3']); 3160 3158 else $spellid_3 = 0; 3161 if (isset($_POST['spelltrigger_3']) && $_POST['spelltrigger_3'] != '') $spelltrigger_3 = $ mysql->quote_smart($_POST['spelltrigger_3']);3159 if (isset($_POST['spelltrigger_3']) && $_POST['spelltrigger_3'] != '') $spelltrigger_3 = $sql->quote_smart($_POST['spelltrigger_3']); 3162 3160 else $spelltrigger_3 = 0; 3163 if (isset($_POST['spellcharges_3']) && $_POST['spellcharges_3'] != '') $spellcharges_3 = $ mysql->quote_smart($_POST['spellcharges_3']);3161 if (isset($_POST['spellcharges_3']) && $_POST['spellcharges_3'] != '') $spellcharges_3 = $sql->quote_smart($_POST['spellcharges_3']); 3164 3162 else $spellcharges_3 = 0; 3165 if (isset($_POST['spellcooldown_3']) && $_POST['spellcooldown_3'] != '') $spellcooldown_3 = $ mysql->quote_smart($_POST['spellcooldown_3']);3163 if (isset($_POST['spellcooldown_3']) && $_POST['spellcooldown_3'] != '') $spellcooldown_3 = $sql->quote_smart($_POST['spellcooldown_3']); 3166 3164 else $spellcooldown_3 = -1; 3167 if (isset($_POST['spellcategory_3']) && $_POST['spellcategory_3'] != '') $spellcategory_3 = $ mysql->quote_smart($_POST['spellcategory_3']);3165 if (isset($_POST['spellcategory_3']) && $_POST['spellcategory_3'] != '') $spellcategory_3 = $sql->quote_smart($_POST['spellcategory_3']); 3168 3166 else $description = 0; 3169 if (isset($_POST['spellcategorycooldown_3']) && $_POST['spellcategorycooldown_3'] != '') $spellcategorycooldown_3 = $ mysql->quote_smart($_POST['spellcategorycooldown_3']);3167 if (isset($_POST['spellcategorycooldown_3']) && $_POST['spellcategorycooldown_3'] != '') $spellcategorycooldown_3 = $sql->quote_smart($_POST['spellcategorycooldown_3']); 3170 3168 else $spellcategorycooldown_3 = -1; 3171 if (isset($_POST['spellid_4']) && $_POST['spellid_4'] != '') $spellid_4 = $ mysql->quote_smart($_POST['spellid_4']);3169 if (isset($_POST['spellid_4']) && $_POST['spellid_4'] != '') $spellid_4 = $sql->quote_smart($_POST['spellid_4']); 3172 3170 else $spellid_4 = 0; 3173 if (isset($_POST['spelltrigger_4']) && $_POST['spelltrigger_4'] != '') $spelltrigger_4 = $ mysql->quote_smart($_POST['spelltrigger_4']);3171 if (isset($_POST['spelltrigger_4']) && $_POST['spelltrigger_4'] != '') $spelltrigger_4 = $sql->quote_smart($_POST['spelltrigger_4']); 3174 3172 else $spelltrigger_4 = 0; 3175 if (isset($_POST['spellcharges_4']) && $_POST['spellcharges_4'] != '') $spellcharges_4 = $ mysql->quote_smart($_POST['spellcharges_4']);3173 if (isset($_POST['spellcharges_4']) && $_POST['spellcharges_4'] != '') $spellcharges_4 = $sql->quote_smart($_POST['spellcharges_4']); 3176 3174 else $spellcharges_4 = 0; 3177 if (isset($_POST['spellcooldown_4']) && $_POST['spellcooldown_4'] != '') $spellcooldown_4 = $ mysql->quote_smart($_POST['spellcooldown_4']);3175 if (isset($_POST['spellcooldown_4']) && $_POST['spellcooldown_4'] != '') $spellcooldown_4 = $sql->quote_smart($_POST['spellcooldown_4']); 3178 3176 else $spellcooldown_4 = -1; 3179 if (isset($_POST['spellcategory_4']) && $_POST['spellcategory_4'] != '') $spellcategory_4 = $ mysql->quote_smart($_POST['spellcategory_4']);3177 if (isset($_POST['spellcategory_4']) && $_POST['spellcategory_4'] != '') $spellcategory_4 = $sql->quote_smart($_POST['spellcategory_4']); 3180 3178 else $spellcategory_4 = 0; 3181 if (isset($_POST['spellcategorycooldown_4']) && $_POST['spellcategorycooldown_4'] != '') $spellcategorycooldown_4 = $ mysql->quote_smart($_POST['spellcategorycooldown_4']);3179 if (isset($_POST['spellcategorycooldown_4']) && $_POST['spellcategorycooldown_4'] != '') $spellcategorycooldown_4 = $sql->quote_smart($_POST['spellcategorycooldown_4']); 3182 3180 else $spellcategorycooldown_4 = -1; 3183 if (isset($_POST['spellid_5']) && $_POST['spellid_5'] != '') $spellid_5 = $ mysql->quote_smart($_POST['spellid_5']);3181 if (isset($_POST['spellid_5']) && $_POST['spellid_5'] != '') $spellid_5 = $sql->quote_smart($_POST['spellid_5']); 3184 3182 else $spellid_5 = 0; 3185 if (isset($_POST['spelltrigger_5']) && $_POST['spelltrigger_5'] != '') $spelltrigger_5 = $ mysql->quote_smart($_POST['spelltrigger_5']);3183 if (isset($_POST['spelltrigger_5']) && $_POST['spelltrigger_5'] != '') $spelltrigger_5 = $sql->quote_smart($_POST['spelltrigger_5']); 3186 3184 else $spelltrigger_5 = 0; 3187 if (isset($_POST['spellcharges_5']) && $_POST['spellcharges_5'] != '') $spellcharges_5 = $ mysql->quote_smart($_POST['spellcharges_5']);3185 if (isset($_POST['spellcharges_5']) && $_POST['spellcharges_5'] != '') $spellcharges_5 = $sql->quote_smart($_POST['spellcharges_5']); 3188 3186 else $spellcharges_5 = 0; 3189 if (isset($_POST['spellcooldown_5']) && $_POST['spellcooldown_5'] != '') $spellcooldown_5 = $ mysql->quote_smart($_POST['spellcooldown_5']);3187 if (isset($_POST['spellcooldown_5']) && $_POST['spellcooldown_5'] != '') $spellcooldown_5 = $sql->quote_smart($_POST['spellcooldown_5']); 3190 3188 else $spellcooldown_5 = -1; 3191 if (isset($_POST['spellcategory_5']) && $_POST['spellcategory_5'] != '') $spellcategory_5 = $ mysql->quote_smart($_POST['spellcategory_5']);3189 if (isset($_POST['spellcategory_5']) && $_POST['spellcategory_5'] != '') $spellcategory_5 = $sql->quote_smart($_POST['spellcategory_5']); 3192 3190 else $spellcategory_5 = 0; 3193 if (isset($_POST['spellcategorycooldown_5']) && $_POST['spellcategorycooldown_5'] != '') $spellcategorycooldown_5 = $ mysql->quote_smart($_POST['spellcategorycooldown_5']);3191 if (isset($_POST['spellcategorycooldown_5']) && $_POST['spellcategorycooldown_5'] != '') $spellcategorycooldown_5 = $sql->quote_smart($_POST['spellcategorycooldown_5']); 3194 3192 else $spellcategorycooldown_5 = -1; 3195 if (isset($_POST['bonding']) && $_POST['bonding'] != '') $bonding = $ mysql->quote_smart($_POST['bonding']);3193 if (isset($_POST['bonding']) && $_POST['bonding'] != '') $bonding = $sql->quote_smart($_POST['bonding']); 3196 3194 else $bonding = 0; 3197 if (isset($_POST['description']) && $_POST['description'] != '') $description = $ mysql->quote_smart($_POST['description']);3195 if (isset($_POST['description']) && $_POST['description'] != '') $description = $sql->quote_smart($_POST['description']); 3198 3196 else $description = ""; 3199 if (isset($_POST['PageText']) && $_POST['PageText'] != '') $PageText = $ mysql->quote_smart($_POST['PageText']);3197 if (isset($_POST['PageText']) && $_POST['PageText'] != '') $PageText = $sql->quote_smart($_POST['PageText']); 3200 3198 else $PageText = 0; 3201 if (isset($_POST['LanguageID']) && $_POST['LanguageID'] != '') $LanguageID = $ mysql->quote_smart($_POST['LanguageID']);3199 if (isset($_POST['LanguageID']) && $_POST['LanguageID'] != '') $LanguageID = $sql->quote_smart($_POST['LanguageID']); 3202 3200 else $LanguageID = 0; 3203 if (isset($_POST['PageMaterial']) && $_POST['PageMaterial'] != '') $PageMaterial = $ mysql->quote_smart($_POST['PageMaterial']);3201 if (isset($_POST['PageMaterial']) && $_POST['PageMaterial'] != '') $PageMaterial = $sql->quote_smart($_POST['PageMaterial']); 3204 3202 else $PageMaterial = 0; 3205 if (isset($_POST['startquest']) && $_POST['startquest'] != '') $startquest = $ mysql->quote_smart($_POST['startquest']);3203 if (isset($_POST['startquest']) && $_POST['startquest'] != '') $startquest = $sql->quote_smart($_POST['startquest']); 3206 3204 else $startquest = 0; 3207 if (isset($_POST['lockid']) && $_POST['lockid'] != '') $lockid = $ mysql->quote_smart($_POST['lockid']);3205 if (isset($_POST['lockid']) && $_POST['lockid'] != '') $lockid = $sql->quote_smart($_POST['lockid']); 3208 3206 else $lockid = 0; 3209 if (isset($_POST['Material']) && $_POST['Material'] != '') $Material = $ mysql->quote_smart($_POST['Material']);3207 if (isset($_POST['Material']) && $_POST['Material'] != '') $Material = $sql->quote_smart($_POST['Material']); 3210 3208 else $Material = 0; 3211 if (isset($_POST['sheath']) && $_POST['sheath'] != '') $sheath = $ mysql->quote_smart($_POST['sheath']);3209 if (isset($_POST['sheath']) && $_POST['sheath'] != '') $sheath = $sql->quote_smart($_POST['sheath']); 3212 3210 else $sheath = 0; 3213 if (isset($_POST['RandomProperty']) && $_POST['RandomProperty'] != '') $RandomProperty = $ mysql->quote_smart($_POST['RandomProperty']);3211 if (isset($_POST['RandomProperty']) && $_POST['RandomProperty'] != '') $RandomProperty = $sql->quote_smart($_POST['RandomProperty']); 3214 3212 else $RandomProperty = 0; 3215 if (isset($_POST['block ']) && $_POST['block '] != '') $block = $ mysql->quote_smart($_POST['block']);3213 if (isset($_POST['block ']) && $_POST['block '] != '') $block = $sql->quote_smart($_POST['block']); 3216 3214 else $block = 0; 3217 if (isset($_POST['itemset']) && $_POST['itemset'] != '') $itemset = $ mysql->quote_smart($_POST['itemset']);3215 if (isset($_POST['itemset']) && $_POST['itemset'] != '') $itemset = $sql->quote_smart($_POST['itemset']); 3218 3216 else $itemset = 0; 3219 if (isset($_POST['MaxDurability']) && $_POST['MaxDurability'] != '') $MaxDurability = $ mysql->quote_smart($_POST['MaxDurability']);3217 if (isset($_POST['MaxDurability']) && $_POST['MaxDurability'] != '') $MaxDurability = $sql->quote_smart($_POST['MaxDurability']); 3220 3218 else $MaxDurability = 0; 3221 if (isset($_POST['area']) && $_POST['area'] != '') $area = $ mysql->quote_smart($_POST['area']);3219 if (isset($_POST['area']) && $_POST['area'] != '') $area = $sql->quote_smart($_POST['area']); 3222 3220 else $area = 0; 3223 if (isset($_POST['BagFamily']) && $_POST['BagFamily'] != '') $BagFamily = $ mysql->quote_smart($_POST['BagFamily']);3221 if (isset($_POST['BagFamily']) && $_POST['BagFamily'] != '') $BagFamily = $sql->quote_smart($_POST['BagFamily']); 3224 3222 else $BagFamily = 0; 3225 if (isset($_POST['Map']) && $_POST['Map'] != '') $Map = $ mysql->quote_smart($_POST['Map']);3223 if (isset($_POST['Map']) && $_POST['Map'] != '') $Map = $sql->quote_smart($_POST['Map']); 3226 3224 else $Map = 0; 3227 if (isset($_POST['ScriptName']) && $_POST['ScriptName'] != '') $ScriptName = $ mysql->quote_smart($_POST['ScriptName']);3225 if (isset($_POST['ScriptName']) && $_POST['ScriptName'] != '') $ScriptName = $sql->quote_smart($_POST['ScriptName']); 3228 3226 else $ScriptName = 0; 3229 if (isset($_POST['DisenchantID']) && $_POST['DisenchantID'] != '') $DisenchantID = $ mysql->quote_smart($_POST['DisenchantID']);3227 if (isset($_POST['DisenchantID']) && $_POST['DisenchantID'] != '') $DisenchantID = $sql->quote_smart($_POST['DisenchantID']); 3230 3228 else $DisenchantID = 0; 3231 if (isset($_POST['RequiredDisenchantSkill']) && $_POST['RequiredDisenchantSkill'] != '') $RequiredDisenchantSkill = $ mysql->quote_smart($_POST['RequiredDisenchantSkill']);3229 if (isset($_POST['RequiredDisenchantSkill']) && $_POST['RequiredDisenchantSkill'] != '') $RequiredDisenchantSkill = $sql->quote_smart($_POST['RequiredDisenchantSkill']); 3232 3230 else $RequiredDisenchantSkill = -1; 3233 if (isset($_POST['unk0']) && $_POST['unk0'] != '') $unk0 = $ mysql->quote_smart($_POST['unk0']);3231 if (isset($_POST['unk0']) && $_POST['unk0'] != '') $unk0 = $sql->quote_smart($_POST['unk0']); 3234 3232 else $unk0 = -1; 3235 if (isset($_POST['RandomSuffix']) && $_POST['RandomSuffix'] != '') $RandomSuffix = $ mysql->quote_smart($_POST['RandomSuffix']);3233 if (isset($_POST['RandomSuffix']) && $_POST['RandomSuffix'] != '') $RandomSuffix = $sql->quote_smart($_POST['RandomSuffix']); 3236 3234 else $RandomSuffix = 0; 3237 if (isset($_POST['TotemCategory']) && $_POST['TotemCategory'] != '') $TotemCategory = $ mysql->quote_smart($_POST['TotemCategory']);3235 if (isset($_POST['TotemCategory']) && $_POST['TotemCategory'] != '') $TotemCategory = $sql->quote_smart($_POST['TotemCategory']); 3238 3236 else $TotemCategory = 0; 3239 if (isset($_POST['socketColor_1']) && $_POST['socketColor_1'] != '') $socketColor_1 = $ mysql->quote_smart($_POST['socketColor_1']);3237 if (isset($_POST['socketColor_1']) && $_POST['socketColor_1'] != '') $socketColor_1 = $sql->quote_smart($_POST['socketColor_1']); 3240 3238 else $socketColor_1 = 0; 3241 if (isset($_POST['socketContent_1']) && $_POST['socketContent_1'] != '') $socketContent_1 = $ mysql->quote_smart($_POST['socketContent_1']);3239 if (isset($_POST['socketContent_1']) && $_POST['socketContent_1'] != '') $socketContent_1 = $sql->quote_smart($_POST['socketContent_1']); 3242 3240 else $socketContent_1 = 0; 3243 if (isset($_POST['socketColor_2']) && $_POST['socketColor_2'] != '') $socketColor_2 = $ mysql->quote_smart($_POST['socketColor_2']);3241 if (isset($_POST['socketColor_2']) && $_POST['socketColor_2'] != '') $socketColor_2 = $sql->quote_smart($_POST['socketColor_2']); 3244 3242 else $socketColor_2 = 0; 3245 if (isset($_POST['socketContent_2']) && $_POST['socketContent_2'] != '') $socketContent_2 = $ mysql->quote_smart($_POST['socketContent_2']);3243 if (isset($_POST['socketContent_2']) && $_POST['socketContent_2'] != '') $socketContent_2 = $sql->quote_smart($_POST['socketContent_2']); 3246 3244 else $socketContent_2 = 0; 3247 if (isset($_POST['socketColor_3']) && $_POST['socketColor_3'] != '') $socketColor_3 = $ mysql->quote_smart($_POST['socketColor_3']);3245 if (isset($_POST['socketColor_3']) && $_POST['socketColor_3'] != '') $socketColor_3 = $sql->quote_smart($_POST['socketColor_3']); 3248 3246 else $socketColor_3 = 0; 3249 if (isset($_POST['socketContent_3']) && $_POST['socketContent_3'] != '') $socketContent_3 = $ mysql->quote_smart($_POST['socketContent_3']);3247 if (isset($_POST['socketContent_3']) && $_POST['socketContent_3'] != '') $socketContent_3 = $sql->quote_smart($_POST['socketContent_3']); 3250 3248 else $socketContent_3 = 0; 3251 if (isset($_POST['socketBonus']) && $_POST['socketBonus'] != '') $socketBonus = $ mysql->quote_smart($_POST['socketBonus']);3249 if (isset($_POST['socketBonus']) && $_POST['socketBonus'] != '') $socketBonus = $sql->quote_smart($_POST['socketBonus']); 3252 3250 else $socketBonus = 0; 3253 if (isset($_POST['GemProperties']) && $_POST['GemProperties'] != '') $GemProperties = $ mysql->quote_smart($_POST['GemProperties']);3251 if (isset($_POST['GemProperties']) && $_POST['GemProperties'] != '') $GemProperties = $sql->quote_smart($_POST['GemProperties']); 3254 3252 else $GemProperties = 0; 3255 if (isset($_POST['ExtendedCost']) && $_POST['ExtendedCost'] != '') $ExtendedCost = $ mysql->quote_smart($_POST['ExtendedCost']);3253 if (isset($_POST['ExtendedCost']) && $_POST['ExtendedCost'] != '') $ExtendedCost = $sql->quote_smart($_POST['ExtendedCost']); 3256 3254 else $ExtendedCost = 0; 3257 if (isset($_POST['ArmorDamageModifier']) && $_POST['ArmorDamageModifier'] != '') $ArmorDamageModifier = $ mysql->quote_smart($_POST['ArmorDamageModifier']);3255 if (isset($_POST['ArmorDamageModifier']) && $_POST['ArmorDamageModifier'] != '') $ArmorDamageModifier = $sql->quote_smart($_POST['ArmorDamageModifier']); 3258 3256 else $ArmorDamageModifier = 0; 3259 3257 3260 if (isset($_POST['de_ChanceOrRef']) && $_POST['de_ChanceOrRef'] != '') $de_ChanceOrRef = $ mysql->quote_smart($_POST['de_ChanceOrRef']);3258 if (isset($_POST['de_ChanceOrRef']) && $_POST['de_ChanceOrRef'] != '') $de_ChanceOrRef = $sql->quote_smart($_POST['de_ChanceOrRef']); 3261 3259 else $de_ChanceOrRef = 0; 3262 if (isset($_POST['de_QuestChanceOrGroup']) && $_POST['de_QuestChanceOrGroup'] != '') $de_QuestChanceOrGroup = $ mysql->quote_smart($_POST['de_QuestChanceOrGroup']);3260 if (isset($_POST['de_QuestChanceOrGroup']) && $_POST['de_QuestChanceOrGroup'] != '') $de_QuestChanceOrGroup = $sql->quote_smart($_POST['de_QuestChanceOrGroup']); 3263 3261 else $de_QuestChanceOrGroup = 0; 3264 if (isset($_POST['de_mincount']) && $_POST['de_mincount'] != '') $de_mincount = $ mysql->quote_smart($_POST['de_mincount']);3262 if (isset($_POST['de_mincount']) && $_POST['de_mincount'] != '') $de_mincount = $sql->quote_smart($_POST['de_mincount']); 3265 3263 else $de_mincount = 0; 3266 if (isset($_POST['de_maxcount']) && $_POST['de_maxcount'] != '') $de_maxcount = $ mysql->quote_smart($_POST['de_maxcount']);3264 if (isset($_POST['de_maxcount']) && $_POST['de_maxcount'] != '') $de_maxcount = $sql->quote_smart($_POST['de_maxcount']); 3267 3265 else $de_maxcount = 0; 3268 if (isset($_POST['de_quest_freeforall']) && $_POST['de_quest_freeforall'] != '') $de_quest_freeforall = $ mysql->quote_smart($_POST['de_quest_freeforall']);3266 if (isset($_POST['de_quest_freeforall']) && $_POST['de_quest_freeforall'] != '') $de_quest_freeforall = $sql->quote_smart($_POST['de_quest_freeforall']); 3269 3267 else $de_quest_freeforall = 0; 3270 if (isset($_POST['de_item']) && $_POST['de_item'] != '') $de_item = $ mysql->quote_smart($_POST['de_item']);3268 if (isset($_POST['de_item']) && $_POST['de_item'] != '') $de_item = $sql->quote_smart($_POST['de_item']); 3271 3269 else $de_item = 0; 3272 if (isset($_POST['del_de_items']) && $_POST['del_de_items'] != '') $del_de_items = $ mysql->quote_smart($_POST['del_de_items']);3270 if (isset($_POST['del_de_items']) && $_POST['del_de_items'] != '') $del_de_items = $sql->quote_smart($_POST['del_de_items']); 3273 3271 else $del_de_items = NULL; 3274 3272 … … 3312 3310 3313 3311 if ($_POST['type'] == "add_new"){ 3314 $sql = "INSERT INTO item_template (entry, class, subclass, name, name2, name3, name4,displayid, Quality, Flags, BuyCount, BuyPrice, SellPrice, InventoryType, AllowableClass, AllowableRace, ItemLevel,3312 $sql_query = "INSERT INTO item_template (entry, class, subclass, name,displayid, Quality, Flags, BuyCount, BuyPrice, SellPrice, InventoryType, AllowableClass, AllowableRace, ItemLevel, 3315 3313 RequiredLevel, RequiredSkill, RequiredSkillRank, requiredspell, requiredhonorrank, RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, maxcount, stackable, ContainerSlots, stat_type1, 3316 3314 stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, … … 3321 3319 bonding, description, PageText, LanguageID, PageMaterial, startquest, lockid, Material, sheath, RandomProperty, block, itemset, MaxDurability, area, BagFamily, Map, ScriptName, DisenchantID,RequiredDisenchantSkill, 3322 3320 ArmorDamageModifier,unk0,RandomSuffix,TotemCategory, socketColor_1, socketContent_1, socketColor_2, socketContent_2, socketColor_3, socketContent_3, socketBonus, GemProperties, ExtendedCost) 3323 VALUES ('$entry', '$class', '$subclass', '$name', '$name2', '$name3', '$name4','$displayid', '$Quality', '$Flags', '$BuyCount', '$BuyPrice', '$SellPrice', '$InventoryType', '$AllowableClass', '$AllowableRace', '$ItemLevel', '$RequiredLevel',3321 VALUES ('$entry', '$class', '$subclass', '$name','$displayid', '$Quality', '$Flags', '$BuyCount', '$BuyPrice', '$SellPrice', '$InventoryType', '$AllowableClass', '$AllowableRace', '$ItemLevel', '$RequiredLevel', 3324 3322 '$RequiredSkill', '$RequiredSkillRank', '$requiredspell', '$requiredhonorrank', '$RequiredCityRank', '$RequiredReputationFaction', '$RequiredReputationRank', '$maxcount', '$stackable', '$ContainerSlots', '$stat_type1', 3325 3323 '$stat_value1', '$stat_type2', '$stat_value2', '$stat_type3', '$stat_value3', '$stat_type4', '$stat_value4', '$stat_type5', '$stat_value5', '$stat_type6', '$stat_value6', '$stat_type7', '$stat_value7', '$stat_type8', '$stat_value8', … … 3334 3332 } elseif ($_POST['type'] == "edit"){ 3335 3333 3336 $sql = "UPDATE item_template SET ";3337 3338 $result = $ mysql->query("SELECT * FROM item_template WHERE entry = '$entry'");3339 if ($item_templ = $ mysql->fetch_assoc($result)){3340 3341 if ($item_templ['class'] != $class) $sql .= "class='$class',";3342 if ($item_templ['subclass'] != $subclass) $sql .= "subclass='$subclass',";3343 if ($item_templ['name'] != $name) $sql .= "name='$name',";3344 if ($item_templ['displayid'] != $displayid) $sql .= "displayid='$displayid',";3345 if ($item_templ['Quality'] != $Quality) $sql .= "Quality='$Quality',";3346 if ($item_templ['Flags'] != $Flags) $sql .= "Flags='$Flags',";3347 if ($item_templ['BuyCount'] != $BuyCount) $sql .= "BuyCount='$BuyCount',";3348 if ($item_templ['BuyPrice'] != $BuyPrice) $sql .= "BuyPrice='$BuyPrice',";3349 if ($item_templ['SellPrice'] != $SellPrice) $sql .= "SellPrice='$SellPrice',";3350 if ($item_templ['InventoryType'] != $InventoryType) $sql .= "InventoryType='$InventoryType',";3351 if ($item_templ['AllowableClass'] != $AllowableClass) $sql .= "AllowableClass='$AllowableClass',";3352 if ($item_templ['AllowableRace'] != $AllowableRace) $sql .= "AllowableRace='$AllowableRace',";3353 if ($item_templ['ItemLevel'] != $ItemLevel) $sql .= "ItemLevel='$ItemLevel',";3354 if ($item_templ['RequiredLevel'] != $RequiredLevel) $sql .= "RequiredLevel='$RequiredLevel',";3355 if ($item_templ['RequiredSkill'] != $RequiredSkill) $sql .= "RequiredSkill='$RequiredSkill',";3356 if ($item_templ['RequiredSkillRank'] != $RequiredSkillRank) $sql .= "RequiredSkillRank='$RequiredSkillRank',";3357 if ($item_templ['requiredspell'] != $requiredspell) $sql .= "requiredspell='$requiredspell',";3358 if ($item_templ['requiredhonorrank'] != $requiredhonorrank) $sql .= "requiredhonorrank='$requiredhonorrank',";3359 if ($item_templ['RequiredCityRank'] != $RequiredCityRank) $sql .= "RequiredCityRank='$RequiredCityRank',";3360 if ($item_templ['RequiredReputationFaction'] != $RequiredReputationFaction) $sql .= "RequiredReputationFaction='$RequiredReputationFaction',";3361 if ($item_templ['RequiredReputationRank'] != $RequiredReputationRank) $sql .= "RequiredReputationRank='$RequiredReputationRank',";3362 if ($item_templ['maxcount'] != $maxcount) $sql .= "maxcount='$maxcount',";3363 if ($item_templ['stackable'] != $stackable) $sql .= "stackable='$stackable',";3364 if ($item_templ['ContainerSlots'] != $ContainerSlots) $sql .= "ContainerSlots='$ContainerSlots',";3365 if ($item_templ['stat_type1'] != $stat_type1) $sql .= "stat_type1='$stat_type1',";3366 if ($item_templ['stat_value1'] != $stat_value1) $sql .= "stat_value1='$stat_value1',";3367 if ($item_templ['stat_type2'] != $stat_type2) $sql .= "stat_type2='$stat_type2',";3368 if ($item_templ['stat_value2'] != $stat_value2) $sql .= "stat_value2='$stat_value2',";3369 if ($item_templ['stat_type3'] != $stat_type3) $sql .= "stat_type3='$stat_type3',";3370 if ($item_templ['stat_value3'] != $stat_value3) $sql .= "stat_value3='$stat_value3',";3371 if ($item_templ['stat_type4'] != $stat_type4) $sql .= "stat_type4='$stat_type4',";3372 if ($item_templ['stat_value4'] != $stat_value4) $sql .= "stat_value4='$stat_value4',";3373 if ($item_templ['stat_type5'] != $stat_type5) $sql .= "stat_type5='$stat_type5',";3374 if ($item_templ['stat_value5'] != $stat_value5) $sql .= "stat_value5='$stat_value5',";3375 if ($item_templ['stat_type6'] != $stat_type6) $sql .= "stat_type6='$stat_type6',";3376 if ($item_templ['stat_value6'] != $stat_value6) $sql .= "stat_value6='$stat_value6',";3377 if ($item_templ['stat_type7'] != $stat_type7) $sql .= "stat_type7='$stat_type7',";3378 if ($item_templ['stat_value7'] != $stat_value7) $sql .= "stat_value7='$stat_value7',";3379 if ($item_templ['stat_type8'] != $stat_type8) $sql .= "stat_type8='$stat_type8',";3380 if ($item_templ['stat_value8'] != $stat_value8) $sql .= "stat_value8='$stat_value8',";3381 if ($item_templ['stat_type9'] != $stat_type9) $sql .= "stat_type9='$stat_type9',";3382 if ($item_templ['stat_value9'] != $stat_value9) $sql .= "stat_value9='$stat_value9',";3383 if ($item_templ['stat_type10'] != $stat_type10) $sql .= "stat_type10='$stat_type10',";3384 if ($item_templ['stat_value10'] != $stat_value10) $sql .= "stat_value10='$stat_value10',";3385 if ($item_templ['dmg_min1'] != $dmg_min1) $sql .= "dmg_min1='$dmg_min1',";3386 if ($item_templ['dmg_max1'] != $dmg_max1) $sql .= "dmg_max1='$dmg_max1',";3387 if ($item_templ['dmg_type1'] != $dmg_type1) $sql .= "dmg_type1='$dmg_type1',";3388 if ($item_templ['dmg_min2'] != $dmg_min2) $sql .= "dmg_min2='$dmg_min2',";3389 if ($item_templ['dmg_max2'] != $dmg_max2) $sql .= "dmg_max2='$dmg_max2',";3390 if ($item_templ['dmg_type2'] != $dmg_type2) $sql .= "dmg_type2='$dmg_type2',";3391 if ($item_templ['dmg_min3'] != $dmg_min3) $sql .= "dmg_min3='$dmg_min3',";3392 if ($item_templ['dmg_max3'] != $dmg_max3) $sql .= "dmg_max3='$dmg_max3',";3393 if ($item_templ['dmg_type3'] != $dmg_type3) $sql .= "dmg_type3='$dmg_type3',";3394 if ($item_templ['dmg_min4'] != $dmg_min4) $sql .= "dmg_min4='$dmg_min4',";3395 if ($item_templ['dmg_max4'] != $dmg_max4) $sql .= "dmg_max4='$dmg_max4',";3396 if ($item_templ['dmg_type4'] != $dmg_type4) $sql .= "dmg_type4='$dmg_type4',";3397 if ($item_templ['dmg_min5'] != $dmg_min5) $sql .= "dmg_min5='$dmg_min5',";3398 if ($item_templ['dmg_max5'] != $dmg_max5) $sql .= "dmg_max5='$dmg_max5',";3399 if ($item_templ['dmg_type5'] != $dmg_type5) $sql .= "dmg_type5='$dmg_type5',";3400 if ($item_templ['armor'] != $armor) $sql .= "armor='$armor',";3401 if ($item_templ['holy_res'] != $holy_res) $sql .= "holy_res='$holy_res',";3402 if ($item_templ['fire_res'] != $fire_res) $sql .= "fire_res='$fire_res',";3403 if ($item_templ['nature_res'] != $nature_res) $sql .= "nature_res='$nature_res',";3404 if ($item_templ['frost_res'] != $frost_res) $sql .= "frost_res='$frost_res',";3405 if ($item_templ['shadow_res'] != $shadow_res) $sql .= "shadow_res='$shadow_res',";3406 if ($item_templ['arcane_res'] != $arcane_res) $sql .= "arcane_res='$arcane_res',";3407 if ($item_templ['delay'] != $delay) $sql .= "delay='$delay',";3408 if ($item_templ['ammo_type'] != $ammo_type) $sql .= "ammo_type='$ammo_type',";3409 if ($item_templ['RangedModRange'] != $RangedModRange) $sql .= "RangedModRange='$RangedModRange',";3410 if ($item_templ['spellid_1'] != $spellid_1) $sql .= "spellid_1='$spellid_1',";3411 if ($item_templ['spelltrigger_1'] != $spelltrigger_1) $sql .= "spelltrigger_1='$spelltrigger_1',";3412 if ($item_templ['spellcharges_1'] != $spellcharges_1) $sql .= "spellcharges_1='$spellcharges_1',";3413 if ($item_templ['spellcooldown_1'] != $spellcooldown_1) $sql .= "spellcooldown_1='$spellcooldown_1',";3414 if ($item_templ['spellcategory_1'] != $spellcategory_1) $sql .= "spellcategory_1='$spellcategory_1',";3415 if ($item_templ['spellcategorycooldown_1'] != $spellcategorycooldown_1) $sql .= "spellcategorycooldown_1='$spellcategorycooldown_1',";3416 if ($item_templ['spellid_2'] != $spellid_2) $sql .= "spellid_2='$spellid_2',";3417 if ($item_templ['spelltrigger_2'] != $spelltrigger_2) $sql .= "spelltrigger_2='$spelltrigger_2',";3418 if ($item_templ['spellcharges_2'] != $spellcharges_2) $sql .= "spellcharges_2='$spellcharges_2',";3419 if ($item_templ['spellcooldown_2'] != $spellcooldown_2) $sql .= "spellcooldown_2='$spellcooldown_2',";3420 if ($item_templ['spellcategory_2'] != $spellcategory_2) $sql .= "spellcategory_2='$spellcategory_2',";3421 if ($item_templ['spellcategorycooldown_2'] != $spellcategorycooldown_2) $sql .= "spellcategorycooldown_2='$spellcategorycooldown_2',";3422 if ($item_templ['spellid_3'] != $spellid_3) $sql .= "spellid_3='$spellid_3',";3423 if ($item_templ['spelltrigger_3'] != $spelltrigger_3) $sql .= "spelltrigger_3='$spelltrigger_3',";3424 if ($item_templ['spellcharges_3'] != $spellcharges_3) $sql .= "spellcharges_3='$spellcharges_3',";3425 if ($item_templ['spellcooldown_3'] != $spellcooldown_3) $sql .= "spellcooldown_3='$spellcooldown_3',";3426 if ($item_templ['spellcategory_3'] != $spellcategory_3) $sql .= "spellcategory_3='$spellcategory_3',";3427 if ($item_templ['spellcategorycooldown_3'] != $spellcategorycooldown_3) $sql .= "spellcategorycooldown_3='$spellcategorycooldown_3',";3334 $sql_query = "UPDATE item_template SET "; 3335 3336 $result = $sql->query("SELECT * FROM item_template WHERE entry = '$entry'"); 3337 if ($item_templ = $sql->fetch_assoc($result)){ 3338 3339 if ($item_templ['class'] != $class) $sql_query .= "class='$class',"; 3340 if ($item_templ['subclass'] != $subclass) $sql_query .= "subclass='$subclass',"; 3341 if ($item_templ['name'] != $name) $sql_query .= "name='$name',"; 3342 if ($item_templ['displayid'] != $displayid) $sql_query .= "displayid='$displayid',"; 3343 if ($item_templ['Quality'] != $Quality) $sql_query .= "Quality='$Quality',"; 3344 if ($item_templ['Flags'] != $Flags) $sql_query .= "Flags='$Flags',"; 3345 if ($item_templ['BuyCount'] != $BuyCount) $sql_query .= "BuyCount='$BuyCount',"; 3346 if ($item_templ['BuyPrice'] != $BuyPrice) $sql_query .= "BuyPrice='$BuyPrice',"; 3347 if ($item_templ['SellPrice'] != $SellPrice) $sql_query .= "SellPrice='$SellPrice',"; 3348 if ($item_templ['InventoryType'] != $InventoryType) $sql_query .= "InventoryType='$InventoryType',"; 3349 if ($item_templ['AllowableClass'] != $AllowableClass) $sql_query .= "AllowableClass='$AllowableClass',"; 3350 if ($item_templ['AllowableRace'] != $AllowableRace) $sql_query .= "AllowableRace='$AllowableRace',"; 3351 if ($item_templ['ItemLevel'] != $ItemLevel) $sql_query .= "ItemLevel='$ItemLevel',"; 3352 if ($item_templ['RequiredLevel'] != $RequiredLevel) $sql_query .= "RequiredLevel='$RequiredLevel',"; 3353 if ($item_templ['RequiredSkill'] != $RequiredSkill) $sql_query .= "RequiredSkill='$RequiredSkill',"; 3354 if ($item_templ['RequiredSkillRank'] != $RequiredSkillRank) $sql_query .= "RequiredSkillRank='$RequiredSkillRank',"; 3355 if ($item_templ['requiredspell'] != $requiredspell) $sql_query .= "requiredspell='$requiredspell',"; 3356 if ($item_templ['requiredhonorrank'] != $requiredhonorrank) $sql_query .= "requiredhonorrank='$requiredhonorrank',"; 3357 if ($item_templ['RequiredCityRank'] != $RequiredCityRank) $sql_query .= "RequiredCityRank='$RequiredCityRank',"; 3358 if ($item_templ['RequiredReputationFaction'] != $RequiredReputationFaction) $sql_query .= "RequiredReputationFaction='$RequiredReputationFaction',"; 3359 if ($item_templ['RequiredReputationRank'] != $RequiredReputationRank) $sql_query .= "RequiredReputationRank='$RequiredReputationRank',"; 3360 if ($item_templ['maxcount'] != $maxcount) $sql_query .= "maxcount='$maxcount',"; 3361 if ($item_templ['stackable'] != $stackable) $sql_query .= "stackable='$stackable',"; 3362 if ($item_templ['ContainerSlots'] != $ContainerSlots) $sql_query .= "ContainerSlots='$ContainerSlots',"; 3363 if ($item_templ['stat_type1'] != $stat_type1) $sql_query .= "stat_type1='$stat_type1',"; 3364 if ($item_templ['stat_value1'] != $stat_value1) $sql_query .= "stat_value1='$stat_value1',"; 3365 if ($item_templ['stat_type2'] != $stat_type2) $sql_query .= "stat_type2='$stat_type2',"; 3366 if ($item_templ['stat_value2'] != $stat_value2) $sql_query .= "stat_value2='$stat_value2',"; 3367 if ($item_templ['stat_type3'] != $stat_type3) $sql_query .= "stat_type3='$stat_type3',"; 3368 if ($item_templ['stat_value3'] != $stat_value3) $sql_query .= "stat_value3='$stat_value3',"; 3369 if ($item_templ['stat_type4'] != $stat_type4) $sql_query .= "stat_type4='$stat_type4',"; 3370 if ($item_templ['stat_value4'] != $stat_value4) $sql_query .= "stat_value4='$stat_value4',"; 3371 if ($item_templ['stat_type5'] != $stat_type5) $sql_query .= "stat_type5='$stat_type5',"; 3372 if ($item_templ['stat_value5'] != $stat_value5) $sql_query .= "stat_value5='$stat_value5',"; 3373 if ($item_templ['stat_type6'] != $stat_type6) $sql_query .= "stat_type6='$stat_type6',"; 3374 if ($item_templ['stat_value6'] != $stat_value6) $sql_query .= "stat_value6='$stat_value6',"; 3375 if ($item_templ['stat_type7'] != $stat_type7) $sql_query .= "stat_type7='$stat_type7',"; 3376 if ($item_templ['stat_value7'] != $stat_value7) $sql_query .= "stat_value7='$stat_value7',"; 3377 if ($item_templ['stat_type8'] != $stat_type8) $sql_query .= "stat_type8='$stat_type8',"; 3378 if ($item_templ['stat_value8'] != $stat_value8) $sql_query .= "stat_value8='$stat_value8',"; 3379 if ($item_templ['stat_type9'] != $stat_type9) $sql_query .= "stat_type9='$stat_type9',"; 3380 if ($item_templ['stat_value9'] != $stat_value9) $sql_query .= "stat_value9='$stat_value9',"; 3381 if ($item_templ['stat_type10'] != $stat_type10) $sql_query .= "stat_type10='$stat_type10',"; 3382 if ($item_templ['stat_value10'] != $stat_value10) $sql_query .= "stat_value10='$stat_value10',"; 3383 if ($item_templ['dmg_min1'] != $dmg_min1) $sql_query .= "dmg_min1='$dmg_min1',"; 3384 if ($item_templ['dmg_max1'] != $dmg_max1) $sql_query .= "dmg_max1='$dmg_max1',"; 3385 if ($item_templ['dmg_type1'] != $dmg_type1) $sql_query .= "dmg_type1='$dmg_type1',"; 3386 if ($item_templ['dmg_min2'] != $dmg_min2) $sql_query .= "dmg_min2='$dmg_min2',"; 3387 if ($item_templ['dmg_max2'] != $dmg_max2) $sql_query .= "dmg_max2='$dmg_max2',"; 3388 if ($item_templ['dmg_type2'] != $dmg_type2) $sql_query .= "dmg_type2='$dmg_type2',"; 3389 if ($item_templ['dmg_min3'] != $dmg_min3) $sql_query .= "dmg_min3='$dmg_min3',"; 3390 if ($item_templ['dmg_max3'] != $dmg_max3) $sql_query .= "dmg_max3='$dmg_max3',"; 3391 if ($item_templ['dmg_type3'] != $dmg_type3) $sql_query .= "dmg_type3='$dmg_type3',"; 3392 if ($item_templ['dmg_min4'] != $dmg_min4) $sql_query .= "dmg_min4='$dmg_min4',"; 3393 if ($item_templ['dmg_max4'] != $dmg_max4) $sql_query .= "dmg_max4='$dmg_max4',"; 3394 if ($item_templ['dmg_type4'] != $dmg_type4) $sql_query .= "dmg_type4='$dmg_type4',"; 3395 if ($item_templ['dmg_min5'] != $dmg_min5) $sql_query .= "dmg_min5='$dmg_min5',"; 3396 if ($item_templ['dmg_max5'] != $dmg_max5) $sql_query .= "dmg_max5='$dmg_max5',"; 3397 if ($item_templ['dmg_type5'] != $dmg_type5) $sql_query .= "dmg_type5='$dmg_type5',"; 3398 if ($item_templ['armor'] != $armor) $sql_query .= "armor='$armor',"; 3399 if ($item_templ['holy_res'] != $holy_res) $sql_query .= "holy_res='$holy_res',"; 3400 if ($item_templ['fire_res'] != $fire_res) $sql_query .= "fire_res='$fire_res',"; 3401 if ($item_templ['nature_res'] != $nature_res) $sql_query .= "nature_res='$nature_res',"; 3402 if ($item_templ['frost_res'] != $frost_res) $sql_query .= "frost_res='$frost_res',"; 3403 if ($item_templ['shadow_res'] != $shadow_res) $sql_query .= "shadow_res='$shadow_res',"; 3404 if ($item_templ['arcane_res'] != $arcane_res) $sql_query .= "arcane_res='$arcane_res',"; 3405 if ($item_templ['delay'] != $delay) $sql_query .= "delay='$delay',"; 3406 if ($item_templ['ammo_type'] != $ammo_type) $sql_query .= "ammo_type='$ammo_type',"; 3407 if ($item_templ['RangedModRange'] != $RangedModRange) $sql_query .= "RangedModRange='$RangedModRange',"; 3408 if ($item_templ['spellid_1'] != $spellid_1) $sql_query .= "spellid_1='$spellid_1',"; 3409 if ($item_templ['spelltrigger_1'] != $spelltrigger_1) $sql_query .= "spelltrigger_1='$spelltrigger_1',"; 3410 if ($item_templ['spellcharges_1'] != $spellcharges_1) $sql_query .= "spellcharges_1='$spellcharges_1',"; 3411 if ($item_templ['spellcooldown_1'] != $spellcooldown_1) $sql_query .= "spellcooldown_1='$spellcooldown_1',"; 3412 if ($item_templ['spellcategory_1'] != $spellcategory_1) $sql_query .= "spellcategory_1='$spellcategory_1',"; 3413 if ($item_templ['spellcategorycooldown_1'] != $spellcategorycooldown_1) $sql_query .= "spellcategorycooldown_1='$spellcategorycooldown_1',"; 3414 if ($item_templ['spellid_2'] != $spellid_2) $sql_query .= "spellid_2='$spellid_2',"; 3415 if ($item_templ['spelltrigger_2'] != $spelltrigger_2) $sql_query .= "spelltrigger_2='$spelltrigger_2',"; 3416 if ($item_templ['spellcharges_2'] != $spellcharges_2) $sql_query .= "spellcharges_2='$spellcharges_2',"; 3417 if ($item_templ['spellcooldown_2'] != $spellcooldown_2) $sql_query .= "spellcooldown_2='$spellcooldown_2',"; 3418 if ($item_templ['spellcategory_2'] != $spellcategory_2) $sql_query .= "spellcategory_2='$spellcategory_2',"; 3419 if ($item_templ['spellcategorycooldown_2'] != $spellcategorycooldown_2) $sql_query .= "spellcategorycooldown_2='$spellcategorycooldown_2',"; 3420 if ($item_templ['spellid_3'] != $spellid_3) $sql_query .= "spellid_3='$spellid_3',"; 3421 if ($item_templ['spelltrigger_3'] != $spelltrigger_3) $sql_query .= "spelltrigger_3='$spelltrigger_3',"; 3422 if ($item_templ['spellcharges_3'] != $spellcharges_3) $sql_query .= "spellcharges_3='$spellcharges_3',"; 3423 if ($item_templ['spellcooldown_3'] != $spellcooldown_3) $sql_query .= "spellcooldown_3='$spellcooldown_3',"; 3424 if ($item_templ['spellcategory_3'] != $spellcategory_3) $sql_query .= "spellcategory_3='$spellcategory_3',"; 3425 if ($item_templ['spellcategorycooldown_3'] != $spellcategorycooldown_3) $sql_query .= "spellcategorycooldown_3='$spellcategorycooldown_3',"; 3428 3426 if ($item_templ['spellid_4'] != $spellid_4) $sql .= "spellid_4='$spellid_4',"; 3429 if ($item_templ['spelltrigger_4'] != $spelltrigger_4) $sql .= "spelltrigger_4='$spelltrigger_4',";3430 if ($item_templ['spellcharges_4'] != $spellcharges_4) $sql .= "spellcharges_4='$spellcharges_4',";3431 if ($item_templ['spellcooldown_4'] != $spellcooldown_4) $sql .= "spellcooldown_4='$spellcooldown_4',";3432 if ($item_templ['spellcategory_4'] != $spellcategory_4) $sql .= "spellcategory_4='$spellcategory_4',";3433 if ($item_templ['spellcategorycooldown_4'] != $spellcategorycooldown_4) $sql .= "spellcategorycooldown_4='$spellcategorycooldown_4', ";3434 if ($item_templ['spellid_5'] != $spellid_5) $sql .= "spellid_5='$spellid_5',";3435 if ($item_templ['spelltrigger_5'] != $spelltrigger_5) $sql .= "spelltrigger_5='$spelltrigger_5',";3436 if ($item_templ['spellcharges_5'] != $spellcharges_5) $sql .= "spellcharges_5='$spellcharges_5',";3437 if ($item_templ['spellcooldown_5'] != $spellcooldown_5) $sql .= "spellcooldown_5='$spellcooldown_5',";3438 if ($item_templ['spellcategory_5'] != $spellcategory_5) $sql .= "spellcategory_5='$spellcategory_5',";3439 if ($item_templ['spellcategorycooldown_5'] != $spellcategorycooldown_5) $sql .= "spellcategorycooldown_5='$spellcategorycooldown_5',";3440 if ($item_templ['bonding'] != $bonding) $sql .= "bonding='$bonding',";3441 if ($item_templ['description'] != $description) $sql .= "description='$description',";3442 if ($item_templ['PageText'] != $PageText) $sql .= "PageText='$PageText',";3443 if ($item_templ['LanguageID'] != $LanguageID) $sql .= "LanguageID='$LanguageID',";3444 if ($item_templ['PageMaterial'] != $PageMaterial) $sql .= "PageMaterial='$PageMaterial',";3445 if ($item_templ['startquest'] != $startquest) $sql .= "startquest='$startquest',";3446 if ($item_templ['lockid'] != $lockid) $sql .= "lockid='$lockid',";3447 if ($item_templ['Material'] != $Material) $sql .= "Material='$Material',";3448 if ($item_templ['sheath'] != $sheath) $sql .= "sheath='$sheath',";3449 if ($item_templ['RandomProperty'] != $RandomProperty) $sql .= "RandomProperty='$RandomProperty',";3450 if ($item_templ['block'] != $block) $sql .= "block='$block',";3451 if ($item_templ['itemset'] != $itemset) $sql .= "itemset='$itemset',";3452 if ($item_templ['MaxDurability'] != $MaxDurability) $sql .= "MaxDurability='$MaxDurability',";3453 if ($item_templ['area'] != $area) $sql .= "area='$area',";3454 if ($item_templ['BagFamily'] != $BagFamily) $sql .= "BagFamily='$BagFamily',";3455 if ($item_templ['Map'] != $Map) $sql .= "Map='$Map',";3456 if ($item_templ['ScriptName'] != $ScriptName) $sql .= "ScriptName='$ScriptName',";3457 if ($item_templ['DisenchantID'] != $DisenchantID) $sql .= "DisenchantID='$DisenchantID',";3458 if ($item_templ['RequiredDisenchantSkill'] != $RequiredDisenchantSkill) $sql .= "RequiredDisenchantSkill='$RequiredDisenchantSkill',";3459 if ($item_templ['ArmorDamageModifier'] != $ArmorDamageModifier) $sql .= "ArmorDamageModifier='$ArmorDamageModifier',";3460 if ($item_templ['unk0'] != $unk0) $sql .= "unk0='$unk0',";3461 if ($item_templ['RandomSuffix'] != $RandomSuffix) $sql .= "RandomSuffix='$RandomSuffix',";3462 if ($item_templ['TotemCategory'] != $TotemCategory) $sql .= "TotemCategory='$TotemCategory',";3463 if ($item_templ['socketColor_1'] != $socketColor_1) $sql .= "socketColor_1='$socketColor_1',";3464 if ($item_templ['socketContent_1'] != $socketContent_1) $sql .= "socketContent_1='$socketContent_1',";3465 if ($item_templ['socketColor_2'] != $socketColor_2) $sql .= "socketColor_2='$socketColor_2',";3466 if ($item_templ['socketContent_2'] != $socketContent_2) $sql .= "socketContent_2='$socketContent_2',";3467 if ($item_templ['socketColor_3'] != $socketColor_3) $sql .= "socketColor_3='$socketColor_3',";3468 if ($item_templ['socketContent_3'] != $socketContent_3) $sql .= "socketContent_3='$socketContent_3',";3469 if ($item_templ['socketBonus'] != $socketBonus) $sql .= "socketBonus='$socketBonus',";3470 if ($item_templ['GemProperties'] != $GemProperties) $sql .= "GemProperties='$GemProperties',";3471 if ($item_templ['ExtendedCost'] != $ExtendedCost) $sql .= "ExtendedCost='$ExtendedCost',";3472 3473 $ mysql->free_result($result);3427 if ($item_templ['spelltrigger_4'] != $spelltrigger_4) $sql_query .= "spelltrigger_4='$spelltrigger_4',"; 3428 if ($item_templ['spellcharges_4'] != $spellcharges_4) $sql_query .= "spellcharges_4='$spellcharges_4',"; 3429 if ($item_templ['spellcooldown_4'] != $spellcooldown_4) $sql_query .= "spellcooldown_4='$spellcooldown_4',"; 3430 if ($item_templ['spellcategory_4'] != $spellcategory_4) $sql_query .= "spellcategory_4='$spellcategory_4',"; 3431 if ($item_templ['spellcategorycooldown_4'] != $spellcategorycooldown_4) $sql_query .= "spellcategorycooldown_4='$spellcategorycooldown_4', "; 3432 if ($item_templ['spellid_5'] != $spellid_5) $sql_query .= "spellid_5='$spellid_5',"; 3433 if ($item_templ['spelltrigger_5'] != $spelltrigger_5) $sql_query .= "spelltrigger_5='$spelltrigger_5',"; 3434 if ($item_templ['spellcharges_5'] != $spellcharges_5) $sql_query .= "spellcharges_5='$spellcharges_5',"; 3435 if ($item_templ['spellcooldown_5'] != $spellcooldown_5) $sql_query .= "spellcooldown_5='$spellcooldown_5',"; 3436 if ($item_templ['spellcategory_5'] != $spellcategory_5) $sql_query .= "spellcategory_5='$spellcategory_5',"; 3437 if ($item_templ['spellcategorycooldown_5'] != $spellcategorycooldown_5) $sql_query .= "spellcategorycooldown_5='$spellcategorycooldown_5',"; 3438 if ($item_templ['bonding'] != $bonding) $sql_query .= "bonding='$bonding',"; 3439 if ($item_templ['description'] != $description) $sql_query .= "description='$description',"; 3440 if ($item_templ['PageText'] != $PageText) $sql_query .= "PageText='$PageText',"; 3441 if ($item_templ['LanguageID'] != $LanguageID) $sql_query .= "LanguageID='$LanguageID',"; 3442 if ($item_templ['PageMaterial'] != $PageMaterial) $sql_query .= "PageMaterial='$PageMaterial',"; 3443 if ($item_templ['startquest'] != $startquest) $sql_query .= "startquest='$startquest',"; 3444 if ($item_templ['lockid'] != $lockid) $sql_query .= "lockid='$lockid',"; 3445 if ($item_templ['Material'] != $Material) $sql_query .= "Material='$Material',"; 3446 if ($item_templ['sheath'] != $sheath) $sql_query .= "sheath='$sheath',"; 3447 if ($item_templ['RandomProperty'] != $RandomProperty) $sql_query .= "RandomProperty='$RandomProperty',"; 3448 if ($item_templ['block'] != $block) $sql_query .= "block='$block',"; 3449 if ($item_templ['itemset'] != $itemset) $sql_query .= "itemset='$itemset',"; 3450 if ($item_templ['MaxDurability'] != $MaxDurability) $sql_query .= "MaxDurability='$MaxDurability',"; 3451 if ($item_templ['area'] != $area) $sql_query .= "area='$area',"; 3452 if ($item_templ['BagFamily'] != $BagFamily) $sql_query .= "BagFamily='$BagFamily',"; 3453 if ($item_templ['Map'] != $Map) $sql_query .= "Map='$Map',"; 3454 if ($item_templ['ScriptName'] != $ScriptName) $sql_query .= "ScriptName='$ScriptName',"; 3455 if ($item_templ['DisenchantID'] != $DisenchantID) $sql_query .= "DisenchantID='$DisenchantID',"; 3456 if ($item_templ['RequiredDisenchantSkill'] != $RequiredDisenchantSkill) $sql_query .= "RequiredDisenchantSkill='$RequiredDisenchantSkill',"; 3457 if ($item_templ['ArmorDamageModifier'] != $ArmorDamageModifier) $sql_query .= "ArmorDamageModifier='$ArmorDamageModifier',"; 3458 if ($item_templ['unk0'] != $unk0) $sql_query .= "unk0='$unk0',"; 3459 if ($item_templ['RandomSuffix'] != $RandomSuffix) $sql_query .= "RandomSuffix='$RandomSuffix',"; 3460 if ($item_templ['TotemCategory'] != $TotemCategory) $sql_query .= "TotemCategory='$TotemCategory',"; 3461 if ($item_templ['socketColor_1'] != $socketColor_1) $sql_query .= "socketColor_1='$socketColor_1',"; 3462 if ($item_templ['socketContent_1'] != $socketContent_1) $sql_query .= "socketContent_1='$socketContent_1',"; 3463 if ($item_templ['socketColor_2'] != $socketColor_2) $sql_query .= "socketColor_2='$socketColor_2',"; 3464 if ($item_templ['socketContent_2'] != $socketContent_2) $sql_query .= "socketContent_2='$socketContent_2',"; 3465 if ($item_templ['socketColor_3'] != $socketColor_3) $sql_query .= "socketColor_3='$socketColor_3',"; 3466 if ($item_templ['socketContent_3'] != $socketContent_3) $sql_query .= "socketContent_3='$socketContent_3',"; 3467 if ($item_templ['socketBonus'] != $socketBonus) $sql_query .= "socketBonus='$socketBonus',"; 3468 if ($item_templ['GemProperties'] != $GemProperties) $sql_query .= "GemProperties='$GemProperties',"; 3469 if ($item_templ['ExtendedCost'] != $ExtendedCost) $sql_query .= "ExtendedCost='$ExtendedCost',"; 3470 3471 $sql->free_result($result); 3474 3472 unset($item_templ); 3475 3473 3476 if (($sql == "UPDATE item_template SET ")&&(!$de_item)&&(!$del_de_items)){3477 $ mysql->close();3474 if (($sql_query == "UPDATE item_template SET ")&&(!$de_item)&&(!$del_de_items)){ 3475 $sql->close(); 3478 3476 redirect("item.php?action=edit&entry=$entry&error=6"); 3479 3477 } else { 3480 if ($sql != "UPDATE item_template SET "){3481 $sql [strlen($sql)-1] = " ";3482 $sql .= " WHERE entry = '$entry';\n";3483 } else $sql = "";3478 if ($sql_query != "UPDATE item_template SET "){ 3479 $sql_query[strlen($sql_query)-1] = " "; 3480 $sql_query .= " WHERE entry = '$entry';\n"; 3481 } else $sql_query = ""; 3484 3482 } 3485 3483 3486 3484 if ($de_item){ 3487 $sql .= "INSERT INTO disenchant_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)3485 $sql_query .= "INSERT INTO disenchant_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall) 3488 3486 VALUES ($DisenchantID,$de_item,'$de_ChanceOrRef', '$de_QuestChanceOrGroup' ,$de_mincount ,$de_maxcount ,$de_quest_freeforall);\n"; 3489 3487 } … … 3491 3489 if ($del_de_items){ 3492 3490 foreach($del_de_items as $item_id) 3493 $sql .= "DELETE FROM disenchant_loot_template WHERE entry = $DisenchantID AND item = $item_id;\n";3491 $sql_query .= "DELETE FROM disenchant_loot_template WHERE entry = $DisenchantID AND item = $item_id;\n"; 3494 3492 } 3495 3493 3496 3494 } else { 3497 $ mysql->close();3495 $sql->close(); 3498 3496 redirect("item.php?error=5"); 3499 3497 } 3500 3498 } else { 3501 $ mysql->close();3499 $sql->close(); 3502 3500 redirect("item.php?error=5"); 3503 3501 } 3504 3502 3505 3503 if ( isset($_POST['backup_op']) && ($_POST['backup_op'] == 1) ){ 3506 $ mysql->close();3504 $sql->close(); 3507 3505 Header("Content-type: application/octet-stream"); 3508 3506 Header("Content-Disposition: attachment; filename=itemid_$entry.sql"); 3509 echo $sql ;3507 echo $sql_query; 3510 3508 exit(); 3511 3509 } else { 3512 $sql = explode(';',$sql);3513 foreach($sql as $tmp_query) if(($tmp_query)&&($tmp_query != "\n")) $result = $mysql->query($tmp_query);3514 $ mysql->close();3510 $sql_query = explode(';',$sql_query); 3511 foreach($sql_query as $tmp_query) if(($tmp_query)&&($tmp_query != "\n")) $result = $sql->query($tmp_query); 3512 $sql->close(); 3515 3513 } 3516 3514 … … 3552 3550 else redirect("item.php?error=1"); 3553 3551 3554 $ mysql = new MySQL;3555 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);3556 3557 $result = $ mysql->query("DELETE FROM item_template WHERE entry = '$entry'");3558 3559 $ mysql->close();3552 $sql = new SQL; 3553 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 3554 3555 $result = $sql->query("DELETE FROM item_template WHERE entry = '$entry'"); 3556 3557 $sql->close(); 3560 3558 redirect("item.php"); 3561 3559 }
Note:
See TracChangeset
for help on using the changeset viewer.