本文整理汇总了PHP中sapp_Global类的典型用法代码示例。如果您正苦于以下问题:PHP sapp_Global类的具体用法?PHP sapp_Global怎么用?PHP sapp_Global使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了sapp_Global类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getGrid
public function getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $exParam1 = '', $exParam2 = '', $exParam3 = '', $exParam4 = '')
{
$searchQuery = '';
$searchArray = array();
$data = array();
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
foreach ($searchValues as $key => $val) {
if ($key == 'department') {
$searchQuery .= " d.deptname like '%" . $val . "%' AND ";
} else {
if ($key == 'client_id') {
$searchQuery .= " c.client_name like '%" . $val . "%' AND ";
} else {
if ($key == 'start_date') {
$searchQuery .= " " . $key . " like '%" . sapp_Global::change_date($val, 'database') . "%' AND ";
} else {
if ($key == 'year_skill_last_used') {
} else {
$searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
}
}
}
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
$objName = 'empjobhistory';
$tableFields = array('action' => 'Action', 'department' => 'Department', 'client_id' => 'Client', 'start_date' => 'From', 'end_date' => 'To');
$tablecontent = $this->getEmpJobHistoryData($sort, $by, $pageNo, $perPage, $searchQuery, $exParam1);
$bool_arr = array('' => 'All', 1 => 'Yes', 2 => 'No');
$dataTmp = array('userid' => $exParam1, 'sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getEmployeeAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'add' => 'add', 'menuName' => 'Job history', 'formgrid' => 'true', 'unitId' => $exParam1, 'call' => $call, 'context' => $exParam2, 'search_filters' => array('active_company' => array('type' => 'select', 'filter_data' => $bool_arr), 'start_date' => array('type' => 'datepicker'), 'end_date' => array('type' => 'datepicker')));
return $dataTmp;
}
示例2: getGrid
public function getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $exParam1 = '', $exParam2 = '', $exParam3 = '', $exParam4 = '')
{
$searchQuery = '';
$tablecontent = '';
$searchArray = array();
$data = array();
$id = '';
$dataTmp = array();
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
foreach ($searchValues as $key => $val) {
if ($key == 'expected_date_join') {
$searchQuery .= " " . $key . " like '%" . sapp_Global::change_date($val, 'database') . "%' AND ";
} else {
$searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
/** search from grid - END **/
$objName = 'medicalclaims';
$tableFields = array('action' => 'Action', 'injury_type' => 'Medical Claim Type', 'leaveappliedbyemployee_days' => 'Approved Leaves', 'leavebyemployeer_days' => 'Employee Applied Leaves', 'expected_date_join' => 'Date of Joining');
$tablecontent = $this->getempmedicalclaimdetails($sort, $by, $pageNo, $perPage, $searchQuery, $exParam1);
$dataTmp = array('userid' => $exParam1, 'sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getEmployeeAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'add' => 'add', 'menuName' => 'Medical Claims', 'formgrid' => 'true', 'unitId' => $exParam1, 'call' => $call, 'context' => $exParam2, 'dashboardcall' => $dashboardcall, 'search_filters' => array('injury_type' => array('type' => 'select', 'filter_data' => array('' => 'All', 1 => 'Paternity', 2 => 'Maternity', 3 => 'Disability', 4 => 'Injury')), 'expected_date_join' => array('type' => 'datepicker')));
return $dataTmp;
}
示例3: getdata_emp_report
/**
* This function is used to get data in employees report.
* @param array $param_arr = array of parameters.
* @param integer $per_page = no.of records per page
* @param integer $page_no = page number
* @param string $sort_name = name of the column to be sort
* @param string $sort_type = descending or ascending
* @return array Array of all employees.
*/
public function getdata_emp_report($param_arr, $per_page, $page_no, $sort_name, $sort_type)
{
$search_str = " e.isactive != 5 ";
foreach ($param_arr as $key => $value) {
if ($value != '') {
if ($key == 'date_of_joining') {
$search_str .= " and " . $key . " = '" . sapp_Global::change_date($value, 'database') . "'";
}
if ($key == 'businessunit_id' || $key === 'department_id') {
if (is_array($value)) {
$search_str .= " and " . $key . " in (" . implode(',', $value) . ")";
}
} else {
$search_str .= " and " . $key . " = '" . $value . "'";
}
}
}
$offset = $per_page * $page_no - $per_page;
$db = Zend_Db_Table::getDefaultAdapter();
$limit_str = " limit " . $per_page . " offset " . $offset;
$count_query = "select count(*) cnt from main_employees_summary e where " . $search_str;
$count_result = $db->query($count_query);
$count_row = $count_result->fetch();
$count = $count_row['cnt'];
$page_cnt = ceil($count / $per_page);
$query = "select e.*,es.salary,p.freqtype,c.currencyname " . " from main_employees_summary e left join main_empsalarydetails es on es.user_id = e.user_id " . " left join main_currency c on c.id = es.currencyid " . " left join main_payfrequency p on p.id = es.salarytype " . "where " . $search_str . " " . "order by " . $sort_name . " " . $sort_type . " " . $limit_str;
$result = $db->query($query);
$rows = $result->fetchAll();
return array('rows' => $rows, 'page_cnt' => $page_cnt);
}
示例4: getGrid
public function getGrid($sort, $by, $pageNo, $perPage, $searchData, $call, $dashboardcall, $exParam1 = '', $exParam2 = '', $exParam3 = '', $exParam4 = '')
{
$searchQuery = '';
$tablecontent = '';
$searchArray = array();
$data = array();
$id = '';
$dataTmp = array();
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
foreach ($searchValues as $key => $val) {
if ($key == 'from_date' || $key == 'to_date') {
$searchQuery .= " " . $key . " like '%" . sapp_Global::change_date($val, 'database') . "%' AND ";
} else {
$searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
/** search from grid - END * */
$objName = 'experiencedetails';
$tableFields = array('action' => 'Action', 'comp_name' => 'Company Name', 'designation' => 'Designation', 'from_date' => 'From', 'to_date' => 'To');
$tablecontent = $this->getexperiencedetailsData($sort, $by, $pageNo, $perPage, $searchQuery, $exParam1);
$dataTmp = array('userid' => $exParam1, 'sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getEmployeeAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'dashboardcall' => $dashboardcall, 'add' => 'add', 'menuName' => 'Experience', 'formgrid' => 'true', 'unitId' => $exParam1, 'call' => $call, 'context' => $exParam2, 'search_filters' => array('from_date' => array('type' => 'datepicker'), 'to_date' => array('type' => 'datepicker')));
return $dataTmp;
}
示例5: getGrid
public function getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $statusid, $a1, $a2, $a3)
{
$searchQuery = '';
$searchArray = array();
$data = array();
$requi_model = new Default_Model_Requisition();
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserGroup = $auth->getStorage()->read()->group_id;
}
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
if (count($searchValues) > 0) {
foreach ($searchValues as $key => $val) {
if ($key == 'onboard_date' || $key == 'r.createdon') {
$searchQuery .= " date(" . $key . ") = '" . sapp_Global::change_date($val, 'database') . "' AND ";
} else {
$searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
}
$objName = 'rejectedrequisitions';
$tableFields = array('action' => 'Action', 'requisition_code' => 'Requisition Code', 'jobtitle_name' => 'Job Title', 'createdby_name' => 'Raised By', 'reporting_manager_name' => 'Reporting Manager', 'req_no_positions' => 'No. of Positions', 'filled_positions' => 'Filled Positions', 'r.createdon' => 'Raised On', 'onboard_date' => 'Due Date');
$tablecontent = $requi_model->getRequisitionData($sort, $by, $pageNo, $perPage, $searchQuery, $loginUserId, $loginuserGroup, 3);
$dataTmp = array('sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getAjaxgridData', 'jsFillFnName' => '', 'add' => 'add', 'searchArray' => $searchArray, 'menuName' => 'Rejected Requisitions', 'call' => $call, 'dashboardcall' => $dashboardcall, 'search_filters' => array('r.createdon' => array('type' => 'datepicker'), 'onboard_date' => array('type' => 'datepicker')));
return $dataTmp;
}
示例6: get_sd_report
public function get_sd_report($param_arr, $per_page, $page_no, $sort_name, $sort_type)
{
$search_str = "isactive = 1 ";
foreach ($param_arr as $key => $value) {
if ($value != '') {
if ($key == 'raised_date') {
$search_str .= " and DATE(createddate) = '" . sapp_Global::change_date($value, 'database') . "'";
} else {
$search_str .= " and " . $key . " = '" . $value . "'";
}
}
}
$offset = $per_page * $page_no - $per_page;
$db = Zend_Db_Table::getDefaultAdapter();
$limit_str = " limit " . $per_page . " offset " . $offset;
$count_query = "select count(*) cnt from main_sd_requests_summary where " . $search_str;
$count_result = $db->query($count_query);
$count_row = $count_result->fetch();
$count = $count_row['cnt'];
$page_cnt = ceil($count / $per_page);
$query = "select *,DATE_FORMAT(createddate,'" . DATEFORMAT_MYSQL . "') as createddate from main_sd_requests_summary where " . $search_str . " order by " . $sort_name . " " . $sort_type . " " . $limit_str;
$result = $db->query($query);
$rows = $result->fetchAll();
return array('rows' => $rows, 'page_cnt' => $page_cnt);
}
示例7: getdata_emp_report
/**
* This function is used to get data in employees report.
* @param array $param_arr = array of parameters.
* @param integer $per_page = no.of records per page
* @param integer $page_no = page number
* @param string $sort_name = name of the column to be sort
* @param string $sort_type = descending or ascending
* @return array Array of all employees.
*/
public function getdata_emp_report($param_arr, $per_page, $page_no, $sort_name, $sort_type)
{
$search_str = "isactive != 5 ";
foreach ($param_arr as $key => $value) {
if ($value != '') {
if ($key == 'date_of_joining') {
$search_str .= " and " . $key . " = '" . sapp_Global::change_date($value, 'database') . "'";
} else {
$search_str .= " and " . $key . " = '" . $value . "'";
}
}
}
$offset = $per_page * $page_no - $per_page;
$db = Zend_Db_Table::getDefaultAdapter();
$limit_str = " limit " . $per_page . " offset " . $offset;
$count_query = "select count(*) cnt from main_employees_summary where " . $search_str;
$count_result = $db->query($count_query);
$count_row = $count_result->fetch();
$count = $count_row['cnt'];
$page_cnt = ceil($count / $per_page);
$query = "select * from main_employees_summary where " . $search_str . " order by " . $sort_name . " " . $sort_type . " " . $limit_str;
$result = $db->query($query);
$rows = $result->fetchAll();
return array('rows' => $rows, 'page_cnt' => $page_cnt);
}
示例8: getGrid
public function getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $exParam1 = '', $exParam2 = '', $exParam3 = '', $exParam4 = '')
{
$searchQuery = '';
$tablecontent = '';
$level_opt = array();
$searchArray = array();
$data = array();
$id = '';
$dataTmp = array();
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
foreach ($searchValues as $key => $val) {
if ($key == 'from_date' || $key == 'to_date') {
$searchQuery .= " " . $key . " like '%" . sapp_Global::change_date($val, 'database') . "%' AND ";
} else {
$searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
/** search from grid - END * */
$objName = 'educationdetails';
$tableFields = array('action' => 'Action', 'educationlevel' => 'Education Level', 'institution_name' => 'Institution Name', 'course' => 'Course', 'from_date' => 'From', "to_date" => "To", "percentage" => "Percentage");
$tablecontent = $this->geteducationdetails($sort, $by, $pageNo, $perPage, $searchQuery, $exParam1);
$educationlevelcodemodel = new Default_Model_Educationlevelcode();
$educationlevelArr = $educationlevelcodemodel->getEducationlevelData();
if (!empty($educationlevelArr)) {
foreach ($educationlevelArr as $educationlevelres) {
$level_opt[$educationlevelres['id']] = $educationlevelres['educationlevelcode'];
}
}
$dataTmp = array('userid' => $exParam1, 'sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getEmployeeAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'dashboardcall' => $dashboardcall, 'add' => 'add', 'menuName' => 'Education', 'formgrid' => 'true', 'unitId' => $exParam1, 'call' => $call, 'context' => $exParam2, 'search_filters' => array('from_date' => array('type' => 'datepicker'), 'to_date' => array('type' => 'datepicker'), 'educationlevel' => array('type' => 'select', 'filter_data' => array('' => 'All') + $level_opt)));
return $dataTmp;
}
示例9: getGrid
public function getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $exParam1 = '', $exParam2 = '', $exParam3 = '', $exParam4 = '')
{
$searchQuery = '';
$tablecontent = '';
$searchArray = array();
$data = array();
$dataTmp = array();
/** search from grid - START **/
if ($searchData != '' && $searchData != 'undefined') {
$searchValues = json_decode($searchData);
foreach ($searchValues as $key => $val) {
if ($key == 'visa_expiry_date') {
$searchQuery .= " " . $key . " like '%" . sapp_Global::change_date($val, 'database') . "%' AND ";
} else {
$searchQuery .= " " . $key . " like '%" . $val . "%' AND ";
}
$searchArray[$key] = $val;
}
$searchQuery = rtrim($searchQuery, " AND");
}
/** search from grid - END **/
$objName = 'visaandimmigrationdetails';
$tableFields = array('action' => 'Action', 'passport_number' => 'Passport Number', 'passport_expiry_date' => 'Passport Expiry Date', 'visa_number' => 'Visa Number', 'visa_expiry_date' => 'Visa Expiry Date', 'inine_status' => 'Inine Status', 'ininetyfour_status' => 'Ininetyfour Status');
$tablecontent = $this->getEmpVisaDetails($sort, $by, $pageNo, $perPage, $searchQuery, $exParam1);
$dataTmp = array('userid' => $exParam1, 'sort' => $sort, 'by' => $by, 'pageNo' => $pageNo, 'perPage' => $perPage, 'tablecontent' => $tablecontent, 'objectname' => $objName, 'extra' => array(), 'tableheader' => $tableFields, 'jsGridFnName' => 'getEmployeeAjaxgridData', 'jsFillFnName' => '', 'searchArray' => $searchArray, 'add' => 'add', 'menuName' => 'Visa and Immigration', 'formgrid' => 'true', 'unitId' => $exParam1, 'dashboardcall' => $dashboardcall, 'call' => $call, 'context' => $exParam2, 'search_filters' => array('passport_expiry_date' => array('type' => 'datepicker'), 'visa_expiry_date' => array('type' => 'datepicker')));
return $dataTmp;
}
示例10: login
/**
* Check if a username is a Ldap user
*
* @param string $username
* @return boolean
*/
public function login($postarray)
{
if (isset($postarray['employeeid']) && $postarray['employeeid'] != '' && isset($postarray['password']) && $postarray['password'] != '') {
$result = array();
$employeeid = $postarray['employeeid'];
$password = md5($postarray['password']);
$check = $this->isActiveUser($employeeid, $password);
if (!empty($check) && $check[0]['count'] == 1) {
$result = $this->getUserObject($employeeid, $password);
//$uploadpath = array('imagepath' => USER_UPLOAD_PATH.'/'.$result[0]['profileimg']);
$uploadpath = array('imagepath' => sapp_Global::_getHostBaseURL() . "public/uploads/profile/" . $result[0]['profileimg']);
$resultarray = array_merge($result[0], $uploadpath);
$data = array('status' => '1', 'message' => 'Success', 'result' => $resultarray);
} else {
$userStatusArr = $this->getActiveStatus($employeeid, $password);
if (!empty($userStatusArr)) {
$userStatus = $userStatusArr[0]['status'];
$islockaccount = $userStatusArr[0]['isaccountlock'];
if ($userStatus == 0) {
$data = array('status' => '0', 'message' => 'Login failed. Employee has been inactivated from the organization.', 'result' => '');
} else {
if ($userStatus == 2) {
$data = array('status' => '0', 'message' => 'Login failed. Employee has resigned from the organization.', 'result' => '');
} else {
if ($userStatus == 3) {
$data = array('status' => '0', 'message' => 'Login failed. Employee has left the organization.', 'result' => '');
} else {
if ($userStatus == 4) {
$data = array('status' => '0', 'message' => 'Login failed. Employee has been suspended from the organization.', 'result' => '');
} else {
if ($userStatus == 5) {
$data = array('message' => 'Login failed. Employee deleted.', 'result' => '');
} else {
if ($islockaccount == 1) {
$data = array('status' => '0', 'message' => 'Login failed. Employee has been locked.', 'result' => '');
}
}
}
}
}
}
} else {
$data = array('status' => '0', 'message' => 'Invalid credentials given', 'result' => '');
}
}
} else {
if ($postarray['employeeid'] == '') {
$data = array('status' => '0', 'message' => 'Employee Id cannot be empty.', 'result' => $result);
} else {
if ($postarray['password'] == '') {
$data = array('status' => '0', 'message' => 'Password cannot be empty.', 'result' => $result);
}
}
}
//echo "<pre>";print_r($data);exit;
return $data;
}
示例11: displayData
public function displayData($emp_data, $column_key)
{
if ($column_key == 'created_on') {
echo isset($emp_data['created_on']) ? sapp_Global::change_date($emp_data['created_on'], "view") : "";
} elseif ($column_key == 'onboard_date') {
echo isset($emp_data['onboard_date']) ? sapp_Global::change_date($emp_data['onboard_date'], "view") : "";
} else {
echo isset($emp_data[$column_key]) && !empty($emp_data[$column_key]) ? $emp_data[$column_key] : "--";
}
}
示例12: indexAction
public function indexAction()
{
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
$loginuserRole = $auth->getStorage()->read()->emprole;
$loginuserGroup = $auth->getStorage()->read()->group_id;
}
$addpermission = 'No';
$editpermission = 'No';
$structureModel = new Default_Model_Structure();
$orgData = $structureModel->getOrgData();
$heirarchyModel = new Default_Model_Heirarchy();
$levelsdata = $heirarchyModel->getlevelsusernames();
$baseUrl = $this->getBaseurl();
$emps = $heirarchyModel->getAllEmployees();
$vEmps = $heirarchyModel->getVAllEmployees();
$output = '';
$empData = array();
if (count($emps) > 0) {
foreach ($emps as $empRecord) {
$empData[] = array('id' => $empRecord['id'], 'name' => ucwords($empRecord['name']), 'profileimg' => $empRecord['profileimg']);
}
}
$editpermission = sapp_Global::_checkprivileges(HEIRARCHY, $loginuserGroup, $loginuserRole, 'edit');
$addpermission = sapp_Global::_checkprivileges(HEIRARCHY, $loginuserGroup, $loginuserRole, 'add');
$dataArr = array();
$tmplevelsdata = $levelsdata;
$parentArr = array();
for ($i = 0; $i < sizeof($levelsdata); $i++) {
$parentArr[] = $levelsdata[$i]['parent'];
}
$parentArr = array_unique($parentArr);
$parr = array();
foreach ($parentArr as $parent) {
foreach ($tmplevelsdata as $data) {
if ($data['parent'] == $parent) {
$parr[$parent][] = array('userid' => $data['userid'], 'userfullname' => $data['userfullname'], 'profileimg' => $data['profileimg'], 'level_number' => $data['level_number'], 'parent' => $data['parent'], 'jobtitlename' => $data['jobtitlename']);
}
}
}
if (!empty($parr)) {
$output = "<ul id='org' style='display:none;'>";
$output .= "<li>\r\n\t\t\t\t\t\t<i></i>\t\r\n\t\t\t\t\t\t<p class='tags-ctrl'>\t\t\t\t\t\t \r\n\t\t\t\t\t\t <img class='main-img' border='0' src='" . $baseUrl . "/public/uploads/profile/" . $parr[key($parr)][0]['profileimg'] . "' onerror='this.src=\"" . $baseUrl . "/public/media/images/hierarchy-deafult-pic.jpg\"' />\r\n\t\t\t\t\t\t <span class='main-name' title='" . ucwords($parr[key($parr)][0]['userfullname']) . "' id='" . $parr[key($parr)][0]['userid'] . "'>" . $parr[key($parr)][0]['userfullname'] . "</span>\r\n\t\t\t\t\t\t <span class='main-name' title='" . ucwords($parr[key($parr)][0]['jobtitlename']) . "'>" . $parr[key($parr)][0]['jobtitlename'] . "</span>\r\n\t\t\t\t\t\t </p>";
$output .= $this->hasChildNoEdit($parr[key($parr)][0]['userid'], $parr);
$output .= " </li></ul>";
}
$this->view->output = $output;
$this->view->allEmpdata = $vEmps;
$this->view->empData = $empData;
$this->view->orgData = $orgData;
$this->view->editpermission = $editpermission;
$this->view->addpermission = $addpermission;
}
示例13: preDispatch
public function preDispatch()
{
$session = sapp_Global::_readSession();
if (!isset($session)) {
if ($this->getRequest()->isXmlHttpRequest()) {
echo Zend_Json::encode(array('login' => 'failed'));
die;
} else {
$this->_redirect('');
}
}
}
示例14: isValid
public function isValid($value)
{
$this->_setValue($value);
$today = date('Y-m-d');
$final_val = sapp_Global::change_date($value, 'database');
// expecting $value to be YYYY-MM-DD
if ($final_val <= $today) {
$this->_error(self::DATE_INVALID);
return false;
}
return true;
}
示例15: displayData
public function displayData($emp_data, $column_key)
{
$base_url = BASE_URL;
if ($column_key == 'created_on') {
echo isset($emp_data['created_on']) ? sapp_Global::change_date($emp_data['created_on'], "view") : "";
} elseif ($column_key == 'onboard_date') {
echo isset($emp_data['onboard_date']) ? sapp_Global::change_date($emp_data['onboard_date'], "view") : "";
} elseif ($column_key == 'Show_Report') {
echo "<a href='{$base_url}/reports/requisitionhistoryreportdetail/id/{$emp_data[req_id]}' target='_blank' >Show Report</a>";
} else {
echo isset($emp_data[$column_key]) && !empty($emp_data[$column_key]) ? $emp_data[$column_key] : "--";
}
}