<?php 
			// Project ID
			$pid 	= $_GET['pid'];
			$xuid 	= $_GET['xuid'];
			$lang 	= $_GET['lang'];
			$onload	= $_GET['onload'];			
			$xfdc 	= $_GET['xfdc'];			
			include('field_names.php'); 			
			include('users.php'); 
			include('menu_checks.php'); 		
			include('z_a_version_check.php'); 					
			
			$admin_word = "admin";			
?>



<!DOCTYPE html>
<html>
<head>
<title>
	  <?php include('title.php'); ?>
 </title>

  <meta name="viewport" content="width=device-width, initial-scale=1">
  
  <link rel="stylesheet" href="./css/w3.css">
  
	<link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css">
	<script src="./jquery/jquery-3.5.1.js"></script>
	<script src="./jquery/popper.min.js"></script>  
	<script src="./bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="./fontawesome/css/all.css" >  
	
<style>
html,
body,
header,
.view {
  height: 100%;
}

@media (max-width: 740px) {
  html,
  body,
  header,
  .view {
    height: 1000px;
  }
}
@media (min-width: 800px) and (max-width: 850px) {
  html,
  body,
  header,
  .view {
    height: 650px;
  }
}

.top-nav-collapse {
  background-color: #3f51b5 !important;
}

.navbar:not(.top-nav-collapse) {
  background: transparent !important;
}

@media (max-width: 991px) {
  .navbar:not(.top-nav-collapse) {
    background: #3f51b5 !important;
  }
}

.rgba-gradient {
  background: -webkit-linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(72, 15, 144, 0.4) 100%);
  background: -webkit-gradient(linear, 45deg, from(rgba(0, 0, 0, 0.7), rgba(72, 15, 144, 0.4) 100%)));
  background: linear-gradient(to 45deg, rgba(0, 0, 0, 0.7), rgba(72, 15, 144, 0.4) 100%);
}

.card {
  background-color: rgba(126, 123, 215, 0.2);
}

.md-form label {
  color: #ffffff;
}

h6 {
  line-height: 1.7;
}
</style>

<style>
/* unvisited link */
a:link {
  color: black;
}

/* visited link */
a:visited {
  color: black;
}

/* mouse over link */
a:hover {
  color: blue;
}

/* selected link */
a:active {
  color: black;
}
</style>

<script>
function startTime() {
  var today = new Date();
  var h = today.getHours();
  var m = today.getMinutes();
  var s = today.getSeconds();
  m = checkTime(m);
  s = checkTime(s);
  document.getElementById('txt').innerHTML =
  "<?php echo $ntime ?> " + h + ":" + m + ":" + s;
  var t = setTimeout(startTime, 500);
}
function checkTime(i) {
  if (i < 10) {i = "0" + i};  // add zero in front of numbers < 10
  return i;
}
</script>


<style>
.blink {
      animation: blink 2s steps(5, start) infinite;
      -webkit-animation: blink 1s steps(5, start) infinite;
    }
    @keyframes blink {
      to {
        visibility: hidden;
      }
    }
    @-webkit-keyframes blink {
      to {
        visibility: hidden;
      }
    }
.row {
  height: 26px;
}	
</style>




<script>
// A $( document ).ready() block.
$( document ).ready(function() {
  if (document.cookie.indexOf('visited=true') == -1){
    // load the overlay
    $('#myModal').modal({show:true});
    
    var year = 1000*60*60*24*365;
    var expires = new Date((new Date()).valueOf() + year);
    document.cookie = "visited=true;expires=" + expires.toUTCString();

  }
}); 
</script>

</head>
<body onload="startTime()">
	<div class="view" style="background-image: url('bg.png'); background-repeat: no-repeat; background-size: cover; background-position: center center;">
<?php
	include('menu_vars.php');
?>

<?php if ($demo_user == 1) 
	{ 
?>
<div id="myModal" class="modal fade">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"><?php echo $modal_menu_title; ?></h4>
            </div>
            <div class="modal-body">
				<p><?php echo $modal_menu_body1." ".$htitle.".".$modal_menu_body2; ?></p>
            </div>
		<!-- Modal footer -->
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo $nclose ?></button>
        </div>			
        </div>
    </div>
</div>
<?php 
} 
?>


<br>

<?php
	if (strpos($usrole, $admin_word) !== false) 
		{
			$colrow = "col-sm-3";
		}
	elseif (strpos($usrole, $admin_word) === false)
		{
			$colrow = "col-sm-4";
		}
?>

