<!--<?php
include_once PrintEot('left');
include_once PrintApp('admin_header');
print<<<EOT
-->
<form action="$basename&type=batch" method="post" name="FORM">
<input type="hidden" name="delid" id="delid" value="">
<h2 class="h1"><span class="mr10 fl">勛章列表</span><a href="{$basename}&type=add" class="btn_add fl"><i>添加新勛章</i></a></h2>
<div class="admin_table mb10">
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr class="tr2">
      <td width="30"><span onclick="CheckAll(document.FORM)" class="cp">啟用</span></td>
      <td style="width:40px;">順序</td>
      <td width="160">勛章名稱</td>
      <td width="160">勛章說明</td>
      <td width="70">勛章圖標</td>
      <td>勛章發放機制</td>
      <td>操作</td>
    </tr>
<!--
EOT;
if (!$medal) { 
print<<<EOT
-->
    <tr>
      <td class="p10" colspan="9"><div class="admin_tips">啊哦，沒有你要的信息！</div></td>
    </tr>
<!--
EOT;
} else { 
foreach ($medal as $v) {
$type = $typeArr[$v['type']];
$isOpen = ($v['is_open'] == 1) ? 'checked="checked"' : '';
print<<<EOT
-->
    <tr class="tr1 vt">
      <td class="td2">
	<input type="checkbox"  value="1" name="selid[$v[medal_id]]"  $isOpen>	  
	  </td>
      <td class="td2"><input name="sortorder[$v[medal_id]]" value="$v[sortorder]" type="text" class="input" style="width:20px;" maxlength="5" /></td>
      <td class="td2"><input name="name[$v[medal_id]]" value="$v[name]" type="text" class="input input_wa" maxlength="255" /></td>
      <td class="td2"><input name="descrip[$v[medal_id]]" value="$v[descrip]" type="text" class="input input_wa" /></td>
      <td class="td2"><img width="24" width="24" src="{$v[smallimage]}"  /></td>
      <td class="td2">$type</td>
      <td class="td2">
<!--
EOT;
if ($v['type'] == 0) {
print<<<EOT
-->	
  <span style="color:#999999">系統默認</span>
<!--
EOT;
} else {
print<<<EOT
-->	  
	  <a href="$basename&type=edit&id=$v[medal_id]">[編輯]</a>&nbsp;&nbsp;<a href="javascript:" onclick="if (confirm('確認要刪除,刪除勛章將刪除已經獲取該勛章的會員信息？')) window.location.href='$basename&type=del&id=$v[medal_id]' ">[刪除]</a>
<!--
EOT;
}
print<<<EOT
-->	
	  
	  </td>
    </tr>
<!--
EOT;
} }
print<<<EOT
-->

  </table>
</div>
<div class="mb10 tac"><span class="btn"><span><button type="submit">提 交</button></span></span></div>
<script type="text/javascript">
	function checkDelAll() {
		if (confirm('確認要刪除,刪除勛章將刪除已經獲取該勛章的會員信息？')) {
			document.getElementById('delid').value = 1;
			return true;
		} else {
			return false;
		}
	}
</script>
<!--
EOT;
include_once PrintEot('adminbottom');
?>-->
