include_once "ctrl.group.php"; if (isset($_GET['uid']) && isset($_GET['cdate']) && $_GET['uid'] != "" && $_GET['cdate'] != "") { $d = explode("-", $_GET['cdate']); $userid = $_GET['uid']; // ** get user information $user = getUserProfileById($userid, $db); $wtime = getGroupTime($userid, $db); // ** set current timezone according to user type setTimeZone($user[0]['user_eid']); // ** set intime and outtime for this user's group $WORKINTIME = $wtime[0]['group_intime']; $WORKOUTTIME = $wtime[0]['group_outtime']; $getCurrentMonth = getCurrentMonth($d, $userid, $db); $late = getLateCheckIn($userid, $WORKINTIME, $d, $db); $earlyleave = getEarlyCheckOut($userid, $WORKOUTTIME, $d, $db); $absent = getAbsent($userid, $d, $db); } ?> <html lang="en"> <head> <meta charset="utf-8"> <title>Kinntai system</title> <link href="<?php echo CSS; ?> /import.css" rel="stylesheet" type="text/css"/> <script src="<?php echo JS; ?> /jquery.min.js"></script> </head>
$userid = $_SESSION['sess_user_id']; $todaydate = explode("-", date("Y-n-j")); $show = true; include_once "mod.calendar.php"; include_once "mod.attendance.php"; include_once "ctrl.checklogin.php"; include_once "ctrl.calendar.php"; include_once "ctrl.attendance.php"; if (!$_SESSION['sess_user_id']) { header('Location: index.php'); } if (!isset($_POST['filter']) && $_POST['filter'] != "true" && $_POST["filter"] == "") { $getCurrentMonth = getCurrentMonth($todaydate, $userid, $db); $filter_late = getLateCheckIn($userid, $todaydate, $db); $filter_earlyleave = getEarlyCheckOut($userid, $todaydate, $db); $filter_absent = getAbsent($userid, $todaydate, $db); } $month = $_POST['month']; $year = $_POST['year']; //$yr['0']=$year; //$yr['1']=$month; $_SESSION['year'] = $year; $_SESSION['month'] = $month; //echo $_SESSION['year']; ?> <html lang="en"> <head> <meta charset="utf-8"> <title>Kinntai system</title> <link href="<?php echo CSS;
$my[2] = trim($todaydate[2]); // only allow to view history $show = true; if ($my[0] > $todaydate[0]) { $show = false; } else { if ($my[0] == $todaydate[0]) { if ($my[1] > $todaydate[1]) { $show = false; } } } $getCurrentMonth = getCurrentMonth($my, $userid, $db); $filter_late = getLateCheckIn($userid, $WORKINTIME, $my, $db); $filter_earlyleave = getEarlyCheckOut($userid, $WORKOUTTIME, $my, $db); $filter_absent = getAbsent($userid, $my, $db); } if (isset($_POST['filterAdmin']) && $_POST['filterAdmin'] == "true" && $_POST["filterAdmin"] != "") { $todaydate = explode("-", date("Y-n-j")); $my[0] = trim($_POST['year']); $my[1] = trim($_POST['month']); $my[2] = $todaydate[2]; // only allow to view history $show = true; if ($my[0] > $todaydate[0]) { $show = false; } else { if ($my[0] == $todaydate[0]) { if ($my[1] > $todaydate[1]) { $show = false; }