Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /home/dnlcambodia/public_html/ |
<?php function isCurrentPage($page) { $currentPage = basename($_SERVER['PHP_SELF']); if ($currentPage === $page || ($page === 'news.php' && $currentPage === 'preview.php')) { return 'active'; } return ''; } ?> <style> @font-face { font-family: 'Khmer OS Siemreap'; src: url('assets/css/KhmerOSSiemreap.ttf') format('truetype'); } /* Style for dropdown toggle */ .dropdown-active { cursor: pointer; padding: 0.5rem; border-radius: 0.375rem; transition: background-color 0.3s ease; } .dropdown-active:hover { background-color: #f8f9fa; /* Change to desired hover background color */ } /* Style for dropdown menu */ .dropdown-menu { min-width: 7rem; padding: 0; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 0.375rem; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); } /* Style for dropdown items */ .dropdown-item { padding: 0.5rem 1rem; font-size: 0.875rem; color: #212529; font-family: 'Khmer OS Siemreap'; transition: background-color 0.3s ease; } .dropdown-item:hover { background-color: #f8f9fa; /* Change to desired hover background color */ } </style> <header id="ft-header" class="ft-header-section header-style-two"> <div class="ft-header-top"> <div class="container"> <div class="ft-header-top-content d-flex align-items-center"> <div class="ft-header-top-cta ul-li"> <ul class="d-flex"> <li><i class="fal fa-map-marker-alt"></i>Unit 809 (Floor 8), C7 Fortune Tower, Olympia City, Street 182 corner 161, Sangkat Veal Vong, Khan 7 Makara, Phnom Penh, Cambodia</li> </ul> </div> <div class="ft-header-cta-info d-flex"> <div class="ft-header-cta-icon d-flex justify-content-center align-items-center"> <i class="flaticon-call"></i> </div> <div class="ft-header-cta-text headline pera-content"> <p>Get In Touch</p> <h3>+855 23 885 335 </h3> </div> </div> </div> </div> </div> <div class="ft-header-main-menu-wrapper" style="background:#fff;"> <div class="container"> <div class="ft-header-main-menu-area position-relative"> <div class="ft-header-main-menu d-flex align-items-center justify-content-between position-relative"> <div class="ft-site-logo-area"> <div class="ft-site-logo position-relative"> <a href="./"><img src="assets/img/logo/dnl01-1@2x.png" alt=""></a> </div> </div> <div class="ft-main-navigation-area"> <nav class="ft-main-navigation clearfix ul-li"> <ul id="ft-main-nav" class="nav navbar-nav clearfix"> <li data-page="index.php" <?php if (basename($_SERVER['PHP_SELF']) == 'index.php') echo 'class="active"'; ?>> <a href="./" style="color:<?php echo (basename($_SERVER['PHP_SELF']) == 'index.php') ? '#ea1e00' : '#00570E'; ?>">Home Page</a> </li> <li data-page="about.php" <?php if (basename($_SERVER['PHP_SELF']) == 'about.php') echo 'class="active"'; ?>> <a href="about" style="color:<?php echo (basename($_SERVER['PHP_SELF']) == 'about.php') ? '#ea1e00' : '#00570E'; ?>">About</a> </li> <li data-page="service.php" <?php if (basename($_SERVER['PHP_SELF']) == 'service.php' || basename($_SERVER['PHP_SELF']) == 'service-single.php') echo 'class="active"'; ?>> <a href="service" style="color:<?php echo (basename($_SERVER['PHP_SELF']) == 'service.php' || basename($_SERVER['PHP_SELF']) == 'service-single.php') ? '#ea1e00' : '#00570E'; ?>">Service</a> </li> <li data-page="activities.php" <?php if (basename($_SERVER['PHP_SELF']) == 'activities.php') echo 'class="active"'; ?>> <a href="activities" style="color:<?php echo (basename($_SERVER['PHP_SELF']) == 'activities.php') ? '#ea1e00' : '#00570E'; ?>">Project</a> </li> <li data-page="news.php" <?php if (basename($_SERVER['PHP_SELF']) == 'news.php' || basename($_SERVER['PHP_SELF']) == 'preview.php' || basename($_SERVER['PHP_SELF']) == 'tag.php') echo 'class="active"'; ?>> <a href="news" style="color:<?php echo (basename($_SERVER['PHP_SELF']) == 'news.php' || basename($_SERVER['PHP_SELF']) == 'preview.php' || basename($_SERVER['PHP_SELF']) == 'tag.php') ? '#ea1e00' : '#00570E'; ?>">News</a> </li> <li data-page="faq.php" <?php if (basename($_SERVER['PHP_SELF']) == 'faq.php') echo 'class="active"'; ?>> <a href="faq.php" style="color:<?php echo (basename($_SERVER['PHP_SELF']) == 'faq.php') ? '#ea1e00' : '#00570E'; ?>">Other</a> </li> </ul> </nav> </div> <div class="ft-header-cta-btn"> <a class="d-flex justify-content-center align-items-center" href="contact" style="background:#00570E;">Get Free Quote</a> </div> <div class="dropdown" style="margin-right:70px;"> <button class="btn dropdown-toggle" type="button" id="dropdownLanguage" data-bs-toggle="dropdown" aria-expanded="false"> <img src="./assets/flag/English-Flag.png" alt="Eng" style="width:45px;"> Eng </button> <ul class="dropdown-menu" aria-labelledby="dropdownLanguage"> <li><a class="dropdown-item" href="./Khmer/" id="khmer-link"> <img src="./assets/flag/Khmer-Flag.png" alt="Eng" style="width:45px;">ខ្មែរ </a></li> </ul> </div> <script> document.addEventListener('DOMContentLoaded', function() { const currentPage = '<?php echo basename($_SERVER['PHP_SELF']); ?>'; const khmerLink = document.getElementById('khmer-link'); khmerLink.href = './Khmer/' + currentPage; }); </script> </div> <div class="mobile_menu position-relative"> <div class="mobile_menu_button open_mobile_menu" style="color:#00570E;"> <i class="fal fa-bars"></i> </div> <div class="mobile_menu_wrap"> <div class="mobile_menu_overlay open_mobile_menu"></div> <div class="mobile_menu_content"> <div class="mobile_menu_close open_mobile_menu"> <i class="fal fa-times"></i> </div> <div class="m-brand-logo"> <a href="!#"><img src="assets/img/logo/logo3.png" alt=""></a> </div> <nav class="mobile-main-navigation clearfix ul-li"> <ul id="m-main-nav" class="navbar-nav text-capitalize clearfix"> <li <?php if (basename($_SERVER['PHP_SELF']) == 'index.php') echo 'class="active"'; ?>><a href="index">Home Page</a></li> <li <?php if (basename($_SERVER['PHP_SELF']) == 'about.php') echo 'class="active"'; ?>><a href="about">About</a></li> <li <?php if (basename($_SERVER['PHP_SELF']) == 'service.php') echo 'class="active"'; ?>><a href="service" style="color:#00570E;">Service</a></li> <li <?php if (basename($_SERVER['PHP_SELF']) == 'activities.php') echo 'class="active"'; ?>><a href="activities" style="color:#00570E;">Project</a></li> <li <?php if (basename($_SERVER['PHP_SELF']) == 'news.php') echo 'class="active"'; ?>><a href="news" style="color:#00570E;">News</a></li> <li><a href="faq.php">Other</a></li> </ul> </nav> <div class="dropdown" style="margin-top: 20px;"> <button class="btn dropdown-toggle" type="button" id="dropdownLanguageMobile" data-bs-toggle="dropdown" aria-expanded="false"> <img src="assets/flag/Khmer-Flag.png" alt="ខ្មែរ" style="width:45px;"> ខ្មែរ </button> <ul class="dropdown-menu" aria-labelledby="dropdownLanguageMobile"> <li><a class="dropdown-item" href="#" id="english-link-mobile"> <img src="assets/flag/English-Flag.png" alt="Eng" style="width:45px;"> Eng </a></li> </ul> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { const currentPage = '<?php echo basename($_SERVER['PHP_SELF']); ?>'; const englishLinkMobile = document.getElementById('english-link-mobile'); englishLinkMobile.href = '../' + currentPage; // Mobile menu toggle const openMobileMenu = document.querySelectorAll('.open_mobile_menu'); const mobileMenuWrap = document.querySelector('.mobile_menu_wrap'); openMobileMenu.forEach(button => { button.addEventListener('click', () => { mobileMenuWrap.classList.toggle('open'); }); }); }); </script> </div> </div> </div> </header> <style> .mobile_menu_wrap { display: none; position: fixed; top: 0; right: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 9999; } .mobile_menu_wrap.open { display: block; } .mobile_menu_content { background: #fff; width: 80%; height: 100%; padding: 20px; position: fixed; top: 0; right: 0; overflow-y: auto; } .mobile_menu_close { position: absolute; top: 10px; right: 10px; cursor: pointer; } </style>