<!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/prototype/prototype.js"></script>
    <script type="text/javascript" src="{$smarty.const.DOC_ROOT}/javascripts/scriptaculous/scriptaculous.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_editart.php" id="submit_form" method="post">
        <h3 style="color: red">{$error_message}</h3>
        <table>
            <tr>
                <td colspan="2" style="text-align: center; font-weight: bold;">Edit Article</td>
            </tr>
            <tr>
                <td>{l}Title{/l}</td>
                <td><input type="text" name="TITLE" value="{$article.TITLE}"/></td>
            </tr>
            {if $categs|@count > 0}
            <tr>
                <td>{l}Category{/l}</td>
                <td>
                {*html_options options=$categs selected=$CATEGORY_ID name="CATEGORY_ID" id="CATEGORY_ID"*}
                {*include file="category_select.tpl"*}
                
                {html_options options=$categs selected=$article.CATEGORY_ID name="CATEGORY_ID"}
               
                
                </td>
            </tr>
            {/if}
            <tr>
                <td>{l}Short Description{/l}</td>
                <td><textarea name="DESCRIPTION" rows="10" cols="40">{$article.DESCRIPTION}</textarea></td>
            </tr>
            <tr>
                <td>{l}Article{/l}</td>
                <td>
                    {include file="rte.tpl" NAME="ARTICLE" VALUE=$article.ARTICLE}
                </td>
            </tr>
            {if $smarty.const.REQUIRE_REGISTERED_USER_ARTICLE}
            <tr>
                <td>{l}Assign Owner{/l}</td>
                <td class="smallDesc">
                    {html_options options=$ActiveUsersList selected=$article.OWNER_ID name="OWNER_ID" id="OWNER_ID"}
                    <p class="msg notice info">{l}Use with care!! Selected user details will overwrite link owner name, email address and id!!{/l}</p>
                </td>
            </tr>
            {/if}
            <tr>
                <td>{l}Owner Name{/l}</td>
                <td>
                    <input type="text" id="OWNER_NAME" name="OWNER_NAME" value="{$article.OWNER_NAME|escape|trim}" maxlength="{$smarty.const.USER_NAME_MAX_LENGTH}" class="text" />
                </td>
            </tr>
            <tr>
                <td>{l}Owner Email{/l}</td>
                <td>
                    <input type="text" id="OWNER_EMAIL" name="OWNER_EMAIL" value="{$article.OWNER_EMAIL|escape|trim}" maxlength="255" class="text" />
                </td>
            </tr>
            <tr>
                <td>{l}Type Of Article{/l}</td>
                <td>
                    {html_options options=$types selected=$article.ARTICLE_TYPE name="ARTICLE_TYPE" id="ARTICLE_TYPE"}
                </td>
            </tr>
            <tr>
                <td>{l}Status{/l}</td>
                <td>
                    {html_options options=$stats selected=$article.STATUS name="STATUS" id="STATUS"}
                </td>
            </tr>
            {if $smarty.const.ENABLE_USER_META_TAGS_ARTICLE eq 1}
            <tr>
                <td>{l}META Keywords{/l}</td>
                <td>
                    <input type="text" id="META_KEYWORDS" name="META_KEYWORDS" value="{$article.META_KEYWORDS|escape|trim}" class="text" />
                    <p class="msg notice info">{l}Separate keywords by comma.{/l}</p>
                </td>
            </tr>
            <tr>
                <td>{l}META Description{/l}</td>
                <td>
                    <textarea id="META_DESCRIPTION" name="META_DESCRIPTION" rows="3" cols="30" class="text">{$article.META_DESCRIPTION|trim|escape}</textarea>
                </td>
            </tr>
            {/if}
              {if $is_admin eq 1 }
				<tr>
		         <td>{l}Release Date{/l}:</td>
		         <td>
		           <input id="RELEASE_DATE" type="text" name="RELEASE_DATE" value="{$article.RELEASE_DATE}" class="text"/>
		            <a href=""
		             style="display: block; float: left; margin-left: 5px; margin-top: 1px;"  
		             onclick="window.open(
		             'date_cal.html',
		             'calendar',
		             'toolbar=no,titlebar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=0,dependent=no,width=220,height=220');
		             return false;">
		             <img src="images/date_btn.gif" border="0"></a>
		         </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="{$article.ID}" />
        <input type="hidden" name="formSubmitted" value="1" />
    </form>
</body>
</html>
