{*********************************************************
* Copyright (c) 2009 PHPLDTemplates.com
* Theme Author: http://www.PHPLDTemplates.com
* Theme URL: http://www.phpldtemplates.com/2009/07/free-phpld-template-dbs-3/
* 
* Report bug: Please email contact @ PHPLDTemplates.com
* License: Free, provided user keeps the footer links intake. Not to be resold.
* More free phpld templates are available at http://www.PHPLDTemplates.com
* 
**********************************************************}
{* Build the category selection *}
{strip}

{if $smarty.const.CAT_SELECTION_METHOD eq 1}
   {if !empty ($CategoryTitle)}{$CategoryTitle}{else}{l}Please select a category!{/l}{/if}
   <input type="hidden" id="CATEGORY_ID" name="CATEGORY_ID" value="{$CATEGORY_ID}" />
   {validate form="submit_article" id="v_CATEGORY_ID" message=$smarty.capture.no_url_in_top}

{elseif $smarty.const.CAT_SELECTION_METHOD eq 2}
   <div id="catTitle">
      {if !empty ($CategoryTitle)}{$CategoryTitle}{else}{l}Please select a category!{/l}{/if}
   </div>
   <span id="toggleCategTree">{l}Change category{/l}</span>
   <input type="hidden" id="CATEGORY_ID" name="CATEGORY_ID" value="{$CATEGORY_ID}" />
   {validate form="submit_article" id="v_CATEGORY_ID" message=$smarty.capture.no_url_in_top}
   <div id="categtreebox"></div>

{else}
   {*html_options options=$categs selected=$CATEGORY_ID name="CATEGORY_ID"*}
   <select name="CATEGORY_ID">
   	{foreach from=$categs key=k item=v}
  	<option value="{$k}" {if $CATEGORY_ID eq $k} selected="selected" {/if} {if $v.closed eq 1}disabled = "disabled" {/if}>{$v.val}</option>
	{/foreach}
	</select>
   {validate form="submit_article" id="v_CATEGORY_ID" message=$smarty.capture.no_url_in_top}
{/if}
{/strip}