<link rel="stylesheet" type="text/css" href="plugins/datatables/jquery.dataTables.css"/>
<link rel="stylesheet" type="text/css" href="plugins/datatables/dataTables.bootstrap.css"/>
<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 KEGIATAN
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></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">
                  <li class="active"><a href="#SuratMasuk" data-toggle="tab">Data Kegiatan </a></li>
                  
                </ul>
                <div class="tab-content">
                  <div class="active tab-pane" id="SuratMasuk">
                    <!-- Post -->
                    <div class="post">
                      <div class="box">
                        <div class="box-header">
                            <h3 class="box-title"></h3>
                            <div>
                            <a href="indexadmin.php?p=UksKegiatanMasukAdd">
                            </div>
	<button class="btn btn-primary"><i class="glyphicon glyphicon-plus"> Tambah</i></button><hr>
	</a>
                        </div><!-- /.box-header -->
                            <div class="box-body table-responsive">
                                <table id="example2" class="table table-bordered table-striped table-hover" width="100%">
                                    <thead>
                                        <tr>
                                            <th style="width:px;">Nama Kegiatan</th>
                                            <th style="width:px;">Lokasi</th>
                                            <th style="width:px;">Waktu Pelaksanaan</th>
                                            <th style="width:px;">Isi</th>
                                            <th style="width:px;">Penanggungjawab</th>
                                             
                                            <th style="width:px;">Keterangan</th>
                                            <th style="width:10px;">Opsi</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <?php
                                    $query = mysql_query("SELECT * FROM SuratMasuk");
                                    while ($data = mysql_fetch_array($query)) {
                                    ?>
                                        <tr>           
                                            <td><?php echo $data['JenisSurat']; ?></td>
                                            <td><?php echo $data['NoSurat']; ?></td>
                                            <td><?php echo date("d F Y", strtotime($data['TanggalSurat'])); ?></td>
                                            <td><?php echo substr ($data['IsiSurat'],0,300); ?></td>
                                            <td><?php echo $data['Pengirim']; ?></td>
                                           
                                            <td><?php echo $data['Keterangan']; ?></td>
                                            <td align="center">
                                              <a href="indexadmin.php?p=UksKegiatanMasukUpdate&ID=<?php echo $data['ID']; ?>"> <i class="glyphicon glyphicon-edit"></i></a>  
                                                 
                                            </td>
                                        </tr>
                                      <?php
                                      }
                                      ?>
                                    </tbody>
                                  </table>
                            
                            </div>
                        </div>
                    </div><!-- /.post -->
                  </div><!-- /.tab-pane -->

                  <div class="tab-pane" id="SuratKeluar">
                   <!-- Post -->
                    <div class="post">
                      <div class="box">
                        <div class="box-header">
                            <h3 class="box-title"></h3>
                            <div>
                            <a href="indexadmin.php?p=SuratKeluarAdd">
                            </div>
	<button class="btn btn-primary"><i class="glyphicon glyphicon-plus"> Tambah</i></button><hr>
	</a>
                        </div><!-- /.box-header -->
                            <div class="box-body table-responsive">
                                <table id="example1" class="table table-bordered table-striped table-hover"width="100%">
                                    <thead>
                                        <tr>
                                            <th style="width:px;">Jenis Surat</th>
                                            <th style="width:px;">No Surat Keluar</th>
                                            <th style="width:px;">Isi Surat</th>
                                            <th style="width:px;">Pengirim</th>
                                            <th style="width:px;">Tujuan</th>
                                            <th style="width:px;">Tanggal</th>
                                            <th style="width:px;">Keterangan</th>
                                            <th style="width:50px;">Opsi</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <?php
                                    $query = mysql_query("SELECT * FROM SuratKeluar");
                                    while ($data = mysql_fetch_array($query)) {
                                    ?>
                                        <tr>           
                                            <td><?php echo $data['JenisSurat']; ?></td>
                                            <td><?php echo $data['NoSurat']; ?></td>
                                            <td><?php echo substr ($data['IsiSurat'],0,300); ?></td>
                                            <td><?php echo $data['Pengirim']; ?></td>
                                            <td><?php echo $data['Tujuan']; ?></td>
                                            <td><?php echo date("d F Y", strtotime($data['Tanggal'])); ?></td>
                                            <td><?php echo $data['Keterangan']; ?></td>
                                            <td align="center">
                                              <a href="indexadmin.php?p=SuratKeluarUpdate&ID=<?php echo $data['ID']; ?>"> <i class="glyphicon glyphicon-edit"></i></a>  
                                                  
                                            </td>
                                        </tr>
                                      <?php
                                      }
                                      ?>
                                    </tbody>
                                  </table>
                            
                            </div>
                        </div>
                    </div><!-- /.post -->
                  </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>
<script type="text/javascript" charset="utf8" src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.js"></script>
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
  <script>
  $(function(){
    $("#example1").dataTable();
  })
  </script>
  <script>
  $(function(){
    $("#example2").dataTable();
  })
  </script>