<!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>
    <script type="text/javascript" src="{$smarty.const.DOC_ROOT}/javascripts/formtool/formtool.js"></script>
    <script type="text/javascript" src="{$smarty.const.DOC_ROOT}/javascripts/protoaculous.1.8.1.min.js"></script>
    <script src="{$smarty.const.DOC_ROOT}/javascripts/jquery-1.3.2.min.js"></script>
     
    <script type="text/javascript">
    {literal}jQuery.noConflict();{/literal}
    </script>
    <script type="text/javascript" src="{$smarty.const.DOC_ROOT}/javascripts/categ_selection/categ_selection.js"></script>
    <script type="text/javascript" src="{$smarty.const.DOC_ROOT}/javascripts/tiny_mce/tiny_mce.js"></script>

    {* CSS Style file *}
    <link rel="stylesheet" type="text/css" href="{$smarty.const.DOC_ROOT}/templates/{$smarty.const.USE_TEMPLATE}/style/main.css" />   
</head>
<body style="background: #ffffff;">
    <form action="{$smarty.const.DOC_ROOT}/inplace_editpage.php" method="post">
    <h3 style="color: red">{$error_message}</h3>
    <table>
        <tr>
            <td colspan="2" style="text-align: center; font-weight: bold;">{l}Edit Page{/l}</td>
        </tr>
        <tr>
            <td>{l}Name{/l}</td>
            <td><input type="text" name="NAME" value="{$page.NAME}"/></td>
        </tr>
        <tr>
            <td>{l}SEO Name{/l}</td>
            <td><input type="text" name="SEO_NAME" value="{$page.SEO_NAME}"/></td>
        </tr>
        <tr>
            <td>{l}Information{/l}</td>
            <td>
            {include file="rte.tpl" NAME="CONTENT" VALUE=$page.CONTENT}
            {literal}
            <script type="text/javascript">
            //<![CDATA[
             tinyMCE.init({
             
                 mode : "exact",
                 elements: "CONTENT",
                 theme : "advanced",
                 plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
         
                 theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect",
                 theme_advanced_buttons2 : ",fontselect,fontsizeselect,|,cut,copy,paste,pastetext,pasteword,|,outdent,indent,|,undo,redo",
                 theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                 theme_advanced_statusbar_location : "bottom",
                 theme_advanced_resizing : true,
         
                 content_css : "css/content.css"
         
             });
            //]]>
             </script>
            {/literal}
            <textarea id="CONTENT" name="CONTENT" rows="10" cols="10" style="width: 100%">{$page.CONTENT}
            </textarea> 
            {else}
            <textarea name="CONTENT" rows="10" cols="40" class="text">{$page.CONTENT}</textarea>
            {/if}
        </td>
    </tr>
    <tr>
       <td>{l}Status{/l}</td>
       <td>
          {html_options options=$stats selected=$page.STATUS name="STATUS" id="STATUS"}
       </td>
    </tr>
    <tr>
        <td>{l}Privacy{/l}</td>
        <td>
            {html_options options=$privacy selected=$page.PRIVACY name="PRIVACY" id="PRIVACY"}
        </td>
    </tr>
    <tr>
        <td>{l}Show In Menu{/l}</td>
        <td>
            <input id="SHOW_IN_MENU" type="checkbox" value="1" name="SHOW_IN_MENU" {if $page.SHOW_IN_MENU eq 1}checked="checked"{/if}/>
        </td>
    </tr>
    {if $smarty.const.ENABLE_META_TAGS eq 1}
    <tr>
        <td>{l}META Keywords{/l}</td>
        <td>
            <input type="text" name="META_KEYWORDS" value="{$page.META_KEYWORDS|escape|trim}" size="40" maxlength="2000" class="text" />
            <p class="small">{l}Separate keywords by comma.{/l}</p>
        </td>
    </tr>
    <tr>
        <td>{l}META Description{/l}</td>
        <td>
            <textarea name="META_DESCRIPTION" rows="3" cols="30" class="text">{$page.META_DESCRIPTION|escape|trim}</textarea>
        </td>
    </tr>
    {/if}
    <tr>
      <td colspan="2"><input type="submit" name="save" value="{l}Save{/l}" class="btn" /></td>
    </tr>
    </table>
    <input type="hidden" name="action" value="submit" />
    <input type="hidden" name="ID" value="{$page.ID}" />
	<input type="hidden" name="formSubmitted" value="1" />
    </form>
</body>
</html>