<%template _header%>
<!--header end-->

<!--TheCurrent start-->
<div id="foruminfo">
	<div class="userinfo">
		<h2><a href="{config.forumurl}" class="home">{config.forumtitle}</a> <span><a href="usercp.aspx">用户中心</a></span><strong>增加友情链接</strong></h2>	</div>
	<div class="forumstats">
		<div id="search">
				<%template _quicksearch%>
		</div>
	</div>
</div>

<!--TheCurrent end-->

<!--主体-->
<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="controlpannel">
   <%template _menu%>
	<div class="pannelcontent">
		<div class="pcontent">
			<div class="panneldetail">
				<%template _spacemenu%>	
				<div class="pannelbody">
					<div class="pannellist">
					<%if page_err==0%>
						<%if ispost%>
							<%template _msgbox%>
						<%else%>
						<form id="postpm" name="postpm" method="post" action="">
							<label for="user" class="labelshort">链接文字:</label>
							<input name="linktitle" type="text" id="linktitle" value="" size="40" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" maxlength="50"/><br />
							<label for="email" class="labelshort">链接地址:</label>
							<input name="linkurl" type="text" id="linkurl" value="" size="40" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" maxlength="255"/><br />
							<label for="comment" class="labelshort">描述:</label>
							<textarea name="description" cols="50" rows="6" id="linkdescription" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" style="width:80%;"></textarea><br/>
							
							<input type="submit" name="Submit" value="确定" class="sbutton" onclick="return validateSubmit();" ID="Submit1"/>
						</form>
						<%/if%>
						</div>
					<%else%>
					<%template _usercperrmsgbox%>
					<%/if%>
			  </div>
			</div>
		</div>
	</div>
</div>
<!--主体-->
</div>
<%template _copyright%>
<%template _footer%>
