{include file="pageheader.htm"}
{insert_scripts files='../js/quickView.js'}
<div class="BodyRight">
	<div class="RightDetill">
		<ul>
			<li class="Green"><a href="http://www.nitc.cc/About-nitc/488.html#_Toc239504364" target="_blank">查看演示文件</a></li>
			<li class="SkyBlue"><a href="help_document.php?action=download">下载演示文档</a></li>
			<li class="Black">操作帮助请详见演示文件!</li>
			<li class="DetillRigh"></li>
		</ul>
	</div>
	
	<div class="PageContent">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		{if $language|@count>1}
		  <tr>
			<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				{section name=loop loop=$language}
					{if $smarty.section.loop.index == 0}
						<td width="85" height="29" align="center" id="languagesel{$language[loop].language_id}" {if $language[loop].language_id==$default_language} class="Move" {else} class="Out" {/if}><a href="javascript:void(0);" onclick="javascript:languageselect('{$language[loop].language_id}')">{$language[loop].name}</a></td>
					{else}
						<td width="5" align="center"><img src="images/{$skin}/tiao.gif"></td>
						<td width="85" align="center" id="languagesel{$language[loop].language_id}" {if $language[loop].language_id==$default_language} class="Move" {else} class="Out" {/if}><a href="javascript:void(0);" onclick="javascript:languageselect('{$language[loop].language_id}')">{$language[loop].name}</a></td>	
								
					{/if}
				{/section}
				<td align="left" class="LineRight" style="padding-left:10px;">点击左侧语言选项,查找不同语言分类信息.</td>
			  </tr>
			  
			</table></td>
		  </tr>
			  <tr>
				<td class="LineRightBlue">
			  {else}
			  <tr>
				<td class="LineRightBlue1">	  	
			  {/if}
				<table width="95%" border="0" cellpadding="0" cellspacing="0" style="margin-left:20px;">
			  <tr>
				<td width="88%" height="24">产品管理 > 品牌列表</td>
				<td width="12%" align="right" class="bt_add"><a href="brand.php?action=add">添加</a></td>
			  </tr>
			</table>
			</td>
		  </tr>
		</table>
		
		
		<form name="theForm" method="post" action="">
        <div class="tablelisthead">
        <ul>
        <li class="li_10">排序</li>
        <li class="li_40">品牌名称</li>
        <li class="li_30">品牌ID号</li>
        <li class="li_20">

        编辑

        </li>
        </ul>
        </div>
        {section name=loop loop=$brand_arr}
			 <div id="languageBox{$brand_arr[loop].language_id}" {if $brand_arr[loop].language_id == $default_language} class=""  {else} class="close"  {/if}>
        <div class="tablelist">
        {foreach from=$brand_arr[loop].brand item=brand}
        <ul onmouseover="this.style.background ='#FFFDD7'" onmouseout="this.style.background ='#FFFFFF'">
        <li class="li_10"><input type="text" value="{$brand.sort_order}" onblur="updatesort('{$brand.product_brand_id}','{$brand_arr[loop].language_id}')" name="sortOrder[{$brand.product_brand_id}]" id="sort{$brand.product_brand_id}l{$brand_arr[loop].language_id}" class="listinput"/></li>
        <li class="li_40">
							<a href="{$brand.brand_url}" {if $brand.logo} title="<img src='../upload/photo/{$brand.logo}'>" {/if} target="_blank">{if $brand.logo}<span class='op_pic'>{else}<span>{/if} {$brand.name}</span></a>
					</li>
       <li class="li_30">{$brand.product_brand_id}</li>
        <li class="li_20 operation">
  
						<a href="brand.php?action=edit&product_brand_id={$brand.product_brand_id}" title="编辑" class="op_edit"></a>
			
				
						<a href="brand.php?action=del&product_brand_id={$brand.product_brand_id}" onClick="javascript: return confirm('确实要删除此品牌吗?');" title="删除" class="op_del"></a>
					
						
					
        </li>
        </ul>
        {/foreach}
        </div>
        </div>
        {/section}
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td height="36" class="BotNavBg">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td style="padding-left:5px;">
				<input type="button" value=" 排序 " name="button" OnClick="javascript:dosort();">
				 </td>
			  </tr>
			</table>
			</td>
		  </tr>
		</table>
		</form>
	</div>
</div>
<script type="text/javascript">
{literal}
function clearSearchText(searchText){
	if(document.getElementById(searchText).value=="查找产品信息..."){
		document.getElementById(searchText).value="";
	}
}
function doSearchSubmit(){
	if(document.getElementById("searchText").value=="查找产品信息..."){
		document.getElementById("searchText").value="";
	}
	if(document.getElementById("searchText1").value=="查找产品信息..."){
		document.getElementById("searchText1").value="";
	}	
}

function searchBox() {
	if (document.getElementById('searchBox').className=="close"){
		document.getElementById('searchBox').className ="exp";
	}else{
		document.getElementById('searchBox').className="close";
	}
}

function searchSubmit(){
	if(document.getElementById("searchText").value=="查找产品信息..."){
		document.getElementById("searchText").value="";
	}
	document.searchForm.action="product.php";
	document.searchForm.submit();
}

function languageselect(id){
	{/literal}
	{section name=loop loop=$language}
	{literal}
		document.getElementById('languageBox{/literal}{$language[loop].language_id}{literal}').className="close";
		document.getElementById('languagesel{/literal}{$language[loop].language_id}{literal}').className="Out";
	{/literal}
	{/section}
	{literal}
	document.getElementById('languagesel'+id).className="Move";
	document.getElementById('languageBox'+id).className="";
}

function updatesort(product_brand_id,language_id){
	{/literal}
	{section name=loop loop=$language}
	{literal}
		document.getElementById('sort'+product_brand_id+'l{/literal}{$language[loop].language_id}{literal}').value=document.getElementById('sort'+product_brand_id+'l'+language_id).value;
	{/literal}
	{/section}
	{literal}
}

function dosort(){
	document.theForm.action="brand.php?action=order";
	document.theForm.submit();
}
{/literal}
</script>
{include file="pagefooter.htm"}