<?php

//the global file operation
session_start();
ob_start();

//global varable
global $showoutside;

//to check if the page from .htacess
//$showoutside = $_GET['sn'];
// get the config file
include_once("../public/config.php");


//here the db files that include in the file
// GOES HERE ....................
include("../public/include_dao.php");

//workStation
require_once('../models/dao/WorkstationDAO.class.php');
require_once('../models/dto/Workstation.class.php');
require_once('../models/mysql/WorkstationMySqlDAO.class.php');
require_once('../models/mysql/ext/WorkstationMySqlExtDAO.class.php');


//workstationworker
require_once('../models/dao/WorkstationworkerDAO.class.php');
require_once('../models/dto/Workstationworker.class.php');
require_once('../models/mysql/WorkstationworkerMySqlDAO.class.php');
require_once('../models/mysql/ext/WorkstationworkerMySqlExtDAO.class.php');

//settingOperation
require_once('../models/dao/SettingoperationDAO.class.php');
require_once('../models/dto/Settingoperation.class.php');
require_once('../models/mysql/SettingoperationMySqlDAO.class.php');
require_once('../models/mysql/ext/SettingoperationMySqlExtDAO.class.php');

//get the do the action
$do = $_GET['do'];


/* ======================

  Controller Name :- Setting Operation Controll

  OPERTATION in Controller

  1-display Worker no
  ======================== */


//here goes the instances and general variables
//workStation
$workStation = new Workstation();
$workStationDOA = new WorkstationMySqlDAO();
$workStationEX = new WorkstationMySqlExtDAO();

//workstationworker
$workstationworker = new Workstationworker();
$workstationworkerADO = new WorkstationworkerMySqlDAO();
$workstationworkerEX = new WorkstationworkerMySqlExtDAO();

//setting operation
$settingOperation = new Settingoperation();
$settingOperationDAO = new SettingoperationMySqlDAO();
$settingOperationEX = new SettingoperationMySqlExtDAO();

//Checkcontroller
//check and use the condetion that suite this action

/* ===============================
  function in this CONTROLLER
  ================================ */
if ($do == "getoperationhour") {

    $settingOperationID = $_GET["settingOperationID"];

    $allworkerhours = $settingOperationDAO->load($settingOperationID);
    $opertionhour = $allworkerhours->realTime;
    echo $opertionhour;
}
?>