<LINK href="../images/index.css" rel="stylesheet" type="text/css">
<?PHP
$i_tgl1=$_POST["i_tgl"];
$i_bl=date("m");
$i_th=date("Y");
$i_no1= $_POST["i_nosurat"];
$i_nogen1 = $_POST["i_nogen"];
$i_hal1 = $_POST["i_hal"];
$i_info0 = $_POST["i_info"];
$i_info1 = strip_tags($i_info0, '<p><br><i><li><ul><b><a>');
$i_trend0 = $_POST["i_trend"];
$i_trend1 = strip_tags($i_trend0, '<p><br><i><li><ul><b><a>');
$i_saran0 = $_POST["i_saran"];
$i_saran1 = strip_tags($i_saran0, '<p><br><i><li><ul><b><a>');
$error = "";
if ($i_hal1  == ""){$error = "PERIHAL TIDAK BOLEH KOSONG<BR>";}
if ($i_info1 == ""){$error = "INFO TIDAK BOLEH KOSONG<BR>";}
if ($i_trend1 == ""){$error = "TREND TIDAK BOLEH KOSONG<BR>";}
if ($i_saran1 == ""){$error = "SARAN TIDAK BOLEH KOSONG<BR>";}
include("intel_.db.inc.php");
$mytable = "tlapinsus";
$query = "Select * from $mytable where i_id = '$i_nogen1'";
$result = mysql_query($query); 
if ($row = mysql_fetch_array($result)){ 
if  ($row["i_id"] == $i_nogen1){$error = "$error TIDAK BOLEH ADA DUPLIKASI/NOMOR AGENDA GANDA YAITU NO AGENDA : $i_nogen1<br><br>SOLUSI : REFRESH / LOGOUT TERLEBIH DAHULU\n";}
}
if ($error == ""){
$query = "INSERT INTO $mytable(i_no, i_tgl, i_hal, i_info, i_trend, i_saran, i_status) VALUES
('$i_no1','$i_tgl1','$i_hal1','$i_info1','$i_trend1','$i_saran1','1')";
$result = mysql_query($query);
print ('<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td bgcolor="#993300"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td bgcolor="#FF6600"><a href="../index.php?g=lapinsus&d=inc" class="menu">PENAMBAHAN LAPINSUS BERHASIL DISIMPAN KLIK UNTUK KEMBALI<a></td>
      </tr>
    </table></td>
  </tr>
</table>');

}
else
{
echo "$error.";
} 
?>

