<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--{include file=elements/header.css.html}-->
<!--{include file=elements/header.js.html type=common}-->
<!--{include file=elements/header.js.html type=valid}-->
</head>
<body>
<div id="outside">
	<!--{include file=frame/top.html}-->
	<div id="mainareaContent">
		<!--{include file=frame/left.html}-->
		<div id="rightContent">
			<div id="topContent">
				<div class="sitmap">
					<span class="r"><!--{include file="elements/uuadvad.html"}--></span>模块管理&nbsp;&gt;&nbsp;友链模块&nbsp;&gt;&nbsp;内容管理&nbsp;&gt;&nbsp;修改友链
				</div>
			</div>
			<div class="tabcontent">
				<a href="index.php?r=FriendSite.friendsitelist" class="nolink">内管管理</a>
				<a href="index.php?r=SiteSet.friendsiteset" class="link">属性设置</a>
				<a href="index.php?r=FriendSite.friendsiteListLayout" class="link">列表页布局</a>
					<a href="index.php?r=FriendSite.friendsitePageLayout" class="link">内容页布局</a>
					<a href="index.php?r=FriendSite.realtimereport" class="link">实时数据分析</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent">
					<form id="addForm" action="index.php?r=FriendSite.edit" method="post">
						<input type="hidden" name="data[FriendSite][id]" value="<!--{$data.id}-->"/>
						<input type="hidden" name="returnParams" value="<!--{$returnParams}-->"/>
						<table class="tbl_edit" width="100%">
							<tr>
								<td class="td_name">站点名称<span class="red">*</span></td>
								<td class="td_content"><input type="text" class="text" id="friend_site_name" name="data[FriendSite][friend_site_name]" value="<!--{$data.friend_site_name}-->" maxlength='64'/><span id="span_friend_site_name"></span></td>
							</tr>
							<tr>
								<td class="td_name">站点地址<span class="red">*</span></td>
								<td class="td_content"><input type="text" class="text" id="out_url" name="data[FriendSite][out_url]" value="<!--{$data.out_url}-->" maxlength='512'/><span id="span_out_url"></span></td>
							</tr>
							<tr>
								<td class="td_name">链出地址</td>
								<td class="td_content">index.php?r=FriendSite.out&id=<!--{$data.id}--></td>
							</tr>
							<tr>
								<td class="td_name">频道</td>
								<td class="td_content">
								<!--{if !empty($channel)}-->
									<select name="data[FriendSite][channel_id]">
										<!--{foreach from=$channel item=item name=channellist}-->
										<option value="<!--{$item.id}-->"  <!--{if $item.id eq $data.channel_id}-->selected="selected"<!--{/if}-->><!--{$item.channel_text}--></option>
										<!--{/foreach}-->
									</select>
								<!--{else}-->
									无
								<!--{/if}-->
								</td>
							</tr>
							<tr>
								<td class="td_name">联系方式</td>
								<td class="td_content"><textarea class="textarea" name="data[FriendSite][contact_info]"><!--{$data.contact_info}--></textarea></td>
							</tr>
							<tr>
								<td class="td_name">简介</td>
								<td class="td_content"><textarea class="textarea" name="data[FriendSite][intro]"><!--{$data.intro}--></textarea>
								</td>
							</tr>
							<tr>
								<td class="noborder"></td>
								<td class="noborder"><button type="submit" class="butsubmit">提交</button>&nbsp;&nbsp;<button type="button" class="but2font" onClick="window.location.href='index.php?<!--{$returnParams}-->'">返回</button></td>
							</tr>
						</table>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
$("#addForm").validate({
	rules: {
		"data[FriendSite][friend_site_name]": "required",
		"data[FriendSite][out_url]": "required"
	},
	messages: {
		"data[FriendSite][friend_site_name]": "站点名称不能为空",
		"data[FriendSite][out_url]": "链出地址不能为空"
	},
	errorPlacement: function(error, element){
		$("#span_" + element.attr("id")).html(error).attr("class", "error");
	},
	submitHandler: function(form){
		setDisabled("button", window.document);
		form.submit();
	},
	errorClass: "invalid",
	success: function(label){
		label.parent().html("&nbsp;").attr("class", "valid");
	},
	onkeyup: false
});
</script>
</html>