{include file="header.tpl" page_name=$page_name sys_name=$sys_name}
<!--独立页-->
<div align="center">
{$admin_nav}
{if $do == 'list'}
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="tableborder tableborder_line">
<tr class="header">
<td width="30">编号</td>
<td>页面标题</td>
<td>静态页名</td>
<td>修改时间</td>
<td>操作</td>
</tr>
<tbody>
{if !$farr}
	<tr><td colspan="5" style="color:red;">没有任何单页面</td></tr>
{else}
{section name=i loop=$farr}
	<tr>

	<td>{$farr[i].id}</td>
	<td title="查看内容"><a href="../?page-{$farr[i].id}.html" target="_blank">{$farr[i].title}</a></td>
    <td>{$farr[i].file_name}</td>
	<td>{$farr[i].uptime}</td>
	<td><a href="admincp.php?action=single&do=edit&id={$farr[i].id}">编辑</a> <a href="admincp.php?action=single&do=delete&id={$farr[i].id}">删除</a> <a href="../?page-{$farr[i].id}.html&type=create" target="_blank">生成静态页面</a></td>
	</tr>
{/section}
{/if}
</tbody>
</table>
{/if}
{if $do == 'add' || $do == 'edit'}
{literal}<script language="javascript">
	function chkForm(obj) {
		if (!obj.name.value) {
			alert('网站名称不能为空！');
			obj.name.focus();
			return false;
		}
	}
</script>{/literal}
<form action="admincp.php?action=single&do={$do}" method="post" name="frm" onsubmit="return chkForm(this);">
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="tableborder">

{if $do == 'edit'}<input type="hidden" name="data[id]" value="{$farr[0].id}">{/if}
<tbody>
	<tr>
		<td width="14%"  class="one">标题：</td>
		<td width="86%"><input type="text" name="data[title]" size=30 id="name" value="{$farr[0].title}">&nbsp;&nbsp;<font color=red>*</font></td>
	</tr>
    <tr>
    	<td class="one">静态页文件名:</td>
        <td><input type="text" value="{$farr[0].file_name}"  name="data[file_name]" />
        若不填写将不能生成静态,同时生成静态将直接覆盖原文件,慎用</td>
    </tr>
    	<tr>
		<td  class="one">模板文件：</td>
		<td><input type="text" name="data[template]" size=50 id="template" value="{$farr[0].template}">
        <br />
        若模板为空或指定的模板不存在则使用默认独立页模板 singel_page.php</td>
	</tr>
	<tr>
		<td  class="one">关键词：</td>
		<td><input type="text" name="data[keywords]" size=50 id="url" value="{$farr[0].keywords}">&nbsp;</td>
	</tr>
	<tr>
		<td  class="one">描述：</td>
		<td><textarea name="data[description]" style="width:360px;height:60px;" id="description">{$farr[0].description}</textarea>&nbsp;&nbsp;</td>
	</tr>
	<tr>
		<td  class="one">页面内容：</td>
		<td>
		{$body}
		
	</tr>
	<tr>
		<td  class="one">调用示例：</td>
		<td><font color="blue">http://youdomain/?page-1.html</font>，注：1为单页面的对应编号。</td>
	</tr>

	<tr>
		<td colspan="2"><div align="center"><input type="submit" value=" 提交 "></div></td>
	</tr>
</tbody>
</table>
{if $do =='edit'}
<input type="hidden" value="{$farr[0][id]}" name="id" />
{/if}
</form>
{/if}
</div>
{include file="footer.tpl"}