<?php include $this->admin_tpl('meta', 'admin');?>
<title>自定义表单信息预览 - YzmCMS内容管理系统</title>
</head>
<body>
<article class="page-container">
<div class="formdoby_normal"> 
	<table class="table table-border table-bg table-hover table-sort">
		<thead>
			<tr>
				<th width="15%">字段名称</th>
				<th align="left">内容</th>
			</tr>
		</thead>
		<tbody>
			<?php 
			foreach($model_data as $val){
				if($val['fieldtype'] == 'image'){
					$va = $data[$val['field']] ? '<a href="'.$data[$val['field']].'" target="_blank"><img src="'.$data[$val['field']].'" height="100"></a>' : '';
				}elseif($val['fieldtype'] == 'images'){
					$arr = string2array($data[$val['field']]);
					$va = '';
					foreach($arr as $v){
						$va .= '<a href="'.$v['url'].'" title="'.$v['alt'].'" target="_blank" style="margin-right:10px"><img src="'.$v['url'].'" height="80"></a>';
					}
				}elseif($val['fieldtype'] == 'attachment'){
					$va = '<a href="'.$data[$val['field']].'" target="_blank">'.$data[$val['field']].'</a>';
				}elseif($val['fieldtype'] == 'attachments'){
					$arr = string2array($data[$val['field']]);
					$va = '';
					foreach($arr as $v){
						$va .= '<a href="'.$v['url'].'" download="'.$v['alt'].'.'.fileext($v['url']).'" title="'.$v['alt'].'"><img src="'.STATIC_URL.'images/ext/rar.png" height="15"> '.$v['alt'].'</a><br>';
					}
				}elseif($val['fieldtype'] == 'select' || $val['fieldtype'] == 'radio'){
					$va = get_field_val($data[$val['field']], $val['field'], $modelid);
				}else{
					$va = $data[$val['field']];
				}
			    echo '<tr><td>'.$val['name'].'：</td><td>'.$va.'</td></tr>';
			}
			?>
		</tbody>
	</table>
</div>

<div style="position:fixed;bottom:20px;right:10px;z-index:99;"><input type="button" class="btn btn-primary radius w_100" onclick="yzmcms_close()" value="确定"></div>
</article>
<?php include $this->admin_tpl('footer', 'admin');?>

</body>
</html>