{:tpl head}
<table cellpadding="0" cellspacing="1" class="table_list">
 <caption>友情链接管理</caption>
  <tr>
   <td>
    <strong>管理选项：</strong>
    <a href="?c=link&a=add">添加友情链接</a>&nbsp;|&nbsp;<a href="?c=link">管理友情链接</a>
   </td>
  </tr>
</table>
<!--{:if $a == 'add' or $a == 'edit'}-->
<script type="text/javascript" src="include/My97DatePicker/WdatePicker.js"></script>
<table cellpadding="0" cellspacing="1" class="table_form">
 <caption>{:if $a == 'add'}发布{:else}修改{:/if}友情链接</caption>
 <form name="myform" action="?c={:$c}&a={:$a}" method="post">
 <input type="hidden" name="info[id]" value="{:$data['id']}" />
 <input type="hidden" name="forward" value="{:$referer}" />
 <tr>
  <td width="30%" align="right">网站名称：</td>
  <td>
   <input name="info[name]" type="text" value="{:$data['name']}" size="40" require="true" datatype="require" msg="网站名称不能为空">&nbsp;<span class="fred">*</span></td>
 </tr>
 <tr>
  <td align="right">网站地址：</td>
  <td>
   <input name="info[url]" type="text" value="{:$data['url']}" size="40" require="true" datatype="require" msg="网站地址不能为空">&nbsp;<span class="fred">*</span></td>
 </tr>
 <tr>
  <td align="right">网站Logo：</td>
  <td><input name="info[logo]" type="text" value="{:$data['logo']}" size="40"></td>
 </tr>
 <tr>
  <td align="right">站长email：</td>
  <td><input name="info[email]" value="{:$data['email']}" size="40" type="text"></td>
 </tr>
 <tr>
  <td align="right">网站简介：</td>
  <td><textarea name="info[introduce]" cols="60" rows="4">{:$data['introduce']}</textarea></td>
 </tr>
 <tr>
  <td align="right">网站性质：</td>
  <td><input name="info[elite]" type="checkbox" value="1"{:Tag::checked($data['elite'],1)}>推荐&nbsp;&nbsp;<input name="info[passed]" type="checkbox" value="1"{:Tag::checked($data['passed'],1)}>通过审核</td>
 </tr>
 <tr>
  <td align="right">所属分类：</td>
  <td>
   <select name="info[catid]">
    <option value='0'>不分类</option>
    {:Tag::tree("<option value='\$catid'\$selected>\$tab\$name</option>",$data['catid'])}
   </select>
  </td>
 </tr>
 <tr>
  <td>&nbsp;</td>
  <td ><button type="submit" name="submit">提交</button></td>
 </tr>
 </form>
</table>
<script type="text/javascript" src="../../statics/js/validator.js"></script>
<script language="javascript" type="text/javascript">
$(function(){
	$('form').checkForm(1);
})
</script>
<!--{:elseif $a == 'defaults'}-->
<table cellpadding="0" cellspacing="1" class="table_list">
 <caption>管理友情链接</caption>
 <form name="myform" method="post">
 <input type="hidden" value="" name="selids" />
 <tr align="center">
  <th width="6%"><input name="checkbox" type="checkbox" onclick="checkorno(this,this.form.ids)"></th>
  <th width="24%">网站名称</th>
  <th>网站地址</th>
  <th width="22%">电子邮件地址</th>
  <th width="6%">排序</th>
  <th width="13%">添加日期</th>
  <th width="13%">操作</th>
 </tr>
 {:loop $data $v}
 <tr align="center">
  <td><input name="ids" type="checkbox" value="{:$v['id']}" /></td>
  <td align="left">{:$v['name']}{:if $v['elite']}<span class="fred"> 荐</span>{:/if}</td>
  <td>{:$v['url']}</td>
  <td>{:$v['email']}</td>
  <td><input name="orderid[{:$v['id']}]" type="text" size="2" value="{:if $v['orderid'] == 255}0{:else}$v['orderid']{:/if}"></td>
  <td>{:Tag :: date($v['addtime'],1)}</td>
  <td>
   {:if $v['passed']}已审{:else}<a href="?c=link&a=check&selids={:$v['id']}" class="fred">审核</a>{:/if} | <a href="?c=link&a=edit&id={:$v['id']}">修改</a> | <a href="?c=link&a=del&selids={:$v['id']}">删除</a>
  </td>
 </tr>
 {:/loop}
 <tr>
  <td height="20" colspan="7" align="center">
   <button name="select1" onclick="selAll(this.form.ids)" type="button">全选</button>
   <button name="select2" onclick="noSelAll(this.form.ids)" type="button">反选</button>
   <button name="submitsh" type="button" onClick="subform(this.form,this.form.ids,'?c=link&a=check','')">审核</button>
   <button name="submittj" type="button" onClick="subform(this.form,this.form.ids,'?c=link&a=elite&elite=1','')">推荐</button>
   <button name="submitqxtj" type="button" onClick="subform(this.form,this.form.ids,'?c=link&a=elite&elite=0','')">取消推荐</button>
   <button name="order" type="button" onClick="subform(this.form,this.form.ids,'?c=link&a=order','')">排序</button>
   <button type="button" name="btn2" onClick="subform(this.form,this.form.ids,'?c=link&a=del','确认删除吗？此操作不可恢复。')">删除</button>
   </td>
 </tr>
 </form>
</table>
{:if $pages}<div class="pages">{:$pages}</div>{:/if}
<!--{:/if}-->
{:tpl foot}