<?php if(!defined('IN_SDCMS')) exit;?>
	<div class="topbar topbar-gray">
		<div class="width row">
			<div class="col-6">{if $site_isopen==1 && sdcms[city_open]==1}【<span class="text-red">{$cityname}</span>】<a href="{N('city')}">城市切换</a>{else}{sdcms[ct_company]}欢迎您！{/if}</div>
			<div class="col-6 text-right">
				<div class="ui-nav">
					<ul>
						{if USER_ID==0}
							<li><a href="{N('login')}">请登录</a></li>
							<li><a href="{N('reg')}">免费注册</a></li>
						{else}
						<li><a>{get_user_info('uname')}</a></li>
						<li><a href="{N('user')}">会员中心<span class="ui-icon-down"></span></a>
							<ul>
								<li><a href="{N('myorder')}">我的订单</a></li>
								<li><a href="{N('mymoney')}">财务明细</a></li>
								<li><a href="{N('out')}">退出登录</a></li>
							</ul>
						</li>
						{/if}
						{if sdcms[mobile_open]==1 && !isempty(sdcms[mobile_domain])}<li><a href="{sdcms[mobile_http]}{sdcms[mobile_domain]}" target="_blank">手机站</a></li>{/if}
					</ul>
				</div>
			</div>
		</div>
	</div>
	
	<div class="header width row">
		<div class="col-8"><a href="{$webroot}"><img src="{sdcms[web_logo]}" alt="{sdcms[web_name]}" ></a></div>
		<div class="col-4">
			<div class="icon"><i class="ui-icon-service"></i></div>
			<div class="text">
				<div class="text-gray">7*24小时服务热线：</div>
				<div class="telphone">{sdcms[ct_tel]}</div>
			</div>
		</div>
	</div>
	
	<div class="nav">
		<div class="ui-nav width">
			<ul>
				<li{if (CONTROLLER_NAME.'/'.ACTION_NAME)=='index/index'} class="active"{/if}><a href="{$webroot}" title="网站首页">网站首页</a></li>
				{sdcms:rp top="0" table="sd_category" where="followid=0 and isshow=1" order="catenum,cateid"}
				{php $head_sonid=$rp[cateid]}
				<li{is_active($rp[cateid],$parentid,'active')}><a href="{cateurl($rp[cateid])}" title="{$rp[catename]}"{if $rp[isblank]==1} target="_blank"{/if}>{$rp[catename]}</a>
					{if get_sonid_num($rp[cateid])!=0}<ul>
						{sdcms:rs top="0" table="sd_category" where="followid=$head_sonid and isshow=1" order="catenum,cateid"}
                    	<li><a href="{cateurl($rs[cateid])}" {if $rs[isblank]==1} target="_blank"{/if}>{$rs[catename]}</a></li>
                        {/sdcms:rs}
					</ul>{/if}
				</li>
				{/sdcms:rp}
				{if C('bbs_open')==1}
                <li{if CONTROLLER_NAME=='bbs'} class="active"{/if}><a href="{N('bbs')}" title="{sdcms[bbs_webname]}">{sdcms[bbs_webname]}</a>
				{if USER_ID>0}<ul>
					<li><a href="{U('bbs/mytopic','uid='.USER_ID.'')}">我的主题</a></li>
					<li><a href="{U('bbs/myreply','uid='.USER_ID.'')}">我的回复</a></li>
				</ul>{/if}
				</li>
                {/if}
			</ul>
		</div>
	</div>