コード例 #1
0
/**
 * Print the body of the plugin table
 *
 * @param $data_rows
 */
function print_tbody($data_rows)
{
    $get_sort_val = $_GET['sortVal'];
    $get_sort_order = $_GET['sort'];
    $sort_column = userprojectapi::get_sort_col($get_sort_val, $data_rows);
    $sort_order = userprojectapi::get_sort_order($get_sort_order);
    if ($data_rows != null) {
        array_multisort($sort_column, $sort_order, SORT_NATURAL | SORT_FLAG_CASE, $data_rows);
    }
    $stat_issue_count = array();
    for ($stat_index = 1; $stat_index <= userprojectapi::get_stat_count(); $stat_index++) {
        $stat_issue_count[$stat_index] = '';
    }
    $groups = array();
    $groups[0] = array();
    $groups[1] = array();
    $groups[2] = array();
    $groups[3] = array();
    $groups = userprojectapi::assign_groups($groups, $data_rows);
    $group_three_data_rows = userprojectapi::process_no_user_matchcodes($groups[3], $data_rows);
    echo '<tbody>' . PHP_EOL . '<form action="' . plugin_page('UserProject_Option') . '" method="post">' . PHP_EOL;
    /** GROUP 0 */
    $stat_issue_count = process_user_row_group($groups[0], $data_rows, $stat_issue_count, 0, true, 'headrow_user');
    /** GROUP 1 */
    $stat_issue_count = userprojectapi::process_general_group($groups[1], $data_rows, $stat_issue_count, 1, 'headrow_no_issue');
    /** GROUP 2 */
    $stat_issue_count = process_user_row_group($groups[2], $data_rows, $stat_issue_count, 2, false, 'headrow_del_user');
    /** GROUP 3 */
    $stat_issue_count = userprojectapi::process_general_group($groups[3], $group_three_data_rows, $stat_issue_count, 3, 'headrow_no_user');
    /** OPTION PANEL */
    print_option_panel($stat_issue_count);
    echo '</form>' . PHP_EOL . '</tbody>' . PHP_EOL;
}