function get_user_info($id, $batch)
{
    $id = (int) $id;
    $batch = (int) $batch;
    $user = get_user_by_id($id);
    $reviews_given = get_number_of_reviews_given($id);
    $reviews_received = get_number_of_reviews_received($id);
    $teammember_reviews = get_number_of_poll_team_members($id);
    $notteammember_reviews = get_number_of_poll_not_team_members($id);
    $teammanager_reviews = get_number_of_poll_team_manager($id);
    $notteammanager_reviews = get_number_of_poll_not_team_manager($id);
    $preferred_reviewers = get_number_of_preferred_reviewers($id);
    $preferred_reviewees = get_number_of_preferred_reviewees($id);
    $comments = get_comments($id);
    $questions = get_questions();
    echo get_text('Reviews_received') . ": <b>{$reviews_received}</b><br />" . get_text('Reviews_from_teammember') . ": <b>{$teammember_reviews}</b><br />" . get_text('Reviews_from_not_teammember') . ": <b>{$notteammember_reviews}</b><br />" . get_text('Reviews_from_preferred_reviewer') . ": <b>{$preferred_reviewers}</b><br />";
    //        get_text('Reviews_given_to_preferred_reviewee') . ": <b>$preferred_reviewees</b><br />";
    ?>
    <h3><?php 
    echo get_Text('Average_score');
    ?>
</h3>
    <h4><?php 
    echo get_text('Legend');
    ?>
</h4>
    <p>
        1: <?php 
    echo get_answer_name(1);
    ?>
<br/>
        2: <?php 
    echo get_answer_name(2);
    ?>
<br/>
        3: <?php 
    echo get_answer_name(3);
    ?>
<br/>
        4: <?php 
    echo get_answer_name(4);
    ?>
<br/>
        5: <?php 
    echo get_answer_name(5);
    ?>
    </p>
    <table class="questions">
        <?php 
    $number = 1;
    $categories = get_categories();
    foreach ($categories as $category) {
        ?>
        <thead>
        <tr style="margin-top: 25px;">
            <th><?php 
        echo $category['Name'];
        ?>
</th>
            <th><?php 
        echo get_text('Average_score');
        ?>
</th>
            <th><?php 
        echo get_text('Your_score');
        ?>
</th>
        </tr>
        </thead>
        <tbody>
        <?php 
        foreach ($questions as $question) {
            if ($category['ID'] == $question['Category']) {
                ?>
                <tr id="poll">
                    <td><?php 
                echo $number . '. ' . $question['Question'];
                ?>
</td>
                    <td style="text-align:center;"><?php 
                $avg_score = get_average_score_user($id, $question['ID']);
                if ($avg_score == false) {
                    $avg_score = get_answer_name(6);
                }
                echo $avg_score;
                ?>
                    </td>
                    <td style="text-align:center;">
                        <?php 
                $your_score = get_answer(get_poll_by_reviewer_reviewee_batch($id, $id, $batch), $question['ID']);
                if ($your_score == 6) {
                    $your_score = get_answer_name(6);
                }
                echo $your_score;
                ?>
                    </td>
                </tr>
                <?php 
                $number++;
            }
        }
        ?>
        <tr class="spacer"></tr>
        <?php 
    }
    ?>
        </tbody>
        <?php 
    ?>
    </table>
    <!--<tr>
				<th></th>
				<th><?php 
    echo get_text('Question');
    ?>
</th>
				<th><?php 
    echo get_text('Your_score') . '-' . get_text('Average_score');
    ?>
</th>
			</tr>
		<?php 
    foreach ($questions as $key => $question) {
        ?>
			<tr>
				<td>
					<?php 
        echo $key + 1;
        ?>
				</td>
				<td>
					<?php 
        echo $question['Question'];
        ?>
				</td>
				<td style="text-align:center;">
					<?php 
        echo get_answer_name(get_answer(get_poll_by_reviewer_reviewee_batch($id, $id, $batch), $question['ID']));
        echo " - " . get_average_score($id, $question['ID']);
        ?>

				</td>
			</tr>
			<?php 
    }
    ?>
	</table>-->
    <?php 
    if ($comments) {
        echo "<h3>" . get_text('Extra_comment') . ":</h3>";
        foreach ($comments as $comment) {
            ?>
            <div class="comment"><?php 
            echo $comment['Comment'];
            ?>
</div>
        <?php 
        }
    }
}
if (isset($_GET['id']) || isset($_SESSION['admin_id'])) {
    if (isset($_SESSION['user_id'])) {
        if ($_SESSION['user_id'] != $_GET['id']) {
            header('Location: user.php');
        }
    }
    $id = $_GET['id'];
    $batch = get_published_batch_id();
    $user = get_user_by_id($id);
    $reviews_given = get_number_of_reviews_given($id);
    $reviews_received = get_number_of_reviews_received($id);
    $teammember_reviews = get_number_of_poll_team_members($id);
    $notteammember_reviews = get_number_of_poll_not_team_members($id);
    $teammanager_reviews = get_number_of_poll_team_manager($id);
    $notteammanager_reviews = get_number_of_poll_not_team_manager($id);
    $preferred_reviewers = get_number_of_preferred_reviewers($id);
    $preferred_reviewees = get_number_of_preferred_reviewees($id);
    $comments = get_comments($id);
    $questions = get_questions();
    $pdf = new PDF();
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFont('Arial', 'B', 18);
    $pdf->Cell(10, 10, $user[0] . ' ' . $user[1], 0, 0);
    $pdf->Ln(15);
    $pdf->SetFont('Arial', '', 12);
    //    $pdf->Cell(10, 10, get_text('Reviews_written') . ": $reviews_given", 0, 0);
    //    $pdf->Ln(5);
    $pdf->Cell(10, 10, get_text('Reviews_received') . ": {$reviews_received}", 0, 0);
    $pdf->Ln(5);
    $pdf->Cell(10, 10, get_text('Reviews_from_teammember') . ": {$teammember_reviews}", 0, 0);