<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>友链管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script src="images/js/check.func.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function(){
		checkForm(0);
	});
</script>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="?file=other&action=flink">友链管理</a></li>
			<li><a href="javascript:void(0);" class="on">编辑友链</a></li>			
		</ul>
	</div>
	<div class="main">
	<fieldset>
		<legend>操作提示</legend>
		1：友链类型名称不能为空； 2：友链类型排序应为数字；3：链接URL必须以http://开头 。
	</fieldset>
	<form action="" method="post" name="myform" enctype="multipart/form-data">
	<input type="hidden" name="do_submit" value="1" />
	<input type="hidden" name="id" value="<?php echo $r['id'];?>" />
	<table cellspacing="0" class="sub">
		<tr>
			<td width="80" align="right">链接名称：</td>
			<td>
			<input type="text" name="link[name]" datatype="limit" min="1" max="100" size="25" value="<?php echo $r['name'];?>" />
			</td>
		</tr>
		<tr>
			<td width="80" align="right">链接图片：</td>
			<td>
			<?php if($r['logo']){?><img src="<?php echo $r['logo'];?>" width="100" alt="<?php echo basename($r['logo']);?>" /> <?php }?><input type="file" name="linklogo" style="border:1px;width:350px;height:20px"  />
			</td>
		</tr>
		<tr>
			<td width="80" align="right">链接地址：</td>
			<td>
			<input type="text" size="45" value="<?php echo $r['url'];?>" name="link[url]" datatype="url"  />
			</td>
		</tr>
		<tr>
			<td align="right">链接排序：</td>
			<td>
			<input type="text" size="6" value="<?php echo $r['orderby'];?>" datatype="integer" name="link[orderby]" />
			</td>
		</tr>
		<tr>
			<td align="right">是否推荐：</td>
			<td>
			<input type="radio" class="radio" value="1" <?php echo $r['isindex']?'checked="checked"':'';?> name="link[isindex]" />推荐
			<input type="radio" class="radio" value="0" <?php echo !$r['isindex']?'checked="checked"':'';?> name="link[isindex]" />普通
			</td>
		</tr>
		<tr>
			<td align="right">是否启用：</td>
			<td>
			<input type="radio" class="radio" value="1" <?php echo $r['ispassed']?'checked="checked"':'';?> name="link[ispassed]" />启用
			<input type="radio" class="radio" value="0" <?php echo !$r['ispassed']?'checked="checked"':'';?> name="link[ispassed]" />待审
			</td>
		</tr>
		<tr class="bg2"><td></td><td><input type="button" class="button" onclick="doSubmit(this);" value="保存友链" /> <input type="button" class="button" onclick="window.location.href='<?php echo ADMIN_FILE;?>?file=other&action=flink'" value="取消返回" /></td></tr>
	</table>
	</form>

	</div>
</div>
</body>
</html>