<?php
$d->reset();
$baiviet_gioithieu="select ten_$lang,tenkhongdau,id from #_baiviet where hienthi=1 and type='gioi-thieu' order by stt,id desc";
$d->query($baiviet_gioithieu);
$baiviet_gioithieu=$d->result_array();

$d->reset();
$baiviet_dichvu="select ten_$lang,tenkhongdau,id from #_baiviet_list where hienthi=1 and type='dich-vu' and noibat=1 order by stt asc,id desc limit 10";
$d->query($baiviet_dichvu);
$baiviet_dichvu=$d->result_array();

$d->reset();
$baiviet_congtrinh="select ten_$lang,tenkhongdau,id from #_baiviet_list where hienthi=1 and type='cong-trinh' and noibat=1 order by stt asc,id desc limit 10";
$d->query($baiviet_congtrinh);
$baiviet_congtrinh=$d->result_array();

$d->reset();
$_product_list="select ten_$lang,tenkhongdau,id from #_product_list where hienthi=1 and type='san-pham' and noibat=1 order by stt asc,id desc";
$d->query($_product_list);
$_product_list=$d->result_array();

$d->reset();
$_baiviet_cap="select ten_$lang,tenkhongdau,id from #_baiviet where hienthi=1 and type='capability' order by stt asc ";
$d->query($_baiviet_cap);
$_baiviet_cap=$d->result_array();
?>
<ul class="menu-parent">
	<li <?php if($com == 'index') echo 'class="home menu active2"'; else echo 'class="home menu"'; ?>><a class="text-a" href="index">Trang Chủ</a></li>
	<li <?php if($com == 'gioi-thieu') echo 'class="home menu more active2"'; else echo 'class="home menu more"'; ?>><a class="text-a" href="gioi-thieu"><?=_gioithieu?></a></li>

	<li <?php if($com == 'san-pham') echo 'class="menu active2"'; else echo 'class="menu"'; ?>><a class="text-a" href="san-pham">Thực Đơn</a>
	<ul class="ul-child">
		<?php foreach($_product_list as $list){
			$product_cat = result_array("select * from #_product_cat where type='san-pham' and id_list='".$list['id']."' and hienthi=1 order by stt asc  ");
		?>
		<li <?php if($com=='san-pham' && $idl==$list["tenkhongdau"]) echo 'class="li-child"'; else echo 'class="li-child"'; ?>><a  href="<?=$list["tenkhongdau"]?>"><?=$list["ten_$lang"]?></a>
		<?php if(count($product_cat) > 0){ ?>
		<ul class="ul-child-child">
			<?php foreach($product_cat as $cat){ ?>
			<li class="li-child-child">
				<a  href="<?=$cat["tenkhongdau"]?>"><?=$cat["ten_$lang"]?></a>
			</li>
			<?php } ?>
		</ul>
		<?php } ?>
	</li>
	<?php } ?>
	</ul>
	</li>
	<li <?php if($com == 'hinh-anh') echo 'class="home menu more active2"'; else echo 'class="home menu more"'; ?>><a class="text-a" href="album">Hình Ảnh</a>
	</li>
	</ul>
	<div id="logo" class="fl">
			<a href="">
				<img src="upload/hinhanh/<?=$row_logo["photo_vi"]?>" alt="<?=$row_logo["photo_vi"]?>">
			</a>
		</div>
	<ul class="menu-parent">
		<li <?php if($com == 'khuyen-mai') echo 'class="home menu more active2"'; else echo 'class="home menu more"'; ?>><a class="text-a" href="khuyen-mai">Khuyến Mãi</a>
	</li>
	<li <?php if($com == 'tin-tuc') echo 'class="home menu more active2"'; else echo 'class="home menu more"'; ?>><a class="text-a" href="tin-tuc">Tin Tức</a></li>
<li <?php if($com == 'tuyen-dung') echo 'class="home menu more active2"'; else echo 'class="home menu more"'; ?>><a class="text-a" href="tuyen-dung">Tuyển Dụng</a>
	</li>
	<li <?php if($com=='lien-he') echo 'class="menu menu active2"'; else echo 'class="menu"'; ?>><a class="text-a" href="lien-he"><?=_lienhe?></a></li>
</ul>

