<?php
include "config/koneksi.php";
// Form Pencarian
echo "<tr><td colspan=2><img src=images/search.png></td></tr>
<tr><td colspan=2>
<form method=POST action='?module=hasilcari'>
<input type=text name=kata class=txt-search input type text title='Ketik yang anda cari lalu tekan enter' value='Quick Search' onfocus=if(this.value ==Quick Search) {this.value = '';}>
<input type=submit name=s id=s class=s>
</form>
<hr color=#265180></td></tr>";
?>
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Situs Lowongan Kerja Universitas Kristen Duta Wacana</title>
<link href="adminstyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="wrapper">
<div id="header-wrapper"><a href="index.php"><img src="images/silokerukdw.jpg"/></a>
</div>
</div>
<!-- end #header -->
<div id="navigation">
<ul>
<a href="index.php">Home </a>
<a href="peserta_jobfair.php">Lowongan </a>
<li id="current"><a href="masukkan_data.php">Rekomendasi Lowongan</a></li>
</ul>
</div>
<!-- end #navigation -->
<div id="page">
<div id="content">
<p>
<form method="post" action="bobotalternatif3.php">
<?php
include "connect.php";
//kriterianya
$kriteria=mysql_query("select * from kriteria where kd_kriteria=1");
$k=mysql_fetch_array($kriteria);
//ambil nilai kriteria 2
$kriteria2=mysql_query("select * from kriteria where kd_kriteria=2");
$k2=mysql_fetch_array($kriteria2);
//ambil nilai kriteria 3
$kriteria3=mysql_query("select * from kriteria where kd_kriteria=3");
$k3=mysql_fetch_array($kriteria3);
//ambil nilai alternatif 1
$hasil=mysql_query("select * from alternatif where kd_alternatif=1");
$data=mysql_fetch_array($hasil);
//ambil nilai alternatif 2
$hasil2=mysql_query("select * from alternatif where kd_alternatif=2");
$data2=mysql_fetch_array($hasil2);
//ambil nilai alternatif 3
$hasil3=mysql_query("select * from alternatif where kd_alternatif=3");
$data3=mysql_fetch_array($hasil3);
//ambil nilai alternatif 3
$hasil4=mysql_query("select * from alternatif where kd_alternatif=4");
$data4=mysql_fetch_array($hasil4);
//TAMPILAN TABEL ALTERNATIF PILIHAN YANG MAU DIBANDINGKAN
echo "<H2>Daftar lowongan yang Anda bandingkan :</H2><br>";
echo "<table>
<tr>
<th>Posisi</th>
<th>Keterangan Posisi</th>
<th>Perusahaan</th>
<th>Keterangan Perusahaan</th>
<th>Penempatan</th>
</tr>
<tr>
<td>$data[lowongan]</td>
<td>$data[keterangan]</td>
<td>$data[perusahaan]</td>
<td>$data[ket_per]</td>
<td>$data[penempatan]</td>
</tr>
<tr>
<td>$data2[lowongan]</td>
<td>$data2[keterangan]</td>
<td>$data2[perusahaan]</td>
<td>$data2[ket_per]</td>
<td>$data2[penempatan]</td>
</tr>
<tr>
<td>$data3[lowongan]</td>
<td>$data3[keterangan]</td>
<td>$data3[perusahaan]</td>
<td>$data3[ket_per]</td>
<td>$data3[penempatan]</td>
</tr>
<tr>
<td>$data4[lowongan]</td>
<td>$data4[keterangan]</td>
<td>$data4[perusahaan]</td>
<td>$data4[ket_per]</td>
<td>$data4[penempatan]</td>
</tr>
</table>";
//COMPOSITE WEIGHT
$cw1=($_SESSION[bk1]*$_SESSION[bad1])+($_SESSION[bk2]*$_SESSION[baj1])+($_SESSION[bk3]*$_SESSION[bap1]);
$cw2=($_SESSION[bk1]*$_SESSION[bad2])+($_SESSION[bk2]*$_SESSION[baj2])+($_SESSION[bk3]*$_SESSION[bap2]);
$cw3=($_SESSION[bk1]*$_SESSION[bad3])+($_SESSION[bk2]*$_SESSION[baj3])+($_SESSION[bk3]*$_SESSION[bap3]);
$cw4=($_SESSION[bk1]*$_SESSION[bad4])+($_SESSION[bk2]*$_SESSION[baj4])+($_SESSION[bk3]*$_SESSION[bap4]);
//perhitungan akhir
echo "<br><h2>Perhitungan Prioritas Global</h2><br>
<table><tr>
<th></th>
<th>$k[kriteria]</th>
<th>$k2[kriteria]</th>
<th>$k3[kriteria]</th>
<th>PRIORITAS</th>
</tr>
<tr>
<th>Bobot</th>
<td><center>$_SESSION[bk1]</center></td>
<td><center>$_SESSION[bk2]</center></td>
<td><center>$_SESSION[bk3]</center></td>
<td></td>
</tr>
<tr>
<th>$data[lowongan]<br>$data[perusahaan]<br>$data[penempatan]</th>
<td><center>$_SESSION[bad1]</center></td>
<td><center>$_SESSION[baj1]</center></td>
<td><center>$_SESSION[bap1]</center></td>
<td><center>($_SESSION[bk1]*$_SESSION[bad1])+($_SESSION[bk2]*$_SESSION[baj1])+($_SESSION[bk3]*$_SESSION[bap1])=$cw1</center></td>
</tr>
<tr>
<th>$data2[lowongan]<br>$data2[perusahaan]<br>$data2[penempatan]</th>
<td><center>$_SESSION[bad2]</center></td>
<td><center>$_SESSION[baj2]</center></td>
<td><center>$_SESSION[bap2]</center></td>
<td><center>($_SESSION[bk1]*$_SESSION[bad2])+($_SESSION[bk2]*$_SESSION[baj2])+($_SESSION[bk3]*$_SESSION[bap2])=$cw2</center></td>
</tr>
<tr>
<th>$data3[lowongan]<br>$data3[perusahaan]<br>$data3[penempatan]</th>
<td><center>$_SESSION[bad3]</center></td>
<td><center>$_SESSION[baj3]</center></td>
<td><center>$_SESSION[bap3]</center></td>
<td><center>($_SESSION[bk1]*$_SESSION[bad3])+($_SESSION[bk2]*$_SESSION[baj3])+($_SESSION[bk3]*$_SESSION[bap3])=$cw3</center></td>
</tr>
<tr>
<th>$data4[lowongan]<br>$data4[perusahaan]<br>$data4[penempatan]</th>
<td><center>$_SESSION[bad4]</center></td>
<td><center>$_SESSION[baj4]</center></td>
<td><center>$_SESSION[bap4]</center></td>
<td><center>($_SESSION[bk1]*$_SESSION[bad4])+($_SESSION[bk2]*$_SESSION[baj4])+($_SESSION[bk3]*$_SESSION[bap4])=$cw4</center></td>
</tr>
</table>";
//HASIL AKHIR
echo "<br>Hasil Akhir<br>
<table><tr>
<th></th>
<th>$k[kriteria]</th>
<th>$k2[kriteria]</th>
<th>$k3[kriteria]</th>
<th>PRIORITAS</th>
</tr>
<tr>
<th>Bobot</th>
<td><center>$_SESSION[bk1]</center></td>
<td><center>$_SESSION[bk2]</center></td>
<td><center>$_SESSION[bk3]</center></td>
<td></td>
</tr>
<tr>
<th>$data[lowongan]<br>$data[perusahaan]<br>$data[penempatan]</th>
<td><center>$_SESSION[bad1]</center></td>
<td><center>$_SESSION[baj1]</center></td>
<td><center>$_SESSION[bap1]</center></td>
<td><center>$cw1</center></td>
</tr>
<tr>
<th>$data2[lowongan]<br>$data2[perusahaan]<br>$data2[penempatan]</th>
<td><center>$_SESSION[bad2]</center></td>
<td><center>$_SESSION[baj2]</center></td>
<td><center>$_SESSION[bap2]</center></td>
<td><center>$cw2</center></td>
</tr>
<tr>
<th>$data3[lowongan]<br>$data3[perusahaan]<br>$data3[penempatan]</th>
<td><center>$_SESSION[bad3]</center></td>
<td><center>$_SESSION[baj3]</center></td>
<td><center>$_SESSION[bap3]</center></td>
<td><center>$cw3</center></td>
</tr>
<tr>
<th>$data4[lowongan]<br>$data4[perusahaan]<br>$data4[penempatan]</th>
<td><center>$_SESSION[bad4]</center></td>
<td><center>$_SESSION[baj4]</center></td>
<td><center>$_SESSION[bap4]</center></td>
<td><center>$cw4</center></td>
</tr>
</table>";
?>
</form>
<p>
<?php
//TAMPIL HASIL AHP KRITERIA
echo "<h2>Lowongan pekerjaan <br>yang sesuai untuk anda adalah :</h2>
Bobot Alternatif Lowongan <b><i>".$data[lowongan]."</i></b> di $data[perusahaan] penempatan $data[penempatan] :<b> $cw1</b><br>
Bobot Alternatif Lowongan <b><i>".$data2[lowongan]."</i></b> di $data2[perusahaan] penempatan $data2[penempatan] :<b> $cw2</b><br>
Bobot Alternatif Lowongan <b><i>".$data3[lowongan]."</i></b> di $data3[perusahaan] penempatan $data3[penempatan] :<b> $cw3</b><br>
Bobot Alternatif Lowongan <b><i>".$data4[lowongan]."</i></b> di $data4[perusahaan] penempatan $data4[penempatan] :<b> $cw4</b><br>";
?>
</form>
</p><h2></h2><p>Dari analisis tersebut, lowongan dengan prioritas tertinggi merupakan lowongan yang direkomendasikan oleh sistem.</p>
</p><p> </p>
</div>
</div>
</div>
<div id="footer">© 2012 Situs Lowongan Kerja UKDW</div>
</div>
</body>
</html>