<?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="javascript:void(0);" class="on">模板方案</a></li>
			<li><a href="?file=template&action=manage">模板管理</a></li>	
			<li><a href="?file=template&action=add">添加模板</a></li>	
		</ul>
	</div>
	<div class="main">
		<fieldset>
		<legend>操作提示</legend>
		如果您需要增加一个模板方案，只需通过FTP在template/ 目录下建立一个以字母，数字，下划线组成的文件夹，然后在这里设为默认即可。
		</fieldset>
		<table cellspacing="0" class="datalist" id="list">
		<tr>
			<th width="140" class="firstcol">方案名称</th>
			<th width="138">模板目录</th>
			<th width="137">修改时间</th>
			<th width="65">使用</th>
			<th width="100">管理</th>
		</tr>
		<form action="" method="post" name="myform">
		<input type="hidden" name="do_submit" value="1" />
		<?php if($r){foreach($r as $val){?>
		<tr>
			<input type="hidden" name="dir[]" value="<?php echo $val['dir'];?>" />
		  <td width="140" align="center"><input type="text" size="20" name="name[]" value="<?php echo $val['name'];?>" /></td>
			<td width="138" align="center"><?php echo $val['dir'];?></td>
			<td width="137" align="center"><?php echo $val['mtime'];?></td>
			<td width="65" align="center"><?php echo $val['isdefault']?'√':'&nbsp;';?></td>
			<td width="100" align="center"><?php if(!$val['isdefault']){?> <a href="<?php echo ADMIN_FILE;?>?file=<?php echo $file;?>&action=setdefault&project=<?php echo $val['dir'];?>&projectname=<?php echo urlencode($val['name']);?>">设为默认</a><?php }else{echo '<font color="#999999">设为默认</font>';}?>&nbsp; &nbsp;<?php if(!$val['isdefault']){?><a href="javascript:confirmUrl('您确定要删除模板方案【<?php echo $val['dir'];?>】吗？','<?php echo ADMIN_FILE;?>?file=<?php echo $file;?>&action=delete&project=<?php echo $val['dir'];?>')">删除</a><?php }else{echo '<font color="#999999">删除</font>';}?></td>
		</tr>
		<?php }?>
		<tr>
			<td colspan="5" align="left">
			&nbsp;<input type="button" onclick="this.form.submit();" class="submit" value="批量修改" />
			</td>
		</tr>
		</form>
		<?php }else{?>
		<tr><td colspan="5">目前尚未添加任何模板方案...</td></tr>	
		<?php }?>
		</table>
	</div>
</div>
</body>
</html>