Ejemplo n.º 1
0
</td>
                <td><?php 
    echo $conto->id_conto;
    ?>
</td>
                <td><?php 
    echo $kode_conto . '-' . str_pad($no++, 3, 0, STR_PAD_LEFT);
    ?>
</td>
                <?php 
    foreach ($parameter as $param) {
        // tampilkan jika parameter ada satuan dan parameter bukan bagian dari parameter tanpa satuan
        if (!empty($param->satuan) or in_array(strtoupper($param->id_parameter), $parameter_nonsatuan)) {
            ?>
                <td>
                    <?php 
            $nilai = nilai($conto->id, $param->id_parameter, FALSE, $param->satuan);
            echo $nilai[0];
            ?>
                </td>
                <?php 
        }
    }
    ?>
        </tr>
    <?php 
}
?>
    </tbody>
</table>
Ejemplo n.º 2
0
        echo "Buruk";
    } else {
        if ($var >= 65 and $var <= 75) {
            echo "Cukup Baik";
        } else {
            if ($var > 75 and $var <= 85) {
                echo "Baik";
            } else {
                if ($var > 85 and $var <= 95) {
                    echo "Sangat Baik";
                } else {
                    echo "N/A";
                }
            }
        }
    }
}
while ($dt = mysql_fetch_array($tampil)) {
    echo "<tr>\n\t\t\t\t<td>{$no}</td>\n\t    \t\t<td>{$dt['nip']}</td>\n\t   \t\t\t<td>{$dt['nama']}</td>\n\t    \t\t<td>{$dt['topik_pelatihan']}</td>\n\t\t\t\t<td>" . tgl_indo($dt['tgl_pelatihan']) . "</td>\n\t\t\t\t<td>";
    nilai($dt[hasil_pelatihan]);
    echo "</td>\n\t  \t\t</tr>";
    $no++;
}
echo "  \n\t\t\t</table>";
?>
	<div>
		<input class="noPrint" type="button" value="Cetak Halaman" onclick="window.print()"></div>
