Esempio n. 1
0
<?php

define('CLIENT_PATH', dirname(__FILE__));
include "include.common.php";
$modulePath = getSessionObject("modulePath");
if (!defined('MODULE_PATH')) {
    define('MODULE_PATH', $modulePath);
}
include "server.includes.inc.php";
if (empty($user)) {
    $ret['status'] = "ERROR";
    echo json_encode($ret);
    exit;
}
$_REQUEST['sm'] = fixJSON($_REQUEST['sm']);
$_REQUEST['cl'] = fixJSON($_REQUEST['cl']);
$_REQUEST['ft'] = fixJSON($_REQUEST['ft']);
$columns = json_decode($_REQUEST['cl'], true);
$columns[] = "id";
$table = $_REQUEST['t'];
$obj = new $table();
$sLimit = "";
if (isset($_REQUEST['iDisplayStart']) && $_REQUEST['iDisplayLength'] != '-1') {
    $sLimit = " LIMIT " . intval($_REQUEST['iDisplayStart']) . ", " . intval($_REQUEST['iDisplayLength']);
}
$isSubOrdinates = false;
if (isset($_REQUEST['type']) && ($_REQUEST['type'] = "sub")) {
    $isSubOrdinates = true;
}
$skipEmployeeRestriction = false;
if (isset($_REQUEST['skip']) && ($_REQUEST['type'] = "1")) {
Esempio n. 2
0
                header("Location:" . CLIENT_BASE_URL . "?g=admin&n=dashboard&m=admin_Admin");
            } else {
                header("Location:" . CLIENT_BASE_URL . "?g=modules&n=dashboard&m=module_Personal_Information");
            }
        } else {
            header("Location:" . CLIENT_BASE_URL . "login.php?f=1");
        }
    }
} else {
    if ($user->user_level == "Admin") {
        header("Location:" . CLIENT_BASE_URL . "?g=admin&n=dashboard&m=admin_Admin");
    } else {
        header("Location:" . CLIENT_BASE_URL . "?g=modules&n=dashboard&m=module_Personal_Information");
    }
}
$tuser = getSessionObject('user');
//check user
$logoFileName = CLIENT_BASE_PATH . "data/logo.png";
$logoFileUrl = CLIENT_BASE_URL . "data/logo.png";
if (!file_exists($logoFileName)) {
    $logoFileUrl = BASE_URL . "images/logo.png";
}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>IceHRM Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
Esempio n. 3
0
 public function getCurrentEmployeeId()
 {
     if (!function_exists('saveSessionObject')) {
         include APP_BASE_PATH . "include.common.php";
     }
     $adminEmpId = getSessionObject('admin_current_employee');
     if (empty($adminEmpId)) {
         $user = getSessionObject('user');
         return $user->employee;
     }
     return $adminEmpId;
 }