<%inherits "Discuz.Space.Pages.usercpspacelinkadd"%>
<%template _header%>
<div class="wrap cl pageinfo">
	<div id="nav">
		<%if {usergroupinfo.allowsearch}>0%>
			<%template _quicksearch%>
		<%/if%>
        <a href="{config.forumurl}" class="title">{config.forumtitle}</a> &raquo; <a href="usercp.aspx">用户中心</a> &raquo; <strong>增加友情链接</strong>
	</div>
</div>
<script type="text/javascript">
	function validateSubmit()
	{
		$ = document.getElementById;
		if($("linktitle").value == "")
		{
			alert("没有输入链接文字！");
			$("linktitle").focus();
			return false;
		}
		if($("linkurl").value == "")
		{
			alert("没有输入链接地址！");
			$("linkurl").focus();
			return false;
		}
		if($("linkdescription").value.length > 200)
		{
			alert('链接描述长度最大为200字'); 
			return false;
		}
	}
</script>
<div class="wrap uc cl">
	<%template _menu%>
	<div class="uc_main">
	<div class="uc_content">
		<h1>增加友情链接</h1>
		<%template _spacemenu%>	
	<%if page_err==0%>
		<%if ispost%>
			<%template _usercpmsgbox%>
		<%else%>
		<form id="postpm" name="postpm" method="post" action="">
			<table cellspacing="0" cellpadding="0" class="tfm" summary="个人资料">
			<tbody>
			<tr>
				<th>链接文字</th>
				<td><input name="linktitle" type="text" id="linktitle" value="" size="40" maxlength="50" class="txt"/></td>
			</tr>
			<tr>
				<th>链接地址</th>
				<td><input name="linkurl" type="text" id="linkurl" value="" size="40" maxlength="255" class="txt"/></td>
			</tr>
			<tr>
				<th>描述</th>
				<td><textarea name="description" cols="50" rows="6" id="linkdescription" class="txtarea"></textarea></td>
			</tr>
			<tr>
				<th></th>
				<td><button type="submit" name="Submit" onclick="return validateSubmit();" class="pn"><span>确定</span></button></td>
			</tr>
			</tbody>
			</table>
		</form>
		<%/if%>
	<%else%>
		<%template _usercperrmsgbox%>
	<%/if%>
	</div>
	</div>
</div>
<%template _copyright%>
<%template _footer%>