HOME SHELL

NULLCOMMUNITY
 LiteSpeed
 Linux server2.poyrazhosting.com 3.10.0-962.3.2.lve1.5.77.el7.x86_64 #1 SMP Mon Dec 12 07:06:14 EST 2022 x86_64
 safemode : OFF
 MySQL: OFF | Perl: OFF | cURL: ON | WGet: OFF
  >  / home / cuneytsener53 / kurumsal16.snrsoft.com.tr / datainclude /

Server Ip : 104.21.78.54




Filename/home/cuneytsener53/kurumsal16.snrsoft.com.tr/datainclude/menu.php
Size4.4 kb
Permissionrw-r--r--
Owner
Create time02-Mar-2025 05:46
Last modified10-Oct-2022 13:59
Last accessed05-Apr-2025 09:50
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image

<ul class="main-menu__list">
<?php
// Main menu query
$mainMenuAsk=$db->prepare("SELECT * FROM menu WHERE menu_top_id=:menu_top_id AND status=:status AND language=:language ORDER BY order_sort");
$mainMenuAsk->execute(array(
'menu_top_id' => 0,
'status' => 1,
'language' => $getLangCheck['language_id']
));
while($mainMenuCheck=$mainMenuAsk->fetch(PDO::FETCH_ASSOC)){
// Does the main menu have a submenu?
$countSubmenu=$db->prepare("SELECT * FROM menu WHERE menu_top_id=:menu_top_id AND status=:status ORDER BY order_sort");
$countSubmenu->execute(array(
'menu_top_id' => $mainMenuCheck['menu_id'],
'status' => 1
));
$resultSubMenu=$countSubmenu->rowCount();
?>

<li <?php echo $resultSubMenu > 0 ? 'class="dropdown"' : ''; ?>>
<?php if ($mainMenuCheck['ready_link'] == "manualLink") { ?>
<a <?php echo $mainMenuCheck['new_tab'] == 1 ? 'target="_blank"' : ''; ?> href="<?php echo $mainMenuCheck['link']; ?>" <?php echo $resultSubMenu > 0 ? '' : ''; ?>><?php echo $mainMenuCheck['title']; ?></a>
<?php }else{
// if the ready link is a page link
$pageLinkId = $mainMenuCheck['ready_link'];
$pageLinkAsk=$db->prepare("SELECT * FROM posts WHERE post_id=$pageLinkId");
$pageLinkAsk->execute();
$pageLinkCheck=$pageLinkAsk->fetch(PDO::FETCH_ASSOC);
?>
<a <?php echo $mainMenuCheck['new_tab'] == 1 ? 'target="_blank"' : ''; ?> href="<?php echo $pageLinkCheck['seo_url']; ?>" <?php echo $resultSubMenu > 0 ? '' : ''; ?>><?php echo $mainMenuCheck['title']; ?></a>
<?php }
$topMenuId = $mainMenuCheck['menu_id'];
$subMenuAsk=$db->prepare("SELECT * FROM menu WHERE menu_top_id=$topMenuId AND status=1 ORDER BY order_sort");
$subMenuAsk->execute();
// if the main menu has a submenu
if ($resultSubMenu > 0) {
?>
<ul>
<?php
while($subMenuCheck=$subMenuAsk->fetch(PDO::FETCH_ASSOC)){
// if the submenu has a submenu
$countSubmenu=$db->prepare("SELECT * FROM menu WHERE menu_top_id=:menu_top_id AND status=:status ORDER BY order_sort");
$countSubmenu->execute(array(
'menu_top_id' => $subMenuCheck['menu_id'],
'status' => 1
));
$resultSubSubMenu=$countSubmenu->rowCount();
?>
<li>
<?php if ($subMenuCheck['ready_link'] == "manualLink") { ?>

<a <?php echo $subMenuCheck['new_tab'] == 1 ? 'target="_blank"' : ''; ?> href="<?php echo $subMenuCheck['link']; ?>" <?php echo $resultSubSubMenu > 0 ? 'data-toggle="dropdown" class="dropdown-toggle"' : ''; ?>><?php echo $subMenuCheck['title']; ?></a>
<?php }else{
// if the ready link is a page link
$subPageLinkId = $subMenuCheck['ready_link'];
$subPageLinkAsk=$db->prepare("SELECT * FROM posts WHERE post_id=$subPageLinkId");
$subPageLinkAsk->execute();
$subPageLinkCheck=$subPageLinkAsk->fetch(PDO::FETCH_ASSOC);
?>
<a <?php echo $mainMenuCheck['new_tab'] == 1 ? 'target="_blank"' : ''; ?> href="<?php echo $subPageLinkCheck['seo_url']; ?>" <?php echo $resultSubSubMenu > 0 ? 'data-toggle="dropdown" class="dropdown-toggle"' : ''; ?>><?php echo $subMenuCheck['title']; ?></a> <?php } ?>
</li>
<?php } ?> </ul>
<?php } ?></li>
<?php } ?>
<?php
while ($langCheck=$langAsk->fetch(PDO::FETCH_ASSOC)){
$langCodeAsk=$db->prepare("SELECT * FROM countries where alpha=:alpha");
$langCodeAsk->execute(array(
'alpha' => $langCheck['country_code']
));
$langCodeCheck=$langCodeAsk->fetch(PDO::FETCH_ASSOC);
?>

<li><a href="<?php echo $generalSettingCheck['site_url']; ?>?lang=<?php echo $langCheck['country_code']; ?>">
<i class='flag-icon flag-icon-<?php echo $langCheck['country_code'] ?> mr-2'></i>
</a></li>


<?php } ?>
</ul>