<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>在线商城后台管理</title>
<link rel="stylesheet" type="text/css" href="view/admin/style/basic.css" />
<link rel="stylesheet" type="text/css" href="view/admin/style/nav.css" />
<link rel="stylesheet" type="text/css" href="view/admin/js/css/jquery-ui.css" />
<script type="text/javascript" src="view/admin/js/jquery.js"></script>
<script type="text/javascript" src="view/admin/js/jquery-ui.js"></script>
<script type="text/javascript" src="view/admin/js/nav.js"></script>
<script type="text/javascript" src="view/admin/js/basic.js"></script>
{literal}
<script type="text/javascript">
<!--
function addcate(url){	
	$.get(url,{},
	function(data){
		$('#dialog').html(data);
	});
	$('#blurdiv').show();
	$('#blurdiv').height($(document).height());
	$('#dialog').dialog('open');
	$('#dialog').dialog({
		title:'添加导航',
		width:960,
		height:470,
		buttons: {},
		close:function(){$('#blurdiv').hide();$('#dialog').html('');}
	});
}
function modifycate(url){	
		$.get(url,{},
		function(data){
			$('#dialog').html(data);
		});
		$('#blurdiv').show();
		$('#blurdiv').height($(document).height());
		$('#dialog').dialog('open');
		$('#dialog').dialog({
			title:'修改导航',
			width: 960,
			height:470,
			buttons: {},
			close:function(){$('#blurdiv').hide();$('#dialog').html('');}
		});
}
</script>
{/literal}
</head>
<body>
<h2><a href="javascript:addcate('?a=nav&m=add');">添加导航</a>界面管理 -- 导航条列表</h2>
<div style="padding:10px; overflow:hidden;">

	<div class="main_top" style="clear:both;">
		<h4>温馨提示:</h4>
		<p class="green">提示：如果您想把导航链接到其他位置，请不要填写B2C分类和淘宝分类,直接填写相对应的地址即可。</p>		
		{if $rewrite}
			<p style="color:red; font-size:14px; font-weight:bold;">您开启了伪静态，请按照以下规则修改您的导航链接:</p>
			<p style="font-size:14px;" class="green"><span class="green" style="font-weight:bold;">商家大全: </span>{$domain}/index.php?a=mall　 改为　 {$domain}/{$mall}{$suffix}</p>									
			<p style="font-size:14px;" class="green"><span class="green" style="font-weight:bold;">分类大全: </span>{$domain}/index.php?a=all　  改为 　{$domain}/{$all}{$suffix}</p>
			<p style="font-size:14px;" class="green"><span class="green" style="font-weight:bold;">促销活动: </span>{$domain}/index.php?a=promo　  改为 　{$domain}/{$promo}{$suffix}</p>			
			<p style="font-size:14px;" class="green"><span class="green" style="font-weight:bold;">购物资讯: </span>{$domain}/index.php?a=artilelist　  改为 　{$domain}/{$artile}{$suffix}</p>
			<p style="font-size:14px;" class="green"><span class="green" style="font-weight:bold;">皇冠店铺: </span>{$domain}/index.php?a=shop　  改为 　{$domain}/{$shop}{$suffix}</p>
			<p style="font-size:14px;" class="green"><span class="green" style="font-weight:bold;">添加b2c分类后: </span>{$domain}/index.php?a=category&cid=374　  改为 　{$domain}/{$b2c_category}-374{$suffix} 其中374这个数字表示分类id</p>		
		
		 {/if}	
		 </br>
		 <p class="green">tab标签说明：用于导航的选中状态，(例如：商家大全 ?a=mall 那么tab标签填写mall即可）,选择了b2c分类以后，tab设置相应的分类id即可</p>
	</div>
	
</div>
<div id="list">
	<form method="post" action="?a=nav&m=sort">
	<table>
		<tr><th>导航名称</th><th>链接地址</th><th>是否显示</th><th>打开方式</th><th>淘宝分类id</th><th>B2C数据分类ID</th><th>tab标签</th><th>简介</th><th>子类</th><th>排序</th><th>操作</th></tr>
		{foreach from=$AllNav key=key item=value}
			<tr>
				<td>{$value->name}</td>
				<td>{$value->url}</td>
				<td>{$value->state}</td>
				<td>{$value->target}</td>
				<td>{$value->tao_category}</td>
				<td><strong>(分类ID：{$value->category})</strong></td>
				<td>{$value->tab}</td>
				<td>{$value->info}</td>
				<td>{if $OneNav}无{else}<a href="?a=nav&sid={$value->id}">查看</a> | 
				<a href="javascript:addcate('?a=nav&m=add&id={$value->id}');">添加</a>{/if}</td>
				<td><input type="text" name="sort[{$value->id}]" class="sort" value="{$value->sort}" /></td>
				<td><a href="javascript:modifycate('?a=nav&m=update&id={$value->id}')"><img src="view/admin/images/edit.gif" alt="编辑" title="编辑" /></a>
				 <a href="?a=nav&m=delete&id={$value->id}" onclick="return confirm('你真的要删除这个导航吗？') ? true : false"><img src="view/admin/images/drop.gif" alt="删除" title="删除" /></a>
				 </td>
			 </tr>
		{foreachelse}
		<tr><td colspan="10">没有任何导航</td></tr>
		{/foreach}
		{if $AllNav}<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><input type="submit" name="send" value="排序" /></td><td></td></tr>{/if}
		{if $OneNav}<tr><td colspan="10">主类名称：[{$OneNav[0]->name}] <a href="?a=nav">[返回]</a></td></tr>{/if}
	</table>
	</form>
</div>
<div id="page">{$page}</div>
<div id="dialog" style="display:none;"><img src="view/admin/images/loading.gif" style="display:block;border:none;margin:0px auto; margin-top:80px;" /></div>
<div style="z-index: 1000; background-color: rgb(0, 0, 0); visibility: visible; display: none; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; width:100%;filter:alpha(opacity=50); opacity: 0.5; -moz-opacity:0.5;" id="blurdiv"></div>
</body>
</html>