<?PHP 
if (file_exists("./../".$SYSD."/messagebox3.inc.txt")){}else{copy("./../".$SYSI."/".$SYSD."/messagebox3.inc.txt" , "./../".$SYSD."/messagebox3.inc.txt");}
if (file_exists("./../".$SYSD."/messagebox3a.inc.txt")){}else{copy("./../".$SYSI."/".$SYSD."/messagebox3a.inc.txt" , "./../".$SYSD."/messagebox3a.inc.txt");}
if (file_exists("./../".$SYSD."/messagebox5.inc.txt")){}else{copy("./../".$SYSI."/".$SYSD."/messagebox5.inc.txt" , "./../".$SYSD."/messagebox5.inc.txt");}

if($adlanguage == $tlanguage){$langTemp="";}else{$langTemp=$tlanguage;}
if($googleTranslate == 1){
$langTemp="GT";
}else{
$langTemp=$langTemp;
}

$handle=opendir("./../".$SYSI."/dataA");
if($handle)
$prgSumX=0;
while($file=readdir($handle))
{$prgSumX++;}
$mesBox1=$prgSumX - 2;

if($mesBox1 <= 0){
$mesBox1C="label-empty";
$mesBox1=0;
copy("./../".$SYSI."/".$SYSD."/messagebox3.inc.txt" , "./../".$SYSD."/messagebox3.inc.txt");
}else{
$mesBox1C="label-info";
$mesBox1=$mesBox1;
}

$mesBox3F="messagebox3.inc.txt";
if (file_exists("./../".$SYSD."/".$mesBox3F)){}else{copy("./../".$SYSI."/".$SYSD."/".$mesBox3F , "./../".$SYSD."/".$mesBox3F);}
$mesBox3=file_get_contents("../".$SYSD."/".$mesBox3F);
if($weblink == "messages-new-index.php"){
$mesBox3C="label-info";
$mesBox3="<i class='fa fa-download'></i>";
}else{
if($mesBox3 == 0){
$mesBox3C="label-empty";
$mesBox3=0;
}else{
$mesBox3C="label-danger";
$mesBox3=$mesBox3;
}
}

$mesBox5F="messagebox5.inc.txt";
if (file_exists("./../".$SYSD."/".$mesBox5F)){}else{copy("./../".$SYSI."/".$SYSD."/".$mesBox5F , "./../".$SYSD."/".$mesBox5F);}
$mesBox5=file_get_contents("../".$SYSD."/".$mesBox5F);
if($mesBox5 == 0){
$mesBox5C="label-empty";
}else{
$mesBox5C="label-warning";
}

echo "
<div class='navbar-custom-menu'>
<ul class='nav navbar-nav'>

<li><span class='padd-icon'></span></li>
";
if($prewX == "on"){
echo "<li><a href='".$projectURL."' target='testpage' class='dropdown-toggle'><i class='fa fa-eye font16'></i></a></li>
";
}
echo "
<li><a href='#' class='dropdown-toggle' data-toggle='dropdown'><i class='fa fa-sticky-note-o font16'></i><span class='label ".$mesBox1C."'>".$mesBox1."</span></a>";include("navbox1.inc.php");echo "</li>
<li><a href='#' class='dropdown-toggle' data-toggle='dropdown'><i class='fa fa-envelope-o font16'></i><span class='label ".$mesBox3C."'>".$mesBox3."</span></a>";include("navbox3.inc.php");echo "</li>
<li><a href='#' class='dropdown-toggle' data-toggle='dropdown'><i class='fa fa-flag-o font16'></i><span class='label flaglabel ttU label-flag'>".$adlanguage."</span><span class='label flaglabel2 ttU label-flag'>".$langTemp."</span></a>";include("navbox4.inc.php");echo "</li>";
if($infoLMs == 1){ echo "<li><a href='#' class='dropdown-toggle' data-toggle='dropdown'><i class='fa fa-newspaper-o font16'></i><span class='label ".$mesBox5C."'>".$mesBox5."</span></a>";include("navbox5.inc.php");echo "</li>";}
echo "<li><span class='padd-icon'></span></li>
<li><a href='#' data-toggle='control-sidebar' id='sidebar-toggle-right'><i class='fa fa-th font16'></i></a></li>
</ul><!-- ./nav navbar-nav -->
</div><!-- ./navbar-custom-menu -->
";
?>
