<style>
  .headermenu{
  border-collapse:collapse;
  background-color:#1B1B19;
  }
  .headericon{
  height:50px;
  margin:5px 5px 5px 5px;
  cursor:pointer;
  border:none;
  }
  .headertitle{
  height:50px;
  cursor:pointer;
  border:none;
  }
</style>

<?php
  $arrExsttgItem[] = "announce";
  $strExsttgItem = "'".implode("','",$arrExsttgItem)."'";

  $qexsttg = "SELECT * FROM ".$CLIENTID."_attendace_exsttg WHERE name IN ($strExsttgItem) ORDER BY tb_order";
  $rexsttg = mysqli_query($conn,$qexsttg);
  while($myrow = mysqli_fetch_array($rexsttg)){
    $arrExsttg[$myrow["name"]] = $myrow["val"];
  }
?>

<center>
<table width="900" border="0" class="headermenu">
  <tr>
    <td width="185px"><a href="main.php"><img src="img/img_title.png" class="headertitle"></a></td>
    <td align="right">

<?php
if( $_SESSION["teacherSessionId"]=="admin" ){
?>
	  <a href="main.php?pg=ttl"><img alt="TUTORIAL" class="headericon" src="img/ico_video.png"></a>
	  <a href="main.php?pg=stf"><img alt="STAFF" class="headericon" src="img/ico_people.png"></a>
	  <?php
	  if($arrExsttg["announce"]=="1"){
	    ?>
	  <a href="main.php?pg=anc"><img alt="ANNOUNCE" class="headericon" src="img/ico_announce.png"></a>
		<?php
	  }
	  ?>

	  <a href="main.php?pg=rmk&ac=tsk"><img alt="REMARK" class="headericon" src="img/ico_remark.png"></a>
	  <a href="main.php?pg=pch"><img alt="RECORD" class="headericon" src="img/ico_record.png"></a>
	  <a href="main.php?pg=rpt"><img alt="REPORT" class="headericon" src="img/ico_report.png"></a>
	  <a href="main.php?pg=sys"><img alt="SETTING" class="headericon" src="img/ico_setting.png"></a>
<?php
}
?>


<?php
if( $_SESSION["teacherSessionId"]=="pejabat" ){
?>
      <a href="main.php?pg=stf"><img alt="STAFF" class="headericon" src="img/ico_people.png"></a>
	  <a href="main.php?pg=rmk&ac=tsk"><img alt="REMARK" class="headericon" src="img/ico_remark.png"></a>
	  <a href="main.php?pg=rpt"><img alt="REPORT" class="headericon" src="img/ico_report.png"></a>
<?php
}
?>
	  
	  
	  <a href="logout.php"><img alt="LOGOUT" class="headericon" src="img/ico_logout.png"></a>
	</td>
  </tr>
</table>
</center>