<!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>
<script src="{#$base_weburl#}/js/jquery.min.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#}';
	var inv_pcd_all = '';
	var p_val = '';
	var c_val = '';
	var d_val = '';
	
	function submitFun()
	{
			var idinv_position 		= document.getElementById('inv_position');
			var idinv_num 			= document.getElementById('inv_num');
			var idinv_type 			= document.getElementById('inv_type');
			var idinv_pay 			= document.getElementById('inv_pay');

			//var idsuggestionInfo 	= document.getElementById('suggestionInfo');
	
			if(idinv_position.value=='')
			{
				alert('{#$lang.inv_position_err#}');
				idinv_position.focus();
				return false;
			}else if(idinv_num.value=='')
			{
				alert('{#$lang.inv_num_err#}');
				idinv_num.focus();
				return false;
			}else if(idinv_type.value=='')
			{
				alert('{#$lang.inv_type_err#}');
				idinv_type.focus();
				return false;
			}else if(idinv_pay.value=='')
			{
				alert('{#$lang.inv_pay_err#}');
				idinv_pay.focus();
				return false;
			}
			
			document.formSub.target="_self"
			document.formSub.submit();
	}
	



</script>
</head>
<body>
    <div class="info-tit"><span class="glyphicon glyphicon-paperclip"> </span> <a href="index.php?load={#$master_act#}&act=info_list" >{#$lang.title#}</a> > {#$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.inv_position#}</label>
          <div class="col-sm-4">
            <input class="form-control" name="inv_position" id="inv_position" value="{#$info.inv_position#}" type="text"  >
          </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.inv_num#}</label>
          <div class="col-sm-3">
            <input class="form-control" name="inv_num" id="inv_num" value="{#$info.inv_num#}" type="text"  >
          </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.inv_type#}</label>
          <div class="col-sm-3">
{#foreach key=pk item=pi from=$lang.inv_type_arr#}&nbsp;&nbsp;
{#$pi#}<input type="radio"   name="inv_type" id="inv_type[{#$pk#}]"  value="{#$pk#}" {#if $pk eq $info.inv_type#} checked="checked" {#/if#}>
{#/foreach#}
          </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.inv_pay#}</label>
          <div class="col-sm-4">
 <select  class="form-control" name="inv_pay" id="inv_pay" style="width:250px;">
<option value="">{#$lang.txt_select#}</option>
{#foreach item=pay_item key=pay_key  from=$lang.inv_pay_arr#}#}
<option value="{#$pay_key#}" {#if $info.inv_pay eq $pay_key#} selected="selected" {#/if#} >{#$pay_item#}</option>
{#/foreach#}
</select>

          </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.inv_year#}</label>
          <div class="col-sm-4">
<select class="form-control" name="inv_year" id="inv_year"  style="width:250px;" >
<option value="">{#$lang.txt_select#}</option>
{#foreach item=year_item key=year_key  from=$lang.inv_year_arr#}
<option value="{#$year_key#}" {#if $info.inv_year eq $year_key#} selected="selected" {#/if#} >{#$year_item#}</option>
{#/foreach#}
</select>
          </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.inv_age#}</label>
          <div class="col-sm-4">
<select  class="form-control" name="inv_age" id="inv_age"  style="width:250px;" >
<option value="">{#$lang.txt_select#}</option>
{#foreach item=age_item key=age_key  from=$lang.inv_age_arr#}
<option value="{#$age_key#}" {#if $info.inv_age eq $age_key#} selected="selected" {#/if#}  >{#$age_item#}</option>
{#/foreach#}
</select>      
          
 
          </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.inv_educational#}</label>
          <div class="col-sm-4">
<select  class="form-control" name="inv_educational" id="inv_educational"  style="width:250px;" >
<option value="">{#$lang.txt_select#}</option>
{#foreach item=edu_item key=edu_key  from=$lang.inv_educational_arr#}
<option value="{#$edu_key#}"  {#if $info.inv_educational eq $edu_key#} selected="selected" {#/if#} >{#$edu_item#}</option>
{#/foreach#}
</select>  
          
 
          </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.inv_sex#}</label>
          <div class="col-sm-4">
{#foreach key=pk item=pi from=$lang.inv_sex_arr#}&nbsp;&nbsp;
{#$pi#}<input type="radio"   name="inv_sex" id="inv_sex[{#$pk#}]"  value="{#$pk#}" {#if $pk eq $info.inv_sex#} checked="checked" {#/if#}>
{#/foreach#}
          </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.inv_marriage#}</label>
          <div class="col-sm-4">
{#foreach key=ek item=ei from=$lang.inv_marriage_arr#}&nbsp;&nbsp;
{#$ei#}<input type="radio"   name="inv_marriage" id="inv_marriage[{#$ek#}]"  value="{#$ek#}" {#if $ek eq $info.inv_marriage#} checked="checked" {#/if#}>
{#/foreach#}
          </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.inv_subject#}</label>
          <div class="col-sm-3">
            <input class="form-control" name="inv_subject" id="inv_subject" value="{#$info.inv_subject#}" type="text"  >
          </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.inv_active_time#}</label>
          <div class="col-sm-3">
            <input class="form-control" name="inv_active_time" id="inv_active_time" value="{#$info.inv_active_time|date_format:"%Y-%m-%d %H:%M:%S"#}" type="text"  >
          </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.inv_address#}</label>
          <div class="col-sm-1">
		  <div id="top_addr"><span id="province_span"><select class="form-control" name="province" id="province">
          <option value="">{#$lang.txt_select#}</option>
          </select></span> </div>
          </div>
          <div class="col-sm-1"> 
          <span id="city_span"><select class="form-control" name="city" id="city">
          <option value="" >{#$lang.txt_select#}</option>
          </select></span>
          </div>
          <div class="col-sm-1">
          <span id="district_span"><select class="form-control" name="district" id="district">
          <option value="" >{#$lang.txt_select#}</option>
          </select></span>
          </div>
        <input name="inv_pcd_all" id="inv_pcd_all" value="{#$info.inv_pcd_all#}" type="hidden"  >
        </div>
<script language="javascript">
	function get_area( obj_val,  area_type , sel_val )
	{
		if(obj_val!='')
		{
			$.get(webroot_url+"/adminsys/index.php?load=ajax_area&act="+area_type+"&obj_val="+obj_val+"&sel_val="+sel_val, function(data)
			{
				$('#'+area_type+'_span' ).html(data);
			})
		}else{
			$.get(webroot_url+"/adminsys/index.php?load=ajax&act=area&type="+area_type, function(data)
			{
				$('#'+area_type+'_span' ).html(data);
			})
		}
	}
	function get_pcd_all(obj,type)
	{
		if(type=='province' && obj.value!='' ){
			p_val = obj.options[obj.selectedIndex].text 
			
		}
		if(type=='city' && obj.value!='' ){
			c_val = obj.options[obj.selectedIndex].text 
			
		}
		if(type=='district' && obj.value!='' ){
			d_val = obj.options[obj.selectedIndex].text 
			
		}
		$('#inv_pcd_all').val( p_val + c_val + d_val ) ;	
	}

	get_area( '0',  'province' ,  '{#$info.inv_province#}');
	get_area( '{#$info.inv_province#}', 'city' ,  '{#$info.inv_city#}');
	get_area( '{#$info.inv_city#}', 'district' ,  '{#$info.inv_district#}');
	
</script>



        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"><font color="red">*</font> {#$lang.field_list.inv_desc#}</label>
          <div class="col-sm-3">
           {#$desc_ckeditorLoad#}
          </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.inv_requests#}</label>
          <div class="col-sm-3">
           {#$requests_ckeditorLoad#}
          </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="inv_id" id="inv_id"  value="{#$info.inv_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/base.js"></script>
</body>
</html>