<body class="">
	<!-- Main navbar -->
	<div class="navbar navbar-expand-lg navbar-dark navbar-static navbar-lg">

		<!-- Header with logos -->
			<div class="navbar-brand">
				<a href="../" class="d-inline-block">
					<img src="../asset/<?php echo $logo['image_link']; ?>"  alt="<?php echo $set['site_name'] ?>"/>
				</a>
			</div>
		<!-- /header with logos -->
	

		<!-- Mobile controls -->
		<div class="d-md-none">
			<button class="navbar-toggler sidebar-mobile-main-toggle" type="button">
				<i class="icon-paragraph-justify3"></i>
			</button>
			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-mobile">
				<i class="icon-user"></i>
			</button>
		</div>
		<!-- /mobile controls -->


		<!-- Navbar content -->
		<div class="collapse navbar-collapse" id="navbar-mobile">
			<ul class="navbar-nav">
				<li class="nav-item">
					<a href="#" class="navbar-nav-link sidebar-control sidebar-main-toggle d-none d-md-block">
						<i class="icon-paragraph-justify3"></i>
					</a>
				</li>
			</ul>
			<span class="navbar-text ml-md-3 mr-md-auto">
				<span class="badge badge-mark border-orange-300 mr-2"></span>
				Welcome back, <?php echo $row['name'];?>!
			</span>

			<ul class="navbar-nav">
				<li class="nav-item dropdown">
					<a href="#" class="navbar-nav-link dropdown-toggle" data-toggle="dropdown">
						<i class="icon-share mr-2"></i>
						Follow us on
					</a>

					<div class="dropdown-menu dropdown-menu-right bg-white dropdown-content wmin-md-350">
						<div class="dropdown-content-body p-2">
							<div class="row no-gutters">
								<?php
								$data = mysqli_query($dbc, "SELECT * FROM social_links");
								while($row1 = mysqli_fetch_array($data)){
								if(!empty($row1['value'])){ ?>
								<div class="col-4 col-sm-4">
									<a href="<?php echo $row1['value'];?>" class="d-block text-default text-center ripple-dark rounded p-3">
										<i class="fa fa-<?php echo $row1['type'];?> mr-2"></i>
										<div class="font-size-md font-weight-semibold text-uppercase mt-2"><?php echo $row1['type'];?></div>
									</a>
								</div>
							<?php } } ?> 
							</div>
						</div>
					</div>
				</li>
				<li class="nav-item dropdown">
					<a href="#" class="navbar-nav-link dropdown-toggle" data-toggle="dropdown">
						<?php if(mysqli_num_rows(mysqli_query($dbc, "SELECT * FROM tran_acct WHERE user_id = '".$row['id']."' AND seen='0'"))>0){?>
							<i class="icon-bell3 mr-2"></i>
						<?php }else{?>
							<i class="icon-bell2 mr-2"></i>
						<?php }?>
						Alerts
					</a>
					
					<div class="dropdown-menu dropdown-menu-right dropdown-content wmin-md-350">
						<div class="dropdown-content-body dropdown-scrollable">
							<ul class="media-list">
                  <?php
                  $trans = mysqli_query($dbc, "SELECT * FROM tran_acct WHERE user_id = '".$row['id']."' ORDER BY tran_acct.date DESC");
                  while($hh = mysqli_fetch_array($trans)){?>
								<li class="media">
									<?php if($hh['type']==1){?>
										<div class="mr-3">
											<a href="#" class="btn bg-success-800 rounded-round btn-icon"><i class="icon-download"></i></a>
										</div>
									<?php }else{?>
										<div class="mr-3">
											<a href="#" class="btn bg-danger-800 rounded-round btn-icon"><i class="icon-upload"></i></a>
										</div>
									<?php }?>
									<div class="media-body">
										<?php echo $hh['content'];?>
										<div class="font-size-sm text-muted mt-1"><?php echo timeAgo($hh['date']);?></div>
									</div>
								</li>
				<?php }?>
							</ul>
						</div>

						<div class="dropdown-content-footer bg-light">
							<a href="./alerts" class="font-size-sm line-height-sm text-uppercase font-weight-semibold text-grey mr-auto">History</a>
							<div>
							</div>
						</div>
					</div>
				</li>
				<li class="nav-item dropdown dropdown-user">
					<a href="#" class="navbar-nav-link dropdown-toggle" data-toggle="dropdown">
						<img src="<?php echo $cast;?>" class="rounded-circle" alt="">
						<span><?php echo $row['username'];?></span>
					</a>

					<div class="dropdown-menu dropdown-menu-right">
						<a href="./profile/0" class="dropdown-item" title="My profile">
							<i class="icon-user-plus"></i>
							<span>My profile<?php if($set['kyc']==1){?> & Verification<?php }?></span>
						</a>
						<a href="security/0" class="dropdown-item" title="Account security">
							<i class="icon-lock"></i>
							<span>Password</span>
						</a>
						<a href="2fa" class="dropdown-item" title="2fa security">
							<i class="icon-key"></i>
							<span>2fa security</span>
						</a>
						<a href="ticket" class="dropdown-item" title="Help center">
							<i class="icon-bubbles5"></i>
							<span>Help</span>
						</a>	
						<a href="../app/user/logout" class="dropdown-item" title="Logout">
							<i class="icon-switch2"></i>
							<span>Logout</span>
						</a>
					</div>
				</li>
			</ul>
		</div>
		<!-- /navbar content -->
		
	</div>
	<!-- /main navbar -->