<!-- $Id: link_info.htm 16752 2009-10-20 09:59:38Z wangleisvn $ -->
{include file="pageheader.htm"}
<div class="main-div">
<form action="friend_link.php" method="post" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
<table width="100%" id="general-table">
<tr>
<td class="label"><a href="javascript:showNotice('LogoNameNotic');" title="{$lang.form_notice}">
<img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>{$lang.link_name}</td>
<td>
<input type="text" name="link_name" value="{$link_arr.link_name|escape:html}" size="30" />
<br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="LogoNameNotic">{$lang.link_name_desc}</span>
</td>
</tr>
<tr>
<td class="label">{$lang.link_url}</td>
<td>
<input type='text' name='link_url' value='{$link_arr.link_url}' size="30" />
</td>
</tr>
<tr>
<td class="label">{$lang.show_order}</td>
<td>
<input type='text' name='show_order' {if $link_arr.show_order} value="{$link_arr.show_order}" {else} value="50" {/if} size="30" />
</td>
</tr>
{if $action eq "add"}
<tr>
<td class="label">{$lang.link_logo}</td>
<td>
<input type='file' name='link_img' size="35" />
</td>
</tr>
<tr>
<td class="label"><a href="javascript:showNotice('LogoUrlNotic');" title="{$lang.form_notice}">
<img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>{$lang.url_logo}</td>
<td>
<input type='text' name='url_logo' size="42" />
<br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="LogoUrlNotic">{$lang.url_logo_value}</span>
</td>
</tr>
<tr>
<td class="label">类型</td>
<td>
<input type="radio" name="link_type" checked value="0"> 所有
<input type="radio" name="link_type" value="1"> pc
<input type="radio" name="link_type" value="2"> 手机
</td>
</tr>
<tr>
<td class="label">位置</td>
<td>
<input type="radio" name="link_seat" checked value="0" onclick="show_seat(0)"> 首页
<input type="radio" name="link_seat" value="1" onclick="show_seat(1)"> 栏目
<input type="radio" name="link_seat" value="2" onclick="show_seat(2)"> 全站
</td>
</tr>
<tr id="link_seat" style="display:none">
<td class="label">选择栏目</td>
<td>
<select name="link_nav">
<option value="">请选择栏目</option>
</select>
商品栏目
</td>
</tr>
<tr>
<td class="label">状态</td>
<td>
<input type="radio" name="link_state" checked value="1"> 正常
<input type="radio" name="link_state" value="0" > 关闭
</td>
</tr>
{/if}
{if $action eq "edit"}
<tr>
<td class="label">{$lang.link_logo}</td>
<td>
<input type='file' name='link_img' size="35" />
</td>
</tr>
<tr>
<td class="label"><a href="javascript:showNotice('LogoUrlNotic');" title="{$lang.form_notice}">
<img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>{$lang.url_logo}</td>
<td>
<input type='text' name='url_logo' value="{$link_logo}" size="42" />
<br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="LogoUrlNotic">{$lang.url_logo_value}</span>
</td>
</tr>
<tr>
<td class="label"><a href="javascript:showNotice('LogoUrlNotic');" title="{$lang.form_notice}">
<img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a>友情连位置</td>
<td>
<select name="seat">
<option value="0" {if $link_arr.seat eq 0}selected{/if}>请选择</option>
<option value="1" {if $link_arr.seat eq 1}selected{/if}>首页</option>
<option value="2" {if $link_arr.seat eq 2}selected{/if}>栏目页</option>
<option value="3" {if $link_arr.seat eq 3}selected{/if}>内容页</option>
</select>
</td>
</tr>
{/if}
<tr>
<td class="label"> </td>
<td>
<input type="submit" value="{$lang.button_submit}" class="button" />
<input type="reset" value="{$lang.button_reset}" class="button" />
<input type="hidden" name="act" value="{$form_act}" />
<input type="hidden" name="id" value="{$link_arr.link_id}" />
<input type="hidden" name="type" value="{$type}" />
</td>
</tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
<script language="JavaScript">
<!--
{literal}
/**
* 检查表单输入的数据
*/
function validate()
{
validator = new Validator("theForm");
validator.required("link_name", link_name_empty);
validator.required("link_url", link_url_empty);
validator.isNumber("show_order", show_order_type);
return validator.passed();
}
onload = function()
{
// 开始检查订单
startCheckOrder();
}
{/literal}
//-->
//显示栏目选择框
function show_seat(seat)
{
var link_seat = document.getElementById("link_seat");
if(seat == 1)
{
link_seat.removeAttribute("style");
}
else
{
link_seat.setAttribute("style", "display:none");
}
}
</script>
{include file="pagefooter.htm"}