<script type="text/javascript">
$(function() { //防止回车提交表单
	document.onkeydown = function(e){ 
		var ev = document.all ? window.event : e;
		if (ev.keyCode==13) $("#mark").val("1"); // 标识不能提交表单
	}
	$(".table_form th").last().css('border','none');
	$(".table_form td").last().css('border','none');
});
function dr_form_check() {
	if ($("#dr_name").val() == '') {
		dr_form_tips('name', false, '{fc_lang("名称")}');
		return false;
	} else {
		dr_form_tips('name', true, '&nbsp;');
	}
	if ($("#mark").val() == 0) { 
		return true;
	} else {
		return false;
	}
}
</script>
<div class="table-list" style="width:600px;max-height:400px;overflow-x:hidden;overflow-y:auto">
<form action="" method="post" id="myform" name="myform" onsubmit="return dr_form_check()">
<input name="mark" id="mark" type="hidden" value="0">
<table width="100%" class="table_form">
<tr>
    <th width="100"><font color="red">*</font>&nbsp;{fc_lang('名称')}： </th>
    <td>
    <input class="input-text" type="text" name="data[name]" id="dr_name" value="{$data['name']}" size="20" />
    <div class="onShow" id="dr_name_tips">{fc_lang('给它一个描述名称')}</div>
    </td>
</tr>
{if $data['id']!=1}
<tr>
    <th style="border:none;padding-top:12px" valign="top">&nbsp;{fc_lang('站点权限')}： </th>
    <td style="border:none;padding-left: 0;">
    <table width="100%" class="table_form">
    {loop $ci->site_info $id $t}
    <tr>
        <td style="border:none"><input class="dr_rule" name="data[site][]" type="checkbox" value="{$id}" {if @in_array($id, $data['site'])}checked="checked"{/if} />&nbsp;&nbsp;{$t['SITE_NAME']}&nbsp; </td>
    </tr>
    {/loop}
    <tr>
        <td style="border:none"><input name="_rule_admin" id="dr_rule" type="checkbox" onclick="dr_selected_by('dr_rule')" />&nbsp;&nbsp;<font color="#FF0000">{fc_lang('只有选中站点才拥有管理权限，新建站点默认无权限')}</font></td>
    </tr>
    </table>
    </td>
</tr>
{/if}
</table>
</form>
</div>