<input type="hidden" name="attr_cat_id" id="attr_cat_id" value="<?php echo $this->_var['attr_cat_id']; ?>" />
<table class="table table-bordered" width="100%">
<?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
<td><?php echo $this->_var['c']['title']; ?></td>
<td>
<!--选项-->
<?php if ($this->_var['c']['input_type'] == 2): ?>
<?php if ($this->_var['c']['attr_type'] > 1): ?>
<div class="attr_item">
<a href="javascript:;" class="attr_item_add">增加</a>
<div class="attr_item_list">

<?php if ($this->_var['attr'] [ $this->_var['c']['id'] ]): ?>  
<?php $_from = $this->_var['attr'][$this->_var['c'][id]][value]; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'a_c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['a_c']):
?>
<div class="<?php if ($this->_var['k'] == 0): ?>attr_item_copy<?php endif; ?> attr_item_li">
 
<select name="attr[<?php echo $this->_var['c']['id']; ?>][value][]"   class="attr_value" >
<?php $_from = $this->_var['c']['select']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('kk', 'cc');if (count($_from)):
    foreach ($_from AS $this->_var['kk'] => $this->_var['cc']):
?>
		<option value="<?php echo $this->_var['kk']; ?>" <?php if ($this->_var['kk'] == $this->_var['a_c']): ?> selected="selected"<?php endif; ?>><?php echo $this->_var['cc']; ?></option>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</select>
价格：<input type="text" name="attr[<?php echo $this->_var['c']['id']; ?>][price][]" value="<?php echo $this->_var['attr'][$this->_var['c'][id]][price][$this->_var['k']]; ?>" class="attr_price" />
<a href="javascript:;" class="attr_item_remove"><i class="icon-remove"></i></a>
</div>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
<?php else: ?>
<div class="attr_item_copy attr_item_li"  >
<select name="attr[<?php echo $this->_var['c']['id']; ?>][value][]"   class="attr_value" >
<?php $_from = $this->_var['c']['select']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('kk', 'cc');if (count($_from)):
    foreach ($_from AS $this->_var['kk'] => $this->_var['cc']):
?>
		<option value="<?php echo $this->_var['kk']; ?>" ><?php echo $this->_var['cc']; ?></option>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</select>
价格：<input type="text" name="attr[<?php echo $this->_var['c']['id']; ?>][price][]"  value="" class="attr_price" />
<a href="javascript:;" class="attr_item_remove"><i class="icon-remove"></i></a>
</div>
<?php endif; ?>
</div>
</div>
<?php else: ?>
<select name="attr[<?php echo $this->_var['c']['id']; ?>]" >
<?php $_from = $this->_var['c']['select']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('kk', 'cc');if (count($_from)):
    foreach ($_from AS $this->_var['kk'] => $this->_var['cc']):
?>
		<option value="<?php echo $this->_var['kk']; ?>" <?php if ($this->_var['kk'] == $this->_var['attr'] [ $this->_var['c']['id'] ]): ?> selected="selected"<?php endif; ?>><?php echo $this->_var['cc']; ?></option>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</select> 
<?php endif; ?>
 
<?php else: ?>
<input type="text" name="attr[<?php echo $this->_var['c']['id']; ?>]" value="<?php echo $this->_var['attr'][$this->_var['c']['id']]; ?>">
<?php endif; ?>  
</td>
</tr>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

</table>
<style type="text/css">
.attr_item_copy .attr_item_remove{display:none;}
</style>