{# begin {templatelocation} #}

{noscript}
<div id="advanced_editor" style="display:none;">
    {navbar}
    <form name="frmstory" action="{site_admin_url}/story.php" method="post" enctype="multipart/form-data" onsubmit="set_postcontent();">
        <table id='adveditor' cellspacing="0" cellpadding="3" style="width:100%; margin-top:10px; border:1px solid #ECE9D8;">
            <tr>
                <td style="width:20%;" class="alignright">{lang_author}:</td>
                <td>{story_author}<input type="hidden" name="uid" value="{story_uid}"{xhtml}></td>
            </tr>
            <tr>
                <td class="alignright">{lang_title}:</td>
                <td><input type="text" size="48" maxlength="128" {!if titletoid}onkeyup="TitleToId();" {!endif}id="title" name="title" value="{story_title}"{xhtml}></td>
            </tr>
            <tr>
                <td class="alignright">{lang_page_title}:</td>
                <td><input type="text" size="48" maxlength="128" name="page_title" value="{page_title}"{xhtml}></td>
            </tr>

            <tr>
                <td class="alignright" style="vertical-align:top;">{lang_sid}:</td>
                <td><input type="text" dir="ltr" size="48" maxlength="128" id="id" name="sid" value="{story_id}"{xhtml}></td>
            </tr>
            <tr{hide_meta}>
                <td valign="top" align="right">{lang_metadescription}:</td>
                <td><textarea name="meta_description" style="width:98%" cols="45" rows="2">{meta_description}</textarea></td>
            </tr>
            <tr{hide_meta}>
                <td valign="top" align="right">{lang_metakeywords}:</td>
                <td><textarea name="meta_keywords" style="width:98%" cols="45" rows="2">{meta_keywords}</textarea></td>
            </tr>            
            <tr>
                <td class="alignright" valign="top">{lang_topic}:</td>
                <td>{topic_selection}</td>
            </tr>
            <tr>
                <td class="alignright">{lang_story_stats}:</td>
                <td>
                  <table cellspacing="0" cellpadding="3" style="width:50%;">
                    <tr>
                        <td class="alignright">{lang_hits}:</td>
                        <td><input type="hidden" name="hits" value="{story_hits}"{xhtml}>{story_hits}</td>
                        <td class="alignright">{lang_comments}:</td>
                        <td><input type="hidden" name="comments" value="{story_comments}"{xhtml}>{story_comments}</td>
                        <td class="alignright">{lang_emails}:</td>
                        <td><input type="hidden" name="numemails" value="{story_emails}"{xhtml}>{story_emails}</td>
                    </tr>
                 </table>
                </td>
            </tr>
            <tr>
                <td class="alignright" style="vertical-align:top">{lang_cachetime}:</td>
                <td><input type="text" size="8" name="cache_time" value="{cache_time}"{xhtml}><div class="pluginMediumText">{lang_cachetime_desc}</div></td>
            </tr>                                        
            <tr>
                <td class="alignright">{lang_show_topic_icon}:<input type="checkbox" name="show_topic_icon" {show_topic_icon_checked}{xhtml}> </td>
                <td style="padding-left:25px;">{lang_draft}:<input type="checkbox" name="draft_flag" {is_checked}{xhtml}><span style="padding-left:30px;">{lang_postmode}:</span>&nbsp;<select id="sel_editmode" name="postmode" {change_editormode}>{post_options}</select></td>
            </tr>
        </table>
        <!-- Basic textarea field - no editor -->
        <div id="text_editor" style="margin-top:10px; padding:5px 0 5px 10px; border:1px solid #ECE9D8;display:{show_texteditor};">
            {lang_introtext}:
            <img src="{layout_url}/images/expand.png" title="{lang_expandhelp}" alt="" onclick="changeTextAreaSize('introtext','larger');"{xhtml}>
            <img src="{layout_url}/images/collapse.png" title="{lang_reducehelp}" alt="" onclick="changeTextAreaSize('introtext','smaller');"{xhtml}>
            <textarea id="introtext" style="padding:5px 10px 5px 10px; width:95%;" name="introtext" cols="45" rows="14">{story_introtext}</textarea>
            {lang_bodytext}:
            <img src="{layout_url}/images/expand.png" title="{lang_expandhelp}" alt="" onclick="changeTextAreaSize('bodytext','larger');"{xhtml}>
            <img src="{layout_url}/images/collapse.png" title="{lang_reducehelp}" alt="" onclick="changeTextAreaSize('bodytext','smaller');"{xhtml}>
            <textarea id="bodytext" style="padding:5px 10px 5px 10px; width:95%;" name="bodytext" cols="45" rows="14">{story_bodytext}</textarea>
        </div>
        <!-- HTML Editor -->
        <div id="html_editor" style="margin-top:10px; padding:5px; border:1px solid #ECE9D8;display:{show_htmleditor};">
            {lang_introtext}:
            <img src="{layout_url}/images/expand.png" title="{lang_expandhelp}" alt="" onclick="changeHTMLTextAreaSize('introhtml','larger');"{xhtml}>
            <img src="{layout_url}/images/collapse.png" title="{lang_reducehelp}" alt="" onclick="changeHTMLTextAreaSize('introhtml','smaller');"{xhtml}>
            <span style="padding-left:15px;">{lang_toolbar}:&nbsp;
                <select id="fckeditor_toolbar_selector" name="fckeditor_toolbar_selector" onchange="changeToolbar(this.value);">
                     <option value="editor-toolbar1">{toolbar1}</option>
                     <option value="editor-toolbar2" selected="selected">{toolbar2}</option>
                     <option value="editor-toolbar3">{toolbar3}</option>
                     <option value="Default">{toolbar5}</option>
                </select>
            </span>
            <textarea id="introhtml" style="padding:5px 10px 5px 10px;" name="introhtml" cols="45" rows="12">{story_introtext}</textarea>
            {lang_bodytext}:
            <img src="{layout_url}/images/expand.png" title="{lang_expandhelp}" alt="" onclick="changeHTMLTextAreaSize('bodyhtml','larger');"{xhtml}>
            <img src="{layout_url}/images/collapse.png" title="{lang_reducehelp}" alt="" onclick="changeHTMLTextAreaSize('bodyhtml','smaller');"{xhtml}>
            <textarea id="bodyhtml" style="padding:5px 10px 5px 10px;" name="bodyhtml" cols="45" rows="20">{story_bodytext}</textarea>
        </div>
        <div id="editor_mode">
            {lang_allowed_html}
        </div>
        <div  id="se_options" style="width:100%; margin-top:10px; border:1px solid #ECE9D8; display:none;">
            <div id="se_publish" style="display:none;">
                <fieldset><legend>{lang_publishdate}</legend>
                    <table cellspacing="0" cellpadding="3" style="width:100%;">
                        <tr>
                            <td class="alignright" style="vertical-align:top;">{lang_date}:</td>
                            <td>
                              <span dir="ltr">
                                <select name="publish_month">
                                    {publish_month_options}
                                </select>
                                /
                                <select name="publish_day">
                                    {publish_day_options}
                                </select>
                                /
                                <select name="publish_year">
                                    {publish_year_options}
                                </select>&nbsp;&nbsp;
                                <select name="publish_hour">
                                    {publish_hour_options}
                                </select>
                                :
                                <select name="publish_minute">
                                    {publish_minute_options}
                                </select>
                                {publishampm_selection}
                                <input type="hidden" name="publish_second" value="{publish_second}"{xhtml}>
                              </span><br{xhtml}><br{xhtml}>
                              {publish_date_explanation}
                            </td>
                        </tr>
                    </table>
                </fieldset>
                <fieldset style="margin-top:10px;"><legend>{lang_publishoptions}</legend>
                    <table cellspacing="3" cellpadding="3" style="width:100%;">
                        <tr>
                            <td>
                                {featured_options}
                            </td>
                            <td style="width:75%;">
                                <select name="frontpage">
                                    {frontpage_options}
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <select name="commentcode">
                                    {comment_options}
                                </select>
                            </td>
                            <td>
                                <select name="trackbackcode">
                                    {trackback_options}
                                </select>
                            </td>
                         </tr>
                         <tr>
                            <td><label for="cmt_close_flag">{lang_cmt_disable}</label>:</td>
                                        <td class="alignleft" style="vertical-align:top;" colspan="1"><label for="cmt_close_flag">{lang_enabled}</label>:<input type="checkbox" name="cmt_close_flag" id="cmt_close_flag" value="1" {is_checked5} onclick="enablecmtclose(this);"{xhtml}>
                                            <span dir="ltr">
                                                <select name="cmt_close_month">
                                                    {cmt_close_month_options}
                                                 </select>
                                                 /
                                                 <select name="cmt_close_day">
                                                    {cmt_close_day_options}
                                                 </select>
                                                 /
                                                 <select name="cmt_close_year">
                                                    {cmt_close_year_options}
                                                 </select>&nbsp;&nbsp;
                                                 <select name="cmt_close_hour">
                                                     {cmt_close_hour_options}
                                                 </select>
                                                 :
                                                 <select name="cmt_close_minute">
                                                     {cmt_close_minute_options}
                                                 </select>
                                                     {cmt_close_ampm_selection}
                                                  <input type="hidden" name="cmt_close_second" value="{cmt_close_second}"{xhtml}>
                                                      </span><br{xhtml}>
                                        </td>

                        </tr>
                    </table>
                </fieldset>
            </div>
            <div id="se_images" style="display:none;">
                <fieldset style="margin-top:10px;"><legend>{lang_images}</legend>
                    {saved_images}
                    {image_form_elements}
                </fieldset>
            </div>
            <div id="se_archive" style="display:none;">
                <fieldset style="margin-top:10px;">
                    <legend>{lang_archivetitle}</legend>
                    <table cellspacing="0" cellpadding="3" style="width:100%;">
                        <tr>
                            <td class="alignright" style="width:20%; padding-right:5px;">{lang_option}:</td>
                            <td style="width:20%;"><label for="admin-storyeditor_advanced-archiveflag">{lang_enabled}</label>:<input type="checkbox" name="archiveflag" value="1" {is_checked2} id="admin-storyeditor_advanced-archiveflag" onclick="enablearchive(this);"{xhtml}></td>
                            <td class="alignleft">
                                <input type="checkbox" name="statuscode" id="storycode10" value="10" {is_checked3}{xhtml}><label for="storycode10">{lang_optionarchive}</label>
                                &nbsp;
                                <input type="checkbox" name="statuscode" id="storycode11" value="11" {is_checked4}{xhtml}><label for="storycode11">{lang_optiondelete}</label>
                            </td>
                        </tr>
                        <tr>
                            <td class="alignright" style="vertical-align:top;padding-right:5px;">{lang_date}:</td>
                            <td colspan="2">
                              <span dir="ltr">
                                <select id="expire_month" name="expire_month">
                                    {expire_month_options}
                                </select>
                                <select name="expire_day">
                                    {expire_day_options}
                                </select>
                                <select name="expire_year">
                                    {expire_year_options}
                                </select>
                                <select name="expire_hour">
                                    {expire_hour_options}
                                </select>&nbsp;:
                                <select name="expire_minute">
                                    {expire_minute_options}
                                </select>
                                {expireampm_selection}
                                <input type="hidden" name="expire_second" value="{expire_second}"{xhtml}>
                              </span><br{xhtml}>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </div>
            <fieldset id="se_perms" style="margin-top:10px; display:none;">
                <legend>{lang_permissions}</legend>
                <p>{lang_owner}: {owner_name}<input type="hidden" name="owner_id" value="{owner_id}"{xhtml}></p>
                <p>{lang_group}: {group_dropdown}</p>
                <p>{lang_permissions}:</p>
                <p>{lang_perm_key}</p>
                {permissions_editor}
                <p>{lang_permissions_msg}</p>
            </fieldset>
        </div>
        <div id="se_bottom" style="width:100%; padding:3px; margin-top:20px;display:{show_submitoptions}">
            <input type="submit" value="{lang_save}" name="mode"{xhtml}>
            <span style="padding-right:10px;padding-left:10px;"><input type="submit" value="{lang_preview}" name="mode"{xhtml}></span>
            <span style="padding-right:50px;"><input type="submit" value="{lang_cancel}" name="mode"{xhtml}></span>
            {delete_option}
            {submission_option}
            <input type="hidden" name="old_sid" value="{old_story_id}"{xhtml}>
            <input type="hidden" name="hour_mode" value="{hour_mode}"{xhtml}>
            <input type="hidden" name="{gltoken_name}" value="{gltoken}"{xhtml}>
        </div>
    </form>
    <div id="preview" style="width:100%; border:1px dashed grey; padding:0; margin-top:10px; display:{show_preview};">
        <div style="margin:10px;">
            {preview_content}
        </div>
    </div>
</div>

{# end {templatelocation} #}
