Beispiel #1
0
 private function change_user_id($emp_id)
 {
     $returner = "";
     $checker = FALSE;
     $headman_level = 0;
     if ($emp_id !== "") {
         //check can see this profile is_your_headman or is_hr
         $user_detail = getEmployeeDetail($emp_id);
         list($checker, $headman_level) = is_your_headman($user_detail["UserID"], $this->user_id);
         if ($checker || is_hr()) {
             $this->emp_id = $emp_id;
             $this->user_id = $user_detail["UserID"];
             $returner = $emp_id;
         }
     }
     return $returner;
 }
Beispiel #2
0
}
?>
		<br>
		<br>
		สถานะใบลา : <?php 
echo $leave_detail['WFName'];
?>
		
		<?php 
if (is_your_headman($leave_detail['L_UserID'], $this->session->userdata('userid')) || is_hr()) {
    ?>
			<?php 
    if ((int) $leave_detail['L_WFID'] < 2) {
        ?>
				<?php 
        if (is_your_headman($leave_detail['L_UserID'], $this->session->userdata('userid'))) {
            ?>
					<div>
						<textarea name="txt_remark_approve_headman" id="txt_remark_approve_headman" cols="30" rows="10"></textarea>	
						<br>
						<a href="javascript:void(0);" onclick="approveThis('<?php 
            echo $leave_id;
            ?>
');">อนุมัติ</a>
						<a href="javascript:void(0);" onclick="disApproveThis('<?php 
            echo $leave_id;
            ?>
');">ไม่อนุมัติ</a>
						<script type="text/javascript">
							function approveThis(ID)
							{
Beispiel #3
0
 public function myShiftwork($id = "")
 {
     $empDetail = array();
     if ($id !== "") {
         $checker;
         $headman_level;
         list($checker, $headman_level) = is_your_headman($id, $this->user_id);
         if ($checker || is_hr()) {
             $empDetail = getEmployeeDetail($id);
         } else {
             redirect(site_url("Worktime"));
             exit;
         }
     } else {
         $id = $this->user_id;
     }
     $this->load->model("Shiftwork_model", "shiftwork");
     $query = $this->shiftwork->getDetailByUserId($id);
     $data = array();
     $data["dataDetail"] = $query->row_array();
     $data["dataList"] = $query->result_array();
     $data["empDetail"] = $empDetail;
     parent::setHeader("ตารางเวลาเข้าออกงาน", "User Profile");
     $this->load->view("Worktime_my_shiftwork.php", $data);
     parent::setFooter();
 }