{include file="page_header.htm"}
<form name="theForm" method="post" action="product.php">

<table cellspacing="0" cellpadding="0" class="list-table" width="100%" style="border-top:1px #d6dfe7 solid;">
  <tr class="thead">
	<th align="center" width="30"><input type="checkbox" name="check_all" checked value="yes" onClick="return select_all('theForm');" /></th>
	{foreach from=$field key=field item=title}
	{if $field_show.$field=='true'}<th align="left">{$title}</th>{/if}
	{/foreach}
  </tr>
  
	{foreach from=$product_list key=key item=product}
	<tr style="line-height:27px;">
	<td align="center" nowrap height="35" width="80"> 
	<input type="checkbox" name="checked[{$key}]" value="1" checked />
	</td>
	{foreach from=$product key=field item=value}
		{if $field=='category'}
			<td>
			<select name="{$field}[{$key}]" class="select_input">
			{foreach from=$category_tree item=va}
			<option value="{$va.category_id}"{if $va.name == $value} selected="selected"{/if}>{'--'|str_repeat:$va.level}{$va.name}</option>
			{/foreach}
			</select>
			</td>
		{else}
			{if $field_show.$field=='true'}
				<td><input type="text" class="FormSmall" style="width:160px;" name="{$field}[{$key}]" value="{$value}" /></td>
			{else}
				<input type="hidden" name="{$field}[{$key}]" value="{$value}" />
			{/if}			
			
		{/if}
	{/foreach}
	</tr>
	{/foreach}
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_form">
	<tr>
		<td style="border:none;" align="center">
			<input type="hidden" name="act" value="import_insert" />
			<input name="submit" type="submit" value=" 确定 " class="bginput" />
			<input name="reset" type="reset" value=" 重置 " class="bginput" />
		</td>
	</tr>
</table>
</form>
{include file="page_footer.htm"}
<script type="text/javascript">
{literal}
function select_all(frmName){
	var frm=document.forms[frmName];
	for(var i=0;i<frm.elements.length;i++){
		var e =frm.elements[i];
		if (e.type=='checkbox'){
			e.checked =frm.check_all.checked;
		}
	}
}
{/literal}
</script>