LISTING PROGRAM
1. Halaman Menu Utama Administrator/Tim Penilai
<?php session_start(); include "page/koneksi.php";
error_reporting (E_ALL ^ E_NOTICE); if($_SESSION['id_user']){ ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"/>
<title>Seleksi Jabatan Pemerintah Kota Tebing Tinggi</title> <link rel="stylesheet" href="css/layout.css" type="text/css" media="screen" />
<!--[if lt IE 9]>
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" /> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <header id="header"> <hgroup> <?php if($_SESSION['id_user']=='admin'){?> <h1 class="site_title"><a href="index.php">Website Administrator</a></h1>
<?php } else if($_SESSION['id_user']=='Tim Penilai'){ ?>
<h1 class="site_title"><a href="index.php">Website Tim Penilai</a></h1>
<?php } ?>
<h2 class="section_title">Implementasi Metode SAW dan Profile Matching dalam menentukan Pejabat Struktural</h2><div class="btn_view_site"></div>
</hgroup>
</header> <!-- end of header bar --> <section id="secondary_bar"> <div class="user">
<p>Hello <?php echo $_SESSION['username'];?> | <a href="index.php">Home</a> | <a href="logout.php">Logout</a></p> <!-- <a class="logout_user" href="#"
title="Logout">Logout</a> --> </div>
<div class="breadcrumbs_container"> <?php if($_SESSION['id_user']=='admin'){?>
<article class="breadcrumbs"><a href="#">Website Administrator</a> <div class="breadcrumb_divider"></div> <a class="current">
<?php } else if($_SESSION['id_user']){?>
<article class="breadcrumbs"><a href="#">Website Tim Penilai</a> <div class="breadcrumb_divider"></div> <a
class="current"> <?php } ?>
<?php echo $_GET['page'];?> </a></article>
</div>
</section><!-- end of secondary bar --> <aside id="sidebar" class="column"> <?php if($_SESSION['id_user']=='admin'){?> <h3>Parameter</h3> <ul> <li class="icn_categories"><a href="index.php?page=Kriteria">Lihat Kriteria</a></li> <li class="icn_edit_article"><a href="index.php?page=Tambah_Pegawai">Tambah Pegawai</a></li> <li class="icn_categories"><a
href="index.php?page=Pegawai">Lihat Daftar Pegawai</a></li> </ul>
<?php } else if($_SESSION['id_user']=='Tim Penilai'){?> <h3>Parameter</h3>
<ul> <li class="icn_edit_article"><a
href="index.php?page=Kinerja_Pegawai">Penilaian Kinerja Pegawai</a></li></ul> <h3>SAW</h3> <ul> <li class="icn_categories"><a href="index.php?page=Bobot">Lihat Bobot</a></li> <li class="icn_edit_article"><a
href="index.php?page=Proses_SAW">Proses SAW</a></li> </ul>
<ul><li class="icn_categories"><a
href="index.php?page=Faktor">Lihat Faktor</a></li> <li class="icn_categories"><a
href="index.php?page=Profil_Ideal">Lihat Profil Ideal</a></li> <li class="icn_categories"><a
href="index.php?page=Persentase_Faktor">Persentase Core Factor dan Secondary Factor</a></li>
<li class="icn_edit_article"><a
href="index.php?page=Proses_Profil_Matching"> Proses Profile Matching</a></li> </ul> <? } ?> <?php if($_SESSION['id_user']=='admin'){?> <h3>Users</h3> <ul> <li class="icn_add_user"><a href="index.php?page=add_user">Tambah User</a></li> <li class="icn_view_users"><a href="index.php?page=user">Lihat User</a></li> <li class="icn_settings"><a href="logout.php">Logout</a></li> <?php } ?> </ul> <footer> <hr />
<p><strong>Copyright © <?php echo date("Y");?> USU</strong></p>
<p>Creted by <a href="#">ALFI RAHMAN</a></p> <p><img src="images/logo pemko2.png" width="45px" height="60px" /><img src="images/logo.png" width="60px"
height="60px" /></p> </footer>
</aside><!-- end of sidebar --> <?php $page=$_GET['page']; if(empty($page)){ include "./page/home.php"; }else{ include "./page/$page.php"; } ?>
</body> </html> <?php } else {
header('location:login.php'); } ?>
2. Proses Metode SAW
<?php
$time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time;
sleep(1.0);
$delete_matrix= mysql_query("DELETE FROM tbmatrik_saw"); $delete_hasil = mysql_query("DELETE FROM hasil_saw");
$sql_kandidat = mysql_query("SELECT * FROM kandidat ORDER BY id_pegawai DESC") or die (mysql_error());
while($array_kandidat = mysql_fetch_array($sql_kandidat)){ if($array_kandidat['gol'] == "III/a")
$golongan = 1;
else if($array_kandidat['gol'] == "III/b") $golongan = 2;
else if($array_kandidat['gol'] == "III/c") $golongan = 3;
else if($array_kandidat['gol'] == "III/d") $golongan = 4;
if($array_kandidat['pendidikan'] == "SLTA") $pendidikan = 1;
else if($array_kandidat['pendidikan'] == "Diploma 3 (D3)") $pendidikan = 2;
else if($array_kandidat['pendidikan'] == "Sarjana (S1)") $pendidikan = 3;
else if($array_kandidat['pendidikan'] == "Pasca Sarjana (S2)") $pendidikan = 4;
if($array_kandidat['diklat_kepemimpinan'] == 'Ya') $diklat_kepemimpinan=4;
else if($array_kandidat['diklat_kepemimpinan'] == 'Tidak') $diklat_kepemimpinan=2;
if($array_kandidat['jlh_diklat_teknis'] == ">5") $jlh_diklat_teknis=4; else if($array_kandidat['jlh_diklat_teknis'] == "3-5") $jlh_diklat_teknis=3; else if($array_kandidat['jlh_diklat_teknis'] == "1-2") $jlh_diklat_teknis=2; else if($array_kandidat['jlh_diklat_teknis'] >= "0") $jlh_diklat_teknis=1; if($array_kandidat['lama_bekerja'] == ">18") $lama_bekerja=4; else if($array_kandidat['lama_bekerja'] == "12-17") $lama_bekerja=3; else if($array_kandidat['lama_bekerjai'] == "6-11") $lama_bekerja=2; else if($array_kandidat['lama_bekerja'] >= "0-5") $lama_bekerja=1; if ($array_kandidat['kesetiaan']=='Sangat Baik') $kesetiaan=4; else if ($array_kandidat['kesetiaan']=='Baik') $kesetiaan=3; else if ($array_kandidat['kesetiaan']=='Cukup') $kesetiaan=2; else if ($array_kandidat['kesetiaan']=='Kurang') $kesetiaan=1; if ($array_kandidat['prestasi_kerja']=='Sangat Baik') $prestasi_kerja=4; else if ($array_kandidat['prestasi_kerja']=='Baik') $prestasi_kerja=3; else if ($array_kandidat['prestasi_kerja']=='Cukup') $prestasi_kerja=2; else if ($array_kandidat['prestasi_kerja']=='Kurang') $prestasi_kerja=1; if ($array_kandidat['tanggung_jawab']=='Sangat Baik') $tanggung_jawab=4; else if ($array_kandidat['tanggung_jawab']=='Baik') $tanggung_jawab=3; else if ($array_kandidat['tanggung_jawab']=='Cukup') $tanggung_jawab=2; else if ($array_kandidat['tanggung_jawab']=='Kurang') $tanggung_jawab=1;
if ($array_kandidat['ketaatan']=='Sangat Baik') $ketaatan=4; else if ($array_kandidat['ketaatan']=='Baik') $ketaatan=3; else if ($array_kandidat['ketaatan']=='Cukup') $ketaatan=2; else if ($array_kandidat['ketaatan']=='Kurang') $ketaatan=1; if ($array_kandidat['kejujuran']=='Sangat Baik') $kejujuran=4; else if ($array_kandidat['kejujuran']=='Baik') $kejujuran=3; else if ($array_kandidat['kejujuran']=='Cukup') $kejujuran=2; else if ($array_kandidat['kejujuran']=='Kurang') $kejujuran=1; if ($array_kandidat['kerjasama']=='Sangat Baik') $kerjasama=4; else if ($array_kandidat['kerjasama']=='Baik') $kerjasama=3; else if ($array_kandidat['kerjasama']=='Cukup') $kerjasama=2; else if ($array_kandidat['kerjasama']=='Kurang') $kerjasama=1; if ($array_kandidat['prakarsa']=='Sangat Baik') $prakarsa=4; else if ($array_kandidat['prakarsa']=='Baik') $prakarsa=3; else if ($array_kandidat['prakarsa']=='Cukup') $prakarsa=2; else if ($array_kandidat['prakarsa']=='Kurang') $prakarsa=1; $id_pegawai = $array_kandidat['id_pegawai'];
$sql_cek_pegawai = mysql_query("SELECT * FROM tbmatrik_saw WHERE id_pegawai='$id_pegawai'") or die (mysql_error());
if(mysql_num_rows($sql_cek_pegawai)){ echo '';
} else {
$insert_matrik = mysql_query("INSERT INTO tbmatrik_saw VALUES ('','$id_pegawai', '$golongan', '$pendidikan',
'$diklat_kepemimpinan','$jlh_diklat_teknis','$lama_bekerja','$kesetiaan','$prestasi_ker ja','$tanggung_jawab','$ketaatan','$kejujuran','$kerjasama','$prakarsa')") or die
(mysql_error()); } }
?>
<section id="main" class="column"> <!-- end of stats article -->
<article class="module width_3_quarter">
<header><h3 class="tabs_involved">Kandidat</h3> </header>
<table class="tablesorter" cellspacing="0"> <thead> <tr> <th>No</th> <th>Nama</th> <th>Gol</th> <th>Pendidikan</th> <th>Diklat Kepemimpinan</th> <th>Jlh. Diklat Teknis</th> <th>Lama Bekerja</th> <th>Kesetiaan</th> <th>Prestasi Kerja</th> <th>Tanggung Jawab</th> <th>Ketaatan</th> <th>Kejujuran</th> <th>Kerjasama</th> <th>Prakarsa</th></tr> </thead> <?php $b = 1;
$sql_kandidat = mysql_query("select * from kandidat order by id_pegawai asc"); while($array_kandidat = mysql_fetch_array($sql_kandidat)){ ?> <tbody> <tr> <td><?php echo $b;?></td> <td><?php echo $array_kandidat['nama_pegawai'];?></td> <td><?php echo $array_kandidat['gol'];?></td> <td><?php echo $array_kandidat['pendidikan'];?></td> <td><?php echo $array_kandidat['diklat_kepemimpinan'];?></td> <td><?php echo $array_kandidat['jlh_diklat_teknis'];?></td> <td><?php echo $array_kandidat['lama_bekerja'];?></td>
<td><?php echo $array_kandidat['kesetiaan'];?></td> <td><?php echo $array_kandidat['prestasi_kerja'];?></td> <td><?php echo $array_kandidat['tanggung_jawab'];?></td> <td><?php echo $array_kandidat['ketaatan'];?></td> <td><?php echo $array_kandidat['kejujuran'];?></td> <td><?php echo $array_kandidat['kerjasama'];?></td> <td><?php echo $array_kandidat['prakarsa'];?></td></tr> </tbody> <?php $b++; } ?> </table>
<header><h3 class="tabs_involved">Matrik Kandidat</h3> </header>
<table class="tablesorter" cellspacing="0"> <thead> <tr> <th>No</th> <th>Nama</th> <th>Gol</th> <th>Pendidikan</th> <th>Diklat Kepemimpinan</th> <th>Jlh. Diklat Teknis</th> <th>Lama Bekerja</th> <th>Kesetiaan</th> <th>Prestasi Kerja</th> <th>Tanggung Jawab</th> <th>Ketaatan</th> <th>Kejujuran</th> <th>Kerjasama</th> <th>Prakarsa</th></tr> </thead> <?php $c=1;
$sql_kandidat_matrix = mysql_query("select a.*,b.* from kandidat a, tbmatrik_saw b WHERE a.id_pegawai=b.id_pegawai order by b.id_pegawai asc");
while($array_kandidat_matrix = mysql_fetch_array($sql_kandidat_matrix)){ ?> <tbody> <tr> <td><?php echo $c;?></td> <td><?php echo $array_kandidat_matrix['nama_pegawai'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria1'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria2'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria3'];?></td>
<td><?php echo $array_kandidat_matrix['Kriteria4'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria5'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria6'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria7'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria8'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria9'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria10'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria11'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria12'];?></td> </tr> </tbody> <?php $c++; } ?> </table> <?php
$crMax = mysql_query("SELECT max(Kriteria1) as maxKriteria1, max(Kriteria2) as maxKriteria2, max(Kriteria3) as maxKriteria3, max(Kriteria4) as maxKriteria4, max(Kriteria5) as maxKriteria5, max(Kriteria6) as maxKriteria6, max(Kriteria7) as maxKriteria7, max(Kriteria8) as maxKriteria8, max(Kriteria9) as maxKriteria9, max(Kriteria10) as maxKriteria10, max(Kriteria11) as maxKriteria11, max(Kriteria12) as maxKriteria12 FROM tbmatrik_saw"); $max = mysql_fetch_array($crMax);
$sql2 = mysql_query("SELECT a.*, b.nama_pegawai FROM tbmatrik_saw a left join kandidat b on a.id_pegawai=b.id_pegawai order by id_pegawai ASC");
echo "<header><h3 class='tabs_involved'>Matrik Normalisasi Kandidat</h3> </header>
<table class='tablesorter' cellspacing='0'> <thead> <tr> <th>No</th> <th>Nama</th> <th>Gol</th> <th>Pendidikan</th> <th>Diklat Kepemimpinan</th> <th>Jlh. Diklat Teknis</th> <th>Lama Bekerja</th> <th>Kesetiaan</th>
<th>Prestasi Kerja</th> <th>Tanggung Jawab</th> <th>Ketaatan</th> <th>Kejujuran</th> <th>Kerjasama</th> <th>Prakarsa</th> </tr> </thead>"; $d = 1; while ($dt2 = mysql_fetch_array($sql2)) { echo "<tbody>"; echo "<tr>"; echo "<td>$d</td>"; echo "<td>".$dt2['nama_pegawai']."</td>"; echo "<td>".round($dt2['Kriteria1']/$max['maxKriteria1'],2)."</td> <td>".round($dt2['Kriteria2']/$max['maxKriteria2'],2)."</td> <td>".round($dt2['Kriteria3']/$max['maxKriteria3'],2)."</td> <td>".round($dt2['Kriteria4']/$max['maxKriteria4'],2)."</td> <td>".round($dt2['Kriteria5']/$max['maxKriteria5'],2)."</td> <td>".round($dt2['Kriteria6']/$max['maxKriteria6'],2)."</td> <td>".round($dt2['Kriteria7']/$max['maxKriteria7'],2)."</td> <td>".round($dt2['Kriteria8']/$max['maxKriteria8'],2)."</td> <td>".round($dt2['Kriteria9']/$max['maxKriteria9'],2)."</td> <td>".round($dt2['Kriteria10']/$max['maxKriteria10'],2)."</td> <td>".round($dt2['Kriteria11']/$max['maxKriteria11'],2)."</td> <td>".round($dt2['Kriteria12']/$max['maxKriteria12'],2)."</td> "; echo "</tr>"; echo "</tbody>"; $d++; } echo "</table>";
$sql3 = mysql_query("SELECT * FROM tbmatrik_saw order by id_pegawai ASC"); $bobot = array();
$sql_bobot = mysql_query("SELECT * FROM bobot ORDER BY id_kriteria ASC"); $a=1; while($array_bobot = mysql_fetch_array($sql_bobot)){ $bobot = array($a=>$array_bobot['nilai_bobot']); $bobot_1 .= $bobot[1]; $bobot_2 .= $bobot[2]; $bobot_3 .= $bobot[3]; $bobot_4 .= $bobot[4]; $bobot_5 .= $bobot[5]; $bobot_6 .= $bobot[6]; $bobot_7 .= $bobot[7];
$bobot_8 .= $bobot[8]; $bobot_9 .= $bobot[9]; $bobot_10 .= $bobot[10]; $bobot_11 .= $bobot[11]; $bobot_12 .= $bobot[12]; $a++; } $e = 1; while ($dt3 = mysql_fetch_array($sql3)) { $id_pegawai3 = $dt3['id_pegawai']; $hasil = round((($dt3['Kriteria1']/$max['maxKriteria1'])*$bobot_1)+ (($dt3['Kriteria2']/$max['maxKriteria2'])*$bobot_2)+ (($dt3['Kriteria3']/$max['maxKriteria3'])*$bobot_3)+ (($dt3['Kriteria4']/$max['maxKriteria4'])*$bobot_4)+ (($dt3['Kriteria5']/$max['maxKriteria5'])*$bobot_5)+ (($dt3['Kriteria6']/$max['maxKriteria6'])*$bobot_6)+ (($dt3['Kriteria7']/$max['maxKriteria7'])*$bobot_7)+ (($dt3['Kriteria8']/$max['maxKriteria8'])*$bobot_8)+ (($dt3['Kriteria9']/$max['maxKriteria9'])*$bobot_9)+ (($dt3['Kriteria10']/$max['maxKriteria10'])*$bobot_10)+ (($dt3['Kriteria11']/$max['maxKriteria11'])*$bobot_11)+ (($dt3['Kriteria12']/$max['maxKriteria12'])*$bobot_12),2); $sql_cek_hasil = mysql_query("SELECT * FROM hasil_saw WHERE id_pegawai='$id_pegawai3'");
if(mysql_num_rows($sql_cek_hasil)){ echo '';
} else {
$insert_hasil = mysql_query("INSERT INTO hasil_saw VALUES ('','$id_pegawai3', '$hasil')");
} $e++; } ?>
<header><h3 class="tabs_involved">Hasil Perangkingan Kandidat dengan Metode SAW</h3>
</header>
<table class="tablesorter" cellspacing="0"> <thead> <tr> <th>No</th> <th>Nama</th> <th>Gol</th> <th>Pendidikan</th> <th>Diklat Kepemimpinan</th>
<th>Jlh. Diklat Teknis</th> <th>Lama Bekerja</th> <th>Kesetiaan</th> <th>Prestasi Kerja</th> <th>Tanggung Jawab</th> <th>Ketaatan</th> <th>Kejujuran</th> <th>Kerjasama</th> <th>Prakarsa</th> <th>Nilai SAW</th> </tr> </thead> <?php $f=1;
$sql_kandidat_hasil = mysql_query("select a.*,b.* from kandidat a, hasil_saw b WHERE a.id_pegawai=b.id_pegawai order by b.nilai desc");
while($array_kandidat_hasil = mysql_fetch_array($sql_kandidat_hasil)){ ?> <tbody> <tr> <td><?php echo $f;?></td> <td><?php echo $array_kandidat_hasil['nama_pegawai'];?></td> <td><?php echo $array_kandidat_hasil['gol'];?></td> <td><?php echo $array_kandidat_hasil['pendidikan'];?></td> <td><?php echo $array_kandidat_hasil['diklat_kepemimpinan'];?></td> <td><?php echo $array_kandidat_hasil['jlh_diklat_teknis'];?></td> <td><?php echo $array_kandidat_hasil['lama_bekerja'];?></td> <td><?php echo $array_kandidat_hasil['kesetiaan'];?></td> <td><?php echo $array_kandidat_hasil['prestasi_kerja'];?></td> <td><?php echo $array_kandidat_hasil['tanggung_jawab'];?></td> <td><?php echo $array_kandidat_hasil['ketaatan'];?></td> <td><?php echo $array_kandidat_hasil['kejujuran'];?></td> <td><?php echo $array_kandidat_hasil['kerjasama'];?></td> <td><?php echo $array_kandidat_hasil['prakarsa'];?></td> <td><span style="color:#F00"><?php echo
$array_kandidat_hasil['nilai'];?></span></td> </tr> </tbody> <?php $f++; } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time;
$total_time = round(($finish - $start), 4); ?>
</table>
<header><h3 class="tabs_involved">Lama Waktu Eksekusi Program adalah : <?php echo $total_time; ?> Detik</h3>
</header>
</article> </section>
3. Proses Metode Profile Matching
<?php
$time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time;
sleep(1.0);
$delete_matrix = mysql_query("DELETE FROM tbnilai_profil"); $delete_matrix1 = mysql_query("DELETE FROM tbnilai_bobot_gap"); $delete_matrix2 = mysql_query("DELETE FROM hasil_pm");
$sql_kandidat = mysql_query("SELECT * FROM kandidat ORDER BY id_pegawai DESC") or die (mysql_error());
while($array_kandidat = mysql_fetch_array($sql_kandidat)){ if($array_kandidat['gol'] == "III/a")
$golongan = 1;
else if($array_kandidat['gol'] == "III/b") $golongan = 2;
else if($array_kandidat['gol'] == "III/c") $golongan = 3;
else if($array_kandidat['gol'] == "III/d") $golongan = 4;
if($array_kandidat['pendidikan'] == "SLTA") $pendidikan = 1;
else if($array_kandidat['pendidikan'] == "Diploma 3 (D3)") $pendidikan = 2;
else if($array_kandidat['pendidikan'] == "Sarjana (S1)") $pendidikan = 3;
else if($array_kandidat['pendidikan'] == "Pasca Sarjana (S2)") $pendidikan = 4;
$diklat_kepemimpinan=4;
else if($array_kandidat['diklat_kepemimpinan'] == 'Tidak') $diklat_kepemimpinan=2; if($array_kandidat['jlh_diklat_teknis'] == ">5") $jlh_diklat_teknis=4; else if($array_kandidat['jlh_diklat_teknis'] == "3-5") $jlh_diklat_teknis=3; else if($array_kandidat['jlh_diklat_teknis'] == "1-2") $jlh_diklat_teknis=2; else if($array_kandidat['jlh_diklat_teknis'] >= "0") $jlh_diklat_teknis=1; if($array_kandidat['lama_bekerja'] == ">18") $lama_bekerja=4; else if($array_kandidat['lama_bekerja'] == "12-17") $lama_bekerja=3; else if($array_kandidat['lama_bekerja'] == "6-11") $lama_bekerja=2; else if($array_kandidat['lama_bekerja'] >= "0-5") $lama_bekerja=1; if ($array_kandidat['kesetiaan']=='Sangat Baik') $kesetiaan=4; else if ($array_kandidat['kesetiaan']=='Baik') $kesetiaan=3; else if ($array_kandidat['kesetiaan']=='Cukup') $kesetiaan=2; else if ($array_kandidat['kesetiaan']=='Kurang') $kesetiaan=1; if ($array_kandidat['prestasi_kerja']=='Sangat Baik') $prestasi_kerja=4; else if ($array_kandidat['prestasi_kerja']=='Baik') $prestasi_kerja=3; else if ($array_kandidat['prestasi_kerja']=='Cukup') $prestasi_kerja=2; else if ($array_kandidat['prestasi_kerja']=='Kurang') $prestasi_kerja=1; if ($array_kandidat['tanggung_jawab']=='Sangat Baik') $tanggung_jawab=4; else if ($array_kandidat['tanggung_jawab']=='Baik') $tanggung_jawab=3; else if ($array_kandidat['tanggung_jawab']=='Cukup')
$tanggung_jawab=2; else if ($array_kandidat['tanggung_jawab']=='Kurang') $tanggung_jawab=1; if ($array_kandidat['ketaatan']=='Sangat Baik') $ketaatan=4; else if ($array_kandidat['ketaatan']=='Baik') $ketaatan=3; else if ($array_kandidat['ketaatan']=='Cukup') $ketaatan=2; else if ($array_kandidat['ketaatan']=='Kurang') $ketaatan=1; if ($array_kandidat['kejujuran']=='Sangat Baik') $kejujuran=4; else if ($array_kandidat['kejujuran']=='Baik') $kejujuran=3; else if ($array_kandidat['kejujuran']=='Cukup') $kejujuran=2; else if ($array_kandidat['kejujuran']=='Kurang') $kejujuran=1; if ($array_kandidat['kerjasama']=='Sangat Baik') $kerjasama=4; else if ($array_kandidat['kerjasama']=='Baik') $kerjasama=3; else if ($array_kandidat['kerjasama']=='Cukup') $kerjasama=2; else if ($array_kandidat['kerjasama']=='Kurang') $kerjasama=1; if ($array_kandidat['prakarsa']=='Sangat Baik') $prakarsa=4; else if ($array_kandidat['prakarsa']=='Baik') $prakarsa=3; else if ($array_kandidat['prakarsa']=='Cukup') $prakarsa=2; else if ($array_kandidat['prakarsa']=='Kurang') $prakarsa=1; $id_pegawai = $array_kandidat['id_pegawai'];
$sql_cek_pegawai = mysql_query("SELECT * FROM tbnilai_profil WHERE id_pegawai='$id_pegawai'") or die (mysql_error());
echo ''; } else {
$insert_matrik = mysql_query("INSERT INTO tbnilai_profil VALUES ('','$id_pegawai', '$golongan', '$pendidikan',
'$diklat_kepemimpinan','$jlh_diklat_teknis','$lama_bekerja','$kesetiaan','$prestasi_ker ja','$tanggung_jawab','$ketaatan','$kejujuran','$kerjasama','$prakarsa')") or die
(mysql_error()); } }
?>
<section id="main" class="column"> <!-- end of stats article --> <style type="text/css"> <!--
.style1 {color: #FF0000} -->
</style>
<article class="module width_3_quarter">
<header><h3 class="tabs_involved">Kandidat</h3> </header>
<table class="tablesorter" cellspacing="0"> <thead> <tr> <th>No</th> <th>Nama</th> <th>Gol</th> <th>Pendidikan</th> <th>Diklat Kepemimpinan</th> <th>Jlh. Diklat Teknis</th> <th>Lama Bekerja</th> <th>Kesetiaan</th> <th>Prestasi Kerja</th> <th>Tanggung Jawab</th> <th>Ketaatan</th> <th>Kejujuran</th> <th>Kerjasama</th> <th>Prakarsa</th> </tr></thead> <?php $h = 1;
$sql_kandidat = mysql_query("select * from kandidat order by id_pegawai asc"); while($array_kandidat = mysql_fetch_array($sql_kandidat)){
?>
<tbody> <tr>
<td><?php echo $array_kandidat['nama_pegawai'];?></td> <td><?php echo $array_kandidat['gol'];?></td> <td><?php echo $array_kandidat['pendidikan'];?></td> <td><?php echo $array_kandidat['diklat_kepemimpinan'];?></td> <td><?php echo $array_kandidat['jlh_diklat_teknis'];?></td> <td><?php echo $array_kandidat['lama_bekerja'];?></td> <td><?php echo $array_kandidat['kesetiaan'];?></td> <td><?php echo $array_kandidat['prestasi_kerja'];?></td> <td><?php echo $array_kandidat['tanggung_jawab'];?></td> <td><?php echo $array_kandidat['ketaatan'];?></td> <td><?php echo $array_kandidat['kejujuran'];?></td> <td><?php echo $array_kandidat['kerjasama'];?></td> <td><?php echo $array_kandidat['prakarsa'];?></td> </tr> </tbody> <?php $h++; } ?> </table><br />
<header><h3 class="tabs_involved">Perhitungan GAP Kompetensi</h3>
</header>
<table class="tablesorter" cellspacing="0"> <thead> <tr> <th>No</th> <th>Nama</th> <th>Gol</th> <th>Pendidikan</th> <th>Diklat Kepemimpinan</th> <th>Jlh. Diklat Teknis</th> <th>Lama Bekerja</th> <th>Kesetiaan</th> <th>Prestasi Kerja</th> <th>Tanggung Jawab</th> <th>Ketaatan</th> <th>Kejujuran</th> <th>Kerjasama</th> <th>Prakarsa</th> </tr> </thead> <?php $j=1;
$sql_kandidat_matrix = mysql_query("select a.*,b.* from kandidat a, tbnilai_profil b WHERE a.id_pegawai=b.id_pegawai order by b.id_pegawai asc");
while($array_kandidat_matrix = mysql_fetch_array($sql_kandidat_matrix)){ ?> <tbody> <tr> <td><?php echo $j;?></td> <td><?php echo $array_kandidat_matrix['nama_pegawai'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria1'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria2'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria3'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria4'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria5'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria6'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria7'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria8'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria9'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria10'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria11'];?></td> <td><?php echo $array_kandidat_matrix['Kriteria12'];?></td> </tr> </tbody> <?php $j++; }
$sql_profil_ideal = mysql_query("select * from profil_ideal");
while($array_profil_ideal = mysql_fetch_array($sql_profil_ideal)){ ?>
<tbody>
<tr bgcolor="#6666FF">
<td colspan="2"><?php echo 'NILAI PROFIL IDEAL'; ?></td> <td><?php echo $array_profil_ideal['gol'];?></td> <td><?php echo $array_profil_ideal['pendidikan'];?></td> <td><?php echo $array_profil_ideal['diklat_kepemimpinan'];?></td> <td><?php echo $array_profil_ideal['jlh_diklat_teknis'];?></td> <td><?php echo $array_profil_ideal['lama_bekerja'];?></td> <td><?php echo $array_profil_ideal['kesetiaan'];?></td> <td><?php echo $array_profil_ideal['prestasi_kerja'];?></td> <td><?php echo $array_profil_ideal['tanggung_jawab'];?></td> <td><?php echo $array_profil_ideal['ketaatan'];?></td> <td><?php echo $array_profil_ideal['kejujuran'];?></td> <td><?php echo $array_profil_ideal['kerjasama'];?></td> <td><?php echo $array_profil_ideal['prakarsa'];?></td> </tr> </tbody> <?php
$j=1;
$sql_kandidat_matrix = mysql_query("select a.*,b.* from kandidat a, tbnilai_profil b WHERE a.id_pegawai=b.id_pegawai order by b.id_pegawai asc");
while($array_kandidat_matrix = mysql_fetch_array($sql_kandidat_matrix)){ ?> <tbody> <tr> <td><?php echo $j;?></td> <td><?php echo $array_kandidat_matrix['nama_pegawai'];?></td> <td><?php echo $gap_gol[$j]=$array_kandidat_matrix['Kriteria1']-$array_profil_ideal['gol'];?></td> <td><?php echo $gap_pendidikan[$j]=$array_kandidat_matrix['Kriteria2']-$array_profil_ideal['pendidikan'];?></td> <td><?php echo $gap_diklat_kepemimpinan[$j]=$array_kandidat_matrix['Kriteria3']-$array_profil_ideal['diklat_kepemimpinan'];?></td> <td><?php echo $gap_jlh_diklat_teknis[$j]=$array_kandidat_matrix['Kriteria4']-$array_profil_ideal['jlh_diklat_teknis'];?></td> <td><?php echo $gap_lama_bekerja[$j]=$array_kandidat_matrix['Kriteria5']-$array_profil_ideal['lama_bekerja'];?></td> <td><?php echo $gap_kesetiaan[$j]=$array_kandidat_matrix['Kriteria6']-$array_profil_ideal['kesetiaan'];?></td> <td><?php echo $gap_prestasi_kerja[$j]=$array_kandidat_matrix['Kriteria7']-$array_profil_ideal['prestasi_kerja'];?></td> <td><?php echo $gap_tanggung_jawab[$j]=$array_kandidat_matrix['Kriteria8']-$array_profil_ideal['tanggung_jawab'];?></td> <td><?php echo $gap_ketaatan[$j]=$array_kandidat_matrix['Kriteria9']-$array_profil_ideal['ketaatan'];?></td> <td><?php echo $gap_kejujuran[$j]=$array_kandidat_matrix['Kriteria10']-$array_profil_ideal['kejujuran'];?></td> <td><?php echo $gap_kerjasama[$j]=$array_kandidat_matrix['Kriteria11']-$array_profil_ideal['kerjasama'];?></td> <td><?php echo $gap_prakarsa[$j]=$array_kandidat_matrix['Kriteria12']-$array_profil_ideal['prakarsa'];?></td> </tr> </tbody> <?php if($gap_gol[$j] == "0") $bobot_gol[$j] = 4; else if($gap_gol[$j] == "1") $bobot_gol[$j] = 3.5; else if($gap_gol[$j] == "-1") $bobot_gol[$j] = 3; else if($gap_gol[$j] == "2") $bobot_gol[$j] = 2.5;
else if($gap_gol[$j] == "-2") $bobot_gol[$j] = 2; else if($gap_gol[$j] == "3") $bobot_gol[$j] = 1.5; else if($gap_gol[$j] == "-3") $bobot_gol[$j] = 1; else if($gap_gol[$j] == "4") $bobot_gol[$j] = 0.5; else if($gap_gol[$j] == "-4") $bobot_gol[$j] = 0; if($gap_pendidikan[$j] == "0") $bobot_pendidikan[$j] = 4; else if($gap_pendidikan[$j] == "1") $bobot_pendidikan[$j] = 3.5; else if($gap_pendidikan[$j] == "-1") $bobot_pendidikan[$j] = 3; else if($gap_pendidikan[$j] == "2") $bobot_pendidikan[$j] = 2.5; else if($gap_pendidikan[$j] == "-2") $bobot_pendidikan[$j] = 2; else if($gap_pendidikan[$j] == "3") $bobot_pendidikan[$j] = 1.5; else if($gap_pendidikan[$j] == "-3") $bobot_pendidikan[$j] = 1; else if($gap_pendidikan[$j] == "4") $bobot_pendidikan[$j] = 0.5; else if($gap_pendidikan[$j] == "-4") $bobot_pendidikan[$j] = 0; if($gap_diklat_kepemimpinan[$j] == "0") $bobot_diklat_kepemimpinan[$j] = 4; else if($gap_diklat_kepemimpinan[$j] == "1") $bobot_diklat_kepemimpinan[$j] = 3.5; else if($gap_diklat_kepemimpinan[$j] == "-1") $bobot_diklat_kepemimpinan[$j] = 3; else if($gap_diklat_kepemimpinan[$j] == "2") $bobot_diklat_kepemimpinan[$j] = 2.5; else if($gap_diklat_kepemimpinan[$j] == "-2") $bobot_diklat_kepemimpinan[$j] = 2; else if($gap_diklat_kepemimpinan[$j] == "3") $bobot_diklat_kepemimpinan[$j] = 1.5; else if($gap_diklat_kepemimpinan[$j] == "-3") $bobot_diklat_kepemimpinan[$j] = 1; else if($gap_diklat_kepemimpinan[$j] == "4")
$bobot_diklat_kepemimpinan[$j] = 0.5; else if($gap_diklat_kepemimpinan == "-4") $bobot_diklat_kepemimpinan[$j] = 0; if($gap_jlh_diklat_teknis[$j] == "0") $bobot_jlh_diklat_teknis[$j] = 4; else if($gap_jlh_diklat_teknis[$j] == "1") $bobot_jlh_diklat_teknis[$j] = 3.5; else if($gap_jlh_diklat_teknis[$j] == "-1") $bobot_jlh_diklat_teknis[$j] = 3; else if($gap_jlh_diklat_teknis[$j] == "2") $bobot_jlh_diklat_teknis[$j] = 2.5; else if($gap_jlh_diklat_teknis[$j] == "-2") $bobot_jlh_diklat_teknis[$j] = 2; else if($gap_jlh_diklat_teknis[$j] == "3") $bobot_jlh_diklat_teknis[$j] = 1.5; else if($gap_jlh_diklat_teknis[$j] == "-3") $bobot_jlh_diklat_teknis[$j] = 1; else if($gap_jlh_diklat_teknis[$j] == "4") $bobot_jlh_diklat_teknis[$j] = 0.5; else if($gap_jlh_diklat_teknis[$j] == "-4") $bobot_jlh_diklat_teknis[$j] = 0; if($gap_lama_bekerja[$j] == "0") $bobot_lama_bekerja[$j] = 4; else if($gap_lama_bekerja[$j] == "1") $bobot_lama_bekerja[$j] = 3.5; else if($gap_lama_bekerja[$j] == "-1") $bobot_lama_bekerja[$j] = 3; else if($gap_lama_bekerja[$j] == "2") $bobot_lama_bekerja[$j] = 2.5; else if($gap_lama_bekerja[$j] == "-2") $bobot_lama_bekerja[$j] = 2; else if($gap_lama_bekerja[$j] == "3") $bobot_lama_bekerja[$j] = 1.5; else if($gap_lama_bekerja[$j] == "-3") $bobot_lama_bekerja[$j] = 1; else if($gap_lama_bekerja[$j] == "4") $bobot_lama_bekerja[$j] = 0.5; else if($gap_lama_bekerja[$j] == "-4") $bobot_lama_bekerja[$j] = 0; if($gap_kesetiaan[$j] == "0") $bobot_kesetiaan[$j] = 4; else if($gap_kesetiaan[$j] == "1")
$bobot_kesetiaan[$j] = 3.5; else if($gap_kesetiaan[$j] == "-1") $bobot_kesetiaan[$j] = 3; else if($gap_kesetiaan[$j] == "2") $bobot_kesetiaan[$j] = 2.5; else if($gap_kesetiaan[$j] == "-2") $bobot_kesetiaan[$j] = 2; else if($gap_kesetiaan[$j] == "3") $bobot_kesetiaan[$j] = 1.5; else if($gap_kesetiaan[$j] == "-3") $bobot_kesetiaan[$j] = 1; else if($gap_kesetiaan[$j] == "4") $bobot_kesetiaan[$j] = 0.5; else if($gap_kesetiaan[$j] == "-4") $bobot_kesetiaan[$j] = 0; if($gap_prestasi_kerja[$j] == "0") $bobot_prestasi_kerja[$j] = 4; else if($gap_prestasi_kerja[$j] == "1") $bobot_prestasi_kerja[$j] = 3.5; else if($gap_prestasi_kerja[$j] == "-1") $bobot_prestasi_kerja[$j] = 3; else if($gap_prestasi_kerja[$j] == "2") $bobot_prestasi_kerja[$j] = 2.5; else if($gap_prestasi_kerja[$j] == "-2") $bobot_prestasi_kerja[$j] = 2; else if($gap_prestasi_kerja[$j] == "3") $bobot_prestasi_kerja[$j] = 1.5; else if($gap_prestasi_kerja[$j] == "-3") $bobot_prestasi_kerja[$j] = 1; else if($gap_prestasi_kerja[$j] == "4") $bobot_prestasi_kerja[$j] = 0.5; else if($gap_prestasi_kerja[$j] == "-4") $bobot_prestasi_kerja[$j] = 0; if($gap_tanggung_jawab[$j] == "0") $bobot_tanggung_jawab[$j] = 4; else if($gap_tanggung_jawab[$j] == "1") $bobot_tanggung_jawab[$j] = 3.5; else if($gap_tanggung_jawab[$j] == "-1") $bobot_tanggung_jawab[$j] = 3; else if($gap_tanggung_jawab[$j] == "2") $bobot_tanggung_jawab[$j] = 2.5; else if($gap_tanggung_jawab[$j] == "-2") $bobot_tanggung_jawab[$j] = 2;
else if($gap_tanggung_jawab[$j] == "3") $bobot_tanggung_jawab[$j] = 1.5; else if($gap_tanggung_jawab[$j] == "-3") $bobot_tanggung_jawab[$j] = 1; else if($gap_tanggung_jawab[$j] == "4") $bobot_tanggung_jawab[$j] = 0.5; else if($gap_tanggung_jawab[$j] == "-4") $bobot_tanggung_jawab[$j] = 0; if($gap_ketaatan[$j] == "0") $bobot_ketaatan[$j] = 4; else if($gap_ketaatan[$j] == "1") $bobot_ketaatan[$j] = 3.5; else if($gap_ketaatan[$j] == "-1") $bobot_ketaatan[$j] = 3; else if($gap_ketaatan[$j] == "2") $bobot_ketaatan[$j] = 2.5; else if($gap_ketaatan[$j] == "-2") $bobot_ketaatan[$j] = 2; else if($gap_ketaatan[$j] == "3") $bobot_ketaatan[$j] = 1.5; else if($gap_ketaatan[$j] == "-3") $bobot_ketaatan[$j] = 1; else if($gap_ketaatan[$j] == "4") $bobot_ketaatan[$j] = 0.5; else if($gap_ketaatan[$j] == "-4") $bobot_ketaatan[$j] = 0; if($gap_kejujuran[$j] == "0") $bobot_kejujuran[$j] = 4; else if($gap_kejujuran[$j] == "1") $bobot_kejujuran[$j] = 3.5; else if($gap_kejujuran[$j] == "-1") $bobot_kejujuran[$j] = 3; else if($gap_kejujuran[$j] == "2") $bobot_kejujuran[$j] = 2.5; else if($gap_kejujuran[$j] == "-2") $bobot_kejujuran[$j] = 2; else if($gap_kejujuran[$j] == "3") $bobot_kejujuran[$j] = 1.5; else if($gap_kejujuran[$j] == "-3"){ $bobot_kejujuran[$j] = 1; else if($gap_kejujuran[$j] == "4") $bobot_kejujuran[$j] = 0.5; else if($gap_kejujuran[$j] == "-4") $bobot_kejujuran[$j] = 0;
if($gap_kerjasama[$j] == "0") $bobot_kerjasama[$j] = 4; else if($gap_kerjasama[$j] == "1") $bobot_kerjasama[$j] = 3.5; else if($gap_kerjasama[$j] == "-1") $bobot_kerjasama[$j] = 3; else if($gap_kerjasama[$j] == "2") $bobot_kerjasama[$j] = 2.5; else if($gap_kerjasama[$j] == "-2") $bobot_kerjasama[$j] = 2; else if($gap_kerjasama[$j] == "3") $bobot_kerjasama[$j] = 1.5; else if($gap_kerjasama[$j] == "-3") $bobot_kerjasama[$j] = 1; else if($gap_kerjasama[$j] == "4") $bobot_kerjasama[$j] = 0.5; else if($gap_kerjasama[$j] == "-4") $bobot_kerjasama[$j] = 0; if($gap_prakarsa[$j] == "0") $bobot_prakarsa[$j] = 4; else if($gap_prakarsa[$j] == "1") $bobot_prakarsa[$j] = 3.5; else if($gap_prakarsa[$j] == "-1") $bobot_prakarsa[$j] = 3; else if($gap_prakarsa[$j] == "2") $bobot_prakarsa[$j] = 2.5; else if($gap_prakarsa[$j] == "-2") $bobot_prakarsa[$j] = 2; else if($gap_prakarsa[$j] == "3") $bobot_prakarsa[$j] = 1.5; else if($gap_prakarsa[$j] == "-3") $bobot_prakarsa[$j] = 1; else if($gap_prakarsa[$j]== "4") $bobot_prakarsa[$j] = 0.5; else if($gap_prakarsa[$j] == "-4") $bobot_prakarsa[$j] = 0; $j++; } } ?> </table> <?
$sql2 = mysql_query("SELECT * FROM kandidat order by id_pegawai ASC"); //Buat tabel untuk menampilkan hasil
echo "<header><h3 class='tabs_involved'>Pembobotan Nilai GAP</h3> </header>
<table class='tablesorter' cellspacing='0'> <thead> <tr> <th>No</th> <th>Nama</th> <th>Gol</th> <th>Pendidikan</th> <th>Diklat Kepemimpinan</th> <th>Jlh. Diklat Teknis</th> <th>Lama Bekerja</th> <th>Kesetiaan</th> <th>Prestasi Kerja</th> <th>Tanggung Jawab</th> <th>Ketaatan</th> <th>Kejujuran</th> <th>Kerjasama</th> <th>Prakarsa</th> </tr> </thead> "; $k = 1; while ($dt2 = mysql_fetch_array($sql2)) { ?> <tbody> <tr> <td><? echo $k; ?></td> <td><? echo $dt2[nama_pegawai]; ?> </td> <td><? echo $nilai[1]=$bobot_gol[$k]; ?> </td> <td><? echo $nilai[2]=$bobot_pendidikan[$k]; ?></td> <td><? echo $nilai[3]=$bobot_diklat_kepemimpinan[$k]; ?></td> <td><? echo $nilai[4]=$bobot_jlh_diklat_teknis[$k]; ?></td> <td><? echo $nilai[5]=$bobot_lama_bekerja[$k]; ?></td> <td><? echo $nilai[6]=$bobot_kesetiaan[$k]; ?></td> <td><? echo $nilai[7]=$bobot_prestasi_kerja[$k]; ?></td> <td><? echo $nilai[8]=$bobot_tanggung_jawab[$k]; ?></td> <td><? echo $nilai[9]=$bobot_ketaatan[$k]; ?></td> <td><? echo $nilai[10]=$bobot_kejujuran[$k]; ?></td> <td><? echo $nilai[11]=$bobot_kerjasama[$k]; ?></td>
<td><? echo $nilai[12]=$bobot_prakarsa[$k]; ?></td> <?
echo "</tr>"; echo "</tbody>"; $k++;
$sql3 = mysql_query("SELECT * FROM kriteria order by id_kriteria ASC"); $p=1;
while($data=mysql_fetch_array($sql3)) {
$insert = mysql_query("INSERT INTO tbnilai_bobot_gap VALUES ('$dt2[id_pegawai]','$data[id_kriteria]', '$nilai[$p]')");
$p++; } }
echo "</table>";
$sql4 = mysql_query("SELECT a.*, b.*, c.nama_pegawai FROM tbnilai_bobot_gap a left join kriteria b on a.id_faktor=b.id_kriteria left join kandidat c on
a.id_pegawai=c.id_pegawai");
$sql_kolom1 = mysql_query("select * from kriteria where jenis='core'"); $cek1=mysql_num_rows($sql_kolom1);
$sql_kolom2 = mysql_query("select * from kriteria where jenis='secondary'"); $cek2=mysql_num_rows($sql_kolom2);
?>
<header><h3 class="tabs_involved">Pengelompokkan Core dan Secondary Factor</h3>
</header>
<table class="tablesorter" cellspacing="0"> <thead>
<tr>
<th></th><th></th>
<th colspan="<?=$cek1?>" align="center">Core Factor</th> <th colspan="<?=$cek2?>" align="center">Secondary Factor</th>
</tr>
</thead><thead> <tr><th>No</th> <th>Nama</th> <? $z=1; while($array_kolom1 = mysql_fetch_array($sql_kolom1)){ ?> <th><?php echo $id_faktor_core[$z]=$array_kolom1['id_kriteria'];?></th> <? $z++; } $y=1; while($array_kolom2 = mysql_fetch_array($sql_kolom2)){ ?>
<th><?php echo $id_faktor_secondary[$y]=$array_kolom2['id_kriteria'];?></th> <? $y++; } echo "</tr></thead> "; $no = 1;
$sql_nama = mysql_query("select * from kandidat order by id_pegawai asc"); while($array_faktor=mysql_fetch_array($sql_nama)) { ?> <tbody><tr> <td><?php echo $no;?></td> <td><?php echo $array_faktor['nama_pegawai'];?></td> <?
$sql_nilai_bobot_core = mysql_query("select * from tbnilai_bobot_gap join kriteria on tbnilai_bobot_gap.id_faktor=kriteria.id_kriteria where
id_pegawai='$array_faktor[id_pegawai]' and kriteria.jenis='core' ");
while($array_bobot_faktor_core=mysql_fetch_array($sql_nilai_bobot_core)) { ?>
<td><?php echo $array_bobot_faktor_core['nilai_bobot_gap'];?></td> <? }
$sql_nilai_bobot_secondary = mysql_query("select * from tbnilai_bobot_gap join kriteria on tbnilai_bobot_gap.id_faktor=kriteria.id_kriteria where
id_pegawai='$array_faktor[id_pegawai]' and kriteria.jenis='secondary'");
while($array_bobot_faktor_secondary=mysql_fetch_array($sql_nilai_bobot_secondar y)) { ?> <td><?php echo $array_bobot_faktor_secondary['nilai_bobot_gap'];?></td> <? } ?> </tr></tbody> <? $no++; } ?> </table> <header>
<h3 class="tabs_involved">Perhitungan Nilai Rata-Rata Core dan Secondary Factor</h3>
</header>
<table class="tablesorter" cellspacing="0"> <thead>
<tr>
<th align="center">No</th> <th align="center">Nama</th>
<th align="center">Secondary Factor</th> </tr>
</thead> <?
$n = 1;
$sql_nama2 = mysql_query("select * from kandidat order by id_pegawai asc"); while($array_faktor2=mysql_fetch_array($sql_nama2)) { ?> <tbody><tr> <td><?php echo $n;?></td> <td><?php echo $array_faktor2['nama_pegawai'];?></td> <?
$sql_nilai_rata_core = mysql_query("SELECT sum( nilai_bobot_gap ) as nilai_core FROM tbnilai_bobot_gap
JOIN kriteria ON tbnilai_bobot_gap.id_faktor = kriteria.id_kriteria where kriteria.jenis='core' and
tbnilai_bobot_gap.id_pegawai='$array_faktor2[id_pegawai]'"); $jumlah_item_core=$cek1;
$array_bobot_rata_core=mysql_fetch_array($sql_nilai_rata_core); ?>
<td><?php echo $array_bobot_rata_core['nilai_core']; echo " / ".$jumlah_item_core." = ";
echo
$nilai_rata_core[$array_faktor2['id_pegawai']]=round($array_bobot_rata_core['nilai_ core']/$jumlah_item_core,4);?></td>
<?
$sql_nilai_rata_secondary = mysql_query("SELECT sum( nilai_bobot_gap ) as nilai_secondary
FROM tbnilai_bobot_gap
JOIN kriteria ON tbnilai_bobot_gap.id_faktor = kriteria.id_kriteria where kriteria.jenis='secondary' and
tbnilai_bobot_gap.id_pegawai='$array_faktor2[id_pegawai]'"); $jumlah_item_secondary=$cek2;
$array_bobot_rata_secondary=mysql_fetch_array($sql_nilai_rata_secondary); ?>
<td><?php echo $array_bobot_rata_secondary['nilai_secondary']; echo " / ".$jumlah_item_secondary." = "; echo $nilai_rata_secondary[$array_faktor2['id_pegawai']]=round($array_bobot_rata_secon dary['nilai_secondary']/$jumlah_item_secondary,4);?></td> </tr> <? $n++; } ?>
</tbody> </table>
<header><h3 class="tabs_involved">Hasil Perangkingan Kandidat Menggunakan Metode Profile Matching</h3>
</header>
<table class="tablesorter" cellspacing="0"> <thead> <tr> <th align="center">No</th> <th align="center">Nama</th> <th align="center">Core Factor</th> <th align="center">Secondary Factor</th> <th align="center">Nilai Total ( %CF + %SF )</th> </tr> </thead><tbody> <?
$sql_persentase = mysql_query("SELECT * FROM persentase_faktor"); $array_persentase = mysql_fetch_array($sql_persentase);
$persentase_core= $array_persentase['core_factor'];
$persentase_secondary= $array_persentase['secondary_factor'];
$sql_nama3 = mysql_query("select * from kandidat order by id_pegawai asc"); while($array_faktor3=mysql_fetch_array($sql_nama3)) {
$hasil_pm['id_pegawai']=(($persentase_core/100)*$nilai_rata_core[$array_faktor3['id _pegawai']])+(($persentase_secondary/100)*$nilai_rata_secondary[$array_faktor3['id _pegawai']]);
mysql_query("INSERT INTO hasil_pm VALUES ('','$array_faktor3[id_pegawai]', '$hasil_pm[id_pegawai]')");
} $x=1;
$sql_nama4 = mysql_query("select * from kandidat join hasil_pm on kandidat.id_pegawai=hasil_pm.id_pegawai order by nilai_akhir desc"); while($array_faktor4=mysql_fetch_array($sql_nama4)) { ?> <tr> <td><?php echo $x;?></td> <td><?php echo $array_faktor4['nama_pegawai'];?></td> <td><?php echo $nilai_rata_core[$array_faktor4['id_pegawai']];?></td> <td><?php echo $nilai_rata_secondary[$array_faktor4['id_pegawai']];?></td> <td><?php echo "( ".$persentase_core."% x ".$nilai_rata_core[$array_faktor4['id_pegawai']].") + "; echo "( ".$persentase_secondary."% x ".$nilai_rata_secondary[$array_faktor4['id_pegawai']].") = ";
echo "<span style='color:#F00'>".$array_faktor4['nilai_akhir']."</span>";?></td> </tr>
<? $x++; } ?> </tbody> </table> <?php $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time;
$total_time = round(($finish - $start), 4); ?>
</table>
<header><h3 class="tabs_involved">Lama Waktu Eksekusi Program adalah : <?php echo $total_time;
?> Detik</h3> </header>
</article><!-- end of content manager article --> </section>