<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/validator.js"></script>
<body>
<h1>
<span class="action-span"><a href="?ctl=flink&act=flink_manage"><tpl>$flink_list</tpl><!--友情链接列表--></a></span>
<span class="action-span1"><a href="?ctl=index&act=admin_main"><tpl>$common_admin_index</tpl><!--管理首页--></a> >> <tpl>if $flink_info['flink_id'] != ''</tpl><tpl>$flink_edit</tpl><tpl>else</tpl><tpl>$flink_add</tpl><!--友情链接添加--><tpl>/if</tpl></span>
<div style="clear:both"></div>
</h1>
<div class="main-div">
<form action="index.php?ctl=flink&act=flink_save" method="post" name="theForm" enctype="multipart/form-data" onSubmit="return validate();">
<table width="100%" id="general-table">
  <tr>
    <td width="29%" class="label"><a href="javascript:showNotice('LogoNameNotic');" title="{$lang.form_notice}">
      <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a><tpl>$flink_add_name</tpl><!--友情链接名称-->：</td>
    <td colspan="2">
      <input type="text" name="flink_name" value="<tpl>$flink_info['flink_name']</tpl>" size="30"  />   </td>
  </tr>
  <tr>
    <td class="label"><tpl>$flink_add_url</tpl><!--友情链接地址-->：</td>
    <td colspan="2">
      <input type='text' name='flink_url' value="<tpl>$flink_info['flink_url']</tpl>" size="30"  /></td>
  </tr>
  <tr>
    <td class="label"><tpl>$flink_add_sort</tpl><!--友情链接排序-->：</td>
    <td colspan="2"><input name="flink_sort" type="text" value="<tpl>$flink_info['flink_sort']</tpl>" size="5" /></td>
  </tr>
  <tr>
    <td class="label"><tpl>$flink_add_logo</tpl><!--友情链接图片-->：</td>
    <td width="37%">
      <input type='file' name='flink_logo' size="35" /></td>
    <td width="34%" rowspan="2"><tpl>if $flink_info['flink_logo'] != ''</tpl><img src="<tpl>WEB_HOST</tpl><tpl>$flink_info['flink_logo']</tpl>" width="100" height="50" border="0" /><tpl>/if</tpl></td>
  </tr>
    <tr>
      <td class="label"><a href="javascript:showNotice('LogoUrlNotic');" title="{$lang.form_notice}">
        <img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a><tpl>$flink_add_url_logo</tpl><!--远程链接图片-->：</td>
      <td>
        <input type='text' name='url_logo' value="<tpl>$flink_info['flink_logo']</tpl>" size="42"  /></td>
      </tr>
  <tr>
    <td class="label">&nbsp;</td>
    <td colspan="2">
	<input type="hidden" name="flink_id" value="<tpl>$flink_info['flink_id']</tpl>" />
	<input type="hidden" name="image_logo" value="<tpl>$flink_info['flink_logo']</tpl>"  />
      <input type="submit" value="<tpl>$flink_add_save</tpl>" class="button" />
      <input type="reset" value="<tpl>$flink_add_reset</tpl>" class="button" />      </td>
  </tr>
</table>
</form>
</div>
<div id="footer">
<tpl>$common_copyright</tpl>
</div>
<script language="javascript">
  /**
   * 检查输入的内容
   */
  function validate()
  {
    var validator = new Validator('theForm');
    validator.required('flink_name','<tpl>$flink_add_name_error</tpl>');
	validator.required('flink_url','<tpl>$flink_add_url_error</tpl>');
    return validator.passed();
  }
</script>
</body>