<div class="container">

   <div class="row row-grid">
     <div class="col-sm-6 w3-animate-opacity">
		<h3>
			<p style="color:maroon"><i class="fas fa-bars"></i>	<strong><?php echo $nmenu ?>
					<?php 
					if (strpos($usrole, $admin_word) !== false) {
							printf("<img src='user_".$usrole.".png' height=auto width=30 />"); 						
					}
					?>

					
				</strong>
			</p>
		</h3>
     </div>
     <!-- /.col-sm-6 -->
     <div class="col-sm-6 text-end w3-animate-opacityd">
       <h4><p style="color:maroon">		<strong><?php include('title.php'); ?>	</strong><img src='./logos/<?php echo $logopic ?>' width=30 height=auto /></p></h4>
     </div>
     <!-- /.col-sm-6 -->
   </div>
   <!-- /.row -->


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr style="border: 1px solid #999999">
     </div>
   </div>
   <!-- /.row -->
 


  <div class="row row-grid">
    <div class="<?php echo $colrow ?>  w3-animate-opacity">
			<h6><span style='color:<?php echo $menu_color_forms ?>'><i class="fas fa-desktop"></i></span>	<strong>	<?php echo $forms_name ?>		</strong></h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
			<h6><span style='color:<?php echo $menu_color_reports ?>'><i class="far fa-file-alt"></i></span>	<strong>	<?php echo $reps_name ?>		</strong></h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
			<h6><span style='color:<?php echo $menu_color_views ?>'><i class="fas fa-chart-bar"></i></span>	<strong>	<?php echo $views_name ?>		</strong></h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
			<h6><span style='color:<?php echo $menu_color_struc ?>'><i class="fas fa-database"></i></span>	<strong>	<?php echo $structure_name ?>	</strong></h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->

	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr style="border: 1px solid #999999">
     </div>
   </div>
   <!-- /.row -->
	
  <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
		<h6><?php echo $form1 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?> w3-animate-opacityb">
      <h6><?php echo $rep1 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?> w3-animate-opacityc">
      <h6><?php echo $view1 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?> w3-animate-opacityd">
		<h6><?php echo $struc1 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->
	
	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->

	
	<div class="row row-grid">
    <div class="<?php echo $colrow ?>  w3-animate-opacity">
			<h6><?php echo $form2 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?> w3-animate-opacityb">
      <h6><?php echo $rep2 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?> w3-animate-opacityc">
      <h6><?php echo $view2 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?> w3-animate-opacityd">
		<h6><?php echo $struc2 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->	

   
	<div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form3 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?> w3-animate-opacityb">
      <h6><?php echo $rep3 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?> w3-animate-opacityc">
      <h6><?php echo $view3 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?> w3-animate-opacityd">
		<h6><?php echo $struc3 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->


	<div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form4 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep4 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view4 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc4 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->

   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form5 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep5 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view5 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc5 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->

   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form6 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep6 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view6 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc6 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->   
   
   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form7 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep7 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view7 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc7 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->
   
   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form8 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep8 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view8 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc8 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->   

   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form9 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep9 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view9 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc9 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->
   
   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form10 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep10 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view10 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc10 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->

	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->
   
   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form11 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep11 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view11 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc11 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr>
     </div>
   </div>
   <!-- /.row -->


   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<h6><?php echo $form12 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">
      <h6><?php echo $rep12 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
      <h6><?php echo $view12 ?>		</h6>
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
		<h6><?php echo $struc12 ?>	</h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	


	<div class="row justify-content-center row-grid">
     <div class="col-sm-12">
			<hr style="border: 1px solid #999999">
     </div>
   </div>
   <!-- /.row -->   



   
   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">
			<div id="txt"></div>
	<?php
	if ($ulang > 1) 
		{
				if ($lang == '') { $langen = "<b>EN</b>"; 	$langgr = "GR"; }
				if ($lang == 1) { $langen = "<b>EN</b>"; 	$langgr = "GR"; }
				if ($lang == 2) { $langen = "EN"; 			$langgr = "<b>GR</b>"; }
				
				printf("$nlang: <a href='menu.php?xuid=$xuid&pid=$pid&xfdc=$xfdc'>$langen</a> <a href='menu.php?xuid=$xuid&pid=$pid&lang=2&xfdc=$xfdc'>$langgr</a>");
		}
	?>			
    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">

			<?php echo $nuser.": ".$user_description ?>
			<br>
			<?php printf($nrole.": ".$role_description." <img src='user_".$usrole.".png' height=auto width=20 />"); ?>
			<br>
			<div style='color:<?php echo $rabio_edition_color ?>'><b><?php echo $rabio_edition ?></b></div> <!-- IT COMES FROM z_a_version_check.php -->
    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">
	<h6><strong><a href="help/index.php?lang=<?php echo $lang ?>&pid=<?php echo $pid ?>" target=_blank style="color:olive" ><span style='color:blue'><i class="fas fa-question-circle"></i></span>	<?php echo $nhelp ?></a>	</strong></h6>
    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->	
   <div class="<?php echo $colrow ?>  w3-animate-opacityd">
	<h6><a href='projects.php?xuid=<?php echo $xuid ?>&xfdc=<?php echo $xfdc ?>' style="color:green" ><span style='color:blue'><i class="fas fa-list-ul"></i></span>	<?php echo $nselect." ".$npid ?></a></h6>					
    </div>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->	



	
   <div class="row row-grid">
    <div class="<?php echo $colrow ?> w3-animate-opacity">

    </div>
    <!-- /.col-sm-3 -->
    <div class="<?php echo $colrow ?>  w3-animate-opacityb">

    </div>
    <!-- /.col-sm-3 -->
		<?php if (strpos($usrole, $admin_word) !== false) {	?>
    <div class="<?php echo $colrow ?>  w3-animate-opacityc">

    </div>
		<?php } ?>
    <!-- /.col-sm-3 -->	
    <div class="<?php echo $colrow ?>  w3-animate-opacityd">
   <h6><a href='index.php' style="color:red"><span style='color:red'><i class="fas fa-sign-out-alt"></i></span>	<b><?php echo $nlogout ?></b></a></h6>
    </div>
    <!-- /.col-sm-3 -->
    </div>
    <!-- /.row -->		


 </div>
 <!-- /.container -->


 <!-- bakcground image close div -->
</div>
</body>
</html>