<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="copyright" content="DouCo Co.,Ltd." />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{$lang.home}{if $ur_here} - {$ur_here} {/if}</title>
<link href="{$site.root_url}favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="templates/public.css" rel="stylesheet" type="text/css">
{include file="javascript.htm"}
<script type="text/javascript" src="images/jquery.form.min.js"></script>
</head>
<body>
<div id="dcWrap">
 {include file="header.htm"}
 <div id="dcLeft">{include file="menu.htm"}</div>
 <div id="dcMain">
   {include file="handle.htm"}
   <div class="mainBox" style="{$workspace.height}">
    <h3><a href="{$action_link.href}" class="actionBtn">{$action_link.text}</a>{$ur_here}</h3>
    <!-- {if $rec eq 'default'} 单页面列表 -->
    <div id="page">
     <!-- {foreach from=$page_list item=page_list} -->
      <dl class="child{$page_list.level}">
        <dt>{$page_list.page_name}<p>{$page_list.unique_id}</p></dt>
        <dd><a href="page.php?rec=edit&id={$page_list.id}">{$lang.edit}</a> | <a href="page.php?rec=del&id={$page_list.id}">{$lang.del}</a></dd>
      </dl>
     <!-- {/foreach} -->
    </div>
    <!-- {/if} -->
    <!-- {if $rec eq 'add' || $rec eq 'edit'} 单页面添加或编辑 -->
    <form action="page.php?rec={$form_action}" method="post">
     <div class="formBasic">
      <dl>
       <dt>{$lang.page_name}</dt>
       <dd>
        <input type="text" name="page_name" value="{$page.page_name}" size="40" class="inpMain" />
       </dd>
      </dl>
      <dl>
       <dt>{$lang.unique}</dt>
       <dd>
        <input type="text" name="unique_id" value="{$page.unique_id}" size="40" class="inpMain" />
       </dd>
      </dl>
      <dl>
       <dt>{$lang.parent}</dt>
       <dd>
        <select name="parent_id">
         <option value="0">{$lang.empty}</option>
         <!-- {foreach from=$page_list item=list} -->
         <!-- {if $list.id eq $page.parent_id} -->
         <option value="{$list.id}" selected="selected">{$list.mark} {$list.page_name}</option>
         <!-- {else} -->
         <option value="{$list.id}">{$list.mark} {$list.page_name}</option>
         <!-- {/if} -->
         <!-- {/foreach} -->
        </select>
       </dd>
      </dl>
      <dl>
       <dt>{$lang.page_content}</dt>
       <dd> 
        <!-- FileBox -->
        <div id="contentFile" class="fileBox">
         <ul class="fileBtn">
          <li class="btnFile" onclick="fileBox('content');">{$lang.file_insert_image}</li>
          <li class="fileStatus" style="display:none"><img src="images/loader.gif" alt="uploading"/></li>
         </ul>
        </div>
        <!-- /FileBox --> 
        <!-- umeditor -->
        <link href="include/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
        <script type="text/javascript" src="include/umeditor/umeditor.config.js"></script>
        <script type="text/javascript" src="include/umeditor/umeditor.min.js"></script>
        <script type="text/javascript" src="include/umeditor/lang/zh-cn/zh-cn.js"></script>
        <script type="text/plain" id="content" name="content" class="editor">{$page.content}</script>
        <script type="text/javascript">
         {literal}
            //实例化编辑器
            var um = UM.getEditor('content');
            function insertHtml(html) {
                UM.getEditor('content').execCommand('insertHtml', html);
            }
         {/literal}
        </script>
        <!-- /umeditor -->
       </dd>
      </dl>
      <dl>
       <dt>{$lang.keywords}</dt>
       <dd>
        <input type="text" name="keywords" value="{$page.keywords}" size="114" class="inpMain" />
       </dd>
      </dl>
      <dl>
       <dt>{$lang.description}</dt>
       <dd>
        <textarea name="description" cols="115" rows="3" class="textArea" />{$page.description}</textarea>
       </dd>
      </dl>
      <dl>
       <input type="hidden" name="token" value="{$token}" />
       <input type="hidden" name="id" value="{$page.id}">
       <input name="submit" class="btn" type="submit" value="{$lang.btn_submit}" />
      </dl>
     </div>
    </form>
    <!-- {/if} -->
   </div>
 </div>
 {include file="footer.htm"}
 </div>
{include file="filebox.htm"}
</body>
</html>