| Server IP : 103.48.194.25 / Your IP : 216.73.217.33 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/nhadatkhangdien.net-bk/public_html/templates/layout/ |
Upload File : |
<?php
$d->reset();
$sql="select* from table_photo where hienthi=1 and com='banner_top'";
$d->query($sql);
$result=$d->fetch_array();
$d->reset();
$sql="select*from table_title";
$d->query($sql);
$title=$d->fetch_array();
$d->reset();
$sql="select*from table_hotline";
$d->query($sql);
$hlt=$d->fetch_array();
?>
<? if(isset($title['ten']) && !empty($title['ten'])){?>
<h2 style="display:none;"><?=$title['ten']?></h2>
<? } //else {?>
<!--<h2 style="display:none;"><?//=$result_detail[0]['ten']?></h2>-->
<? //}?>
<div class="container head_content">
<div class="head_logo"> <a href="<?=site?>"> <img src="<?=_upload_hinhanh_l.$result['photo']?>" alt="<?=$alt?>" /> </a> </div>
<div id="menu_m"><? include _template."layout/menu.php" ?></div>
<div class="head_tk">
<div class="search">
<input type="text" name="keyword" id="keyword" value="Tìm kiếm..." onclick="this.value=''" />
<input type="submit" id="search-button" value="" title="Tìm kiếm" onclick="searchProduct()"/>
<script type="text/javascript">
function locdau(str) {
str= str.toLowerCase();
str= str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g,"a");
str= str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g,"e");
str= str.replace(/ì|í|ị|ỉ|ĩ/g,"i");
str= str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g,"o");
str= str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g,"u");
str= str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g,"y");
str= str.replace(/đ/g,"d");
str= str.replace(/!|@|%|\^|\*|\(|\)|\+|\=|\<|\>|\?|\/|,|\.|\:|\;|\'| |\"|\&|\#|\[|\]|~|$|_/g,"-");
/* tìm và thay thế các kí tự đặc biệt trong chuỗi sang kí tự - */
str= str.replace(/-+-/g,"-"); //thay thế 2- thành 1-
str= str.replace(/^\-+|\-+$/g,"");
//cắt bỏ ký tự - ở đầu và cuối chuỗi
return str;
}
$('#keyword').keypress(function(event){
var keycode = (event.keyCode ? event.keyCode : event.which);
if(keycode == '13'){
//alert('Bạn vừa nhấn phím "enter" trong thẻ input');
searchProduct();
}
});
function searchProduct(){
var name_search = locdau($('#keyword').val());
//alert(name_search);
if(name_search=='')
{
alert('Từ khóa không phù hợp');
document.getElementById('keyword').value='';
document.getElementById('keyword').focus();
}
else if(($('#keyword').val()).trim() != '' )
window.location = 'tim-kiem/' + name_search;
else
alert('Bạn chưa nhập thông tin tìm kiếm');
}
</script>
</div>
</div>
<div class="head_hl">
<p><?=$hlt['dienthoai']?></p>
</div>
</div>
<script type="text/javascript">
$(function() {
var menu_ul = $('.menu > li > ul'),
menu_a = $('.menu > li > a');
menu_ul.hide();
menu_a.click(function(e) {
e.preventDefault();
if(!$(this).hasClass('active')) {
menu_a.removeClass('active');
menu_ul.filter(':visible').slideUp('normal');
$(this).addClass('active').next().stop(true,true).slideDown('normal');
} else {
$(this).removeClass('active');
$(this).next().stop(true,true).slideUp('normal');
}
});
var menu2_ul = $('.menu2 > li > ul'),
menu2_a = $('.menu2 > li > a');
menu2_ul.hide();
menu2_a.click(function(e) {
e.preventDefault();
if(!$(this).hasClass('active')) {
menu2_a.removeClass('active');
menu2_ul.filter(':visible').slideUp('normal');
$(this).addClass('active').next().stop(true,true).slideDown('normal');
} else {
$(this).removeClass('active');
$(this).next().stop(true,true).slideUp('normal');
}
});
});
</script>
<div class="clear"></div>
<div class="menurp">
<ul class="menu">
<li class="item1" style="position:relative;padding-top:5px">
<a href="#" style="line-height:20px;position: absolute;top: -50px;"><img src="images/bg-menu.png" style="border-radius:3px" alt="<?=$alt?>"></a>
<ul style="display:none;">
<li <?php if($com == ''){?>class="act" <?php } ?>> <a href="">Trang chủ</a> </li>
<li <?php if($com == 'gioi-thieu'){?>class="act" <?php } ?>> <a href="gioi-thieu"> Giới thiệu</a> </li>
<ul class="menu2">
<li><a style="cursor:pointer">Dự án</a>
<ul style="border-top:solid 1px #fff;">
<span class="ttt"></span>
<?
$cat = get_product_cat();
for($i=0;$i<count($cat);$i++){?>
<li><a href="du-an/<?=$cat[$i]['tenkhongdau']?>"><?=$cat[$i]['ten']?></a></li>
<? }?>
</ul>
</li>
</ul>
<li <?php if($com == 'news'){?>class="act" <?php } ?>> <a href="news"> Tin tức - Sự kiện</a> </li>
<li <?php if($com == 'lien-he'){?>class="act" <?php } ?>> <a href="lien-he"> Liên hệ</a> </li>
</ul>
</li>
</ul>
</div>
<div class="clear"></div>
<script type="text/javascript">
(function () {
window.onload = function () {
var menu = document.getElementById('header');
var init = menu.offsetTop;
var docked;
window.onscroll = function () {
if (!docked && (menu.offsetTop - scrollTop() < 0)) {
menu.style.top = 0;
menu.style.position = 'fixed';
menu.className = 'docked';
docked = true;
} else if (docked && scrollTop() <= init) {
menu.style.position = 'absolute';
menu.style.top = init + 'px';
menu.className = menu.className.replace('docked', '');
var contain_m = document.getElementById('contain_m');
contain_m.style.marginTop = '60px';
docked = false;
}
}
}
function scrollTop()
{
return document.body.scrollTop || document.documentElement.scrollTop;
}
})();
</script>