{capture name="title"}{$TITLE|escape|trim}{/capture}
{capture assign="in_page_title"}{$TITLE|escape|trim}{/capture}
{capture assign="description"}{l}Article Details{/l}{/capture}

{include file="header.tpl"}
{include file="top_bar.tpl"}

<!--strip-->
{if $error}
   <div class="err">
      <img src="admin/images/no_22.gif" align="baseline" alt="Error" title="Error" />
      <p>{l}Error{/l}: {$error}</p>
   </div>
{else}
   <table align="center" border="0" width="80%">
   <tbody>
   <tr>
      <td class="smallDesc"><h3>{$TITLE|escape|trim}</h3></td>
   </tr>
   <tr>
      <td class="smallDesc">{l}Date Added{/l}: {$DATE_ADDED|escape|trim}</td>
   </tr>
   <tr>
      <td class="smallDesc">{l}Author{/l}: {$NAME|trim}</td>
   </tr>
    <tr>
 <td class="smallDesc">{l}Category{/l}: <a href="{$CATEGORY_URL|escape|trim}" title="{$CATEGORY_TITLE|escape|trim}">{$CACHE_TITLE|escape|trim}</a></td>
 </tr>
   <tr>
      <td class="smallDesc" style="text-align:justify;" id="article_content_{$ID}">{$ARTICLE|trim}</td>
   </tr>
<tr>
    <td>
        <div style="float: right;">
        {if $rights.editArt eq 1}
        <a href="{$smarty.const.DOC_ROOT}/inplace_editart.php?ID={$ID}&detail=1&TB_iframe=true&height=400&width=600" onclick="return showThickbox(this);" class="thickbox">
        <img src="{$smarty.const.DOC_ROOT}/templates/{$smarty.const.USE_TEMPLATE}/images/edit.gif" width="14" height="14" style="border: none;" alt="edit article"/>
        </a> 
        {/if}
        {if $rights.delArt eq 1}  
        <a href="{$smarty.const.DOC_ROOT}/inplace_editart.php?ID={$ID}&detail=1&mode=del&TB_iframe=true&height=100&width=250"  class="thickbox" onclick="{literal}question = confirm('Are you sure you want to delete this article?');if (question !='0'){return showThickbox(this);} else return false;{/literal}">
        <img src="{$smarty.const.DOC_ROOT}/templates/{$smarty.const.USE_TEMPLATE}/images/delete.gif" width="14" height="14" style="border: none;" alt="delete article"/>
        </a>
        {/if}
        {if $STATUS<2 && $rights.editArt eq 1}
        <a href="{$smarty.const.DOC_ROOT}/inplace_editart.php?ID={$ID}&detail=1&mode=active&TB_iframe=true&height=100&width=250"  class="thickbox" onclick="{literal}question = confirm('Are you sure you want to make this article active?');if (question !='0'){return showThickbox(this);} else return false;{/literal}">
            <img src="{$smarty.const.DOC_ROOT}/templates/{$smarty.const.USE_TEMPLATE}/images/active.gif" width="14" height="14" style="border: none;" alt="article is inactive" class="float_tiny"/>
        </a>
        {/if}
        {if $rights.editArt eq 1 || $rights.delArt eq 1}
        {if $has_payment > 0}
            <div class="float_tiny" style="color: green; font-weight: bold;">$</div>
        {/if}
        {/if}
        </div>
    </td>
</tr>
{if $ratings_on == 1}
<tr>
   <td>
