<!--<?php
include_once PrintEot('left');
if(empty($action)){print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li class="current"><a href="$basename">友情链接管理</a></li>
		<li><a href="$basename&action=add">添加友情链接</a></li>
	</ul>
</div>
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend"> 友情链接添加说明:<ol><li>特殊链接(显示顺序<0，每行显示一个)</li><li>普通连接(显示顺序>=0)</li></ol></div>
</div>
<form method="post" action="$basename&">
	<h2 class="h1 cc">
		<span class="mr5"><!---->链接列表</span>
		<span class="linka"><select onchange="window.location=('$basename&state='+this.value);">
			<option>所有状态</option>
			<option value="1" $state_1>已审</option>
			<option value="0" $state_0>未审</option>
		</select>
		</span>
	</h2>
	<div class="admin_table mb10">
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr class="tr2 vt td_bgB">
			<td width="3%">&nbsp;</td>
			<td width="18%">站点名称</td>
			<td width="8%">顺序</td>
			<td width="25%">站点URL</td>
			<td width="*">站点说明</td>
			<td width="8%">状态</td>
			<td width="8%">操作</td>
			<td width="4%">&nbsp;</td>
		</tr>
<!--
EOT;
foreach($threaddb as $key=> $thread){
$key++;
$state=$thread[ifcheck] ? '<span class="s3">已审</span>' : '<span class="s1">未审</span>';
print <<<EOT
-->
		<tr class="tr1 vt">
			<td class="td2">$key</td>
			<td class="td2"><a href="$basename&action=edit&sid=$thread[sid]">$thread[name]</a></td>
			<td class="td2">$thread[threadorder]</td>
			<td class="td2">$thread[url]</td>
			<td class="td2">$thread[descrip]</td>
			<td class="td2">{$state}</td>
			<td class="td2"><a href="$basename&action=edit&sid=$thread[sid]" title="编辑">[编辑]</a></td>
			<td class="td2"><input type='checkbox' name='deiaid[]' value="$thread[sid]"></td>
		</tr>
		<!--
EOT;
}print <<<EOT
-->
	</table>
	</div>
	<input name=action type=hidden value="del">
	<div class="tac mb10">
		<span class="bt"><span><button type="button" name="chkall" onclick="CheckAll(this.form)">全 选</button></span></span>
		<span class="bt"><span><button type="submit" name="delete" value="delete">删 除</button></span></span>
		<span class="bt"><span><button type="submit" name="unpass" value="unpass">未 审</button></span></span>
		<span class="btn"><span><button type="submit" name="pass" value="pass">审 核</button></span></span>
	</div>
</form>
<!--
EOT;
}elseif($action=='add' || $action=='edit'){print <<<EOT
-->
<div class="nav3 mb10">
	<ul class="cc">
		<li><a href="$basename">友情链接管理</a></li>
<!--
EOT;
if($action=='edit'){ print <<<EOT
-->
		<li><a href="$basename&action=add">添加友情链接</a></li>
		<li class="current"><a href="$basename&action=$action">编辑友情链接</a></li>
<!--
EOT;
}else{ print <<<EOT
-->
		<li class="current"><a href="$basename&action=$action">添加友情链接</a></li>
<!--
EOT;
} print <<<EOT
-->
	</ul>
</div>
<div class="admin_info mb10">
	<h3 class="h1"><b>提示信息</b></h3>
	<div class="legend"> 友情链接添加说明:<ol><li>特殊链接(显示顺序<0，每行显示一个)</li><li>普通连接(显示顺序>=0)</li></ol></div>
</div>
<form action="$basename" method=POST>
	<input type=hidden name="action" value=$action />
	<input type=hidden name="step" value="2" />
	<input type=hidden name="sid" value=$sid />
	<h2 class="h1"><b>友情链接</b></h2>
	<div class="admin_table mb10">
	<table cellspacing="0" cellpadding="0" width="100%">
		<tr class="tr1 vt">
			<td class="td1">站点名称</td>
			<td class="td2"><input type="text" class="input input_wa" name="name" value='$name' /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td1">显示顺序(默认为0)</td>
			<td class="td2"><input type="text" class="input input_wa" name="threadorder" value='$threadorder' /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td1">站点URL</td>
			<td class="td2"><input type="text" class="input input_wa" name="url" value='$url' /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td1">站点主人</td>
			<td class="td2"><input type="text" class="input input_wa" name="username" value='$username' /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td1">站点说明</td>
			<td class="td2"><input type="text" class="input input_wb" name="descrip" value='$descrip' /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td1">站点LOGO<br />(设置文字链接请留空)</td>
			<td class="td2"><input type="text" class="input input_wa" name="logo" value='$logo' /></td>
		</tr>
		<tr class="tr1 vt">
			<td class="td1">状态</td>
			<td class="td2">
				<ul class="list_A list_80 cc">
					<li><input type="radio" name="ifcheck" $ifcheck_Y value="1" />已审</li>
					<li><input type="radio" name="ifcheck" $ifcheck_N value="0" />未审</li>
				</ul>
			</td>
		</tr>
	</table>
	</div>
	<div class="tac mb10">
		<span class="btn"><span><button type="submit">提 交</button></span></span>
	</center>
</form>
<!--
EOT;
}include_once PrintEot('adminbottom');
?>-->
