<div class="form pj-form">
	<p>
		<label class="title"><?php __('report_tickets_received'); ?></label>
		<span class="inline_block t5"><?php echo $tpl['tickets_received']?></span>
	</p>
	<p>
		<label class="title"><?php __('report_client_replies'); ?></label>
		<span class="inline_block t5"><?php echo $tpl['client_replies']?></span>
	</p>
	<p>
		<label class="title"><?php __('report_support_replies'); ?></label>
		<span class="inline_block t5"><?php echo $tpl['support_replies']?></span>
	</p>
	<p>
		<label class="title"><?php __('report_ratings_received'); ?></label>
		<span class="inline_block t5"><?php echo $tpl['ratings_received']?></span>
	</p>
	<p>
		<label class="title"><?php __('report_average_rating'); ?></label>
		<span class="inline_block t5"><?php echo $tpl['average_rating']?></span>
	</p>
	
	<p></p>
	
	<table class="pj-table" style="width: 100%; margin-bottom: 12px;" cellspacing="0" cellpadding="0">
		<thead>
			<tr>
				<th><?php __('report_name');?></th>
				<th><?php __('report_tickets');?></th>
				<th><?php __('report_replies');?></th>
				<th><?php __('report_ratings');?></th>
				<th><?php __('report_average_rating');?></th>
			</tr>
		</thead>
		<tbody>
			<?php
			foreach($tpl['user_arr'] as $k => $v)
			{
				?>
				<tr>
					<td><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminUsers&amp;action=pjActionUpdate&amp;id=<?php echo $v['id'];?>"><?php echo pjSanitize::html($v['name']);?></a></td>
					<td><?php echo (int) $v['tickets'];?></td>
					<td><?php echo (int) $v['replies'];?></td>
					<td><?php echo (int) $v['ratings'];?></td>
					<td><?php echo number_format( $v['avg_rating'], 2);?></td>
				</tr>
				<?php
			} 
			?>
		</tbody>
	</table>
	
	<p></p>
	
	<?php
	if(!empty($tpl['department_arr']))
	{ 
		?>
		<table class="pj-table" style="width: 100%; margin-bottom: 12px;" cellspacing="0" cellpadding="0">
			<thead>
				<tr>
					<th><?php __('report_department');?></th>
					<th><?php __('report_tickets');?></th>
					<th><?php __('report_replies');?></th>
					<th><?php __('report_ratings');?></th>
					<th><?php __('report_average_rating');?></th>
				</tr>
			</thead>
			<tbody>
				<?php
				foreach($tpl['department_arr'] as $k => $v)
				{
					?>
					<tr>
						<td><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminDepartments&amp;action=pjActionUpdate&amp;id=<?php echo $v['id'];?>"><?php echo pjSanitize::html($v['name']);?></a></td>
						<td><?php echo (int) $v['tickets'];?></td>
						<td><?php echo (int) $v['replies'];?></td>
						<td><?php echo (int) $v['ratings'];?></td>
						<td><?php echo number_format( $v['avg_rating'], 2);?></td>
					</tr>
					<?php
				}
				$info_arr = $tpl['info_arr'][0]; 
				?>
				<tr>
					<td><?php __('lblUnassigned');?></td>
					<td><?php echo (int) $info_arr['tickets'];?></td>
					<td><?php echo (int) $info_arr['replies'];?></td>
					<td><?php echo (int) $info_arr['ratings'];?></td>
					<td><?php echo number_format( $info_arr['avg_rating'], 2);?></td>
				</tr>
			</tbody>
		</table>
		<?php
	} 
	?>
</div>