<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>{#$txt_title#} - Powered by HuCart.COM</title>
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link href="./css/info.css" rel="stylesheet">
<script language="javascript" src="{#$base_weburl#}/js/pinyin.js"></script>
<script language="javascript" src="{#$base_weburl#}/js/admin_common.js"></script>
<!--[if lt IE 9]>
  <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script language="javascript">
	var webroot_url = '{#$base_weburl#}';
	function submitFun()
	{
			var idart_title 		= document.getElementById('art_title');
			var idars_id 			= document.getElementById('ars_id');
			var idart_num 			= document.getElementById('art_num');
			var idart_unit 			= document.getElementById('art_unit');
			var idart_img 			= document.getElementById('art_img');
			var idart_sell_price 	= document.getElementById('art_sell_price');
			var content				= CKEDITOR.instances.art_content.getData();
			//var idsuggestionInfo 	= document.getElementById('suggestionInfo');
	
			if(idart_title.value=='')
			{
				alert('{#$lang.art_title_err#}');
				idart_title.focus();
				return false;
			}else if(idars_id.value=='')
			{
				alert('{#$lang.ars_id_err#}');
				idars_id.focus();
				return false;
			}else if(idart_num.value=='')
			{
				alert('{#$lang.art_num_err#}');
				idart_num.focus();
				return false;
			}else if(idart_unit.value=='')
			{
				alert('{#$lang.art_unit_err#}');
				idart_unit.focus();
				return false;
			}else if(idart_img.value=='')
			{
				alert('{#$lang.art_img_err#}');
				idart_img.focus();
				return false;
			}else if(idart_sell_price.value=='')
			{
				alert('{#$lang.art_sell_price_err#}');
				idart_sell_price.focus();
				return false;
			}else if(content=='')
			{
				alert('{#$lang.art_content_err#}');
				CKEDITOR.instances.art_content.focus();
				return false;
			}
	
			//document.formSub.action='./index.php?load=product&act=add_info';
			document.formSub.target="_self"
			document.formSub.submit();
	}
	
	function check_bolder(obj)
	{
		if(obj.checked==true)
		{
			//document.getElementById('art_title').style.fontWeight		= 'bold';
			document.getElementById('art_small_title').style.fontWeight	= 'bold';
		}else if(obj.checked==false)
		{
			///document.getElementById('art_title').style.fontWeight		= 'normal';
			document.getElementById('art_small_title').style.fontWeight	= 'normal';
		}
	}

</script>
</head>
<body>
    <div class="info-tit"><span class="glyphicon glyphicon-paperclip"> </span> {#$lang.title#} > {#$txt_title#} ({#$lang.need_edit#}&nbsp;&nbsp; {#$lang.need_add#} {#$lang.need_del#})</div>
    <!-- custom con start -->
    <div class="info-add">
      <form class="form-horizontal" name="add-form" id="add-form" method="post" action="{#$act_url#}">
        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"><font color="red">*</font> {#$lang.field_list.art_title#}</label>
          <div class="col-sm-10">
            <input class="form-control" name="art_title" id="art_title" value="{#$info.art_title#}" type="text"  style="width:450px;"  onblur="getPinYinValue('art_title','art_phoneticize')"  >
          </div>
        </div>

          
        <div class="form-group form-group-sm" style="display:none;">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.art_phoneticize#}</label>
          <div class="col-sm-3">
            <input class="form-control" name="art_phoneticize" id="art_phoneticize" value="{#$info.art_phoneticize#}" type="text"  style="width:300px;"    >
          </div><div class="col-sm-3">{#$lang.phoneticize_say#}</div>
        </div>   
        

        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.art_small_title#}</label>
          <div class="col-sm-3">
            <input class="form-control" name="art_small_title" id="art_small_title" value="{#$info.art_small_title#}" type="text"  style="width:300px;"  >
          </div><div  class="col-sm-3">{#$lang.field_list.art_color#}<select name="art_color" id="art_color"  onchange="document.getElementById('art_title').style.color=this.value;document.getElementById('art_small_title').style.color=this.value;">
 {#foreach item=colitem  key=colkey  from =$lang.art_color_arr#}
<option value="{#$colitem.val#}" style="color:{#$colitem.val#}" {#if $info.art_color eq $colitem.val#} selected="selected"  {#/if#} >{#$colitem.col#}</option>
{#/foreach#}
</select>&nbsp;&nbsp;{#$lang.is_bolder#}<input name="art_bolder" id="art_bolder" type="checkbox" value="1"  onclick="check_bolder(this)"  {#if $info.art_bolder eq '1'#} checked="checked" {#/if#} /></div>
        </div>
        
        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"><font color="red">*</font> {#$lang.field_list.sort_id#}</label>
          <div class="col-sm-3">
            {#$sort_select_str#}
          </div>
        </div>      


        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.art_type#}</label>
          <div class="col-sm-3">
             <select class="form-control"  id="art_type">
            {#foreach item=item   from = $art_type#}
            <option value="">{#$item#}</option>
            {#/foreach#}
           </select>
          </div>
        </div> 


        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.art_keyword#}</label>
          <div class="col-sm-6">
            <input class="form-control" name="art_keyword" id="art_keyword" value="{#$info.art_keyword#}" type="text"  style="width:300px;"    >
          </div>
        </div>
        
        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.art_description#}</label>
          <div class="col-sm-6">
            <textarea class="form-control" rows="4" cols="56" name="art_description" id="art_description">{#$info.art_description#}</textarea>
          </div>
        </div>

        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"><font color="red">*</font> {#$lang.field_list.art_content#}</label>
          <div class="col-sm-6">
            {#$ckeditorLoad#}
          </div>
        </div> 

        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.art_author#}</label>
          <div class="col-sm-6">
            <input class="form-control" name="art_author" id="art_author" value="{#$info.art_author#}" type="text"  style="width:300px;"    >
          </div>
        </div> 

        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.art_file#}</label>
          <div class="col-sm-3">
            <input class="form-control" name="art_file" id="art_file" value="{#$info.art_file#}" type="text"  style="width:300px;"    >
          </div> <div class="col-sm-3" style="margin-left:12px;"><button type="button" class="btn btn-default"  onclick="select_img('article','art_file')" >{#$lang.add_file#}</button></div>
        </div>  
        
        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.art_pic#}</label>
          <div class="col-sm-3">
            <input class="form-control" name="art_pic" id="art_pic" value="{#$info.art_pic#}" type="text"  style="width:300px;"    >
          </div> <div class="col-sm-3" style="margin-left:12px;"><button type="button" class="btn btn-default"  onclick="select_img('article','art_pic')" >{#$lang.add_pic#}</button></div>
        </div>  

        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"><font color="red">*</font> {#$lang.field_list.art_list#}</label>
          <div class="col-sm-1">
            <input class="form-control" name="art_list" id="art_list" value="{#if $info.art_list eq ''#}99999{#else#}{#$info.art_list#}{#/if#}" type="text"  style="width:100px;"    >
          </div><div class="col-sm-3">{#$lang.say_list#}</div>
        </div>  
        
        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"><font color="red">*</font> {#$lang.field_list.art_enabled#}</label>
          <div class="col-sm-6">
{#foreach key=ek item=ei from=$lang.enabled_arr#}&nbsp;&nbsp;
{#$ei#}<input type="radio"   name="art_enabled" id="art_enabled[{#$ek#}]"  value="{#$ek#}" {#if $ek eq 1#} checked="checked" {#/if#}>
{#/foreach#}
          </div>
        </div> 

        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-primary  btn-sm" onclick="return submitFun(this)" >{#$edit_submit#}</button>&nbsp;&nbsp;&nbsp;&nbsp;
            <button type="reset" class="btn btn-default btn-sm">{#$lang.reset#}</button>
          </div>
        </div>
        <input type="hidden" name="act_type" value="{#$act_type#}">
        <input type="hidden" name="art_id" id="art_id"  value="{#$info.art_id#}">
      </form>
    </div>
    <!-- custom con end -->

    <footer class="footer">
      <div class="container">
        <p class="text-muted">Powered by <a href="http://Www.HuCart.COM" target="_blank">HuCart.COM</a></p>
      </div>
    </footer>
<script src="{#$base_weburl#}/js/jquery.min.js"></script>
<script src="{#$base_weburl#}/js/base.js"></script>
</body>
</html>