<script type="text/javascript" src="tinymce/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
  tinymce.init({
  selector: 'textarea',
  height: 500,
  theme: 'modern',
  plugins: [
    'advlist autolink lists link image charmap print preview hr anchor pagebreak',
    'searchreplace wordcount visualblocks visualchars code fullscreen',
    'insertdatetime media nonbreaking save table contextmenu directionality',
    'emoticons template paste textcolor colorpicker textpattern imagetools'
  ],
  toolbar1: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
  toolbar2: 'print preview media | forecolor backcolor emoticons',
  image_advtab: true,
  templates: [
    { title: 'Test template 1', content: 'Test 1' },
    { title: 'Test template 2', content: 'Test 2' }
  ],
  content_css: [
    '//fast.fonts.net/cssapi/e6dc9b99-64fe-4292-ad98-6974f93cd2a2.css',
    '//www.tinymce.com/css/codepen.min.css'
  ]
 });
</script>
<div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            DATA AGENDA DESA
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="">Administaris Desa</a></li>
            <li class="active">Agenda Desa</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">

          <div class="row">
              
              <!-- TABS ------------------------------------------------------------------------------------- -->
            <div class="col-md-12">
              <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                 
                  </ul>
                  <div class="tab-pane" id="SuratMasuk">
                   <!-- Post -->
                    <div class="post">
                      <div class="box">
                        <div class="box-header">
                            <h3 class="box-title">Data Agenda Desa</h3> 
                            
                        </div><!-- /.box-header -->
                        
                            <div class="box-body">
                            
                    <form id="form-data" role="form" action="" method="post" enctype="multipart/form-data">
                      <div class="form-group">
                        <label for="inputName" class="col-sm-2 control-label">Jenis Surat</label>
                        <div class="col-sm-3">
                          <input type="text" class="form-control" id="JenisSurat" placeholder="" name="JenisSurat">
                        </div>
                      </div>
                      <br><br>
                      <div class="form-group">
                        <label for="inputExperience" class="col-sm-2 control-label">No Surat Keluar</label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="NoSurat" placeholder="" name="NoSurat"><br>
                        </div>
                      </div>
                      <br><br>
                      <div class="form-group">
                        <label for="" class="col-sm-2 control-label">isi Surat keluar</label>
                        <div class="col-sm-10">
                          <textarea class="form-control" id="IsiSurat" name="IsiSurat"></textarea><br>
                        </div>
                      </div>
                      <br><br>
                      <div class="form-group">
                        <label for="" class="col-sm-2 control-label">Pengirim Surat Keluar</label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="Pengirim" placeholder="" name="Pengirim"><br>
                        </div>
                      </div>
                      <br><br>
                      <div class="form-group">
                        <label for="" class="col-sm-2 control-label">Tanggal Surat Keluar</label>
                        <div class="col-sm-4">
                          <input type="date" class="form-control" id="Tanggal" placeholder="" name="Tanggal"><br>
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="" class="col-sm-2 control-label">Tujuan</label>
                        <div class="col-sm-4">
                          <input type="text" class="form-control" id="Tujuan" placeholder="" name="Tujuan"><br>
                        </div>
                      </div>
                      <div class="form-group">
                        <label for="" class="col-sm-2 control-label">Keterangan</label>
                        <div class="col-sm-10">
                          <input type="text" class="form-control" id="Keterangan" placeholder="" name="Keterangan"><br>
                        </div>
                      </div>
                      <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                          <button type="submit" class="btn btn-danger"name="TambahAgenda">Submit</button>
                          <?php
				if (isset($_POST['TambahAgenda'])) 
				{
				include 'koneksi.php';					
				    $JenisSurat = $_POST['JenisSurat'];
	                            $NoSurat= $_POST['NoSurat'];
	                            $IsiSurat= $_POST['IsiSurat']; 
	                            $Pengirim= $_POST['Pengirim']; 
	                            $Tujuan= $_POST['Tujuan'];
	                            $Tanggal= $_POST['Tanggal'];
	                            $Keterangan = $_POST['Keterangan'];
	                            
				$query3=mysql_query("INSERT INTO SuratKeluar (ID,JenisSurat,NoSurat,IsiSurat,Pengirim,Tujuan,Tanggal,Keterangan) VALUES ('','$JenisSurat','$NoSurat','$IsiSurat','$Pengirim','$Tujuan','$Tanggal','$Keterangan')")or die(mysql_error());  
				echo "<script>window.location='indexadmin.php?p=UmumAgenda';</script>";
				}
				?>
                        </div>
                      </div>
                    </form>
                  </div><!-- /.tab-pane -->
                </div><!-- /.tab-content -->
              </div><!-- /.nav-tabs-custom -->
            </div><!-- /.col -->
          </div><!-- /.row -->

        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
            <script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>