</div>
</body>
</html>
Ejemplo n.º 3
0
Archivo: pdf.php Proyecto: phi314/onix
 function tabel_kimia($list_conto, $id, $nomor_analisis, $jumlah_conto, $jenis_conto, $lokasi, $id_pemohon, $kode_conto = 'KC')
 {
     $CI =& get_instance();
     $CI->load->model('hasil_analisis_m');
     $this->addpage();
     $this->SetFont('Arial', 'B', 12);
     $this->Cell(0, 0, 'HASIL ANALISIS KIMIA', 0, 0, 'C');
     $this->Ln(1);
     /*
      * Keterangan
      */
     $this->SetX(3);
     $this->SetFont('Arial', 'B', 9);
     $this->Cell(6.1, 0.5, 'NOMOR ANALISIS');
     $this->Cell(2.6, 0.5, ': ' . $nomor_analisis);
     $this->ln();
     $this->SetX(3);
     $this->Cell(6.1, 0.5, 'CONTO YANG DIANALISIS');
     $this->Cell(2.6, 0.5, ': ' . $jumlah_conto . ' Conto ' . $jenis_conto);
     $this->ln();
     $this->SetX(3);
     $this->Cell(6.1, 0.5, 'LOKASI');
     $this->Cell(2.6, 0.5, ': ' . $lokasi);
     $this->ln();
     $this->SetX(3);
     $this->Cell(6.1, 0.5, 'ANALISIS UNTUK');
     $this->Cell(2.6, 0.5, ': ' . nama_pemohon($id_pemohon));
     $this->ln(1);
     /*
      * END KETERANGAN
      */
     //        $this->cell(3.1,1,'KODE CONTO',1,0,'C');
     $i = 1;
     //        foreach($list_conto as $data=>$val):
     //            $this->cell(2.8,1,$kode_conto.' - '.str_pad($i++, 3, 0, STR_PAD_LEFT),1,0,'C');
     //        endforeach;
     $parameter = $CI->hasil_analisis_m->pakai_satuan($id);
     $th = array('KODE CONTO');
     $wth = array(3.1);
     $ath = array('C');
     $parameter_nonsatuan = array('KMKGB01', 'KMKGB02', 'KMBAK01', 'KPBTH02');
     // kolom parameter
     foreach ($parameter as $param) {
         $nama = $param->nama;
         // singkatan
         if ($nama == 'Drilling Mud Test (Viskositas Relatif)' or $nama == 'Drilling Mud Test (CEC, Ca &Mg)' or $nama == 'Drilling Mud Test (Viskositas Absolut)') {
             $nama = 'DMT';
         } elseif ($nama == 'Methylene Blue Test') {
             $nama = 'MBT';
         }
         // parameter dipakai
         // tampilkan jika parameter ada satuan dan parameter bukan bagian dari parameter tanpa satuan
         if (!empty($param->satuan) or in_array(strtoupper($param->id_parameter), $parameter_nonsatuan)) {
             if (empty($param->satuan)) {
                 $satuan = '';
             } else {
                 $satuan = "\n                (" . $param->satuan . ")";
             }
             $cek_sign_fix = iconv("UTF-8", "windows-1252", $nama);
             $satuan = iconv("UTF-8", "windows-1252", $satuan);
             $cek_sign_fix = $cek_sign_fix . $satuan;
             array_push($th, $cek_sign_fix);
             // width th
             array_push($wth, 1.5);
             array_push($ath, 'C');
         }
     }
     $this->SetWidths($wth);
     $this->SetAligns($ath);
     $this->Row($th);
     // end kolom parameter
     // kolom conto
     $metoda_dipakai = array();
     $list_conto = $CI->hasil_analisis_m->get_conto_by_no_analisis($id);
     foreach ($list_conto as $conto) {
         $this->cell(3.1, 1, $kode_conto . ' - ' . str_pad($i++, 3, 0, STR_PAD_LEFT), 1, 0, 'C');
         foreach ($parameter as $param) {
             // tampilkan jika parameter ada satuan
             // dan parameter bukan bagian dari parameter tanpa satuan
             if (!empty($param->satuan) or in_array(strtoupper($param->id_parameter), $parameter_nonsatuan)) {
                 $nilai = nilai($conto->id, $param->id_parameter, FALSE, $param->satuan);
                 $this->SetFont('Arial', '', 9);
                 $this->cell(1.5, 1, $nilai[0], 1, 0, 'C');
                 $this->SetFont('Arial', 'B', 9);
             }
             // ambil 5 karakter dari id parameter karena merupakan id type analisis
             array_push($metoda_dipakai, substr($param->id_parameter, 0, 5));
         }
         $this->ln();
     }
     // end kolom conto
     // type analisis jika type = kml
     if (substr($id, 5, 3) == 'kml') {
         $metoda_dipakai_unique = array_unique($metoda_dipakai);
         foreach ($metoda_dipakai_unique as $key => $metoda) {
             $nama_metoda = $CI->type_analisis_m->get_nama($metoda);
             $this->SetFont('Arial', 'B', 8);
             // width metoda
             $w_m = 3.5;
             // jika fmbse size = 5
             if ($metoda == 'FMBSE') {
                 $w_m = 6;
             }
             $this->cell($w_m, 0.5, $nama_metoda . ":", 0, 0, '');
             $uji_parameter_by_metode = $CI->hasil_analisis_m->get_uji_param_by_type_analisis($metoda);
             $this->SetFont('Arial', '', 8);
             foreach ($uji_parameter_by_metode as $uji_param) {
                 $this->cell(0.8, 0.5, implode(",", $uji_param), 0, 0);
             }
             $this->ln();
         }
     }
     // catatan
     $this->SetFont('Arial', 'BU', 8);
     $this->cell(4, 0.5, "Catatan:", 0, 0);
     $this->SetFont('Arial', '', 8);
     $this->ln();
     $this->cell(4, 0.5, "1 %                         = 10.000 ppm", 0, 0);
     $this->ln();
     $this->cell(4, 0.5, "1 ppm (gr/ton)         = 1000 ppb", 0, 0);
 }
Ejemplo n.º 4
0
familyName("Kai Jim", "1983");
echo "<br>";
function setHeight($setHeight = 50)
{
    echo "tingginya adalah : {$setHeight} <br>";
}
setHeight(350);
setHeight();
// will use the default value of 50
setHeight(135);
setHeight(80);
echo "<br>";
function nilai($nama, $nilai = 100)
{
    echo "{$nama} mendapatkan nilai {$nilai} <br>";
}
nilai("Rasyid", "75");
nilai("Pradana");
echo "<br>";
function sum($x, $y)
{
    $z = $x + $y;
    return $z;
}
echo "5 + 10 = " . sum(5, 10) . "<br>";
echo "7 + 13 = " . sum(7, 13) . "<br>";
echo "2 + 4 = " . sum(2, 4);
?>

</body>
</html>
Ejemplo n.º 5
0
familyName("Kai Jim", "1983");
echo "<br>";
function setHeight($setHeight = 50)
{
    echo "tingginya adalah : {$setHeight} <br>";
}
setHeight(350);
setHeight();
// will use the default value of 50
setHeight(135);
setHeight(80);
echo "<br>";
function nilai($nama, $nilai = 100)
{
    echo "{$nama} mendapatkan nilai {$nilai} <br>";
}
nilai("Dicky", "75");
nilai("Bayu");
echo "<br>";
function sum($x, $y)
{
    $z = $x + $y;
    return $z;
}
echo "5 + 10 = " . sum(5, 10) . "<br>";
echo "7 + 13 = " . sum(7, 13) . "<br>";
echo "2 + 4 = " . sum(2, 4);
?>

</body>
</html>