<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<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/css/bootstrap.min.css">
		<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/style.css">
		<script src="<?php echo $cfg_cmsurl;?>/static/web/js/jquery.min.js"></script>
	</head>
	<body>
		<?php pasterTempletDiy('top.htm');?>
		<main class="container py-3">
			<div class="row">
				<div class="col-md-12">
					<h3 class="mb-3"><?php echo $diy->name;?>详细文档</h3>
					<table cellspacing="1" class="table">
						<?php
						echo '<tbody>';
						echo '<tr><td bgcolor="#f5f5f5" width="20%">id</td><td bgcolor="#f5f5f5">'.$row['id'].'</td></tr>';
						$allowhtml = array('htmltext');
						foreach($fieldlist as $field=>$fielddata)
						{
							if ($row[$field]=='') continue;
							if ($fielddata[1]=='img')
							{
								$row[$field] = "<a href='{$row[$field]}' target='_blank'><img src='{$row[$field]}'/></a>";
								}
								else if ($fielddata[1]=='addon')
								{
									$row[$field] = "<a href='{$row[$field]}' target='_blank'><img src='img/icon_addon.png'> 相关附件</a>";
								} else {
									if (!in_array($fielddata[1], $allowhtml))
									{
										$row[$field] = htmlspecialchars($row[$field]);
									}
								}
								echo '<tr><td>'.$fielddata[0].'</td><td>'.$row[$field].'</td></tr>';
							}
							echo '</tbody>';
						?>
					</table>
				</div>
			</div>
		</main>
		<?php pasterTempletDiy('foot.htm');?>
	</body>
</html>