<?php 
	include "php_class/class_mysql.php";
	include "php_class/class_agenda.php";
	$dataAgenda = new dataAgenda;

?>

<link href="<?php echo $base?>plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $base?>plugins/iCheck/all.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $base?>plugins/timepicker/bootstrap-timepicker.min.css" rel="stylesheet"/>
<script src="<?php echo $base?>plugins/input-mask/jquery.inputmask.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/input-mask/jquery.inputmask.date.extensions.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/input-mask/jquery.inputmask.extensions.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/timepicker/bootstrap-timepicker.min.js" type="text/javascript"></script>
<script src="<?php echo $base?>plugins/iCheck/icheck.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $base?>plugins/autocomplete/shieldui-all.css" />
<link href="<?php echo $base?>bootstrap/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
<script type="text/javascript" src="<?php echo $base?>bootstrap/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script type="text/javascript" src="<?php echo $base?>bootstrap/js/locales/bootstrap-datetimepicker.id.js" charset="UTF-8"></script>
<script type="text/javascript" src="<?php echo $base?>plugins/autocomplete/shieldui-all.min.js"></script>
<script>
	$(document).ready(function(){
	var base = <?php echo json_encode($base);?>;
</script>

<style>
	.checkbox2{	width:20px; height:20px; float:left; }
</style>
<section class="content-header">
  <h1>
   Data Agenda Surat
  </h1>
  <ol class="breadcrumb">
    <li><a href="<?php echo $base?>"><i class="fa fa-dashboard"></i> Home</a></li>
    <li><a href="<?php echo $base?>data-proposal">Data Agenda Surat</a></li>
    <li class="active">Tambah Data Agenda Surat</li>
  </ol>
</section>
<section class="content">
 	<div class="row">
    	<div class="col-md-12">
        	 <div class="box box-info">
                <div class="box-header">
                  <h3 class="box-title">Tambah Data Agenda Surat</h3>
                </div>
                <?php 
						$id = $xcode;
						$tgl = $dataAgenda->get_agenda_by_id('tgl', $id);
						$nosurat = $dataAgenda->get_agenda_by_id('nosurat',$id);
						$asal = $dataAgenda->get_agenda_by_id('asal',$id);
						$tujuan = $dataAgenda->get_agenda_by_id('tujuan',$id);
						$prihal = $dataAgenda->get_agenda_by_id('prihal', $id);
						$disposisi = $dataAgenda->get_agenda_by_id('disposisi',$id);
						$beranda = $dataAgenda->get_agenda_by_id('beranda',$id);
						
						
						if($beranda == 1){
							$ctk = 'DEKANAT';	
						}elseif($beranda == 2){
							$ctk = 'MANAJEMEN';
						}elseif($beranda == 3){
							$ctk = 'AKUNTANSI';	
						}elseif($beranda == 4){
							$ctk = 'IESP';	
						}elseif($beranda == 5){
							$ctk = 'REGULER B';
						}else{
							$ctk = 'DEKANAT';
							$beranda = 1;	
						}
				?>
                <div class="box-body">
                	<form method="post" action="<?php echo $base?>query-edit-surat-masuk" enctype="multipart/form-data">
                    	<input type="hidden" name="id" value="<?php echo $id?>">
                         <div class="form-group">
                         	<label for="Operator" class="control-label">Beranda</label>
                            <select class="form-control" name="beranda">
                            	<option value="<?php echo $beranda?>"><?php echo $ctk?></option>
                            	<option value="1">DEKANAT</option>
                                <option value="2">MANAJEMEN</option>
                                <option value="3">AKUNTANSI</option>
                                <option value="4">IESP</option>
                                <option value="5">REGULER B</option>
                            </select>
                         </div>
                        <div class="form-group">
                            <label class="control-label">No Surat</label>
                            <input type="text" name="nosurat"  class="form-control"  placeholder="nomer surat" value="<?php echo $nosurat?>">
                        </div>
                         <div class="form-group">
                            <label for="Operator" class="control-label">Asal Surat</label>
                            <input type="text" name="asal" required="required" class="form-control"  placeholder="asal surat" value="<?php echo $asal?>">
                         </div>
                         <div class="form-group">
                            <label for="Operator" class="control-label">Prihal</label>
                            <input type="text" name="prihal" required="required" class="form-control"  placeholder="prihal" value="<?php echo $prihal?>">
                         </div>

                        <div class="form-group">
                            <label for="Operator" class="control-label">Tujuan / Kepada</label>
                            <input type="text" name="tujuan" required="required" class="form-control"  placeholder="tujuan" value="<?php echo $tujuan?>">
                         </div>
                        <div class="form-group">
                            <label for="Operator" class="control-label">Disposisi</label>
                            <input type="text" name="disposisi" class="form-control"  placeholder="disposisi" value="<?php echo $disposisi?>">
                         </div>
                         <div class="form-group">
                            <label class="control-label">Tanggal Surat</label>
                            <div class="input-group date form_date" data-date="" data-date-format="yyyy-mm-dd" data-link-field="tglProposal2">
                                <input required="required" class="form-control" type="text" value="<?php echo $tgl?>" placeholder="tanggal surat" readonly id="tglProposal">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                                <input type="hidden" id="tglProposal2" name="tanggal" value="<?php echo $tgl?>" />
                                <script type="text/javascript">
                                    $('.form_date').datetimepicker({
                                        language:  'id',
                                        weekStart: 1,
                                        todayBtn:  1,
                                        autoclose: 1,
                                        todayHighlight: 1,
                                        startView: 2,
                                        minView: 2,
                                        forceParse: 0
                                    });
                                </script>  
                            </div>
                         </div>
                         <div class="form-group">
                            <label for="Operator" class="control-label">Dokumen</label>
                            <input type="file" name="dokumen" class="form-control" >
                         </div>
                         <div class="form-group">
                            <button type="submit" class="btn btn-default"><i class='glyphicon glyphicon-ok'></i> Simpan</button>
                         </div>
                </form>
                </div>
               </div>
         </div>
    </div>
</section>

    	
    	