<!--{if $command=='check'}-->
<form method="post" name="npcmng" onsubmit="admin.php">
	<input type="hidden" name="mode" value="npcmng">
	<input type="hidden" id="command" name="command" value="list">
	<input type="hidden" name="start" value="$start">
	<input type="hidden" name="checkmode" value="$checkmode">	
	<input type="hidden" name="checkinfo" value="$checkinfo">
	<input type="hidden" name="name" value="{$npc['name']}">
	<input type="hidden" name="pid" value="{$npc['pid']}">
	
	<input type="hidden" name="itm0" value="{$npc['itm0']}">
	<input type="hidden" name="itme0" value="{$npc['itme0']}">
	<input type="hidden" name="itmk0" value="{$npc['itmk0']}">
	<input type="hidden" name="itms0" value="{$npc['itms0']}">
	<input type="hidden" name="itmsk0" value="{$npc['itmsk0']}">
	<table class="admin">
		<tr>		
			<th>Variable</th>
			<th>Value</th>
			<th>Equip Property</th>
			<th>Equip Value</th>
			<th>Package Property</th>
			<th>Package Value</th>
		</tr>
		<tr>		
			<td>Name</td>
			<td>{$npc['name']}</td>
			<td>Weapon</td>
			<td><input size="20" type="text" name="wep" value="{$npc['wep']}" maxlength="30"></td>
			<td>Pack1</td>
			<td><input size="20" type="text" name="itm1" value="{$npc['itm1']}" maxlength="30"></td>
		</tr>
		<tr>		
			<td>Gender</td>
			<td><input size="20" type="text" name="gd" value="{$npc['gd']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="wepk" value="{$npc['wepk']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="itmk1" value="{$npc['itmk1']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>ID</td>
			<td><input size="20" type="text" name="sNo" value="{$npc['sNo']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="wepe" value="{$npc['wepe']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="itme1" value="{$npc['itme1']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Avatar</td>
			<td><input size="20" type="text" name="icon" value="{$npc['icon']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="weps" value="{$npc['weps']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="itms1" value="{$npc['itms1']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Club</td>
			<td><input size="20" type="text" name="club" value="{$npc['club']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="wepsk" value="{$npc['wepsk']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="itmsk1" value="{$npc['itmsk1']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>HP</td>
			<td><input size="20" type="text" name="hp" value="{$npc['hp']}" maxlength="20"></td>
			<td>Armor(Body)</td>
			<td><input size="20" type="text" name="arb" value="{$npc['arb']}" maxlength="30"></td>
			<td>Pack2</td>
			<td><input size="20" type="text" name="itm2" value="{$npc['itm2']}" maxlength="30"></td>
		</tr>
		<tr>
			<td>Max HP</td>
			<td><input size="20" type="text" name="mhp" value="{$npc['mhp']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="arbk" value="{$npc['arbk']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="itmk2" value="{$npc['itmk2']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>SP</td>
			<td><input size="20" type="text" name="sp" value="{$npc['sp']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="arbe" value="{$npc['arbe']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="itme2" value="{$npc['itme2']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Max SP</td>
			<td><input size="20" type="text" name="msp" value="{$npc['msp']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="arbs" value="{$npc['arbs']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="itms2" value="{$npc['itms2']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Base ATK</td>
			<td><input size="20" type="text" name="att" value="{$npc['att']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="arbsk" value="{$npc['arbsk']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="itmsk2" value="{$npc['itmsk2']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Base DEF</td>
			<td><input size="20" type="text" name="def" value="{$npc['def']}" maxlength="20"></td>
			<td>Aromr(Head)</td>
			<td><input size="20" type="text" name="arh" value="{$npc['arh']}" maxlength="30"></td>
			<td>Pack3</td>
			<td><input size="20" type="text" name="itm3" value="{$npc['itm3']}" maxlength="30"></td>
		</tr>
		<tr>
			<td>Position</td>
			<td><input size="20" type="text" name="pls" value="{$npc['pls']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="arhk" value="{$npc['arhk']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="itmk3" value="{$npc['itmk3']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>LVL</td>
			<td><input size="20" type="text" name="lvl" value="{$npc['lvl']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="arhe" value="{$npc['arhe']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="itme3" value="{$npc['itme3']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>EXP</td>
			<td><input size="20" type="text" name="exp" value="{$npc['exp']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="arhs" value="{$npc['arhs']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="itms3" value="{$npc['itms3']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Coin</td>
			<td><input size="20" type="text" name="money" value="{$npc['money']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="arhsk" value="{$npc['arhsk']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="itmsk3" value="{$npc['itmsk3']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Opponent</td>
			<td><input size="20" type="text" name="bid" value="{$npc['bid']}" maxlength="20"></td>
			<td>Armor(Arm)</td>
			<td><input size="20" type="text" name="ara" value="{$npc['ara']}" maxlength="30"></td>
			<td>Pack4</td>
			<td><input size="20" type="text" name="itm4" value="{$npc['itm4']}" maxlength="30"></td>
		</tr>
		<tr>
			<td>Wounds</td>
			<td><input size="20" type="text" name="inf" value="{$npc['inf']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="arak" value="{$npc['arak']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="itmk4" value="{$npc['itmk4']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Rage</td>
			<td><input size="20" type="text" name="rage" value="{$npc['rage']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="arae" value="{$npc['arae']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="itme4" value="{$npc['itme4']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Stance</td>
			<td><input size="20" type="text" name="pose" value="{$npc['pose']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="aras" value="{$npc['aras']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="itms4" value="{$npc['itms4']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Tactics</td>
			<td><input size="20" type="text" name="tactic" value="{$npc['tactic']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="arask" value="{$npc['arask']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="itmsk4" value="{$npc['itmsk4']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Kills</td>
			<td><input size="20" type="text" name="killnum" value="{$npc['killnum']}" maxlength="20"></td>
			<td>Armor(Feet)</td>
			<td><input size="20" type="text" name="arf" value="{$npc['arf']}" maxlength="30"></td>
			<td>Pack5</td>
			<td><input size="20" type="text" name="itm5" value="{$npc['itm5']}" maxlength="30"></td>
		</tr>
		<tr>
			<td>Blunt</td>
			<td><input size="20" type="text" name="wp" value="{$npc['wp']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="arfk" value="{$npc['arfk']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="itmk5" value="{$npc['itmk5']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Slash</td>
			<td><input size="20" type="text" name="wk" value="{$npc['wk']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="arfe" value="{$npc['arfe']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="itme5" value="{$npc['itme5']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Firearm</td>
			<td><input size="20" type="text" name="wg" value="{$npc['wg']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="arfs" value="{$npc['arfs']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="itms5" value="{$npc['itms5']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Throwing</td>
			<td><input size="20" type="text" name="wc" value="{$npc['wc']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="arfsk" value="{$npc['arfsk']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="itmsk5" value="{$npc['itmsk5']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Explosive</td>
			<td><input size="20" type="text" name="wd" value="{$npc['wd']}" maxlength="20"></td>
			<td>Amulet</td>
			<td><input size="20" type="text" name="art" value="{$npc['art']}" maxlength="30"></td>
			<td>Pack6</td>
			<td><input size="20" type="text" name="itm6" value="{$npc['itm6']}" maxlength="30"></td>
		</tr>
		<tr>
			<td>Magic</td>
			<td><input size="20" type="text" name="wf" value="{$npc['wf']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="artk" value="{$npc['artk']}" maxlength="20"></td>
			<td>Type</td>
			<td><input size="20" type="text" name="itmk6" value="{$npc['itmk6']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Team Name</td>
			<td><input size="20" type="text" name="teamID" value="{$npc['teamID']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="arte" value="{$npc['arte']}" maxlength="20"></td>
			<td>Effect</td>
			<td><input size="20" type="text" name="itme6" value="{$npc['itme6']}" maxlength="20"></td>
		</tr>
		<tr>
			<td>Team Pass</td>
			<td><input size="20" type="text" name="teamPass" value="{$npc['teamPass']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="arts" value="{$npc['arts']}" maxlength="20"></td>
			<td>DUR</td>
			<td><input size="20" type="text" name="itms6" value="{$npc['itms6']}" maxlength="20"></td>
		</tr>
		<tr>
			<td></td>
			<td></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="artsk" value="{$npc['artsk']}" maxlength="20"></td>
			<td>Sub-Type</td>
			<td><input size="20" type="text" name="itmsk6" value="{$npc['itmsk6']}" maxlength="20"></td>
		</tr>
	</table>
	<input type="submit" value="EDIT NPC" onclick="$('command').value = 'submitedit'">
</form> 
<form method="post" name="npcmng" onsubmit="admin.php">
	<input type="hidden" name="mode" value="npcmng">
	<input type="hidden" name="command" value="list">
	<input type="submit" value="BACK">
</form>
<!--{else}-->
<form method="post" name="npcmng" onsubmit="admin.php">
	<input type="hidden" name="mode" value="npcmng">
	<input type="hidden" id="command" name="command" value="find">
	<input type="hidden" name="start" value="$start">
	<input type="hidden" name="pagemode" value="">
	<table class="admin">
		<tr>
			<th colspan=2>Find NPC</th>
		</tr>
		<tr>
			<td>Search：
				<select name="checkmode">
					<option value="name" <!--{if $checkmode == 'name'}-->selected<!--{/if}-->>NPC name
					<option value="teamID" <!--{if $checkmode == 'teamID'}-->selected<!--{/if}-->>Team Name
					<option value="pls" <!--{if $checkmode == 'pls'}-->selected<!--{/if}-->>Position
				</select>LIKE
			</td>
			<td>
				<input size="30" type="text" name="checkinfo" id="checkinfo" value="$checkinfo" maxlength="30"><input type="submit" value="SEARCH NPC" onclick="javascript:document.npcmng.pagemode.value='ref'">
			</td>
		</tr>
	</table>
	<br>
	<input type="submit" value="PREV" onclick="javascript:document.npcmng.pagemode.value='up';">
	<span class="yellow">$resultinfo</span>
	<input type="submit" value="NEXT" onclick="javascript:document.npcmng.pagemode.value='down';">
	<table class="admin">
		<tr>
			<th></th>
			<th>Name</th>
			<th>Gender</th>
			<th>ID</th>
			<th>LVL</th>
			<th>Position</th>
			<th>Team</th>
			<th>Status</th>
			<th>SP</th>
			<th>HP</th>
			<th>Club</th>
			<th>Coin</th>
			<th>Mastery</th>
			<th>Weapon</th>
			<th>Operation</th>
		</tr>
		<!--{if isset($npcdata)}-->
		<!--{loop $npcdata $n $npc}-->
		<tr>
			<td><input type="checkbox" id="npc_$n" name="npc_$n" value="{$npc['pid']}"></td>
			<td><span <!--{if $npc['hp']<=0 || $npc['state']>=10}-->class="red"<!--{/if}-->>{$npc['name']}</span></td>
			<td>{$sexinfo[$npc['gd']]}</td>
			<td>{$npc['sNo']}</td>
			<td>{$npc['lvl']}</td>
			<td>{$plsinfo[$npc['pls']]}</td>
			<td>{$npc['teamID']}</td>
			<td><span <!--{if $npc['state']>=10}-->class="red"<!--{/if}-->>{$stateinfo[$npc['state']]}</span></td>
			<td>{$npc['sp']}/{$npc['msp']}</td>
			<td>{$npc['hp']}/{$npc['mhp']}</td>
			<td>{$clubinfo[$npc['club']]}</td>
			<td>{$npc['money']}</td>
			<td>{$npc['wp']}/{$npc['wk']}/{$npc['wg']}/{$npc['wc']}/{$npc['wd']}/{$npc['wf']}</td>
			<td>{$npc['wep']}/{$npc['wepe']}/{$npc['weps']}</td>
			<td><input type="submit" value="EDIT DATA" onclick="$('command').value='edit_{$n}_{$npc['pid']}'"></td>
		</tr>
		<!--{/loop}-->
		<tr>
			<td colspan="2">
				<input type="checkbox" name="npc_all" onchange="for(i=0; i<=$n;i++){if(! $('npc_'+i).disabled){if(this.checked==true){$('npc_'+i).checked=true}else{$('npc_'+i).checked=false}}}">全选
			</td>
			<td colspan="13" style="text-align:center">
				<input type="submit" value="NPC REVIVE" onclick="$('command').value='live'">
				<input type="submit" value="NPC KILL" onclick="$('command').value='kill'">
				<input type="submit" value="NPC CLEAR" onclick="$('command').value='del'">
			</td>
		</tr>
		<!--{/if}-->
	</table>
	
</form>
<!--{/if}-->