<?php /* Smarty version 2.6.26, created on 2011-04-11 21:56:41
         compiled from view.htm */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'counter', 'view.htm', 66, false),array('function', 'test', 'view.htm', 74, false),)), $this); ?>
<?php echo '
<script type="text/javascript">
Mo.ready(
	function(){
		Mo("#form").bind(\'submit\',function(){
			var result= Mo.Form( this, function(i){
				/*未加载 Effect 组件*/
				if( Mo.Array(Mo.plugin).indexOf(effect) == -1 ){
					alert(i);
				}else{
					Mo.Message( \'error\', i, 3, { "unique" : "error" } );
				}

			});
			return result;
		});
		
		////////////////////
		
		Mo("#form td").bind(\'click\',function( ele, index, event ){		
			
			var o = ele;
			
			var target = Mo.Event( event ).target();
			
			var input=o.getElementsByTagName(\'input\')[0];
			switch(input.type){
				case \'radio\':
					input.checked=\'true\';
				break;
				case \'checkbox\':
					if(target.tagName==\'TD\'){
						(input.checked?input.checked=\'\':input.checked=\'true\');
					}else{
						return ;
					}
				break;
			}			
			
		});
		
		//加载图片
		LAZY.init();
		LAZY.run();
		
	}
);

</script>
'; ?>


	<?php echo $this->_tpl_vars['check']; ?>


	<form id='form' name='form' enctype='multipart/form-data' method='post' action='?action=post&id=<?php echo $this->_tpl_vars['fid']; ?>
'>
		<input type='hidden' value='<?php echo $this->_tpl_vars['verify']; ?>
' name='verify' />

		<?php $_from = $this->_tpl_vars['form']['groups']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['gid'] => $this->_tpl_vars['group']):
?>
	
		<dl id="group-<?php echo $this->_tpl_vars['gid']; ?>
" class="<?php echo $this->_tpl_vars['group']['type']; ?>
">
			<dt> <?php echo $this->_tpl_vars['group']['name']; ?>
 </dt>
			<dd>
            
            	<table border="0" cellspacing="0" cellpadding="0">
					<tr>
                    
                    	<?php echo smarty_function_counter(array('start' => 0,'assign' => 'cnt','print' => false), $this);?>

                    
                        <?php $_from = $this->_tpl_vars['form']['options']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['oid'] => $this->_tpl_vars['option']):
?>
        
                            <?php if ($this->_tpl_vars['option']['gid'] == $this->_tpl_vars['gid']): ?>
                            
                            	<td width='".$width."' valign='top'>                                
                                
                                <?php echo test(array('group' => $this->_tpl_vars['group'],'option' => $this->_tpl_vars['option'],'gid' => $this->_tpl_vars['gid'],'oid' => $this->_tpl_vars['oid']), $this);?>

                                
                                </td>
                                
                                <?php if ($this->_tpl_vars['group']['break'] && ( $this->_tpl_vars['cnt']+1 ) % $this->_tpl_vars['group']['break'] == 0): ?>
                                </tr><tr>
                                <?php endif; ?>
                                
                                <?php echo smarty_function_counter(array('assign' => 'cnt','print' => false), $this);?>

        
                            <?php endif; ?>
        
                        <?php endforeach; endif; unset($_from); ?>
        
                    </tr>
				</table>	
	
			</dd>		
		</dl>
	
		<?php endforeach; endif; unset($_from); ?>
	
		<div id='send'>
        
            <?php if ($this->_tpl_vars['FR']['USER_MODE'] == 'ANY' && ( $this->_tpl_vars['FR']['ANY_ACCOUNT'] || $this->_tpl_vars['FR']['ANY_NAME'] || $this->_tpl_vars['FR']['ANY_PHONE'] || $this->_tpl_vars['FR']['ANY_IDCARD'] )): ?>
                
                <p>
                	<?php if ($this->_tpl_vars['FR']['ANY_ACCOUNT']): ?>
                    用户名：<input type="text" size="20" name="ACCOUNT" class="text" value="<?php echo $this->_tpl_vars['member']['account']; ?>
" fix_name="您的用户名" fix_null="yes" />
                    <?php endif; ?>
                    <?php if ($this->_tpl_vars['FR']['ANY_NAME']): ?>
                    姓名：<input type="text" size="20" name="NAME" class="text" value="<?php echo $this->_tpl_vars['member']['name']; ?>
" fix_name="您的姓名" fix_null="yes" />
                    <?php endif; ?>
                    <?php if ($this->_tpl_vars['FR']['ANY_PHONE']): ?>
                    电话：<input type="text" size="20" name="PHONE" class="text" value="<?php echo $this->_tpl_vars['member']['phone']; ?>
" fix_name="您的电话" fix_null="yes" fix_number="yes" />
                    <?php endif; ?>
                    <?php if ($this->_tpl_vars['FR']['ANY_IDCARD']): ?>
                    身份证：<input type="text" size="20" name="IDCARD" class="text" value="<?php echo $this->_tpl_vars['member']['idcard']; ?>
" fix_name="您的身份证" fix_card="yes" />
                    <?php endif; ?>
                </p>
            <?php endif; ?>
        
			<p>
			<input type='submit' class='submit' value='提交投票' />
			<input type='button' class='submit' name='button' onclick='location.href="?mode=&action=result&id=<?php echo $this->_tpl_vars['fid']; ?>
&skin=default#top";' value='查看结果' />			
			</p>
		</div>
	
	</form>
