<#import "/lib/layout.ftl" as layout>
<@layout.html title="修改友情链接">
<!-- Pic link begin -->
<div class="box1" id="picLink" style="display:none;">
  <div class="title"> 修改图片友情链接 </div>
  <form action="updateLink.action" method="post" id="imageLink" onSubmit="return Validator.validate(this,'admin');">
  <input name="id" type="hidden" value="${link.id}"/>
  <input name="isLogo" type="hidden" value="1"/>
    <div class="content">	
      <div class="ibox">
        <div class="it">图片链接: *</div>
        <div class="iv">
          <input name="logo" id="Logo" type="text" class="t" value="${link.logo?if_exists}" readonly="true"/><label class="red"> <a href="#" onClick="javascript:Util.openWindow('../common/uploadImage.jsp?element=Logo&preview=false',480,240);">上传链接图片</a> | <a href="#" onClick="javascript:Util.openWindow('../common/viewImage.jsp?element=Logo',1,1);">预览</a> | <a href="#" onClick="javascript:Util.openWindow('../common/deleteImage.jsp?element=Logo&imagePath='+document.getElementById('Logo').value,360,140);">删除</a></label>
        </div>
      </div>
      <div class="ibox">
        <div class="it">链接地址: *</div>
        <div class="iv">
          <input name="url" type="text" class="t" value="${link.url}" size="40"/>
          <span class="red">网站URL(如:http://www.ntsky.com)</span> </div>
      </div>	  
       <div class="ibox" style="height:114px;">
        <div class="it">该网站详细说明: * </div>
        <div class="iv" style="height:114px; width:68%">
          <textarea name="description" cols="50" rows="7" id="description">${link.description}</textarea> </div>
      </div>
      <div class="ibox">
        <div class="it">排序编号: *</div>
        <div class="iv">
          <input name="displayOrder" value="${link.displayOrder}" type="text" class="t" value="0" size="4"/>
          <span class="red">链接地址的排列次序(值越高排在越前)</span> </div>
      </div>	  
    </div>
    <!-- end #content -->
    <div class="box3" style="text-align:center; clear:both">
      <div>
        <input type="submit" value="更新图片友情链接" name="agree" class="b"/>
      </div>
    </div>
  </form>
</div>
<!-- end #Pic link -->

<!-- text link begin -->
<div class="box1" id="textLink" style="display:none;">
  <div class="title"> 修改文字友情链接 </div>
  <form action="updateLink.action" method="post" id="textLink" onSubmit="return Validator.validate(this,'admin');">
  <input name="id" type="hidden" value="${link.id}"/>
  <input name="isLogo" type="hidden" value="0"/>
    <div class="content">	
      <div class="ibox">
        <div class="it">链接名称: * </div>
        <div class="iv">
        <input name="name" type="text" class="t" value="${link.name?default('')}"/>
          <span class="red">网站的名称(如:新技术论坛)</span> </div>
      </div>
      <div class="ibox">
        <div class="it">链接地址: *</div>
        <div class="iv">
          <input name="url" type="text" class="t" value="${link.url}" size="40"/>
          <span class="red">网站URL(如:http://www.ntsky.com)</span> </div>
      </div>
      <div class="ibox" style="height:114px;">
        <div class="it">该网站详细说明: * </div>
        <div class="iv" style="height:114px; width:68%">
          <textarea name="description" cols="50" rows="7" id="description">${link.description}</textarea> </div>
      </div>
      <div class="ibox">
        <div class="it">排序编号: *</div>
        <div class="iv">
          <input name="displayOrder" type="text" class="t" value="${link.displayOrder}" size="4"/>
          <span class="red">链接地址的排列次序(值越高排在越前)</span> </div>
      </div>	  
    </div>
    <!-- end #content -->
    <div class="box3" style="text-align:center; clear:both">
      <div>
        <input type="submit" value="更新文字友情链接" name="agree" class="b"/>
      </div>
    </div>
  </form>
</div>
<!-- end #text link -->
<script type="text/javascript">
	//<![CDATA[	
	window.onload = function(){
		if(${link.isLogo}==1)
			Util.show("picLink");
		else
			Util.show("textLink");
	}
	//]]>
</script>
</@layout.html>