<!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 ad_pcd_all = '';
	var p_val = '';
	var c_val = '';
	var d_val = '';
	
	function submitFun()
	{
			var idad_name 		= document.getElementById('ad_name');
			var idad_url 		= document.getElementById('ad_url');

	
			if(idad_name.value=='')
			{
				alert('{#$lang.ad_name_err#}');
				idad_name.focus();
				return false;
			}else if(idad_url.value=='')
			{
				alert('{#$lang.ad_url_err#}');
				idad_url.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.ad_name#}</label>
          <div class="col-sm-4">
            <input class="form-control" name="ad_name" id="ad_name" value="{#$info.ad_name#}" 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.ad_media_type#}</label>
          <div class="col-sm-3">
           <select class="form-control"  name="ad_media_type" id="ad_media_type"  style="width:250px;" >
            {#foreach key=mtkey item=mtitem from=$lang.ad_media_type_arr#}
            <option value="{#$mtkey#}" {#if $info.ad_media_type eq $mtkey#} selected="selected" {#/if#} >{#$mtitem#}</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.adp_id#}</label>
      <div class="col-sm-3">
      <select class="form-control"  name="adp_id" id="adp_id"  style="width:250px;" >
     {#foreach key=adp_key item=adp_item from=$ap_info#}
     <option value="{#$adp_item.adp_id#}" {#if $info.adp_id eq $adp_item.adp_id#} selected="selected" {#/if#}>{#$adp_item.adp_name#}</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.ad_start_time#}</label>
          <div class="col-sm-3">
           <input class="form-control" name="ad_start_time" id="ad_start_time" value="{#$info.ad_start_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"> {#$lang.field_list.ad_end_time#}</label>
          <div class="col-sm-3">
           <input class="form-control" name="ad_end_time" id="ad_end_time" value="{#$info.ad_end_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"> {#$lang.field_list.ad_url#}</label>
          <div class="col-sm-3">
           <input class="form-control" name="ad_url" id="ad_url" value="{#$info.ad_url#}" type="text"  >
          </div> 
        </div>


        <div class="form-group form-group-sm">
          <label class="col-sm-2 control-label" for="i-tit"> {#$lang.field_list.ad_desc#}</label>
          <div class="col-sm-3">
          <textarea  class="form-control" name="ad_desc" id="ad_desc" style="width:250px;">{#$info.ad_desc#}</textarea>
          </div><div class="col-sm-3" style="margin-left:12px;"><button type="button" class="btn btn-default"  onclick="select_img('{#$master_act#}','ad_desc')" >{#$lang.add_file#}</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.ad_enabled#}</label>
          <div class="col-sm-4">
{#foreach key=ek item=ei from=$lang.enabled_arr#}&nbsp;&nbsp;
{#$ei#}<input type="radio"   name="ad_enabled" id="ad_enabled[{#$ek#}]"  value="{#$ek#}" {#if $ek eq $info.ad_enabled#} 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="ad_id" id="ad_id"  value="{#$info.ad_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>