<?php
  include "include/dbcon.php";
  include "include/CTEACHER.php";
//  include "include/CSYSTEM.php";
  include "include/CFUNCTION.php";
  include "include/CPCSETTING.php";
  $mypcsys = new CPCSETTING();
?>
<?php
  date_default_timezone_set('Asia/Kuala_Lumpur');
  $t = time();
  $today_date = date("Y-m-d", $t);
?>

<html>
<head>
<title>ATTENDANCE SYSTEM (STUDY VERSION)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<style>
  html{
    background:url(img/img_bg.jpg) no-repeat center center fixed;
  }
</style>
<body><br>


<?php

//  if($_SESSION["teacherSessionId"]!=""){
  if( isset($_SESSION["teacherSessionId"]) ){

    $myuser = new CTEACHER();
	$myuser->setTeacher("id",$_SESSION["teacherSessionId"]);
?>
<?php
  include "header.php";
?>
<style>
  .tablebody{
    font-family:Arial;
    background-color:#FFFFFF;
  }
</style>
<center>
<table width="900px" height="350px" class="tablebody" border="0" >
  <tr>
  <td valign="top" width="130px">
<?php
  //----- side menu part ------------------
  include "sidemenu.php";
?>
  </td>
  <td valign="top">
<?php
  //----- main contain part ------------------
  switch($_GET["pg"]){
  
    //-- default page ----
    case "dt":
	
	  break;
	  
	//--- system page ------
    case "sys":
	  switch($_GET["ac"]){
	    case "stt":
		  include "syssttg.php";
		  break;
	    case "sec":
		  include "syssec.php";
		  break;
	    case "sect":
		  include "syssectim.php";
		  break;
	    case "tim":
		  include "syssectim.php";
		  break;
	    case "hol":
		  include "syshol.php";
		  break;
	    case "evt":
		  include "sysevt.php";
		  break;
	    case "bkp":
		  include "sysbkp.php";
		  break;
	  }
	  break;
	  
	//--- report page -------
    case "rpt":
	  switch($_GET["ac"]){
	    case "lst":
		  include "rptlst.php";
		  break;
	    //case "ltely":
		  //include "rptltely.php";
		  //break;
	    case "dy":
		  include "rptltely1.php";
		  break;
	    case "sp":
		  include "rptltely2.php";
		  break;
	   // case "smr":
		  //include "rptsmrstt.php";
		  //break;
	    case "wk":
		  include "rpt4.php";
		  break;
	  }
	  break;
	  
	//--- remark page -------
    case "rmk":
	  switch($_GET["ac"]){
	    case "req":
		  include "rmkreq.php";
		  break;
	    case "apv":
		  include "rmkapv.php";
		  break;
	    case "apv2":
		  include "rmkapv2.php";
		  break;
	    case "chk":
		  include "rmkchk.php";
		  break;
	    case "tsk":
		  include "rmktsk.php";
		  break;
	    case "tsk2":
		  include "rmktskadd.php";
		  break;
	    case "tsk22":
		  include "rmktskadd2.php";
		  break;
	    case "tska":
		  include "rmktska.php";
		  break;
	    case "deltsk":
		  include "rmkdeltsk.php";
		  break;
		  
		  
	  }
	  break;
	  
    case "stf":
	  switch($_GET["ac"]){
	    case "":
	      include "staff.php";
	      break;
		case "edt":
	      include "staff_edt.php";
	      break;
		case "ord":
	      include "staff_ord.php";
	      break;

	  }
	  break;
	
    case "pch":
      include "record.php";
	  break;

    case "ttl":
	  include "tutorial.php";
	  break;
          
    case "anc":
	  include "annouce.php";
	  break;	
	
    case "dft":
	  break;

  }
?>
  </td>
  </tr>
</table>
</center>
<?php
  }else{
?>
    <br><br><br><br>
    <center>
    <table border="0" width="750" height="350" style="font-family:Arial; font-weight:bold; color:#FF0000;">
      <tr><td align="center" valign="middle">
          YOU ARE NOT LOGIN YET, <br><br>PLEASE <a href="index.php">LOGIN</a> FIRST.
      </td></tr>
    </table>
    </center>
<?php
  }
?>
<hr>
<div align="right">
<table style="font-family:Arial ">
  <tr>
    <td valign="middle"><div align="right"><!--b>COPYRIGHT BY EZ-Group</b--> &nbsp;</div></td>
    <td valign="bottom"><span style="font-size:8px">VER.2.0.</span></td>  
  </tr>
</table>
</div>
</body>
</html>