<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title><?php echo $diy->name;?>-<?php echo $cfg_webname;?></title>
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/font/css/font-awesome.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/web/css/style.css">
	</head>
	<body>
		<?php pasterTempletDiy('top.htm');?>
		<main class="container py-3">
			<div class="row">
				<div class="col-md-12">
					<nav class="navbar navbar-expand-lg p-0">
						<ul class="breadcrumb mr-auto">
							<li class="breadcrumb-item"><a href="/apps/diy.php?action=list&diyid=<?php echo $diy->diyid;?>"><?php echo $diy->name;?>列表</a></li>
						</ul>
						<span class="navbar-text"><a href="/apps/diy.php?action=post&diyid=<?php echo $diy->diyid;?>" class="btn btn-success btn-sm">发布信息</a></span>
					</nav>
					{dede:datalist}
					<table class="table">
						<?php
						if (!empty($fields)) {
							echo "<tbody>";
							echo '<tr><td bgcolor="#e9ecef">表单'.$fields['id'].'<a href="diy.php?action=view&diyid='.$diy->diyid.'&id='.$fields['id'].'" target="_blank" class="btn btn-light btn-sm ml-2">详细</a></td></tr></td>';
							foreach($fieldlist as $field=>$fielddata)
							{
								if ($fields[$field]=='') continue;
								echo "<tr><td bgcolor='#f5f5f5'>{$fielddata[0]}</td></tr><tr><td>{$fields[$field]}</td></tr>";
							}
							echo "</tbody>";
						} else {
							echo "<tr><td>暂无记录</td></tr>";
						}
						?>
					</table>
					{/dede:datalist}
					{dede:pagelist listsize='6'/}
				</div>
			</div>
		</main>
		<?php pasterTempletDiy('foot.htm');?>
	</body>
</html>