Ignore:
Timestamp:
Dec 23, 2007, 2:55:36 PM (17 years ago)
Author:
george
Message:

Minimanager 0.1.6b

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/creature.php

    r142 r178  
    7373        <tr>
    7474                <td>{$lang_creature['level']}:</td>
    75                 <td><input type=\"text\" size=\"10\" maxlength=\"3\" name=\"level\" /></td>
     75                <td colspan=\"2\"><input type=\"text\" size=\"10\" maxlength=\"3\" name=\"level\" /></td>
    7676                <td>{$lang_creature['health']}:</td>
    77                 <td><input type=\"text\" size=\"10\" maxlength=\"5\" name=\"health\" /></td>
     77                <td colspan=\"2\"><input type=\"text\" size=\"10\" maxlength=\"5\" name=\"health\" /></td>
     78        </tr>
     79        <tr>
    7880                <td>{$lang_creature['faction_A']}:</td>
    79                 <td><input type=\"text\" size=\"10\" maxlength=\"4\" name=\"faction_A\" /></td>
     81                <td colspan=\"2\"><input type=\"text\" size=\"10\" maxlength=\"4\" name=\"faction_A\" /></td>
     82                <td>{$lang_creature['faction_H']}:</td>
     83                <td colspan=\"2\"><input type=\"text\" size=\"10\" maxlength=\"4\" name=\"faction_H\" /></td>
    8084        </tr>
    8185        <tr>
     
    191195        ($_POST['npcflag'] === '')&&($_POST['type'] === '')&&($_POST['rank'] === '')&&($_POST['family'] === '')
    192196        &&(!isset($_POST['entry'])||$_POST['entry'] === '')&&(!isset($_POST['name'])||$_POST['name'] === '')&&(!isset($_POST['level'])||$_POST['level'] === '')&&(!isset($_POST['health'])||$_POST['health'] === '')
    193         &&(!isset($_POST['faction_A'])||$_POST['faction_A'] === '')&&(!isset($_POST['spell'])||$_POST['spell'] === '')&&(!isset($_POST['lootid'])||$_POST['lootid'] === '')&&(!isset($_POST['ScriptName'])||$_POST['ScriptName'] === '')
     197        &&(!isset($_POST['faction_A'])||$_POST['faction_A'] === '')&&(!isset($_POST['faction_H'])||$_POST['faction_H'] === '')&&(!isset($_POST['spell'])||$_POST['spell'] === '')&&(!isset($_POST['lootid'])||$_POST['lootid'] === '')&&(!isset($_POST['ScriptName'])||$_POST['ScriptName'] === '')
    194198        &&(!isset($_POST['custom_search'])||$_POST['custom_search'] === '')) {
    195199        redirect("creature.php?error=1");
     
    207211if ($_POST['level'] != '') $level = $sql->quote_smart($_POST['level']);
    208212if ($_POST['health'] != '') $health = $sql->quote_smart($_POST['health']);
    209 if ($_POST['faction_A'] != '') $faction = $sql->quote_smart($_POST['faction_A']);
     213if ($_POST['faction_A'] != '') $faction_A = $sql->quote_smart($_POST['faction_A']);
     214if ($_POST['faction_H'] != '') $faction_H = $sql->quote_smart($_POST['faction_H']);
    210215if ($_POST['spell'] != '') $spell = $sql->quote_smart($_POST['spell']);
    211216if ($_POST['lootid'] != '') $lootid = $sql->quote_smart($_POST['lootid']);
     
    220225 if(isset($level)) $where .= "AND minlevel <= $level AND maxlevel >= $level ";
    221226 if(isset($health)) $where .= "AND minhealth <= $health AND maxhealth >= $health ";
    222  if(isset($faction_A)) $where .= "AND faction = '$faction_A' ";
     227 if(isset($faction_A)) $where .= "AND faction_A = '$faction_A' ";
     228 if(isset($faction_H)) $where .= "AND faction_B = '$faction_A' ";
    223229 if(isset($lootid)) $where .= "AND lootid = '$lootid' ";
    224  if(isset($ScriptName)) $where .= "AND ScriptName LIKE '%$ScriptName%' "; 
     230 if(isset($ScriptName)) $where .= "AND ScriptName LIKE '%$ScriptName%' ";
    225231 if(isset($npcflag)) $where .= "AND npcflag = '$npcflag' ";
    226232 if(isset($type)) $where .= "AND type = '$type' ";
     
    283289                <input type=\"hidden\" name=\"backup_op\" value=\"0\"/>
    284290                <input type=\"hidden\" name=\"opp_type\" value=\"add_new\"/>
    285                
     291
    286292<div class=\"jtab-container\" id=\"container\">
    287293  <ul class=\"jtabs\">
     
    299305 <td>".makeinfocell($lang_creature['entry'],$lang_creature['entry_desc'])."</td>
    300306 <td><input type=\"text\" name=\"entry\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
    301  
     307
    302308 <td>".makeinfocell($lang_creature['name'],$lang_creature['name_desc'])."</td>
    303309 <td colspan=\"3\"><input type=\"text\" name=\"name\" size=\"50\" maxlength=\"100\" value=\"mob\" /></td>
     
    306312 <td>".makeinfocell($lang_creature['sub_name'],$lang_creature['sub_name_desc'])."</td>
    307313 <td colspan=\"2\"><input type=\"text\" name=\"subname\" size=\"25\" maxlength=\"100\" value=\"\" /></td>
    308  
     314
    309315 <td>".makeinfocell($lang_creature['script_name'],$lang_creature['script_name_desc'])."</td>
    310316 <td colspan=\"2\"><input type=\"text\" name=\"ScriptName\" size=\"25\" maxlength=\"128\" value=\"\" /></td>
     
    315321 <td>".makeinfocell($lang_creature['min_level'],$lang_creature['min_level_desc'])."</td>
    316322 <td><input type=\"text\" name=\"minlevel\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
    317  
     323
    318324 <td>".makeinfocell($lang_creature['max_level'],$lang_creature['max_level_desc'])."</td>
    319325 <td><input type=\"text\" name=\"maxlevel\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>
    320  
     326
    321327 <td>".makeinfocell($lang_creature['rank'],$lang_creature['rank_desc'])."</td>
    322328        <td><select name=\"rank\">
     
    327333        <option value=\"4\">4 - {$lang_creature['rare']}</option>
    328334        </select></td>
    329 </tr> 
     335</tr>
    330336<tr>
    331337<td>".makeinfocell($lang_creature['min_health'],$lang_creature['min_health_desc'])."</td>
    332338 <td colspan=\"2\"><input type=\"text\" name=\"minhealth\" size=\"14\" maxlength=\"10\" value=\"1\" /></td>
    333  
     339
    334340 <td>".makeinfocell($lang_creature['max_health'],$lang_creature['max_health_desc'])."</td>
    335341 <td colspan=\"2\"><input type=\"text\" name=\"maxhealth\" size=\"14\" maxlength=\"10\" value=\"1\" /></td>
    336342</tr>
    337 <tr> 
     343<tr>
    338344 <td>".makeinfocell($lang_creature['min_mana'],$lang_creature['min_mana_desc'])."</td>
    339345 <td colspan=\"2\"><input type=\"text\" name=\"minmana\" size=\"14\" maxlength=\"10\" value=\"0\" /></td>
    340  
     346
    341347 <td>".makeinfocell($lang_creature['max_mana'],$lang_creature['max_mana_desc'])."</td>
    342348 <td colspan=\"2\"><input type=\"text\" name=\"maxmana\" size=\"14\" maxlength=\"10\" value=\"0\" /></td>
    343 </tr> 
     349</tr>
    344350<tr>
    345351 <td>".makeinfocell($lang_creature['faction_A'],$lang_creature['faction_A_desc'])."</td>
    346352 <td colspan=\"2\"><input type=\"text\" name=\"faction_A\" size=\"14\" maxlength=\"10\" value=\"0\" /></td>
     353
     354 <td>".makeinfocell($lang_creature['faction_A'],$lang_creature['faction_A_desc'])."</td>
     355 <td colspan=\"2\"><input type=\"text\" name=\"faction_A\" size=\"14\" maxlength=\"10\" value=\"0\" /></td>
     356</tr>
     357<tr>
     358 <td></td>
     359 <td colspan=\"2\"></td>
    347360
    348361 <td>".makeinfocell($lang_creature['type'],$lang_creature['type_desc'])."</td>
     
    421434                <option value=\"27\">27 - {$lang_creature['wind_serpent']}</option>
    422435           </select></td>
    423            
     436
    424437</tr>
    425438
     
    428441 <td>".makeinfocell($lang_creature['loot_id'],$lang_creature['loot_id_desc'])."</td>
    429442 <td><input type=\"text\" name=\"lootid\" size=\"10\" maxlength=\"10\" value=\"0\" /></td>
    430  
     443
    431444 <td>".makeinfocell($lang_creature['skin_loot'],$lang_creature['skin_loot_desc'])."</td>
    432445 <td><input type=\"text\" name=\"skinloot\" size=\"10\" maxlength=\"10\" value=\"0\" /></td>
    433  
     446
    434447 <td>".makeinfocell($lang_creature['pickpocket_loot'],$lang_creature['pickpocket_loot_desc'])."</td>
    435448 <td><input type=\"text\" name=\"pickpocketloot\" size=\"10\" maxlength=\"10\" value=\"0\" /></td>
     
    438451 <td>".makeinfocell($lang_creature['min_gold'],$lang_creature['min_gold_desc'])."</td>
    439452 <td colspan=\"2\"><input type=\"text\" name=\"mingold\" size=\"14\" maxlength=\"30\" value=\"0\" /></td>
    440  
     453
    441454 <td>".makeinfocell($lang_creature['max_gold'],$lang_creature['max_gold_desc'])."</td>
    442455 <td colspan=\"2\"><input type=\"text\" name=\"maxgold\" size=\"14\" maxlength=\"30\" value=\"0\" /></td>
     
    454467          <td>".makeinfocell($lang_creature['armor'],$lang_creature['armor_desc'])."</td>
    455468          <td colspan=\"2\"><input type=\"text\" name=\"armor\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    456          
     469
    457470          <td>".makeinfocell($lang_creature['speed'],$lang_creature['speed_desc'])."</td>
    458471          <td colspan=\"2\"><input type=\"text\" name=\"speed\" size=\"8\" maxlength=\"45\" value=\"1\" /></td>
    459472 </tr>
    460  
     473
    461474<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['damage']}:</td></tr>
    462475         <tr>
    463476          <td>".makeinfocell($lang_creature['min_damage'],$lang_creature['min_damage_desc'])."</td>
    464477          <td><input type=\"text\" name=\"mindmg\" size=\"8\" maxlength=\"45\" value=\"1\" /></td>
    465          
     478
    466479          <td>".makeinfocell($lang_creature['max_damage'],$lang_creature['max_damage_desc'])."</td>
    467480          <td><input type=\"text\" name=\"maxdmg\" size=\"8\" maxlength=\"45\" value=\"1\" /></td>
    468  
     481
    469482          <td>".makeinfocell($lang_creature['attack_power'],$lang_creature['attack_power_desc'])."</td>
    470483          <td><input type=\"text\" name=\"attackpower\" size=\"8\" maxlength=\"10\" value=\"1\" /></td>
     
    473486          <td>".makeinfocell($lang_creature['min_range_dmg'],$lang_creature['min_range_dmg_desc'])."</td>
    474487          <td><input type=\"text\" name=\"minrangedmg\" size=\"8\" maxlength=\"45\" value=\"1\" /></td>
    475          
     488
    476489          <td>".makeinfocell($lang_creature['max_range_dmg'],$lang_creature['max_range_dmg_desc'])."</td>
    477490          <td><input type=\"text\" name=\"maxrangedmg\" size=\"8\" maxlength=\"45\" value=\"1\" /></td>
    478  
     491
    479492          <td>".makeinfocell($lang_creature['ranged_attack_power'],$lang_creature['ranged_attack_power_desc'])."</td>
    480493          <td><input type=\"text\" name=\"rangedattackpower\" size=\"8\" maxlength=\"10\" value=\"1\" /></td>
     
    483496          <td>".makeinfocell($lang_creature['attack_time'],$lang_creature['attack_time_desc'])."</td>
    484497          <td><input type=\"text\" name=\"baseattacktime\" size=\"8\" maxlength=\"4\" value=\"1000\" /></td>
    485          
     498
    486499          <td>".makeinfocell($lang_creature['range_attack_time'],$lang_creature['range_attack_time_desc'])."</td>
    487500          <td><input type=\"text\" name=\"rangeattacktime\" size=\"8\" maxlength=\"4\" value=\"1000\" /></td>
    488  
     501
    489502          <td>".makeinfocell($lang_creature['combat_reach'],$lang_creature['combat_reach_desc'])."</td>
    490503          <td><input type=\"text\" name=\"combat_reach\" size=\"8\" maxlength=\"10\" value=\"1\" /></td>
     
    493506          <td>".makeinfocell($lang_creature['bounding_radius'],$lang_creature['bounding_radius_desc'])."</td>
    494507          <td colspan=\"2\"><input type=\"text\" name=\"bounding_radius\" size=\"14\" maxlength=\"45\" value=\"2\" /></td>
    495          
     508
    496509          <td>".makeinfocell($lang_creature['dmgschool'],$lang_creature['dmgschool_desc'])."</td>
    497510           <td colspan=\"2\"><select name=\"dmgschool\">
     
    505518           </select></td>
    506519 </tr>
    507  
     520
    508521  <tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['spells']}:</td></tr>
    509522
     
    511524 <td>".makeinfocell($lang_creature['spell']." 1",$lang_creature['spell_desc'])."</td>
    512525 <td colspan=\"2\"><input type=\"text\" name=\"spell1\" size=\"14\" maxlength=\"11\" value=\"0\" /></td>
    513  
     526
    514527 <td>".makeinfocell($lang_creature['spell']." 2",$lang_creature['spell_desc'])."</td>
    515528 <td colspan=\"2\"><input type=\"text\" name=\"spell2\" size=\"14\" maxlength=\"11\" value=\"0\" /></td>
     
    518531 <td>".makeinfocell($lang_creature['spell']." 3",$lang_creature['spell_desc'])."</td>
    519532 <td colspan=\"2\"><input type=\"text\" name=\"spell3\" size=\"14\" maxlength=\"11\" value=\"0\" /></td>
    520  
     533
    521534 <td>".makeinfocell($lang_creature['spell']." 4",$lang_creature['spell_desc'])."</td>
    522535 <td colspan=\"2\"><input type=\"text\" name=\"spell4\" size=\"14\" maxlength=\"11\" value=\"0\" /></td>
     
    527540        <td>".makeinfocell($lang_creature['resis_holy'],$lang_creature['resis_holy_desc'])."</td>
    528541        <td><input type=\"text\" name=\"resistance1\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    529          
     542
    530543        <td>".makeinfocell($lang_creature['resis_fire'],$lang_creature['resis_fire_desc'])."</td>
    531544        <td><input type=\"text\" name=\"resistance2\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    532  
     545
    533546        <td>".makeinfocell($lang_creature['resis_nature'],$lang_creature['resis_nature_desc'])."</td>
    534547        <td><input type=\"text\" name=\"resistance3\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
     
    537550        <td>".makeinfocell($lang_creature['resis_frost'],$lang_creature['resis_frost_desc'])."</td>
    538551        <td><input type=\"text\" name=\"resistance4\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    539          
     552
    540553        <td>".makeinfocell($lang_creature['resis_shadow'],$lang_creature['resis_shadow_desc'])."</td>
    541554        <td><input type=\"text\" name=\"resistance5\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    542  
     555
    543556        <td>".makeinfocell($lang_creature['resis_arcane'],$lang_creature['resis_arcane_desc'])."</td>
    544557        <td><input type=\"text\" name=\"resistance6\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    545558 </tr>
    546  
     559
    547560 </table><br /><br />
    548561</div>";
    549        
     562
    550563
    551564$output .= "<div id=\"pane4\">
     
    553566<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['models']}:</td></tr>
    554567<tr>
    555         <td colspan=\"2\">".makeinfocell($lang_creature['modelid_Aale'],$lang_creature['modelid_Aale_desc'])."</td>
     568        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_A'],$lang_creature['modelid_A_desc'])."</td>
    556569        <td><input type=\"text\" name=\"modelid_A\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
    557          
    558         <td colspan=\"2\">".makeinfocell($lang_creature['modelid_Hemale'],$lang_creature['modelid_Hemale_desc'])."</td>
     570
     571        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_A2'],$lang_creature['modelid_A2_desc'])."</td>
     572        <td><input type=\"text\" name=\"modelid_A2\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
     573</tr>
     574<tr>
     575        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_H'],$lang_creature['modelid_H_desc'])."</td>
    559576        <td><input type=\"text\" name=\"modelid_H\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
    560 </tr>
    561 <tr>
    562         <td>".makeinfocell($lang_creature['equip_slot']." 1",$lang_creature['equip_slot_desc'])."</td>
    563         <td><input type=\"text\" name=\"equipslot1\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    564          
    565         <td>".makeinfocell($lang_creature['equip_model']." 1",$lang_creature['equip_model_desc'])."</td>
    566         <td><input type=\"text\" name=\"equipmodel1\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    567  
    568         <td>".makeinfocell($lang_creature['equip_info']." 1",$lang_creature['equip_info_desc'])."</td>
    569         <td><input type=\"text\" name=\"equipinfo1\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    570 </tr>
    571 <tr>
    572         <td>".makeinfocell($lang_creature['equip_slot']." 2",$lang_creature['equip_slot_desc'])."</td>
    573         <td><input type=\"text\" name=\"equipslot2\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    574          
    575         <td>".makeinfocell($lang_creature['equip_model']." 2",$lang_creature['equip_model_desc'])."</td>
    576         <td><input type=\"text\" name=\"equipmodel2\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    577  
    578         <td>".makeinfocell($lang_creature['equip_info']." 2",$lang_creature['equip_info_desc'])."</td>
    579         <td><input type=\"text\" name=\"equipinfo2\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    580 </tr>
    581 <tr>
    582         <td>".makeinfocell($lang_creature['equip_slot']." 3",$lang_creature['equip_slot_desc'])."</td>
    583         <td><input type=\"text\" name=\"equipslot3\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    584          
    585         <td>".makeinfocell($lang_creature['equip_model']." 3",$lang_creature['equip_model_desc'])."</td>
    586         <td><input type=\"text\" name=\"equipmodel3\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    587  
    588         <td>".makeinfocell($lang_creature['equip_info']." 3",$lang_creature['equip_info_desc'])."</td>
    589         <td><input type=\"text\" name=\"equipinfo3\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>
    590 </tr>
    591 
     577
     578        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_H2'],$lang_creature['modelid_H2_desc'])."</td>
     579        <td><input type=\"text\" name=\"modelid_H2\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
     580</tr>
    592581</table><br /><br />
    593582</div>";
    594        
     583
    595584$output .= "<div id=\"pane2\">
    596585        <br /><br /><table class=\"lined\" style=\"width: 720px;\">
     
    599588 <td>".makeinfocell($lang_creature['ai_name'],$lang_creature['ai_name_desc'])."</td>
    600589 <td colspan=\"2\"><input type=\"text\" name=\"AIName\" size=\"14\" maxlength=\"128\" value=\"\" /></td>
    601  
     590
    602591 <td>".makeinfocell($lang_creature['movement_type'],$lang_creature['movement_type_desc'])."</td>
    603592 <td colspan=\"2\"><input type=\"text\" name=\"MovementType\" size=\"14\" maxlength=\"24\" value=\"0\" /></td>
    604593</tr>
    605594
    606 <tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['other']}:</td></tr> 
    607        
     595<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['other']}:</td></tr>
     596
    608597<td>".makeinfocell($lang_creature['class'],$lang_creature['class_desc'])."</td>
    609598           <td><select name=\"class\">
     
    618607                <option value=\"9\">9 - {$lang_id_tab['warlock']}</option>
    619608                <option value=\"11\">11 - {$lang_id_tab['druid']}</option>
    620            </select></td>   
     609           </select></td>
    621610
    622611<td>".makeinfocell($lang_creature['race'],$lang_creature['race_desc'])."</td>
     
    634623                <option value=\"11\">11 - {$lang_id_tab['draenei']}</option>
    635624           </select></td>
    636            
     625
    637626 <td>".makeinfocell($lang_creature['RacialLeader'],$lang_creature['RacialLeader_desc'])."</td>
    638627 <td><input type=\"checkbox\" name=\"RacialLeader\" value=\"1\" /></td>
     
    641630 <td>".makeinfocell($lang_creature['trainer_spell'],$lang_creature['trainer_spell_desc'])."</td>
    642631 <td><input type=\"text\" name=\"trainer_spell\" size=\"14\" maxlength=\"11\" value=\"0\" /></td>
    643  
     632
    644633 <td>".makeinfocell($lang_creature['inhabit_type'],$lang_creature['inhabit_type_desc'])."</td>
    645634           <td><select name=\"InhabitType\">
     
    649638                <option value=\"3\">3 - {$lang_creature['both']}</option>
    650639           </select></td>
    651  
     640
    652641 <td>".makeinfocell($lang_creature['civilian'],$lang_creature['civilian_desc'])."</td>
    653642 <td><input type=\"checkbox\" name=\"civilian\" value=\"1\" /></td>
    654 </tr>   
     643</tr>
    655644<tr>
    656645        <td>".makeinfocell($lang_creature['flags'],$lang_creature['flags_desc'])."</td>
    657646        <td><input type=\"text\" name=\"flags\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
    658          
     647
    659648        <td>".makeinfocell($lang_creature['dynamic_flags'],$lang_creature['dynamic_flags_desc'])."</td>
    660649        <td><input type=\"text\" name=\"dynamicflags\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
    661  
     650
    662651        <td>".makeinfocell($lang_creature['flag_1'],$lang_creature['flag_1_desc'])."</td>
    663652        <td><input type=\"text\" name=\"flag1\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>
     
    666655         </table><br /><br />
    667656    </div>
    668        
     657
    669658  </div>
    670659</div>
     
    693682
    694683 if (!isset($_GET['entry'])) redirect("creature.php?error=1");
    695        
     684
    696685 $sql = new SQL;
    697686 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);
    698  
     687
    699688 $entry = $sql->quote_smart($_GET['entry']);
    700689 $result = $sql->query("SELECT * FROM creature_template WHERE entry = '$entry'");
     
    709698                <input type=\"hidden\" name=\"opp_type\" value=\"edit\"/>
    710699                <input type=\"hidden\" name=\"entry\" value=\"$entry\"/>
    711                
     700
    712701<div class=\"jtab-container\" id=\"container\">
    713702  <ul class=\"jtabs\">
     
    756745 <td>".makeinfocell($lang_creature['entry'],$lang_creature['entry_desc'])."</td>
    757746 <td><a href=\"$creature_datasite$entry\" target=\"_blank\">$entry</a></td>
    758  
     747
    759748 <td>".makeinfocell($lang_creature['name'],$lang_creature['name_desc'])."</td>
    760749 <td colspan=\"3\"><input type=\"text\" name=\"name\" size=\"50\" maxlength=\"100\" value=\"{$mob['name']}\" /></td>
    761750 </tr>
    762  
     751
    763752 <tr>
    764753 <td>".makeinfocell($lang_creature['sub_name'],$lang_creature['sub_name_desc'])."</td>
    765754 <td colspan=\"2\"><input type=\"text\" name=\"subname\" size=\"25\" maxlength=\"100\" value=\"{$mob['subname']}\" /></td>
    766  
     755
    767756 <td>".makeinfocell($lang_creature['script_name'],$lang_creature['script_name_desc'])."</td>
    768757 <td colspan=\"2\"><input type=\"text\" name=\"ScriptName\" size=\"25\" maxlength=\"128\" value=\"{$mob['ScriptName']}\" /></td>
     
    774763
    775764 <td>".makeinfocell($lang_creature['min_level'],$lang_creature['min_level_desc'])."</td>
    776  <td><input type=\"text\" name=\"minlevel\" size=\"8\" maxlength=\"3\" value=\"{$mob['minlevel']}\" /></td>
    777  
     765 <td colspan=\"2\"><input type=\"text\" name=\"minlevel\" size=\"8\" maxlength=\"3\" value=\"{$mob['minlevel']}\" /></td>
     766
    778767 <td>".makeinfocell($lang_creature['max_level'],$lang_creature['max_level_desc'])."</td>
    779  <td><input type=\"text\" name=\"maxlevel\" size=\"8\" maxlength=\"3\" value=\"{$mob['maxlevel']}\" /></td>";
    780  
    781  $rank = array(0 => "", 1 => "", 3 => "", 2 => "", 4 => "");
    782  $rank[$mob['rank']] = " selected=\"selected\" ";
    783  
    784 $output .= "<td>".makeinfocell($lang_creature['rank'],$lang_creature['rank_desc'])."</td>
    785         <td><select name=\"rank\">
    786         <option value=\"0\" {$rank[0]}>0 - {$lang_creature['normal']}</option>
    787         <option value=\"1\" {$rank[1]}>1 - {$lang_creature['elite']}</option>
    788         <option value=\"2\" {$rank[2]}>2 - {$lang_creature['rare_elite']}</option>
    789         <option value=\"3\" {$rank[3]}>3 - {$lang_creature['world_boss']}</option>
    790         <option value=\"4\" {$rank[4]}>4 - {$lang_creature['rare']}</option>
    791         </select></td>
    792 </tr>
    793  
     768 <td colspan=\"2\"><input type=\"text\" name=\"maxlevel\" size=\"8\" maxlength=\"3\" value=\"{$mob['maxlevel']}\" /></td>
     769</tr>
     770
    794771<tr>
    795772<td>".makeinfocell($lang_creature['min_health'],$lang_creature['min_health_desc'])."</td>
    796  <td colspan=\"2\"><input type=\"text\" name=\"minhealth\" size=\"14\" maxlength=\"10\" value=\"{$mob['minhealth']}\" /></td>
    797  
     773 <td><input type=\"text\" name=\"minhealth\" size=\"14\" maxlength=\"10\" value=\"{$mob['minhealth']}\" /></td>
     774
    798775 <td>".makeinfocell($lang_creature['max_health'],$lang_creature['max_health_desc'])."</td>
    799  <td colspan=\"2\"><input type=\"text\" name=\"maxhealth\" size=\"14\" maxlength=\"10\" value=\"{$mob['maxhealth']}\" /></td>
    800 </tr>
    801 <tr>
     776 <td><input type=\"text\" name=\"maxhealth\" size=\"14\" maxlength=\"10\" value=\"{$mob['maxhealth']}\" /></td>
     777
     778";
     779 if ($mob['RegenHealth']) $RegenHealth = "checked";
     780        else $RegenHealth = "";
     781
     782$output .= "<td>".makeinfocell($lang_creature['RegenHealth'],$lang_creature['RegenHealth'])."</td>
     783        <td><input type=\"checkbox\" name=\"RegenHealth\" value=\"1\" $RegenHealth /></td>
     784</tr>
     785<tr>
    802786 <td>".makeinfocell($lang_creature['min_mana'],$lang_creature['min_mana_desc'])."</td>
    803787 <td colspan=\"2\"><input type=\"text\" name=\"minmana\" size=\"14\" maxlength=\"10\" value=\"{$mob['minmana']}\" /></td>
    804  
     788
    805789 <td>".makeinfocell($lang_creature['max_mana'],$lang_creature['max_mana_desc'])."</td>
    806790 <td colspan=\"2\"><input type=\"text\" name=\"maxmana\" size=\"14\" maxlength=\"10\" value=\"{$mob['maxmana']}\" /></td>
    807 </tr>
    808 
     791</tr>
    809792<tr>
    810793 <td>".makeinfocell($lang_creature['faction_A'],$lang_creature['faction_A_desc'])."</td>
    811  <td colspan=\"2\"><input type=\"text\" name=\"faction_A\" size=\"14\" maxlength=\"5\" value=\"{$mob['faction_A']}\" /></td>";
     794 <td colspan=\"2\"><input type=\"text\" name=\"faction_A\" size=\"14\" maxlength=\"10\" value=\"{$mob['faction_A']}\" /></td>
     795
     796 <td>".makeinfocell($lang_creature['faction_H'],$lang_creature['faction_H_desc'])."</td>
     797 <td colspan=\"2\"><input type=\"text\" name=\"faction_H\" size=\"14\" maxlength=\"10\" value=\"{$mob['faction_H']}\" /></td>
     798</tr>
     799<tr>";
     800 $rank = array(0 => "", 1 => "", 3 => "", 2 => "", 4 => "");
     801  $rank[$mob['rank']] = " selected=\"selected\" ";
     802
     803 $output .= "<td >".makeinfocell($lang_creature['rank'],$lang_creature['rank_desc'])."</td>
     804        <td><select name=\"rank\">
     805        <option value=\"0\" {$rank[0]}>0 - {$lang_creature['normal']}</option>
     806        <option value=\"1\" {$rank[1]}>1 - {$lang_creature['elite']}</option>
     807        <option value=\"2\" {$rank[2]}>2 - {$lang_creature['rare_elite']}</option>
     808        <option value=\"3\" {$rank[3]}>3 - {$lang_creature['world_boss']}</option>
     809        <option value=\"4\" {$rank[4]}>4 - {$lang_creature['rare']}</option>
     810        </select></td>";
    812811 unset($rank);
    813  
     812
    814813 $type = array(0 => "", 1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => "", 7 => "", 8 => "", 9 => "", 10 => "");
    815814 $type[$mob['type']] = " selected=\"selected\" ";
    816  
    817 $output .= "<td>".makeinfocell($lang_creature['type'],$lang_creature['type_desc'])."</td>
     815
     816$output .= "<td colspan=\"2\">".makeinfocell($lang_creature['type'],$lang_creature['type_desc'])."</td>
    818817 <td colspan=\"2\"><select name=\"type\">
    819818                <option value=\"0\" {$type[0]}>0 - {$lang_creature['other']}</option>
     
    832831<tr>";
    833832 unset($type);
    834  
     833
    835834$npcflag = array(0 => "", 1 => "", 2 => "", 4 => "", 8 => "", 16 => "", 32 => "", 64 => "", 128 => "",
    836835 256 => "", 512 => "", 1024 => "", 2048 => "", 4096 => "", 8192 => "", 16384 => "");
     
    875874           </select></td>";
    876875  unset($npcflag);
    877  
     876
    878877 $trainer_type = array(0 => "", 1 => "", 2 => "", 3 => "");
    879878 $trainer_type[$mob['trainer_type']] = " selected=\"selected\" ";
    880  
     879
    881880$output .= "<td>".makeinfocell($lang_creature['trainer_type'],$lang_creature['trainer_type_desc'])."</td>
    882881           <td colspan=\"2\"><select name=\"trainer_type\">
     
    889888<tr>";
    890889  unset($trainer_type);
    891  
     890
    892891 $family = array(0 => "", 1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => "", 7 => "", 8 => "", 9 => "",
    893892 11 => "", 12 => "", 13 => "", 14 => "", 15 => "", 16 => "", 17 => "", 18 => "", 19 => "", 20 => "", 21 => "",
     
    931930 <td>".makeinfocell($lang_creature['loot_id'],$lang_creature['loot_id_desc'])."</td>
    932931 <td><input type=\"text\" name=\"lootid\" size=\"10\" maxlength=\"10\" value=\"{$mob['lootid']}\" /></td>
    933  
     932
    934933 <td>".makeinfocell($lang_creature['skin_loot'],$lang_creature['skin_loot_desc'])."</td>
    935934 <td><input type=\"text\" name=\"skinloot\" size=\"10\" maxlength=\"10\" value=\"{$mob['skinloot']}\" /></td>
    936  
     935
    937936 <td>".makeinfocell($lang_creature['pickpocket_loot'],$lang_creature['pickpocket_loot_desc'])."</td>
    938937 <td><input type=\"text\" name=\"pickpocketloot\" size=\"10\" maxlength=\"10\" value=\"{$mob['pickpocketloot']}\" /></td>
     
    942941 <td>".makeinfocell($lang_creature['min_gold'],$lang_creature['min_gold_desc'])."</td>
    943942 <td colspan=\"2\"><input type=\"text\" name=\"mingold\" size=\"14\" maxlength=\"30\" value=\"{$mob['mingold']}\" /></td>
    944  
     943
    945944 <td>".makeinfocell($lang_creature['max_gold'],$lang_creature['max_gold_desc'])."</td>
    946945 <td colspan=\"2\"><input type=\"text\" name=\"maxgold\" size=\"14\" maxlength=\"30\" value=\"{$mob['maxgold']}\" /></td>
    947946</tr>";
    948947  unset($family);
    949  
     948
    950949$result1 = $sql->query("SELECT COUNT(*) FROM creature WHERE id = '{$mob['entry']}'");
    951950$output .= "<tr><td colspan=\"6\">{$lang_creature['creature_swapned']} : ".$sql->result($result1, 0)." {$lang_creature['times']}.</td></tr>
     
    961960          <td>".makeinfocell($lang_creature['armor'],$lang_creature['armor_desc'])."</td>
    962961          <td colspan=\"2\"><input type=\"text\" name=\"armor\" size=\"8\" maxlength=\"10\" value=\"{$mob['armor']}\" /></td>
    963          
     962
    964963          <td>".makeinfocell($lang_creature['speed'],$lang_creature['speed_desc'])."</td>
    965964          <td colspan=\"2\"><input type=\"text\" name=\"speed\" size=\"8\" maxlength=\"45\" value=\"{$mob['speed']}\" /></td>
    966965 </tr>
    967  
     966
    968967<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['damage']}:</td></tr>
    969968         <tr>
    970969          <td>".makeinfocell($lang_creature['min_damage'],$lang_creature['min_damage_desc'])."</td>
    971970          <td><input type=\"text\" name=\"mindmg\" size=\"8\" maxlength=\"45\" value=\"{$mob['mindmg']}\" /></td>
    972          
     971
    973972          <td>".makeinfocell($lang_creature['max_damage'],$lang_creature['max_damage_desc'])."</td>
    974973          <td><input type=\"text\" name=\"maxdmg\" size=\"8\" maxlength=\"45\" value=\"{$mob['maxdmg']}\" /></td>
    975  
     974
    976975          <td>".makeinfocell($lang_creature['attack_power'],$lang_creature['attack_power_desc'])."</td>
    977976          <td><input type=\"text\" name=\"attackpower\" size=\"8\" maxlength=\"10\" value=\"{$mob['attackpower']}\" /></td>
     
    980979          <td>".makeinfocell($lang_creature['min_range_dmg'],$lang_creature['min_range_dmg_desc'])."</td>
    981980          <td><input type=\"text\" name=\"minrangedmg\" size=\"8\" maxlength=\"45\" value=\"{$mob['minrangedmg']}\" /></td>
    982          
     981
    983982          <td>".makeinfocell($lang_creature['max_range_dmg'],$lang_creature['max_range_dmg_desc'])."</td>
    984983          <td><input type=\"text\" name=\"maxrangedmg\" size=\"8\" maxlength=\"45\" value=\"{$mob['maxrangedmg']}\" /></td>
    985  
     984
    986985          <td>".makeinfocell($lang_creature['ranged_attack_power'],$lang_creature['ranged_attack_power_desc'])."</td>
    987986          <td><input type=\"text\" name=\"rangedattackpower\" size=\"8\" maxlength=\"10\" value=\"{$mob['rangedattackpower']}\" /></td>
     
    990989          <td>".makeinfocell($lang_creature['attack_time'],$lang_creature['attack_time_desc'])."</td>
    991990          <td><input type=\"text\" name=\"baseattacktime\" size=\"8\" maxlength=\"4\" value=\"{$mob['baseattacktime']}\" /></td>
    992          
     991
    993992          <td>".makeinfocell($lang_creature['range_attack_time'],$lang_creature['range_attack_time_desc'])."</td>
    994993          <td><input type=\"text\" name=\"rangeattacktime\" size=\"8\" maxlength=\"4\" value=\"{$mob['rangeattacktime']}\" /></td>
    995  
    996           <td>".makeinfocell($lang_creature['combat_reach'],$lang_creature['combat_reach_desc'])."</td>
    997           <td><input type=\"text\" name=\"combat_reach\" size=\"8\" maxlength=\"10\" value=\"{$mob['combat_reach']}\" /></td>
     994
     995          <td></td>
     996          <td></td>
    998997 </tr>
    999998 <tr>
    1000           <td>".makeinfocell($lang_creature['bounding_radius'],$lang_creature['bounding_radius_desc'])."</td>
    1001           <td colspan=\"2\"><input type=\"text\" name=\"bounding_radius\" size=\"14\" maxlength=\"45\" value=\"{$mob['bounding_radius']}\" /></td>";
    1002          
    1003          
     999          <td></td>
     1000          <td colspan=\"2\"></td>";
     1001
     1002
    10041003 $dmgschool = array(0 => "", 1 => "", 2 => "", 3 => "", 4 => "", 5 => "", 6 => "");
    10051004 $dmgschool[$mob['dmgschool']] = " selected=\"selected\" ";
    1006  
     1005
    10071006 $output .= "<td>".makeinfocell($lang_creature['dmgschool'],$lang_creature['dmgschool_desc'])."</td>
    10081007           <td colspan=\"2\"><select name=\"dmgschool\">
     
    10161015           </select></td>";
    10171016 unset($dmgschool);
    1018  
     1017
    10191018$output .= "</tr>
    10201019<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['spells']}:</td></tr>
     
    10231022 <td>".makeinfocell($lang_creature['spell']." 1",$lang_creature['spell_desc'])."</td>
    10241023 <td colspan=\"2\"><input type=\"text\" name=\"spell1\" size=\"14\" maxlength=\"11\" value=\"{$mob['spell1']}\" /></td>
    1025  
     1024
    10261025 <td>".makeinfocell($lang_creature['spell']." 2",$lang_creature['spell_desc'])."</td>
    10271026 <td colspan=\"2\"><input type=\"text\" name=\"spell2\" size=\"14\" maxlength=\"11\" value=\"{$mob['spell2']}\" /></td>
     
    10301029 <td>".makeinfocell($lang_creature['spell']." 3",$lang_creature['spell_desc'])."</td>
    10311030 <td colspan=\"2\"><input type=\"text\" name=\"spell3\" size=\"14\" maxlength=\"11\" value=\"{$mob['spell3']}\" /></td>
    1032  
     1031
    10331032 <td>".makeinfocell($lang_creature['spell']." 4",$lang_creature['spell_desc'])."</td>
    10341033 <td colspan=\"2\"><input type=\"text\" name=\"spell4\" size=\"14\" maxlength=\"11\" value=\"{$mob['spell4']}\" /></td>
     
    10391038        <td>".makeinfocell($lang_creature['resis_holy'],$lang_creature['resis_holy_desc'])."</td>
    10401039        <td><input type=\"text\" name=\"resistance1\" size=\"8\" maxlength=\"10\" value=\"{$mob['resistance1']}\" /></td>
    1041          
     1040
    10421041        <td>".makeinfocell($lang_creature['resis_fire'],$lang_creature['resis_fire_desc'])."</td>
    10431042        <td><input type=\"text\" name=\"resistance2\" size=\"8\" maxlength=\"10\" value=\"{$mob['resistance2']}\" /></td>
    1044  
     1043
    10451044        <td>".makeinfocell($lang_creature['resis_nature'],$lang_creature['resis_nature_desc'])."</td>
    10461045        <td><input type=\"text\" name=\"resistance3\" size=\"8\" maxlength=\"10\" value=\"{$mob['resistance3']}\" /></td>
     
    10491048        <td>".makeinfocell($lang_creature['resis_frost'],$lang_creature['resis_frost_desc'])."</td>
    10501049        <td><input type=\"text\" name=\"resistance4\" size=\"8\" maxlength=\"10\" value=\"{$mob['resistance4']}\" /></td>
    1051          
     1050
    10521051        <td>".makeinfocell($lang_creature['resis_shadow'],$lang_creature['resis_shadow_desc'])."</td>
    10531052        <td><input type=\"text\" name=\"resistance5\" size=\"8\" maxlength=\"10\" value=\"{$mob['resistance5']}\" /></td>
    1054  
     1053
    10551054        <td>".makeinfocell($lang_creature['resis_arcane'],$lang_creature['resis_arcane_desc'])."</td>
    10561055        <td><input type=\"text\" name=\"resistance6\" size=\"8\" maxlength=\"10\" value=\"{$mob['resistance6']}\" /></td>
    10571056 </tr>
    1058  
     1057
    10591058 </table><br /><br />
    10601059</div>";
     
    10641063<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['models']}:</td></tr>
    10651064<tr>
    1066         <td colspan=\"2\">".makeinfocell($lang_creature['modelid_Aale'],$lang_creature['modelid_Aale_desc'])."</td>
     1065        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_A'],$lang_creature['modelid_A_desc'])."</td>
    10671066        <td><input type=\"text\" name=\"modelid_A\" size=\"8\" maxlength=\"11\" value=\"{$mob['modelid_A']}\" /></td>
    1068          
    1069         <td colspan=\"2\">".makeinfocell($lang_creature['modelid_Hemale'],$lang_creature['modelid_Hemale_desc'])."</td>
     1067
     1068        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_A2'],$lang_creature['modelid_A2_desc'])."</td>
     1069        <td><input type=\"text\" name=\"modelid_A2\" size=\"8\" maxlength=\"11\" value=\"{$mob['modelid_A2']}\" /></td>
     1070</tr>
     1071<tr>
     1072        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_H'],$lang_creature['modelid_H_desc'])."</td>
    10701073        <td><input type=\"text\" name=\"modelid_H\" size=\"8\" maxlength=\"11\" value=\"{$mob['modelid_H']}\" /></td>
    1071 </tr>
    1072 <tr>
    1073         <td>".makeinfocell($lang_creature['equip_slot']." 1",$lang_creature['equip_slot_desc'])."</td>
    1074         <td><input type=\"text\" name=\"equipslot1\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipslot1']}\" /></td>
    1075          
    1076         <td>".makeinfocell($lang_creature['equip_model']." 1",$lang_creature['equip_model_desc'])."</td>
    1077         <td><input type=\"text\" name=\"equipmodel1\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipmodel1']}\" /></td>
    1078  
    1079         <td>".makeinfocell($lang_creature['equip_info']." 1",$lang_creature['equip_info_desc'])."</td>
    1080         <td><input type=\"text\" name=\"equipinfo1\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipinfo1']}\" /></td>
    1081 </tr>
    1082 <tr>
    1083         <td>".makeinfocell($lang_creature['equip_slot']." 2",$lang_creature['equip_slot_desc'])."</td>
    1084         <td><input type=\"text\" name=\"equipslot2\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipslot2']}\" /></td>
    1085          
    1086         <td>".makeinfocell($lang_creature['equip_model']." 2",$lang_creature['equip_model_desc'])."</td>
    1087         <td><input type=\"text\" name=\"equipmodel2\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipmodel2']}\" /></td>
    1088  
    1089         <td>".makeinfocell($lang_creature['equip_info']." 2",$lang_creature['equip_info_desc'])."</td>
    1090         <td><input type=\"text\" name=\"equipinfo2\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipinfo2']}\" /></td>
    1091 </tr>
    1092 <tr>
    1093         <td>".makeinfocell($lang_creature['equip_slot']." 3",$lang_creature['equip_slot_desc'])."</td>
    1094         <td><input type=\"text\" name=\"equipslot3\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipslot3']}\" /></td>
    1095          
    1096         <td>".makeinfocell($lang_creature['equip_model']." 3",$lang_creature['equip_model_desc'])."</td>
    1097         <td><input type=\"text\" name=\"equipmodel3\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipmodel3']}\" /></td>
    1098  
    1099         <td>".makeinfocell($lang_creature['equip_info']." 3",$lang_creature['equip_info_desc'])."</td>
    1100         <td><input type=\"text\" name=\"equipinfo3\" size=\"8\" maxlength=\"10\" value=\"{$mob['equipinfo3']}\" /></td>
    1101 </tr>
    1102 
     1074
     1075        <td colspan=\"2\">".makeinfocell($lang_creature['modelid_H2'],$lang_creature['modelid_H2_desc'])."</td>
     1076        <td><input type=\"text\" name=\"modelid_H2\" size=\"8\" maxlength=\"11\" value=\"{$mob['modelid_H2']}\" /></td>
     1077</tr>
     1078</table><br /><br />
     1079";
     1080
     1081
     1082$result1 = $sql->query("SELECT * FROM creature_equip_template WHERE entry = '{$mob['equipment_id']}'");
     1083if ($mobequip = $sql->fetch_assoc($result1)){
     1084
     1085$output .= "<br /><br /><table class=\"lined\" style=\"width: 720px;\">
     1086<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['equipment']}:</td></tr>
     1087<tr>
     1088        <td>".makeinfocell($lang_creature['equip_slot']." 1",$lang_creature['equip_slot1_desc'])."</td>
     1089        <td><input type=\"text\" name=\"equipslot1\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipslot1']}\" /></td>
     1090
     1091        <td>".makeinfocell($lang_creature['equip_model']." 1",$lang_creature['equip_model1_desc'])."</td>
     1092        <td><input type=\"text\" name=\"equipmodel1\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipmodel1']}\" /></td>
     1093
     1094        <td>".makeinfocell($lang_creature['equip_info']." 1",$lang_creature['equip_info1_desc'])."</td>
     1095        <td><input type=\"text\" name=\"equipinfo1\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipinfo1']}\" /></td>
     1096</tr>
     1097<tr>
     1098        <td>".makeinfocell($lang_creature['equip_slot']." 2",$lang_creature['equip_slot2_desc'])."</td>
     1099        <td><input type=\"text\" name=\"equipslot2\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipslot2']}\" /></td>
     1100
     1101        <td>".makeinfocell($lang_creature['equip_model']." 2",$lang_creature['equip_model2_desc'])."</td>
     1102        <td><input type=\"text\" name=\"equipmodel2\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipmodel2']}\" /></td>
     1103
     1104        <td>".makeinfocell($lang_creature['equip_info']." 2",$lang_creature['equip_info2_desc'])."</td>
     1105        <td><input type=\"text\" name=\"equipinfo2\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipinfo2']}\" /></td>
     1106</tr>
     1107<tr>
     1108        <td>".makeinfocell($lang_creature['equip_slot']." 3",$lang_creature['equip_slot3_desc'])."</td>
     1109        <td><input type=\"text\" name=\"equipslot3\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipslot3']}\" /></td>
     1110
     1111        <td>".makeinfocell($lang_creature['equip_model']." 3",$lang_creature['equip_model3_desc'])."</td>
     1112        <td><input type=\"text\" name=\"equipmodel3\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipmodel3']}\" /></td>
     1113
     1114        <td>".makeinfocell($lang_creature['equip_info']." 3",$lang_creature['equip_info3_desc'])."</td>
     1115        <td><input type=\"text\" name=\"equipinfo3\" size=\"8\" maxlength=\"10\" value=\"{$mobequip['equipinfo3']}\" /></td>
     1116</tr>
    11031117</table><br /><br />
    11041118</div>";
    1105        
     1119}
     1120else
     1121{
     1122$output .= "<br /><br /><table class=\"lined\" style=\"width: 720px;\">
     1123<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['equipment']}:</td></tr>
     1124</table><br /><br />
     1125</div>";
     1126}
     1127
    11061128$output .= "<div id=\"pane2\">
    11071129        <br /><br /><table class=\"lined\" style=\"width: 720px;\">
     
    11101132 <td>".makeinfocell($lang_creature['ai_name'],$lang_creature['ai_name_desc'])."</td>
    11111133 <td colspan=\"2\"><input type=\"text\" name=\"AIName\" size=\"14\" maxlength=\"128\" value=\"{$mob['AIName']}\" /></td>
    1112  
     1134
    11131135 <td>".makeinfocell($lang_creature['movement_type'],$lang_creature['movement_type_desc'])."</td>
    11141136 <td colspan=\"2\"><input type=\"text\" name=\"MovementType\" size=\"14\" maxlength=\"24\" value=\"{$mob['MovementType']}\" /></td>
     
    11191141 $class = array(0 => "", 1 => "", 2 => "", 3 => "", 4 => "",5 => "",7 => "",8 => "",9 => "",11 => "");
    11201142 $class[$mob['class']] = " selected=\"selected\" ";
    1121  
     1143
    11221144$output .= "<td>".makeinfocell($lang_creature['class'],$lang_creature['class_desc'])."</td>
    11231145           <td><select name=\"class\">
     
    11321154                <option value=\"9\" {$class[9]}>9 - {$lang_id_tab['warlock']}</option>
    11331155                <option value=\"11\" {$class[11]}>11 - {$lang_id_tab['druid']}</option>
    1134            </select></td>"; 
     1156           </select></td>";
    11351157  unset($class);
    1136  
     1158
    11371159 $race = array(0 => "", 1 => "", 2 => "", 3 => "", 4 => "",5 => "",6 => "", 7 => "",8 => "",10 => "",11 => "");
    11381160 $race[$mob['race']] = " selected=\"selected\" ";
    1139  
     1161
    11401162 $output .= "<td>".makeinfocell($lang_creature['race'],$lang_creature['race_desc'])."</td>
    11411163           <td><select name=\"race\">
     
    11551177 if ($mob['RacialLeader']) $RacialLeader = "checked";
    11561178        else $RacialLeader = "";
    1157        
     1179
    11581180$output .= "<td>".makeinfocell($lang_creature['RacialLeader'],$lang_creature['RacialLeader_desc'])."</td>
    11591181        <td><input type=\"checkbox\" name=\"RacialLeader\" value=\"1\" $RacialLeader /></td>
     
    11661188 $InhabitType = array(0 => "", 1 => "", 2 => "", 3 => "");
    11671189 $InhabitType[$mob['InhabitType']] = " selected=\"selected\" ";
    1168  
     1190
    11691191$output .= "<td>".makeinfocell($lang_creature['inhabit_type'],$lang_creature['inhabit_type_desc'])."</td>
    11701192           <td><select name=\"InhabitType\">
     
    11751197           </select></td>";
    11761198  unset($InhabitType);
    1177  
     1199
    11781200 if ($mob['civilian']) $civilian = "checked";
    11791201        else $civilian = "";
    1180  
     1202
    11811203$output .= "<td>".makeinfocell($lang_creature['civilian'],$lang_creature['civilian_desc'])."</td>
    11821204 <td><input type=\"checkbox\" name=\"civilian\" value=\"1\" $civilian /></td>
    1183 </tr>   
     1205</tr>
    11841206<tr>
    11851207        <td>".makeinfocell($lang_creature['flags'],$lang_creature['flags_desc'])."</td>
    11861208        <td><input type=\"text\" name=\"flags\" size=\"8\" maxlength=\"11\" value=\"{$mob['flags']}\" /></td>
    1187          
     1209
    11881210        <td>".makeinfocell($lang_creature['dynamic_flags'],$lang_creature['dynamic_flags_desc'])."</td>
    11891211        <td><input type=\"text\" name=\"dynamicflags\" size=\"8\" maxlength=\"11\" value=\"{$mob['dynamicflags']}\" /></td>
    1190  
     1212
    11911213        <td>".makeinfocell($lang_creature['flag_1'],$lang_creature['flag_1_desc'])."</td>
    11921214        <td><input type=\"text\" name=\"flag1\" size=\"8\" maxlength=\"11\" value=\"{$mob['flag1']}\" /></td>
     
    12151237                $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip");
    12161238                $output .= "<br /><input type=\"checkbox\" name=\"del_loot_items[]\" value=\"$item[0]\" /></td>";
    1217                
     1239
    12181240                if ($cel_counter >= 16) {
    12191241                        $cel_counter = 0;
     
    12641286                $query1 = $sql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'");
    12651287                $quest_templ = $sql->fetch_row($query1);
    1266                
     1288
    12671289                $output .= "<tr><td width=\"5%\"><input type=\"checkbox\" name=\"del_questrelation[]\" value=\"$quest[0]\" /></td>
    12681290                                        <td width=\"95%\" align=\"left\"><a class=\"tooltip\" href=\"$quest_datasite$quest[0]\" target=\"_blank\">({$quest_templ[0]}) $quest_templ[1]</a></td></tr>";
     
    12791301                $query1 = $sql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'");
    12801302                $quest_templ = $sql->fetch_row($query1);
    1281                
     1303
    12821304                $output .= "<tr><td width=\"5%\"><input type=\"checkbox\" name=\"del_involvedrelation[]\" value=\"$quest[0]\" /></td>
    12831305                                <td width=\"95%\" align=\"left\"><a class=\"tooltip\" href=\"$quest_datasite$quest[0]\" target=\"_blank\">({$quest_templ[0]}) $quest_templ[1]</a></td></tr>";
     
    12851307
    12861308$output .= "<tr class=\"large_bold\" align=\"left\"><td colspan=\"2\" class=\"hidden\">{$lang_creature['add_ends_quests']}:</td></tr>
    1287         <tr><td colspan=\"2\" align=\"left\">".makeinfocell($lang_creature['quest_id'],$lang_creature['quest_id_desc'])." : 
     1309        <tr><td colspan=\"2\" align=\"left\">".makeinfocell($lang_creature['quest_id'],$lang_creature['quest_id_desc'])." :
    12881310                <input type=\"text\" name=\"involvedrelation\" size=\"8\" maxlength=\"8\" value=\"\" /></td></tr>
    12891311
     
    13101332                $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip");
    13111333                $output .= "<br /><input type=\"checkbox\" name=\"del_vendor_item[]\" value=\"$item[0]\" /></td>";
    1312                        
     1334
    13131335                if ($cel_counter >= 16) {
    13141336                        $cel_counter = 0;
     
    13391361        <tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_creature['trains']}:</td></tr>
    13401362        <tr><td colspan=\"6\">";
    1341        
     1363
    13421364        $cel_counter = 0;
    13431365        $row_flag = 0;
     
    13501372                $output .= maketooltip($spell[0], "$spell_datasite$spell[0]", $tooltip, "info_tooltip");
    13511373                $output .= "<br /><input type=\"checkbox\" name=\"del_trainer_spell[]\" value=\"$spell[0]\" /></td>";
    1352                                        
     1374
    13531375                if ($cel_counter >= 16) {
    13541376                        $cel_counter = 0;
     
    13971419                $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip");
    13981420                $output .= "<br /><input type=\"checkbox\" name=\"del_skin_items[]\" value=\"$item[0]\" /></td>";
    1399                
     1421
    14001422                if ($cel_counter >= 16) {
    14011423                        $cel_counter = 0;
     
    15161538                error($lang_creature['item_not_found']);
    15171539                exit();
    1518                 } 
     1540                }
    15191541}
    15201542
     
    15231545//DO UPDATE CREATURE TEMPLATE
    15241546//########################################################################################################################
    1525 //Now We are going to clone the faction variable to the H faction for newer revision support. (MeleFire)
    1526 $faction_A = faction_H;
    1527 //Now we are done. Yay!
     1547
    15281548function do_update() {
    15291549 global $mangos_db, $realm_id;
     
    15311551 if (!isset($_POST['opp_type']) || $_POST['opp_type'] === '') redirect("creature.php?error=1");
    15321552 if (!isset($_POST['entry']) || $_POST['entry'] === '') redirect("creature.php?error=1");
    1533  
     1553
    15341554 $sql = new SQL;
    15351555 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);
     
    16291649        else $equipslot3 = 0;
    16301650 if (isset($_POST['lootid']) && $_POST['lootid'] != '') $lootid = $sql->quote_smart($_POST['lootid']);
    1631          else $lootid = 0;     
     1651         else $lootid = 0;
    16321652 if (isset($_POST['pickpocketloot']) && $_POST['pickpocketloot'] != '') $pickpocketloot = $sql->quote_smart($_POST['pickpocketloot']);
    16331653        else $pickpocketloot = 0;
     
    16901710        if (isset($_POST['del_loot_items']) && $_POST['del_loot_items'] != '') $del_loot_items = $sql->quote_smart($_POST['del_loot_items']);
    16911711                else $del_loot_items = NULL;
    1692        
     1712
    16931713        if (isset($_POST['involvedrelation']) && $_POST['involvedrelation'] != '') $involvedrelation = $sql->quote_smart($_POST['involvedrelation']);
    16941714                else $involvedrelation = 0;
     
    17851805                if ($npcflag[$t] & 16384) $tmp = $tmp + 16384;
    17861806                }
    1787         $npcflag = ($tmp) ? $tmp : 0;   
     1807        $npcflag = ($tmp) ? $tmp : 0;
    17881808
    17891809  if ($_POST['opp_type'] == "add_new"){
     
    18061826
    18071827        $sql_query = "UPDATE creature_template SET  ";
    1808  
     1828
    18091829        $result = $sql->query("SELECT * FROM creature_template WHERE entry = '$entry'");
    18101830        if ($mob_templ = $sql->fetch_assoc($result)){
     
    18771897          $sql->free_result($result);
    18781898          unset($mob_templ);
    1879          
     1899
    18801900        if (($sql_query == "UPDATE creature_template SET  ")&&(!$item)&&(!$del_loot_items)
    18811901                &&(!$del_questrelation)&&(!$questrelation)&&(!$del_involvedrelation)&&(!$involvedrelation)
     
    18901910                                        } else $sql_query = "";
    18911911                }
    1892                
     1912
    18931913        if ($trainer_spell){
    18941914        $sql_query .= "INSERT INTO npc_trainer (entry, spell, spellcost, reqskill, reqskillvalue, reqlevel)
    18951915                        VALUES ($entry,$trainer_spell,$spellcost,$reqskill ,$reqskillvalue ,$reqlevel);\n";
    18961916        }
    1897        
     1917
    18981918        if ($del_trainer_spell){
    18991919        foreach($del_trainer_spell as $spell_id)
     
    19051925                        VALUES ($lootid,$item,'$ChanceOrRef', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$freeforall ,$lootcondition ,$condition_value1 ,$condition_value2);\n";
    19061926        }
    1907        
     1927
    19081928        if ($del_loot_items){
    19091929        foreach($del_loot_items as $item_id)
     
    19151935                        VALUES ($skinloot,$skin_item,'$skin_ChanceOrRef', '$skin_QuestChanceOrGroup' ,$skin_mincount ,$skin_maxcount ,$skin_freeforall,$skin_lootcondition ,$skin_condition_value1 ,$skin_condition_value2);\n";
    19161936        }
    1917        
     1937
    19181938        if ($del_skin_items){
    19191939        foreach($del_skin_items as $item_id)
    19201940                $sql_query .= "DELETE FROM skinning_loot_template WHERE entry = $skinloot AND item = $item_id;\n";
    19211941        }
    1922    
     1942
    19231943        if ($pp_item){
    19241944        $sql_query .= "INSERT INTO pickpocketing_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)
     
    19341954        $sql_query .= "INSERT INTO creature_questrelation (id, quest) VALUES ($entry,$questrelation);\n";
    19351955        }
    1936        
     1956
    19371957        if ($involvedrelation){
    19381958        $sql_query .= "INSERT INTO creature_involvedrelation (id, quest) VALUES ($entry,$involvedrelation);\n";
     
    19481968                $sql_query .= "DELETE FROM creature_involvedrelation WHERE id = $entry AND quest = $quest_id;\n";
    19491969        }
    1950        
     1970
    19511971        if ($del_vendor_item){
    19521972        foreach($del_vendor_item as $item_id)
    19531973                $sql_query .= "DELETE FROM npc_vendor WHERE entry = $entry AND item = $item_id;\n";
    19541974        }
    1955        
     1975
    19561976        if ($vendor_item){
    19571977        $sql_query .= "INSERT INTO npc_vendor (entry, item, maxcount, incrtime)
     
    19832003 if ($result) redirect("creature.php?action=edit&entry=$entry&error=4");
    19842004        else redirect("creature.php");
    1985  
     2005
    19862006}
    19872007
     
    20332053 $sql->query("DELETE FROM npc_trainer WHERE entry = '$entry'");
    20342054 $sql->query("DELETE FROM npc_gossip WHERE npc_guid = '$entry'");
    2035          
     2055
    20362056 $sql->close();
    20372057 redirect("creature.php");
    20382058 }
    20392059
    2040  
     2060
    20412061//########################################################################################################################
    20422062//   DELETE ALL CREATURE SPAWNS
     
    20602080 redirect("creature.php?action=edit&entry=$entry&error=4");
    20612081 }
    2062  
     2082
    20632083
    20642084//########################################################################################################################
Note: See TracChangeset for help on using the changeset viewer.