Changeset 374 for minimanager/game_object.php
- Timestamp:
- Sep 11, 2008, 9:10:27 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/game_object.php
r307 r374 9 9 */ 10 10 require_once("header.php"); 11 valid_login( 1);11 valid_login($action_permission['read']); 12 12 13 13 $go_type = Array( … … 150 150 $where = "WHERE gameobject_template.entry > 0 "; 151 151 if($custom_search != "") $where .= " $custom_search "; 152 if(isset($entry)) $where .= "AND entry = '$entry' ";152 if(isset($entry)) $where .= "AND gameobject_template.entry = '$entry' "; 153 153 if(isset($name)) $where .= "AND IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) LIKE '%$name%' "; 154 154 if(isset($type)) $where .= "AND type = '$type' "; … … 235 235 $output .= "</select></td> 236 236 <td>".makeinfocell($lang_game_object['displayId'],$lang_game_object['displayId_desc'])."</td> 237 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\" 3\" value=\"0\" /></td>237 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\"11\" value=\"0\" /></td> 238 238 239 239 </tr> … … 415 415 $output .= "</select></td> 416 416 <td>".makeinfocell($lang_game_object['displayId'],$lang_game_object['displayId_desc'])."</td> 417 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\" 3\" value=\"{$go['displayId']}\" /></td>417 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\"11\" value=\"{$go['displayId']}\" /></td> 418 418 419 419 </tr> … … 537 537 $row_flag = 0; 538 538 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 539 $result1 = $sql->query("SELECT item,ChanceOr Ref,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1, condition_value2 FROM gameobject_loot_template WHERE entry = {$go['entry']} ORDER BY ChanceOrRefDESC");539 $result1 = $sql->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount, lootcondition, condition_value1, condition_value2 FROM gameobject_loot_template WHERE entry = {$go['data1']} ORDER BY ChanceOrQuestChance DESC"); 540 540 while ($item = $sql->fetch_row($result1)){ 541 541 $cel_counter++; 542 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_game_object['drop_chance']}: $item[1]%<br />{$lang_game_object['quest_drop_chance']}: $item[2]%<br />{$lang_game_object['drop_chance']}: $item[3]-$item[4]<br />{$lang_game_object[' freeforall']}: $item[5]<br />{$lang_game_object['lootcondition']}: $item[6]<br />{$lang_game_object['condition_value1']}: $item[7]<br />{$lang_game_object['condition_value2']}: $item[8]";542 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_game_object['drop_chance']}: $item[1]%<br />{$lang_game_object['quest_drop_chance']}: $item[2]%<br />{$lang_game_object['drop_chance']}: $item[3]-$item[4]<br />{$lang_game_object['lootcondition']}: $item[5]<br />{$lang_game_object['condition_value1']}: $item[6]<br />{$lang_game_object['condition_value2']}: $item[7]"; 543 543 $output .= "<td>"; 544 544 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", "$tooltip", "item_tooltip", "target=\"_blank\""); … … 560 560 <td><input type=\"text\" name=\"item\" size=\"8\" maxlength=\"10\" value=\"\" /></td> 561 561 <td>".makeinfocell($lang_game_object['loot_drop_chance'],$lang_game_object['loot_drop_chance_desc'])."</td> 562 <td><input type=\"text\" name=\"ChanceOr Ref\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>562 <td><input type=\"text\" name=\"ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td> 563 563 <td>".makeinfocell($lang_game_object['loot_quest_drop_chance'],$lang_game_object['loot_quest_drop_chance_desc'])."</td> 564 <td><input type=\"text\" name=\" QuestChanceOrGroup\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>564 <td><input type=\"text\" name=\"groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 565 565 </tr> 566 566 <tr> 567 567 <td>".makeinfocell($lang_game_object['min_count'],$lang_game_object['min_count_desc'])."</td> 568 <td><input type=\"text\" name=\"mincount \" size=\"8\" maxlength=\"3\" value=\"1\" /></td>568 <td><input type=\"text\" name=\"mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 569 569 <td>".makeinfocell($lang_game_object['max_count'],$lang_game_object['max_count_desc'])."</td> 570 570 <td><input type=\"text\" name=\"maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 571 <td>".makeinfocell($lang_game_object['freeforall'],$lang_game_object['freeforall_desc'])."</td>572 <td><input type=\"text\" name=\"freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>573 571 </tr> 574 572 <tr> … … 722 720 else $data23 = 0; 723 721 724 if (isset($_POST['ChanceOr Ref']) && $_POST['ChanceOrRef'] != '') $ChanceOrRef = $sql->quote_smart($_POST['ChanceOrRef']);725 else $ChanceOr Ref= 0;726 if (isset($_POST[' QuestChanceOrGroup']) && $_POST['QuestChanceOrGroup'] != '') $QuestChanceOrGroup = $sql->quote_smart($_POST['QuestChanceOrGroup']);727 else $ QuestChanceOrGroup= 0;728 if (isset($_POST['mincount ']) && $_POST['mincount'] != '') $mincount = $sql->quote_smart($_POST['mincount']);729 else $mincount = 0;722 if (isset($_POST['ChanceOrQuestChance']) && $_POST['ChanceOrQuestChance'] != '') $ChanceOrQuestChance = $sql->quote_smart($_POST['ChanceOrQuestChance']); 723 else $ChanceOrQuestChance = 0; 724 if (isset($_POST['groupid']) && $_POST['groupid'] != '') $groupid = $sql->quote_smart($_POST['groupid']); 725 else $groupid = 0; 726 if (isset($_POST['mincountOrRef']) && $_POST['mincountOrRef'] != '') $mincountOrRef = $sql->quote_smart($_POST['mincountOrRef']); 727 else $mincountOrRef = 0; 730 728 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']); 731 729 else $maxcount = 0; 732 if (isset($_POST['freeforall']) && $_POST['freeforall'] != '') $freeforall = $sql->quote_smart($_POST['freeforall']);733 else $freeforall = 0;734 730 if (isset($_POST['lootcondition']) && $_POST['lootcondition'] != '') $lootcondition = $sql->quote_smart($_POST['lootcondition']); 735 731 else $lootcondition = 0; … … 814 810 815 811 if ($item){ 816 $sql_query .= "INSERT INTO gameobject_loot_template (entry, item, ChanceOr Ref, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)817 VALUES ($ entry,$item,'$ChanceOrRef', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$freeforall,$lootcondition ,$condition_value1 ,$condition_value2);\n";812 $sql_query .= "INSERT INTO gameobject_loot_template (entry, item, ChanceOrQuestChance, `groupid`, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) 813 VALUES ($data1,$item,'$ChanceOrQuestChance', '$groupid' ,$mincountOrRef ,$maxcount ,$lootcondition ,$condition_value1 ,$condition_value2);\n"; 818 814 } 819 815 820 816 if ($del_loot_items){ 821 817 foreach($del_loot_items as $item_id) 822 $sql_query .= "DELETE FROM gameobject_loot_template WHERE entry = $ entryAND item = $item_id;\n";818 $sql_query .= "DELETE FROM gameobject_loot_template WHERE entry = $data1 AND item = $item_id;\n"; 823 819 } 824 820 … … 910 906 $sql->query("DELETE FROM gameobject_involvedrelation WHERE id = '$entry'"); 911 907 $sql->query("DELETE FROM gameobject_questrelation WHERE id = '$entry'"); 912 $sql->query("DELETE FROM gameobject_loot_template WHERE entry = '$ entry'");908 $sql->query("DELETE FROM gameobject_loot_template WHERE entry = '$data1'"); 913 909 $sql->query("DELETE FROM gameobject_template WHERE entry = '$entry'"); 914 910
Note:
See TracChangeset
for help on using the changeset viewer.