You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

177 lines
7.4 KiB

<!-- $Id: ads_list.htm 14216 2008-03-10 02:27:21Z testyang $ -->
{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<div class="form-div">
<form action="javascript:searchAds()" name="searchForm">
<img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
广告名称 <input type="text" name="adName" size="15" />
广告位置 <a href="javascript:void(0)" id="selectShow"><img src="images/sort_desc.gif"><img src="images/sort_asc.gif" style="display:none;"></a>
<select style="display:none;" name="selectPos">
<option value="">选择广告位置</option>
{foreach from=$position_list item=pos}
<option value="{$pos.position_name}">{$pos.position_name} [{$pos.ad_width}×{$pos.ad_height}]</option>
{/foreach}
</select>
<input type="text" name="keyword" size="15" />
{if $priv_ru eq 1}
店铺名称
<select name="store_search" onchange="get_store_search(this.value)">
<option value="0">请选择...</option>
<option value="1">按店铺名称</option>
<option value="2">按期望店铺名称</option>
<option value="3">按入驻品牌+类型</option>
</select>
<select name="merchant_id" style="display:none">
{foreach from=$store_list item=store}
<option value="{$store.ru_id}">{$store.store_name}</option>
{/foreach}
</select>
<input name="store_keyword" type="text" style="display:none"/>
<select name="store_type" style="display:none">
<option value="0">店铺类型</option>
<option value="旗舰店">旗舰店</option>
<option value="专卖店">专卖店</option>
<option value="专营店">专营店</option>
<option value="馆"></option>
</select>
{/if}
<input type="submit" value="{$lang.button_search}" class="button" />
</form>
</div>
<form method="post" action="" name="listForm">
<!-- start ads list -->
<div class="list-div" id="listDiv">
{/if}
<table cellpadding="0" cellspacing="0">
<tr>
<th><a href="javascript:listTable.sort('ad_id'); ">{$lang.record_id}</a>{$sort_ad_id}</th>
<th><a href="javascript:listTable.sort('ad_name'); ">{$lang.ad_name}</a>{$sort_ad_name}</th>
{if $priv_ru eq 1}
<th>{$lang.goods_steps_name}</th>
{/if}
<th><a href="javascript:listTable.sort('position_id'); ">{$lang.position_id}</a>{$sort_position_id}</th>
<th><a href="javascript:listTable.sort('media_type'); ">{$lang.media_type}</a>{$sort_media_type}</th>
<th><a href="javascript:listTable.sort('start_date'); ">{$lang.start_date}</a>{$sort_start_date}</th>
<th><a href="javascript:listTable.sort('end_date'); ">{$lang.end_date}</a>{$sort_end_date}</th>
<th><a href="javascript:listTable.sort('click_count'); ">{$lang.click_count}</a>{$sort_click_count}</th>
<th>{$lang.ads_stats}</th>
<th>{$lang.handler}</th>
</tr>
{foreach from=$ads_list item=list}
<tr>
<td align="center"><span>{$list.ad_id}</span></td>
<td class="first-cell">
<span onclick="javascript:listTable.edit(this, 'edit_ad_name', {$list.ad_id})">{$list.ad_name|escape:html}</span>
</td>
{if $priv_ru eq 1}
<td align="center">{if $list.user_name}<font style="color:#F00;">{$list.user_name}</font>{else}<font style="color:#0e92d0;">自营</font>{/if}</td>
{/if}
<td align="left"><span style="margin-left:10px;">{if $list.position_id eq 0}{$lang.outside_posit}{else}{$list.position_name}{/if}</span>
</td>
<td valign="middle" style="padding:8px 0;"><span>
<div style="float:left;margin:0 10px;line-height:40px;">{$list.type}</div>
{if ($list.type == '图片')}
<div style="float:left;height:40px;max-width:200px;*width:200px;overflow:hidden;">
<img {if strpos($list.ad_code,'www') }src="{$list.ad_code}"{else}src="../data/afficheimg/{$list.ad_code}" {/if} height="40px" />
</div>
{/if}
</span></td>
<td align="center"><span>{$list.start_date}</span></td>
<td align="center"><span>{$list.end_date}</span></td>
<td align="center"><span>{$list.click_count}</span></td>
<td align="center"><span>{$list.ad_stats}</span></td>
<td align="center"><span>
{if $list.position_id eq 0}
<a href="ads.php?act=add_js&type={$list.media_type}&id={$list.ad_id}" title="{$lang.add_js_code}">查看广告</a>
{/if}
<a href="ads.php?act=edit&id={$list.ad_id}" title="{$lang.edit}">编辑</a>
|
<a href="javascript:;" onclick="listTable.remove({$list.ad_id}, '{$lang.drop_confirm}')" title="{$lang.remove}">删除</a></span>
</td>
</tr>
{foreachelse}
<tr><td class="no-records" colspan="11">{$lang.no_ads}</td></tr>
{/foreach}
<tr>
<td align="right" nowrap="true" colspan="11">{include file="page.htm"}</td>
</tr>
</table>
{if $full_page}
</div>
<!-- end ad_position list -->
</form>
<script type="text/javascript" language="JavaScript">
//广告位置搜索 by wu
$("#selectShow").click(function(){
$(this).find("img").first().toggle();
$(this).find("img").last().toggle();
$(this).next("select").toggle();
})
$("select[name=selectPos]").change(function(){
$("input[name=keyword]").val($(this).val());
})
listTable.recordCount = {$record_count};
listTable.pageCount = {$page_count};
{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}
{literal}
onload = function()
{
// 开始检查订单
startCheckOrder();
}
{if $priv_ru eq 1}
function get_store_search(val){
if(val == 1){
document.forms['searchForm'].elements['merchant_id'].style.display = '';
document.forms['searchForm'].elements['store_keyword'].style.display = 'none';
document.forms['searchForm'].elements['store_type'].style.display = 'none';
}else if(val == 2){
document.forms['searchForm'].elements['merchant_id'].style.display = 'none';
document.forms['searchForm'].elements['store_keyword'].style.display = '';
document.forms['searchForm'].elements['store_type'].style.display = 'none';
}else if(val == 3){
document.forms['searchForm'].elements['merchant_id'].style.display = 'none';
document.forms['searchForm'].elements['store_keyword'].style.display = '';
document.forms['searchForm'].elements['store_type'].style.display = '';
}else{
document.forms['searchForm'].elements['merchant_id'].style.display = 'none';
document.forms['searchForm'].elements['store_keyword'].style.display = 'none';
document.forms['searchForm'].elements['store_type'].style.display = 'none';
}
}
{/if}
function searchAds()
{
{if $priv_ru eq 1}
listTable.filter['store_search'] = Utils.trim(document.forms['searchForm'].elements['store_search'].value);
listTable.filter['merchant_id'] = Utils.trim(document.forms['searchForm'].elements['merchant_id'].value);
listTable.filter['store_keyword'] = Utils.trim(document.forms['searchForm'].elements['store_keyword'].value);
listTable.filter['store_type'] = Utils.trim(document.forms['searchForm'].elements['store_type'].value);
{/if}
listTable.filter['keyword'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
listTable.filter['adName'] = Utils.trim(document.forms['searchForm'].elements['adName'].value); //by wu
listTable.filter['page'] = 1;
listTable.loadList();
}
{/literal}
</script>
{include file="pagefooter.htm"}
{/if}