{capture name="title"} - {l}Submit Page{/l}{/capture}
{capture assign="in_page_title"}{l}Submit Page{/l}{/capture}
{capture assign="description"}{l}Submit a new page to the directory{/l}{/capture}

{include file="header.tpl"}
{include file="top_bar.tpl"}
{include file="validation.tpl" form_id="submit_form" validators=$validators}
{strip}
{if $smarty.const.DISABLE_SUBMIT == 1 && $is_admin neq 1 } 
<table width="96%" border="0" align="center" cellpadding="4" cellspacing="4" class="sp_area">   
 <tr>      
  <td>         
    <h2>{l}Closed{/l}</h2>      
  </td>   
 </tr>   
 <tr>      
    <td>         
     {l}We are sorry but page submissions are closed.{/l}<br />         {$disablereason}</a>      
     </td>   
 </tr> 
</table> 
<br /> 
{else}
{if empty($regular_user_details.ID) || (($uLevel != 1) && ($uLevel != 3))}
    <table border="0" class="formPage">
       <tr>
          <td>
             <h3>{l}Information{/l}</h3>
          </td>
       </tr>
       <tr>
          <td>
             {l}You must be logged in as Admin or Super Editor to submit a new page.{/l}
             <br />
             {l}No account yet?{/l} <a href="{$smarty.const.DOC_ROOT}/profile.php?mode=register" title="{l}Register new user{/l}">{l}Create one{/l}</a>
          </td>
       </tr>
    </table>
{else}
    <form method="post" action="" id="submit_form">
    <table border="0" class="formPage">
    {if $error}
       <tr><td colspan="2" class="err">
          {l}An error occured while saving the page.{/l}
       </td></tr>
    {/if}
    
    {if $posted}
       <tr><td colspan="2" class="msg">
       {l}Page submitted{/l}{if $waiting_approval eq 1}{l} and awaiting approval{/l}{/if}.<br />
       {l}Submit another page.{/l}
       </td></tr>
    {/if}

<tr>
   <td class="label underlined" align='left' colspan="2">{l}Fields marked with a {/l}<span class='req'>*</span>{l} are required.{/l}</td>
   </tr>
  <tr>
   <td class="label"><span class='req'>*</span>{l}Name{/l}:</td>
   <td class="field">
      <input type="text" name="NAME" value="{$NAME|escape|trim}" size="40" maxlength="{$smarty.const.TITLE_MAX_LENGTH}" class="text" />
   </td>
  </tr>
  
  <tr>
     <td class="label"><span class='req'>*</span>{l}SEO Name{/l}:</td>
     <td class="field">
        <input type="text" id="SEO_NAME" name="SEO_NAME" size="40" value="{$SEO_NAME|escape|trim}" maxlength="255" class="text" />
     </td>
  </tr>

  <tr>
    <td class="label">{l}Information{/l}:</td>
    <td class="field">
       {include file="rte.tpl" NAME="CONTENT" VALUE=$CONTENT}
       
    </td>
  </tr>
 
 <tr>
    <td class="label required"><label for="STATUS">{l}Status{/l}:</label></td>
    <td class="smallDesc">
       {html_options options=$stats selected=$STATUS name="STATUS" id="STATUS"}
    </td>
 </tr>
 <tr>
    <td class="label required"><label for="STATUS">{l}Privacy{/l}:</label></td>
    <td class="smallDesc">
       {html_options options=$privacy selected=$PRIVACY name="PRIVACY" id="PRIVACY"}
    </td>
 </tr>
 <tr>
    <td class="label required"><label for="STATUS">{l}Show In Menu{/l}:</label></td>
    <td class="smallDesc">
       <input id="SHOW_IN_MENU" type="checkbox" value="1" name="SHOW_IN_MENU"/>
    </td>
 </tr>
 
 
 {if $smarty.const.ENABLE_META_TAGS eq 1}
   <tr>
      <td class="label">{l}META Keywords{/l}:</td>
      <td class="field">
        <input type="text" name="META_KEYWORDS" value="{$META_KEYWORDS|escape|trim}" size="40" maxlength="2000" class="text" />
        <p class="small">{l}Separate keywords by comma.{/l}</p>
      </td>
   </tr>
   <tr>
      <td class="label">{l}META Description{/l}:</td>
      <td class="field">
         <textarea name="META_DESCRIPTION" rows="3" cols="30" class="text" {formtool_count_chars name="META_DESCRIPTION" limit=$smarty.const.META_DESCRIPTION_MAX_LENGTH alert=true}>{$META_DESCRIPTION|escape|trim}</textarea>
         <br />
         {l}Limit{/l}: <input type="text" name="META_DESCRIPTION_limit" size="4" class="limit_field" readonly="readonly" value="{$MetaDescriptionLimit|trim}" />
      </td>
   </tr>
  {/if}
  
   <tr>
      <td colspan="2" class="buttons">
            <input type="submit" name="edit" value="{l}Continue{/l}" class="btn" />
      </td>
  </tr>
</table>
</form>
{/if}
{/if}
{include file="footer.tpl"}
{/strip}