<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>模板列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script type="text/javascript" src="admin/template/js/admin.js"></script>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="?file=yellowpages&action=template">黄页模板</a></li>
			<li><a href="javascript:void(0);" class="on">模板列表</a></li>
		</ul>
	</div>
	<div class="main">
		<fieldset>
		<legend>操作提示</legend>
		如果您自己要新增模板，请将您的模板文件夹命名为英文数字，并上传到 template/comtmp/ 文件夹下。 
		</fieldset>
		<table cellspacing="0" class="datalist" id="list">
		<tr>
			<th width="21%" class="firstcol">文件名</th>
			<th width="33%">模板嵌套代码</th>
			<th width="19%">修改时间</th>
			<th width="27%">管理操作</th>
		</tr>
		<?php if($r){foreach($r as $val){?>
		<tr>
			<td width="21%" align="left"><?php echo $val['template'];?>.html</td>
			<td width="33%" align="center"><input type="text" readonly="1" title="双击复制到剪切板" ondblclick="javascript:copy('<?php echo '{{tlp '.$val['template'].'}}';?>');" size="35" value="<?php echo '{{tlp '.$val['template'].'}}';?>" /></td>
			<td width="19%" align="center"><?php echo $val['updatetime'];?></td>
			<td width="27%" align="center"><a href="<?php echo ADMIN_FILE;?>?file=<?php echo $file;?>&action=template_view&path=<?php echo $tlp;?>&tlp=<?php echo $val['template'];?>" target="_blank">可视化布局</a>&nbsp;
			&nbsp;<a href="<?php echo ADMIN_FILE;?>?file=<?php echo $file;?>&action=template_edit&path=<?php echo $tlp;?>&tlp=<?php echo $val['template'];?>">HTML编辑</a>&nbsp;
		    &nbsp;<a href="javascript:confirmUrl('您确定要删除模板【<?php echo $val['template'].'.html';?>】吗？','<?php echo ADMIN_FILE;?>?file=<?php echo $file;?>&action=template_delete&path=<?php echo $tlp;?>&tlp=<?php echo $val['template'];?>')">删除</a></td>
		</tr>
		<?php }?>
		<?php }else{?>
		<tr><td colspan="4">该模板方案下尚未添加任何模板...</td></tr>	
		<?php }?>
		</table>
	</div>
</div>
</body>
</html>