$del_checkbox = $delete_permission ? '<input type="checkbox">' : '';
$table = array();
$table['head'] = array($del_checkbox, 'Name', 'Description');
$table['body'] = isset($body) ? $body : array();
$table['td_attr'] = isset($td_attr) ? $td_attr : array();
$table['th_attr'] = array('class="check-column"');
$table['table_attr'] = array('class' => 'widefat');
$table['tab'] = $tab;
$table['subtab'] = $subtab;
$table['table'] = 'hrm_language';
$table['action'] = 'hrm_delete';
$table['table_attr'] = array('class' => 'widefat');
echo Hrm_Settings::getInstance()->table($table);
//table
//pagination
echo Hrm_Settings::getInstance()->pagination($total, $limit, $pagenum);
$file_path = urlencode(__FILE__);
$url = hrm_Settings::getInstance()->get_current_page_url($page, $tab, $subtab);
?>
<script type="text/javascript">
jQuery(function($) {
    hrm_dataAttr = {
       add_form_generator_action : 'add_form',
       add_form_apppend_wrap : 'hrm-language',
       redirect : '<?php 
echo $url;
?>
',
       class_name : 'Hrm_Admin',
       function_name : 'language',
       page: '<?php 
<?php

$pagenum = hrm_pagenum();
$limit = '20000';
if (isset($_POST['type']) && $_POST['type'] == '_search') {
    $post = $_POST;
    $results = Hrm_Settings::getInstance()->search_query($post, $limit, $pagenum);
    $search_satus = true;
} else {
    $results = Hrm_Settings::getInstance()->hrm_query('hrm_notice', $limit, $pagenum);
    $search_satus = false;
}
$total = $results['total_row'];
unset($results['total_row']);
//search form
$search['title'] = array('label' => __('Title', 'hrm'), 'type' => 'text', 'desc' => 'please insert title');
$search['type'] = array('type' => 'hidden', 'value' => '_search');
$search['action'] = 'hrm_search';
$search['table_option'] = 'hrm_notice';
echo hrm_Settings::getInstance()->get_serarch_form($search, 'Notice');
foreach ($results as $key => $value) {
    if (!isset($value->title) && empty($value->title)) {
        continue;
    }
    ?>
	<div id="hrm-visible-form-warp">
		<div class="hrm-search-head">
			<h2 id="hrm-searchLocationHeading"><?php 
    echo 'Notice ' . $value->title;
    ?>
</h2>
    $body[] = array($name_id, $display_name);
}
$table['head'] = array('User Role', 'Display Name');
$table['body'] = isset($body) ? $body : array();
$table['td_attr'] = isset($td_attr) ? $td_attr : '';
$table['th_attr'] = array('class="check-column"');
$table['table_attr'] = array('class' => 'widefat');
$table['action'] = 'role_delete';
$table['table_attr'] = array('class' => 'widefat');
$table['tab'] = $tab;
$table['subtab'] = $subtab;
$table['add_button'] = false;
$table['delete_button'] = false;
echo Hrm_Settings::getInstance()->table($table);
$file_path = urlencode(__FILE__);
$url = Hrm_Settings::getInstance()->get_current_page_url($page, $tab, $subtab);
?>
<script type="text/javascript">
    jQuery(function($) {
        hrm_dataAttr = {
           add_form_generator_action : 'add_form',
           add_form_apppend_wrap : 'hrm-admin-role',
           class_name : 'Hrm_Time',
           redirect : '<?php 
echo $url;
?>
',
           function_name : 'role_permission',
           tab: '<?php 
echo $tab;
?>
    $td_attr[] = array('class="check-column"');
}
$table = array();
$table['head'] = array('<input type="checkbox">', 'Leave Type', 'Employee Name', 'Start Date', 'End Date', 'Leave Status', 'Comments', 'Total Leave(day)', 'Leave Take(day)', 'Leave Remain(day)');
$table['body'] = isset($body) ? $body : array();
$table['td_attr'] = isset($td_attr) ? $td_attr : array();
$table['th_attr'] = array('class="check-column"');
$table['table_attr'] = array('class' => 'widefat');
$table['table'] = 'hrm_leave';
$table['action'] = 'hrm_delete';
$table['tab'] = $tab;
$table['subtab'] = $subtab;
echo Hrm_Settings::getInstance()->table($table);
//table
$leave_cat = isset($leave_cat) && is_array($leave_cat) ? $leave_cat : array();
$url = Hrm_Settings::getInstance()->get_current_page_url($page, $tab, $subtab) . '&employee_id=' . $employer_id;
$file_path = urlencode(__FILE__);
?>
<script type="text/javascript">
jQuery(function($) {
    hrm_dataAttr = {
       add_form_generator_action : 'add_form',
       add_form_apppend_wrap : 'hrm_Leave_list',
       class_name : 'Hrm_Leave',
       redirect : '<?php 
echo $url;
?>
',
       function_name : 'assign',
       user_id: '<?php 
echo $employer_id;
<?php

$header_path = dirname(__FILE__) . '/header.php';
$header_path = apply_filters('hrm_header_path', $header_path, 'admin');
if (file_exists($header_path)) {
    require_once $header_path;
}
?>
<!-- default $this for class hrm_Admin, $tab; -->
<div class="hrm-time-attendance" id="hrm-subtab-wrap">
    <?php 
Hrm_Settings::getInstance()->show_sub_tab_page($page, $tab, $subtab);
?>
</div>
 function admin_page_handler()
 {
     if (!is_user_logged_in()) {
         sprintf('Please <a href="%s">login</a>', wp_login_url());
         return;
     }
     $current_user_id = get_current_user_id();
     $user_status = get_user_meta($current_user_id, '_status', true);
     if ($user_status == 'no') {
         _e('<div class="hrm wrap"><h1>This account temporary disabled!</h1></div>', 'hrm');
         return;
     }
     $menu = hrm_page();
     $query_args = hrm_get_query_args();
     $page = $query_args['page'];
     $tab = $query_args['tab'];
     $subtab = $query_args['subtab'];
     if ($page == 'hrm_author') {
         require_once dirname(__FILE__) . '/templates/author/header.php';
         return;
     }
     echo '<div class="hrm wrap" id="hrm">';
     Hrm_Settings::getInstance()->show_tab_page($page, $tab, $subtab);
     echo '</div>';
 }
<div class="hrm-update-notification"></div>

<div id="hrm-leave-type"></div>

<?php 
$pagenum = hrm_pagenum();
$limit = hrm_result_limit();
if (isset($_POST['type']) && $_POST['type'] == '_search') {
    $post = $_POST;
    $search_satus = true;
    $results = Hrm_Settings::getInstance()->search_query($post, $limit, $pagenum);
} else {
    $results = Hrm_Settings::getInstance()->hrm_query('hrm_leave_type', $limit, $pagenum);
    $search_satus = false;
}
$total = $results['total_row'];
unset($results['total_row']);
$add_permission = hrm_user_can_access($tab, $subtab, 'add') ? true : false;
$delete_permission = hrm_user_can_access($tab, $subtab, 'delete') ? true : false;
foreach ($results as $key => $value) {
    if ($add_permission) {
        $name_id = '<a href="#" class="hrm-editable" data-table_option="hrm_leave_type" data-id=' . $value->id . '>' . $value->leave_type_name . '<a>';
    } else {
        $name_id = $value->leave_type_name;
    }
    if ($delete_permission) {
        $del_checkbox = '<input name="hrm_check[' . $value->id . ']" value="" type="checkbox">';
    } else {
        $del_checkbox = '';
    }
    $body[] = array($del_checkbox, $name_id);
    function user_task_content($project_id, $user_id)
    {
        $outstanding_tasks = $this->get_outstnding_task($project_id, $user_id, 'outstanding_task');
        $completed_tasks = $this->get_outstnding_task($project_id, $user_id, 'completed_task');
        $running_tasks = $this->get_outstnding_task($project_id, $user_id);
        $all_task_id = array();
        $slider_value = array();
        $running_task_total = 0;
        $outstanding_task_total = 0;
        $completed_task_total = 0;
        ob_start();
        ?>
        <form id="hrm-task-rating-form" action="" method="post">
        <input type="hidden" id="hrm-user-id" name="user_id" value="<?php 
        echo $user_id;
        ?>
">
        <input type="hidden" id="hrm-project-id" name="project_id" value="<?php 
        echo $project_id;
        ?>
">
        <input type="hidden" name="action" value="task_rating">
        <?php 
        wp_nonce_field('hrm_nonce', '_wpnonce');
        ?>
        <div class="hrm-visible-form-warp">
            <div class="hrm-search-head">
                <h2 id="hrm-searchLocationHeading"><?php 
        _e('Current Task', 'hrm');
        ?>
</h2>
            </div>
            <div class="hrm-inside-padding-wrap">

                <?php 
        if (!count($running_tasks)) {
            _e('No task found!', 'hrm');
        }
        foreach ($running_tasks as $project_id => $running_task) {
            echo '<h3>' . __('Project Title', 'hrm') . ' &#8594; ' . $running_task['p_title'] . '</h3>';
            unset($running_task['p_title']);
            $running_task_total = count($running_task);
            foreach ($running_task as $key => $task) {
                $task_id = $task['tID'];
                $all_task_id[] = $task_id;
                $rating_value = get_post_meta($task_id, '_rating_value', true);
                $slider_value[] = array('id' => $task['tID'], 'value' => !empty($rating_value) ? $rating_value : 0);
                $slider = array('class' => 'hrm-slider-field hrm-task-rating', 'value' => !empty($rating_value) ? $rating_value : '');
                ?>
                            <ul>
                                <li>

                                    <div class="hrm-task-wrap">
                                        <strong><?php 
                echo $task['t_t'];
                ?>
</strong>
                                        <div class="hrm-slider-field hrm-task-rating">
                                            <strong><?php 
                _e('Rating ', 'hrm');
                ?>
</strong><span class="hrm-task-rating-value"><?php 
                echo intval($rating_value);
                ?>
</span>
                                        </div>
                                        <?php 
                echo Hrm_Settings::getInstance()->hidden_field('task_rating[' . $task_id . ']', $slider);
                ?>
                                        <div class="hrm-slider-width" id="hrm-rating-slider-<?php 
                echo $task_id;
                ?>
"></div>
                                    </div>

                                </li>
                            </ul>
                        <?php 
            }
        }
        ?>
            </div>
        </div>

        <div class="hrm-visible-form-warp">
            <div class="hrm-search-head">
                <h2 id="hrm-searchLocationHeading"><?php 
        _e('Outstanding Task', 'hrm');
        ?>
</h2>
            </div>
            <div class="hrm-inside-padding-wrap">
                <?php 
        if (!count($outstanding_tasks)) {
            _e('No task found!', 'hrm');
        }
        foreach ($outstanding_tasks as $project_id => $running_task) {
            echo '<h3>' . __('Project Title', 'hrm') . ' &#8594; ' . $running_task['p_title'] . '</h3>';
            unset($running_task['p_title']);
            $outstanding_task_total = count($running_task);
            foreach ($running_task as $key => $task) {
                $task_id = $task['tID'];
                $all_task_id[] = $task_id;
                $rating_value = get_post_meta($task_id, '_rating_value', true);
                $slider_value[] = array('id' => $task['tID'], 'value' => $rating_value ? intval($rating_value) : 0);
                $slider = array('class' => 'hrm-slider-field hrm-task-rating', 'value' => $rating_value ? intval($rating_value) : '');
                ?>
                        <ul>
                            <li>
                                <div class="hrm-task-wrap">
                                    <strong><?php 
                echo $task['t_t'];
                ?>
</strong>
                                    <div class="hrm-slider-field hrm-task-rating">
                                        <strong><?php 
                _e('Rating ', 'hrm');
                ?>
</strong><span class="hrm-task-rating-value"><?php 
                echo intval($rating_value);
                ?>
</span>
                                    </div>
                                    <?php 
                echo Hrm_Settings::getInstance()->hidden_field('task_rating[' . $task_id . ']', $slider);
                ?>
                                    <div class="hrm-slider-width" id="hrm-rating-slider-<?php 
                echo $task['tID'];
                ?>
"></div>
                                </div>
                            </li>
                        </ul>
                    <?php 
            }
        }
        ?>
            </div>
        </div>

        <div class="hrm-visible-form-warp">
            <div class="hrm-search-head">
                <h2 id="hrm-searchLocationHeading"><?php 
        _e('Complete Task', 'hrm');
        ?>
</h2>
            </div>
            <div class="hrm-inside-padding-wrap">
                <?php 
        if (!count($completed_tasks)) {
            _e('No task found!', 'hrm');
        }
        foreach ($completed_tasks as $project_id => $running_task) {
            echo '<h3>' . __('Project Title', 'hrm') . ' &#8594; ' . $running_task['p_title'] . '</h3>';
            unset($running_task['p_title']);
            $completed_task_total = count($running_task);
            foreach ($running_task as $key => $task) {
                $task_id = $task['tID'];
                $all_task_id[] = $task_id;
                $rating_value = get_post_meta($task_id, '_rating_value', true);
                $rating_post_id = isset($rating->ID) ? $rating->ID : 0;
                $slider_value[] = array('id' => $task['tID'], 'value' => $rating_value ? intval($rating_value) : 0);
                $slider = array('class' => 'hrm-slider-field hrm-task-rating', 'value' => $rating_value ? intval($rating_value) : '');
                ?>
                        <ul>
                            <li>
                                <div class="hrm-task-wrap">
                                    <strong><?php 
                echo $task['t_t'];
                ?>
</strong>
                                    <div class="hrm-slider-field hrm-task-rating">
                                        <strong><?php 
                _e('Rating ', 'hrm');
                ?>
</strong><span class="hrm-task-rating-value"><?php 
                echo intval($rating_value);
                ?>
</span>
                                    </div>
                                    <?php 
                echo Hrm_Settings::getInstance()->hidden_field('task_rating[' . $task_id . ']', $slider);
                ?>
                                    <div class="hrm-slider-width" id="hrm-rating-slider-<?php 
                echo $task['tID'];
                ?>
"></div>
                                </div>
                            </li>
                        </ul>
                    <?php 
            }
        }
        ?>
            </div>
        </div>
        <?php 
        $rating_date = isset($task_id) ? get_post_meta($task_id, '_rating_date', true) : '';
        $rating_date = !empty($rating_date) ? hrm_get_date2mysql($rating_date) : '';
        ?>
        <br>
        <input type="text" placeholder="<?php 
        _e('Date', 'hrm');
        ?>
" class="hrm-datepicker" name="task_rate_date" value="<?php 
        echo $rating_date;
        ?>
">
        <input type="submit" class="btn button-primary" value="<?php 
        _e('Rating', 'hrm');
        ?>
">

        </form>
        <?php 
        $total = $running_task_total + $outstanding_task_total + $completed_task_total;
        $max = $total ? 100 / $total : 0;
        return array('slider_value' => $slider_value, 'max' => $max, 'content' => ob_get_clean(), 'tasks_id' => $all_task_id);
    }
    }
    $body[] = array($del_checkbox, $name_id, '<a href="#">' . $user_info[$value->emp_id] . '</a>', hrm_get_date2mysql($value->start_time), hrm_get_date2mysql($value->end_time), hrm_Leave::getInstance()->leave_status($value->leave_status), $value->leave_comments, hrm_Leave::getInstance()->total_leave($value->start_time, $value->end_time, $work_in_week, $holiday_index), hrm_Leave::getInstance()->leave_take($value->start_time, $value->end_time, $work_in_week, $holiday_index), hrm_Leave::getInstance()->leave_remain($value->start_time, $value->end_time, $work_in_week, $holiday_index), $leave_action);
    $td_attr[] = array('class="check-column"');
}
$table = array();
$del_checkbox = $delete_permission ? '<input type="checkbox">' : '';
$table['head'] = array($del_checkbox, __('Leave Type', 'erhm'), __('Employee Name', 'erhm'), __('Start Date', 'erhm'), __('End Date', 'erhm'), __('Leave Status', 'erhm'), __('Comments', 'erhm'), __('Total Leave(day)', 'erhm'), __('Leave Take(day)', 'erhm'), __('Leave Remain(day)', 'erhm'), __('Action', 'hrm'));
$table['body'] = isset($body) ? $body : '';
$table['td_attr'] = isset($td_attr) ? $td_attr : '';
$table['th_attr'] = array('class="check-column"');
$table['table_attr'] = array('class' => 'widefat');
$table['table'] = 'hrm_leave';
$table['action'] = 'hrm_delete';
$table['tab'] = $tab;
$table['subtab'] = $subtab;
echo Hrm_Settings::getInstance()->table($table);
//table
echo hrm_Settings::getInstance()->pagination($total, $limit, $pagenum);
$url = hrm_Settings::getInstance()->get_current_page_url($page, $tab, $subtab);
$file_path = urlencode(__FILE__);
?>

<script type="text/javascript">
jQuery(function($) {
    hrm_dataAttr = {
       add_form_generator_action : 'add_form',
       add_form_apppend_wrap : 'hrm_Leave_list',
       class_name : 'hrm_Leave',
       function_name : 'assign',
       redirect : '<?php 
echo $url;
<?php 
if (!hrm_user_can_access($tab, $subtab, 'view')) {
    printf('<h1>%s</h1>', __('You do no have permission to access this page', 'cpm'));
    return;
}
?>

<?php 
$country = hrm_Settings::getInstance()->country_list();
//default $this for class hrm_Admin, $tab, $subtab;
$field_value = Hrm_Admin::getInstance()->get_general_info();
$field['organization_name'] = array('label' => __('Organization Name', 'hrm'), 'class' => 'required', 'type' => 'text', 'value' => isset($field_value['data']['organization_name']) ? $field_value['data']['organization_name'] : '', 'extra' => array('data-hrm_validation' => true, 'data-hrm_required' => true, 'data-hrm_required_error_msg' => __('This field is required', 'hrm')));
$field['tax_id'] = array('label' => __('Tax ID', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['tax_id']) ? $field_value['data']['tax_id'] : '');
$field['registration_number'] = array('label' => __('Registration Number', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['registration_number']) ? $field_value['data']['registration_number'] : '');
$field['phone'] = array('label' => __('Phone', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['phone']) ? $field_value['data']['phone'] : '');
$field['fax'] = array('label' => __('Fax', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['fax']) ? $field_value['data']['fax'] : '');
$field['email'] = array('label' => __('email', 'hrm'), 'type' => 'email', 'value' => isset($field_value['data']['email']) ? $field_value['data']['email'] : '');
$field['addres_street_1'] = array('label' => __('Address Street 1', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['addres_street_1']) ? $field_value['data']['addres_street_1'] : '');
$field['address_street_2'] = array('label' => __('Address Street 2', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['address_street_2']) ? $field_value['data']['address_street_2'] : '');
$field['city'] = array('label' => __('City', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['city']) ? $field_value['data']['city'] : '');
$field['state_province'] = array('label' => __('State/Province', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['state_province']) ? $field_value['data']['state_province'] : '');
$field['zip'] = array('label' => __('Zip/Postal Code', 'hrm'), 'type' => 'text', 'value' => isset($field_value['data']['zip']) ? $field_value['data']['zip'] : '');
$field['country'] = array('label' => __('Country', 'hrm'), 'type' => 'select', 'option' => $country, 'selected' => isset($field_value['data']['country']) ? $field_value['data']['country'] : '', 'desc' => 'Chose your country');
$field['note'] = array('label' => __('Note', 'hrm'), 'type' => 'textarea', 'value' => isset($field_value['data']['note']) ? $field_value['data']['note'] : '');
$field['header'] = 'General Information';
$field['action'] = 'single_form';
$field['table_option'] = 'hrm_general_info';
$field['tab'] = $tab;
$field['subtab'] = $subtab;
echo Hrm_Settings::getInstance()->visible_form_generator($field);
<div class="hrm-update-notification"></div>

<div id="hrm-leave-holiday"></div>

<?php 
$pagenum = hrm_pagenum();
$limit = hrm_result_limit();
if (isset($_POST['type']) && $_POST['type'] == '_search') {
    $post = $_POST;
    $search_satus = true;
    $results = Hrm_Settings::getInstance()->search_query($post, $limit, $pagenum);
} else {
    $results = Hrm_Settings::getInstance()->hrm_query('hrm_holiday', $limit, $pagenum);
    $search_satus = false;
}
$total = $results['total_row'];
unset($results['total_row']);
$add_permission = hrm_user_can_access($tab, $subtab, 'add') ? true : false;
$delete_permission = hrm_user_can_access($tab, $subtab, 'delete') ? true : false;
foreach ($results as $key => $value) {
    if ($add_permission) {
        $name_id = '<a href="#" class="hrm-editable" data-table_option="hrm_holiday" data-id=' . $value->id . '>' . $value->name . '<a>';
    } else {
        $name_id = $value->name;
    }
    if ($delete_permission) {
        $del_checkbox = '<input name="hrm_check[' . $value->id . ']" value="" type="checkbox">';
    } else {
        $del_checkbox = '';
    }
    $value->length = $value->length == 'full' ? 'Full Day' : 'Half Day';
<?php

$pagenum = hrm_pagenum();
$limit = '20000';
if (isset($_POST['type']) && $_POST['type'] == '_search') {
    $post = $_POST;
    $results = Hrm_Settings::getInstance()->search_query($post, $limit, $pagenum);
    $search_satus = true;
} else {
    $results = Hrm_Settings::getInstance()->hrm_query('hrm_location', $limit, $pagenum);
    $search_satus = false;
}
if (isset($results['total_row'])) {
    $total = $results['total_row'];
    unset($results['total_row']);
} else {
    $total = 0;
}
$field['name'] = array('label' => __('Location Name', 'hrm'), 'type' => 'text', 'desc' => 'please insert location name', 'value' => isset($_POST['name']) ? $_POST['name'] : '');
$field['city'] = array('label' => __('City Name', 'hrm'), 'type' => 'text', 'desc' => 'please insert city', 'value' => isset($_POST['city']) ? $_POST['city'] : '');
$field['phone'] = array('label' => __('Phone Number', 'hrm'), 'type' => 'text', 'desc' => 'please insert phone number', 'value' => isset($_POST['phone']) ? $_POST['phone'] : '');
$field['type'] = array('type' => 'hidden', 'value' => '_search');
$field['action'] = 'hrm_search';
$field['table_option'] = 'hrm_location_option';
echo hrm_Settings::getInstance()->get_serarch_form($field, 'Location');
foreach ($results as $key => $value) {
    if (!isset($value->name) && empty($value->name)) {
        continue;
    }
    ?>
	<div id="hrm-visible-form-warp">