<LINK href="../images/index.css" rel="stylesheet" type="text/css"><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<?PHP
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma_tilang");
$query = "Select * from tilang_set"; 
$result = mysql_query($query); 
if($row2 = mysql_fetch_array($result)){ 
if($row2['s_status'] == '0'){ 
print ('<img src="off.jpg" width="200" height="20">');

}
elseif($row2['s_status'] == '1'){ 
print ('<img src="on.jpg" width="200" height="20">');
}
}
?>
<?PHP
$set1 = $_POST["set"];
$error = "";
if ($set1 == ""){$error = ".";}
if ($error == ""){

mysql_connect("localhost", "root", "benk");
mysql_select_db("cma_tilang");
$query = "UPDATE tilang_set Set s_status = '$set1'";  
$result = mysql_query($query); 

print ('<table width="50%"  border="0" align="center" cellpadding="6" cellspacing="6">
  <tr>
    <td><a href="#" onclick="javascript:window.close();opener.window.focus();" class="menu">BERHASIL DISIMPAN TUTUP JENDELA INI</a></td>
  </tr>
</table>');
}
else
{
echo "$error.";
} 
?>

<table width="100%"  border="0" cellspacing="6" cellpadding="6">
  <tr>
    <td>AKTIFASI LAYANAN INFORMASI TILANG </td>
  </tr>
  <tr>
    <td>Informasi layanan tilang ini menggunakan pulsa untuk membalasnya. Pada penerapan on/off berpengaruh dalam penggunaan pulsa. </td>
  </tr>
  <tr>
    <td><form name="form1" method="post" action="">
      <table width="100%"  border="0" cellspacing="6" cellpadding="6">
        <tr>
          <td width="11%">Setting</td>
          <td width="2%">:</td>
          <td width="87%"><select name="set" id="set">
            <option value="1">ON</option>
            <option value="0">OFF</option>
            <option selected>--Pilih--</option>
          </select></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><input type="submit" name="Submit" value="Submit"></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
