<?php
/*
// Crea la connessione
$conn = new mysqli($servername, $username, $password, $database);

// Controlla la connessione
if ($conn->connect_error) {
    die("Connessione fallita: " . $conn->connect_error);
}

// Query SQL per estrarre le lingue
$sql = "SELECT languagename, languageflag, languageacronym FROM languagesdrop";
$result = $conn->query($sql);

$languages = [];
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        $languages[] = $row;
    }
}

// Chiudi la connessione
$conn->close();
*/ ?>
<!-- Top Bar Start -->
<div class="topbar">

	<nav class="navbar-custom">

		<ul class="list-inline float-right mb-0">
			<!-- language-->
			<li class="list-inline-item dropdown notification-list hide-phone">
				<a class="nav-link dropdown-toggle arrow-none waves-effect text-white" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
					English <img src="<?php echo USERAREA_PATH; ?>assets/images/flags/us_flag.jpg" class="ml-2" height="16" alt="" />
				</a>
				<div class="dropdown-menu dropdown-menu-right language-switch">
					<a class="dropdown-item" href="#"><img src="<?php echo USERAREA_PATH; ?>assets/images/flags/italy_flag.jpg" alt="" height="16" /><span> Italian </span></a>
					<a class="dropdown-item" href="#"><img src="<?php echo USERAREA_PATH; ?>assets/images/flags/french_flag.jpg" alt="" height="16" /><span> French </span></a>
					<a class="dropdown-item" href="#"><img src="<?php echo USERAREA_PATH; ?>assets/images/flags/spain_flag.jpg" alt="" height="16" /><span> Spanish </span></a>
					<a class="dropdown-item" href="#"><img src="<?php echo USERAREA_PATH; ?>assets/images/flags/russia_flag.jpg" alt="" height="16" /><span> Russian </span></a>
				</div>
			</li>
			<li class="list-inline-item dropdown notification-list">
				<a class="nav-link dropdown-toggle arrow-none waves-effect" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
					<i class="dripicons-mail noti-icon"></i>
					<span class="badge badge-danger noti-icon-badge">5</span>
				</a>
				<div class="dropdown-menu dropdown-menu-right dropdown-arrow dropdown-menu-lg">
					<!-- item-->
					<div class="dropdown-item noti-title">
						<h5><span class="badge badge-danger float-right">745</span>Messages</h5>
					</div>

					<!-- item-->
					<a href="javascript:void(0);" class="dropdown-item notify-item">
						<div class="notify-icon"><img src="<?php echo USERAREA_PATH; ?>assets/images/users/avatar-2.jpg" alt="user-img" class="img-fluid rounded-circle" /> </div>
						<p class="notify-details"><b>Charles M. Jones</b><small class="text-muted">Dummy text of the printing and typesetting industry.</small></p>
					</a>

					<!-- item-->
					<a href="javascript:void(0);" class="dropdown-item notify-item">
						<div class="notify-icon"><img src="<?php echo USERAREA_PATH; ?>assets/images/users/avatar-3.jpg" alt="user-img" class="img-fluid rounded-circle" /> </div>
						<p class="notify-details"><b>Thomas J. Mimms</b><small class="text-muted">You have 87 unread messages</small></p>
					</a>

					<!-- item-->
					<a href="javascript:void(0);" class="dropdown-item notify-item">
						<div class="notify-icon"><img src="<?php echo USERAREA_PATH; ?>assets/images/users/avatar-4.jpg" alt="user-img" class="img-fluid rounded-circle" /> </div>
						<p class="notify-details"><b>Luis M. Konrad</b><small class="text-muted">It is a long established fact that a reader will</small></p>
					</a>

					<!-- All-->
					<a href="javascript:void(0);" class="dropdown-item notify-item border-top">
						View All
					</a>

				</div>
			</li>

			<li class="list-inline-item dropdown notification-list">
				<a class="nav-link dropdown-toggle arrow-none waves-effect" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
					<i class="dripicons-bell noti-icon"></i>
					<span class="badge badge-success noti-icon-badge">2</span>
				</a>
				<div class="dropdown-menu dropdown-menu-right dropdown-arrow dropdown-menu-lg">
					<!-- item-->
					<div class="dropdown-item noti-title">
						<h5><span class="badge badge-danger float-right">87</span>Notification</h5>
					</div>

					<!-- item-->
					<a href="javascript:void(0);" class="dropdown-item notify-item">
						<div class="notify-icon bg-primary"><i class="mdi mdi-cart-outline"></i></div>
						<p class="notify-details"><b>Your order is placed</b><small class="text-muted">Dummy text of the printing and typesetting industry.</small></p>
					</a>

					<!-- item-->
					<a href="javascript:void(0);" class="dropdown-item notify-item">
						<div class="notify-icon bg-success"><i class="mdi mdi-message"></i></div>
						<p class="notify-details"><b>New Message received</b><small class="text-muted">You have 87 unread messages</small></p>
					</a>

					<!-- item-->
					<a href="javascript:void(0);" class="dropdown-item notify-item">
						<div class="notify-icon bg-warning"><i class="mdi mdi-glass-cocktail"></i></div>
						<p class="notify-details"><b>Your item is shipped</b><small class="text-muted">It is a long established fact that a reader will</small></p>
					</a>

					<!-- All-->
					<a href="javascript:void(0);" class="dropdown-item notify-item border-top">
						View All
					</a>

				</div>
			</li>

			<li class="list-inline-item dropdown notification-list">
				<a class="nav-link dropdown-toggle arrow-none waves-effect nav-user" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
					<img src="<?php echo USERAREA_PATH; ?>assets/images/users/avatar-6.jpg" alt="user" class="rounded-circle">
				</a>
				<div class="dropdown-menu dropdown-menu-right profile-dropdown ">
					<!-- item-->
					<div class="dropdown-item noti-title">
						<h5>Welcome</h5>
					</div>
					<a class="dropdown-item" href="<?php echo BASE_URL; ?>profile"><i class="mdi mdi-account-circle m-r-5 text-muted"></i> <?php echo $userprofile; ?></a>
					<a class="dropdown-item" href="#"><i class="mdi mdi-wallet m-r-5 text-muted"></i> <?php echo $mycompany; ?></a>

					<div class="dropdown-divider"></div>
					<a class="dropdown-item" href="<?php echo BASE_URL; ?>logout"><i class="mdi mdi-logout m-r-5 text-muted"></i> <?php echo $logoutbutton; ?></a>
				</div>
			</li>
		</ul>

		<ul class="list-inline menu-left mb-0">
			<li class="float-left">
				<button class="button-menu-mobile open-left waves-light waves-effect">
					<i class="mdi mdi-menu"></i>
				</button>
			</li>

		</ul>

		<div class="clearfix"></div>
	</nav>
</div>
<!-- Top Bar End -->