<?php die;?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<title><!--{$smarty.const.MICE_TITLE}--></title>
<base href="<!--{$smarty.const.MICE_URL}--><!--{$smarty.const.MICE_TPL}-->/admin/" />
<link href="css/Default.css" rel="stylesheet" type="text/css" />
<link href="css/fieldset.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
var baseurl = '<!--{$smarty.const.MICE_URL}--><!--{$smarty.const.MICE_TPL}-->/admin/';
</script>
<script type="text/javascript" src="js/Main.js"></script>
<script language="JavaScript">
function CheckForm()
{
 if (document.form1.title.value.length == 0)
 {
  Dialog.alert("链接名称不能为空！");
  document.form1.title.focus();
  return false;
 } 
 if (document.form1.url.value.length == 0)
 {
  Dialog.alert("链接地址不能为空！");
  document.form1.url.focus();
  return false;
 }
 document.form1.submit();
 return true;
}

function ResetForm(){
	document.form1.reset();
}

function uploadfile(name){
	var text = $(name);
	var diag = new Dialog("Diag1");
	diag.Width = 450;
	diag.Height = 300;
	diag.Title = "上传文件";
	diag.URL = "<!--{$smarty.const.MICE_URL}-->admin.php/upload";
	diag.OKEvent = function(){
		text.value=$DW.$("fileurl").value;
		$D.close();
	};
	diag.show();
}
</script>
</head>

<body>
<table width="100%" border="0" cellspacing="6" cellpadding="0" style="border-collapse: separate; border-spacing: 6px;">
	  <form action="<!--{$formaction}-->" method="post" name="form1" id="form1" onsubmit="return CheckForm()">
      <tr valign="top">
        <td>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="blockTable">
			
			<tr>
			  <td width="100%" style="padding:6px 10px;" class="blockTd">
			  <div style="float: left;"><img src="imgs/Icons/icon028a1.gif" />链接编辑</div>
			  <div style="float: right; white-space: nowrap;vertical-align:middle;"><a href='javascript:CheckForm();' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon001a16.gif" /><b>保存&nbsp;</b></a><a href='javascript:ResetForm();' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon001a13.gif" /><b>重置&nbsp;</b></a><a href='javascript:history.back(-1);' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon008a20.gif" /><b>返回&nbsp;</b></a></div>
			 </td>
            </tr>
            <tr>
              <td style="padding-top:0px;padding-left:6px;padding-right:6px;padding-bottom:8px;">

<!--内容开始-->
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" >
	<form id="form1" name="form1" action="<!--{$formaction}-->" method="post" onsubmit="return CheckForm()">
	<tr>
		<td width="100%" valign="top">
			<fieldset class="adminform">
				<legend>友情链接</legend>
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td width="100" class="keyred" height='20'>名　称:</td>
						<td colspan="2">
							<input name='link_id' id='link_id' type='hidden' value='<!--{$results->getLinkId()}-->'>
							&nbsp;<input name='title' id='title' type='text' size='50' value='<!--{$results->getTitle()}-->'>
						</td>
					</tr>
					<tr>
						<td width="100" class="keyred" height='20'>分　类:</td>
						<td colspan="2">
							&nbsp;<select name='category_id' id='category_id'>
							<option value='0'>默认分类</option>
							<!--{foreach from=$categorys item=lc}-->
								<option value='<!--{$lc->getPath()}-->' <!--{if $lc->getPath()==$results->getCategoryId()}-->selected<!--{/if}-->><!--{$lc->getTitle()}--></option>
							<!--{/foreach}-->
						  </select>
						</td>
					</tr>
					<tr>
						<td width="100" class="keyred" height='20'>链接地址:</td>
						<td colspan="2">
							&nbsp;<input name='url' id='url' type='text' size='50' value="<!--{'micefun'|MiceRestoreQuote:$results->getUrl()}-->">
						</td>
					</tr>
					<tr>
						<td width="100" class="key" height='20'>图　片:</td>
						<td colspan="2">
							&nbsp;<input name='logo' id='logo' type='text' size='50' value="<!--{'micefun'|MiceRestoreQuote:$results->getLogo()}-->">&nbsp;(请填写图片地址,<a href="javascript:uploadfile('logo');"><font color="red">上传图片</font></a>)
						</td>
					</tr>
					<tr>
						<td width="100" class="key" height='20'>序　号:</td>
						<td colspan="2">
							&nbsp;<input name='orderid' id='orderid' type='text' size='50' value='<!--{$results->getOrderid()}-->'>&nbsp;(序号越大，排名越靠前)
						</td>
					</tr>
					<tr>
						<td width="100" class="key" height='20'>说　明:</td>
						<td colspan="2">
							&nbsp;<input name='summary' id='summary' type='text' size='50' value='<!--{$results->getSummary()}-->'>
						</td>
					</tr>					
				</table>
			</fieldset>
		</td>
	</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr > 
		<td height="30" valign='middle'>
			<div id='_PageBar_buttom' class="pageBarWrap" style="padding-top:6px;clear:both;bottom:0px; height:30px; line-height:30px;"><div class="pageBar" style='float:right;font-family:Tahoma'></div><div style='float:left;font-family:Tahoma'><a href='javascript:CheckForm();' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon001a16.gif" /><b>保存&nbsp;</b></a><a href='javascript:ResetForm();' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon001a13.gif" /><b>重置&nbsp;</b></a><a href='javascript:history.back(-1);' micetype='micePushBtn' class='micePushBtn' hidefocus='true' tabindex='-1' onselectstart='return false'><img src="imgs/Icons/icon008a20.gif" /><b>返回&nbsp;</b></a>&nbsp;&nbsp;<label><input type="checkbox" name="goon" id="goon" value="1">保存后继续添加</label></div></div>
		</td>
	</tr>
</table>

<!--内容结束-->
		</td>
		</tr>
	</table></td>
  </tr>
  </form>
</table>
</body>
</html>