<fieldset>
<legend>{l}Ratings{/l}</legend>
   {if $logged_rating eq 1}
      {if $ratingError}<div class="errForm">{l}Please choose your rating, and after this click Rate{/l}.</div>{/if}
      <label for="RATING">{l}Rate the article{/l}: &nbsp;</a>
      <form name="rating" action="{$smarty.const.DOC_ROOT}/article.php?action=R:{$ID}" method="post">
         <select id="RATING" name="RATING" class="text" {$rating_disabled}>
           <option value=""></option>
           <option value="1">1</option>
           <option value="2">2</option>
           <option value="3">3</option>
           <option value="4">4</option>
           <option value="5">5</option>
           <option value="6">6</option>
           <option value="7">7</option>
           <option value="8">8</option>
           <option value="9">9</option>
           <option value="10">10</option>
         </select>
         &nbsp;<input type="submit" value="{l}Rate{/l}" class="btn" {$rating_disabled}>
      </form>
      &nbsp;&nbsp;
   {else}
      <center><a href="{$smarty.const.DOC_ROOT}/login.php" class="error">{l}You must be logged in to leave a rating{/l}.</a><br> {/if}<b>{l}Average rating{/l}:</b> {$RATING} ({if !$VOTES}0{else}{$VOTES}{/if} {l}votes{/l})
   {/if}
</fieldset>
</td>
</tr>
{/if}



{if $comments_on == 1}
<tr>
   <td>
      <fieldset>
         <legend>{l}Comments{/l}</legend>
         <!-- Printing Comments -->
         {foreach from=$comments item=comment name=items}
            <table class="comment" cellspacing="0" cellpadding="0" width="100%">
               <tr class="comment">
                  <td>{$comment.USER_NAME}:</td>
                  <td align="right">{$comment.DATE_ADDED}</td>
               </tr>
               <tr height="50" valign="top">
                  <td class="descr" colspan="2">{$comment.COMMENT|nl2br}</td>
               </tr>
            </table>
         {foreachelse}
            <h3>{l}No Comments Yet{/l}.</h3>
         {/foreach}

		{if $comm_posted eq 1 && $needs_approval_msg eq 1}
		<p style="color: green">{l}Comment posted and awaiting admin approval{/l}.</p>

		{/if}

         {if $logged_comment eq 1}
            <br>
            <form id="commentForm" action="{$smarty.const.DOC_ROOT}/article.php?action=C:{$ID}" method="post">
            <table width="100%" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <label for="comment"><b>{l}Leave your comment{/l}:</b><br>
                    <textarea id="comment" name="comment" rows="4" cols="60" class="text">{$COMMENT}</textarea>
                    {if $commentError}<div class="errForm">{l}You need to enter comment before Submit{/l}.</div>{/if}

                </td>
            </tr>
            <tr>
                <td>
                {if $smarty.const.VISUAL_CONFIRM_COMMENTS}
                   {if $rights.editArt neq 1 && $rights.addArt neq 1 && $rights.delArt neq 1} 
                   {if $img_verification_error}
                      <span class="error"><font color=red>{l}Verification error, please enter the code again{/l}</font></span><br>
                   {/if}
                   <input id="IMAGEHASH" name="IMAGEHASH" type="hidden" value="{$imagehash}" />
                   <img src="{$smarty.const.DOC_ROOT}/captcha.php?imagehash={$imagehash}" class="captcha" alt="{l}Visual Confirmation Security Code{/l}" title="{l}Visual Confirmation Security Code{/l}" />
                   <br><br><span class='req'>*</span>{l}Enter the code shown{/l}:
                   &nbsp;<input id="CAPTCHA" name="CAPTCHA" type="text" value="" size="{$smarty.const.CAPTCHA_PHRASE_LENGTH}" maxlength="{$smarty.const.CAPTCHA_PHRASE_LENGTH}" class="text" /><br><br>
                   {/if}
                {/if}
                <input id="submit" name="submit" type="hidden" value="submit" />
                <input type="submit" value="{l}Submit{/l}" class="btn">
                </td>
            </tr>
            </table>
            </form>
         {else}
             <br><a href="{$smarty.const.DOC_ROOT}/login.php" class="error">{l}You must be logged in to leave a Comment{/l}.</a><br>
         {/if}
      </fieldset>
   </td>
</tr>
{/if}
</tbody>
</table>


{*/strip*}


{include file="footer.tpl"}
