<LINK href="../images/index.css" rel="stylesheet" type="text/css">
<?PHP
$i_tgl1=date("d/m/Y");
$i_nogen1 = $_POST["i_nogen"];
$i_kegiatan1 = $_POST["i_kegiatan"];
$i_tgldo1 = $_POST["i_tgldo"];
$error = "";
if ($i_kegiatan1 == ""){$error = "RENCANA KEGIATAN TIDAK BOLEH KOSONG<BR>";}
if ($i_tgldo1 == ""){$error = "TGL DILAKSANAKAN TIDAK BOLEH KOSONG<BR>";}
include("intel_agendaintel.db.inc_.php");
$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_tgl, i_kegiatan, i_tgldo, i_status) VALUES
('$i_tgl1','$i_kegiatan1','$i_tgldo1','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=agendaintel&d=inc" class="menu">PENAMBAHAN AGENDA INTEL TERENCANA BERHASIL DISIMPAN KLIK UNTUK KEMBALI<a></td>
      </tr>
    </table></td>
  </tr>
</table>');

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

