<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>.:SPK_Potensi Wilayah Bidang Pertanian:.</title>
	<link rel="shortcut icon" type="image/x-icon" href="../css/images/pavicon.png" />
	<link rel="stylesheet" href="../css/style.css" type="text/css" media="all" />
	<link rel="stylesheet" href="../css/tabel.css" type="text/css" media="all" />
	<link rel="stylesheet" href="../css/flexslider.css" type="text/css" media="all" />
	
	<script src="../js/jquery-1.7.2.min.js" type="text/javascript"></script>
	<!--[if lt IE 9]>
		<script src="js/modernizr.custom.js"></script>
	<![endif]-->
	<script src="../js/jquery.flexslider-min.js" type="text/javascript"></script>
	<script src="../js/functions.js" type="text/javascript"></script>
</head>
<body>
	<!-- wrapper -->
	<div  id="wrapper">
		<!-- header -->
		<header>
			<div class="shell">
				<h1 id="logo"><a href="#">Core</a></h1>
				
			</div>	
		</header>
		<!-- end of header -->
		<!-- navigation -->
		<nav id="navigation">
			<div class="shell">
				<ul>
					<li><a href="../tabel_user.php"><span class="bottom-arr"></span>USER</a></li>				
					<li><a href="../kriteria/tabel_kriteria.php"><span class="bottom-arr"></span>KRITERIA</a></li>
					<li><a href="../sub_kriteria/tabel_sub.php"><span class="bottom-arr"></span>SUB KRITERIA</a></li>
					<li><a href="../wilayah/tabel_wilayah.php"><span class="bottom-arr"></span>WILAYAH</a></li>
					<li><a href="../penilaian/penilaian.php"><span class="bottom-arr"></span>PENILAIAN</a></li>
					<li><a href="../penilaian/hasil_akhir.php""><span class="bottom-arr"></span>RANGKING</a></li>
					<li><a href="../../../logout.php"><span class="bottom-arr"></span>LOG OUT</a></li>
					
				</ul>
			</div>	
		</nav>
		<!-- end of navigation -->
		<!-- slider-holder --><!-- end of slider-holder -->
        <!-- services -->
<section class="services">


<table>
<tr><td class="baris-ganjil" colspan="7"><a href="tambah_kriteria.php"><img src="../add.png" title="tambah data baru"></a></td></tr>
<caption><h3>Tabel Kriteria</h3></caption>
    <tr>
        <th>NO</th>
        <th>Nama Kriteria</th>
        <th>Bobot</th>
		<th>Type</th>
		<th>Pilihan</th>	
    </tr>
	<?php
include "../../../koneksi.php";
$query = mysql_query("SELECT * FROM kriteria");
if(!$query){
	die( mysql_error() );
}
$i=1;
while($row = mysql_fetch_array($query)){
    $clas='baris-ganjil';
    echo "<tr class=$clas>
				  <td >$i</td>
				  <td >".$row['nama_kriteria']."</td>
				<td >".$row['bobot']."</td>
				<td >".$row['type']."</td>
				<td class='data'><center>";
			   ?>
			<a href="<?php echo "edit_kriteria.php?id=".$row['id_kriteria']."";?>"><img src='../mos-css/img/edit.png'></a>&nbsp;&nbsp;&nbsp;&nbsp; <a href="<?php echo "../hapus.php?action=hapus_kriteria&id=".$row['id_kriteria']."";?>" onClick="return confirm('Apakah anda yakin akan menghapus data ini?')"><img src='../mos-css/img/garbage.png'></a></td>
	<?php
				
				
		echo	"</tr>";
			$i=$i+1;
			if ($clas=='baris-ganjil') 
		     { 
			 $clas='baris-ganjil2';
			 }
		}	
	    echo "</table>";
			mysql_close();
		
			 
	?>















</section>
		<!-- end of services -->
		<!-- main -->
	  <div class="main"></div>
		<!-- end of main -->
		<div id="footer-push"></div>
	</div>
	<!-- end of wrapper -->
	<div id="footer">
		<div class="shell">
			<p class="copy">Copyright &copy; 2017 fikom unisan Reza</a></p>
			<div class="cl">&nbsp;</div>
		</div>
	</div>
</body>
</html>