<?php
$this->pageTitle = 'Laporan Hasil Penilaian Lomba Video';
?>

<TABLE style="font-size:12px; color:#000; border-width: 1px; border-color: #3A3A3A; border-collapse: collapse; width: 100%; padding: 3px;">
  <THEAD>
    <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">NO.</TD>
    <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">Nama Lengkap</TD>
    <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">Total Nilai</TD>
    <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">Rata-Rata</TD>
    <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">Total Penilaian</TD>
    <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">Nama Penilai</TD>
  </THEAD>
  <TBODY>
    <?php
    $x = 0;
    foreach ($model as $data) {
      $x++;
    ?>
      <TR>
        <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">
          <?php echo $x; ?>
        </TD>
        <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">
          <?php echo $data['fullname'] ?>
        </TD>
        <?php if(Review::model()->getTotalList($data['id_paper'],3)==7){ ?>
            <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">
              <?php echo Review::model()->getTotalList($data['id_paper'], 1); ?>
            </TD>
            <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">
              <?php echo Review::model()->getTotalList($data['id_paper'], 2); ?>
            </TD>
        <?php }else{ ?>
            <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">Belum Semua Menilai</TD>
            <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">Belum Semua Menilai</TD>
        <?php } ?>
        <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">
          <?php echo Review::model()->getTotalList($data['id_paper'], 3); ?>
        </TD>
        <TD style="border-width: 1px;padding: 8px;border-style: solid;border-color: #3A3A3A;">
          <?php echo Review::model()->getEvaluator($data['id_paper']); ?>
        </TD>
      </TR>
    <?php } ?>
  </TBODY>
</TABLE>