<?php

require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'uvConst.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'databaseapi.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'userprojectapi.php';
$print = false;
if (isset($_POST['print'])) {
    $print = true;
}
$project_id = gpc_get_int('project_id', helper_get_current_project());
if ((ALL_PROJECTS == $project_id || project_exists($project_id)) && $project_id != helper_get_current_project()) {
    helper_set_current_project($project_id);
    print_header_redirect($_SERVER['REQUEST_URI'], true, false, true);
}
$matchcode = userprojectapi::calc_matchcodes();
$result = userprojectapi::process_match_codes($matchcode);
$data_rows = $result[0];
$matchcode_row_index = $result[1];
if (plugin_config_get('ShowZIU')) {
    $data_rows = userprojectapi::process_no_issue_users($data_rows, $matchcode_row_index, $project_id);
}
html_page_top1(plugin_lang_get('menu_title'));
?>
   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
   <script type="text/javascript" src="plugins/UserProjectView/javascript/table.js"></script>
   <link rel="stylesheet" href="plugins/UserProjectView/files/UserProjectView.css"/>
<?php 
if (!$print) {
    html_page_top2();
    # print whiteboard menu bar
    userprojectapi::htmlPluginTriggerWhiteboardMenu();