{include file="header.html"}
<script type="text/javascript" src="index.php?act=jslang"></script>
<script type="text/javascript">
//<!CDATA[
$(function(){
    $('#recom_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('right').text('OK!');
        },
        onkeyup    : false ,
        rules : {
            recom_name : {
                required : true ,
                remote   : {
                url :'index.php?app=recommend&act=check_recom' ,
                type:'get',
                data:{
                    recom_name : function(){
                        return $('#recom_name').val();
                        },
                    id : '{$recommend.recom_id}'
                    }
                }
            }
        },
        messages : {
            recom_name : {
                required : '{$lang.recom_empty}',
                remote   : '{$lang.name_exist}'
            }
        }
    });
});
//]]>
</script>
<div id="rightTop">
  <p>{$lang.recommend}</p>
  <ul class="subnav">
    <li><a class="btn1" href="index.php?app=recommend">{$lang.manage}</a></li>
    {if $recommend.recom_id}
    <li><a class="btn1" href="index.php?app=recommend&amp;act=add">{$lang.add}</a></li>
    {else}
    <li><span>{$lang.add}</span></li>
    {/if}
  </ul>
</div>
<div class="info">
  <form method="post" enctype="multipart/form-data" id="recom_form">
    <table class="infoTable">
      <tr>
        <th class="paddingT15"> {$lang.recom_name}:</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="recom_name" type="text" id="recom_name" value="{$recommend.recom_name|escape}" />
        <label class="field_notice">{$lang.recom_name}</label>    </td>
      </tr>
      <tr>
        <th></th>
        <td class="ptb20"><input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
          <input class="formbtn" type="reset" name="Reset" value="{$lang.reset}" />        </td>
      </tr>
    </table>
  </form>
</div>
{include file="footer.html"}
