SHARE
TWEET

Untitled

Rofihimam Sep 25th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <link href="https://fonts.googleapis.com/css?family=Bree+Serif&display=swap" rel="stylesheet">
  2. <style type="text/css">
  3.     table{
  4.         border: 5px outset blue;
  5.         background: linear-gradient(to bottom, #33ccff 0%, #ff3399 100%);
  6.         width: 400px;
  7.     }
  8.     th{
  9.         font-family: 'Bree Serif', serif;
  10.         font-size: 30px;
  11.     }
  12.     td{
  13.         font-family: 'Bree Serif', serif;
  14.         font-size: 20px;
  15.     }
  16.     td.batas{
  17.         height: 5px;
  18.         border-radius: 50px;
  19.         background-color: blue;
  20.     }
  21. </style>
  22.  
  23. <?php
  24.     $nama = $_POST['nama'];
  25.     $nilaiTugas = $_POST['nilaiTugas'];
  26.     $nilaiUharian = $_POST['nilaiUharian'];
  27.     $nilaiUts = $_POST['nilaiUts'];
  28.     $nilaiUas = $_POST['nilaiUas'];
  29.     $nilaiAkhir = ($nilaiTugas * 20 / 100) + ($nilaiUharian * 10 / 100) + ($nilaiUts * 30 / 100) + ($nilaiUts * 40/100);
  30. ?>
  31.  
  32. <table>
  33.     <tr>
  34.         <th colspan="3">Nilai Rapot dan Index</th>
  35.     </tr>
  36.     <tr>
  37.         <td class="batas" colspan="3"></td>
  38.     </tr>
  39.     <tr>
  40.         <td>Nama</td>
  41.         <td>:</td>
  42.         <td>
  43.             <?php
  44.                 echo $nama;
  45.             ?>
  46.         </td>
  47.     </tr>
  48.     <tr>
  49.         <td>Nilai Tugas</td>
  50.         <td>:</td>
  51.         <td>
  52.             <?php
  53.                 echo $nilaiTugas;
  54.             ?>
  55.         </td>
  56.     </tr>
  57.     <tr>
  58.         <td>Nilai Ulangan Harian</td>
  59.         <td>:</td>
  60.         <td>
  61.             <?php
  62.                 echo $nilaiUharian;
  63.             ?>
  64.         </td>
  65.     </tr>
  66.     <tr>
  67.         <td>Nilai UTS</td>
  68.         <td>:</td>
  69.         <td>
  70.             <?php
  71.                 echo $nilaiUts;
  72.             ?>
  73.         </td>
  74.     </tr>
  75.     <tr>
  76.         <td>Nilai UAS</td>
  77.         <td>:</td>
  78.         <td>
  79.             <?php
  80.                 echo $nilaiUas;
  81.             ?>
  82.         </td>
  83.     </tr>
  84.     <tr>
  85.         <td>Nilai Akhir</td>
  86.         <td>:</td>
  87.         <td>
  88.             <?php
  89.                 echo $nilaiAkhir;
  90.             ?>
  91.         </td>
  92.     </tr>
  93.     <tr>
  94.         <td>Index</td>
  95.         <td>:</td>
  96.         <td>
  97.             <?php
  98.                 if ($nilaiAkhir >= 80 && $nilaiAkhir <= 100) {
  99.                     echo "<font color = 'green'>A</font>";
  100.                 }
  101.                 elseif ($nilaiAkhir >= 70 && $nilaiAkhir <= 79) {
  102.                     echo "<font color = 'blue'>B</font>";
  103.                 }
  104.                 elseif ($nilaiAkhir >= 60 && $nilaiAkhir <= 69) {
  105.                     echo "<font color = 'yellow'>C</font>";
  106.                 }
  107.                 elseif ($nilaiAkhir >= 50 && $nilaiAkhir <= 59) {
  108.                     echo "<font color = 'orange'>D</font>";
  109.                 }
  110.                 else {
  111.                     echo "<font color = 'red'>E</font>";
  112.                 }
  113.             ?>
  114.         </td>
  115.     </tr>
  116. </table>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top