{*<?php exit();?>*}
<div class="block">
	<div class="head"><span>友情链接</span></div>
	<div class="main">
		<table class="table sheet">
			<tr class="h">
				<td>文字</td>
				<td>网址</td>
				<td>图片</td>
				<td>描述</td>
				<td width="45px">排序</td>
				<td width="40px">置顶</td>
				<td width="40px">显示</td>
				<td width="100px">操作</td>
			</tr>
			{foreach from=$link name=link item=item}
			<tr>
				<td>{$item.lin_word}</td>
				<td>{$item.lin_url}</td>
				<td>{if $item.lin_img != 'none'}<img class="lin_img" src="{$item.lin_img}" width="88px" height="31px" />{else}{$item.lin_img}{/if}</td>
				<td>{$item.lin_title}</td>
				<td onClick="show_edit('index_{$item.lin_id}')">
					<span id="index_{$item.lin_id}_1">{$item.lin_index}<img src="{$S_TPL_PATH}images/pencil.gif" /></span>
					<span id="index_{$item.lin_id}_2" style="display:none;">
						<input type="text" id="index_{$item.lin_id}" value="{$item.lin_index}" style="width:30px;" onBlur="set_order('index','link',{$item.lin_id},this.value)" />
					</span>
				</td>
				<td><input type="checkbox" {if $item.lin_top == 1}checked{/if} onClick="set_order('top','link',{$item.lin_id},this.checked)" /></td>
				<td><input type="checkbox" {if $item.lin_show == 1}checked{/if} onClick="set_order('show','link',{$item.lin_id},this.checked)" /></td>
				<td>
					<a onClick="jump('{url channel=$global.channel mod='link_edit' id=$item.lin_id}')">[修改]</a>
					<a onClick="del('link|{$item.lin_id}')">[删除]</a>
				</td>
			</tr>
			{/foreach}
			<tr>
				<td colspan="8">
					<div class="bt_row">
						<input class="button" type="button" onClick="jump('{url channel=$global.channel mod='link_add'}')" value="添加" />
					</div>
				</td>
			</tr>
		</table>
	</div>
</div>