<?php include 'monev_header.php'; ?>

<div class="breadcome-area">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="breadcome-list">
                    <div class="row">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                            <div class="breadcome-heading">
                                <h4 style="margin-bottom: 0px">Edit Surat Undangan</h4>
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                            <ul class="breadcome-menu" style="padding-top: 0px">
                                <li><a href="#">Home</a> <span class="bread-slash">/</span></li>
                                <li><span class="bread-blod">Arsip</span></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="container-fluid">


    <div class="row">
        <div class="col-lg-6 col-lg-offset-3">
            <div class="panel panel">

                <div class="panel-heading">
                    <h3 class="panel-title">Edit Surat Undangan</h3>
                </div>
                <div class="panel-body">

                    <div class="pull-right">            
                        <a href="undangan.php" class="btn btn-sm btn-primary"><i class="fa fa-arrow-left"></i> Kembali</a>
                    </div>

                    <br>
                    <br>


                    <?php 
                    $id = $_GET['id'];              
                    $data = mysqli_query($koneksi, "select * from undangan where kode_surat='$id'");
                    while($d = mysqli_fetch_array($data)){
                        ?>

                        <form method="post" action="surat_update.php" enctype="multipart/form-data">
							
							
							<input type="hidden" class="form-control" name="kode_surat" required="required" value="<?php echo $d['kode_surat']; ?>">
                            
                            <div class="form-group">
                                <label>Nomor Surat</label>
								<input type="text" class="form-control" name="nomor_surat" required="required" value="<?php echo $d['no_surat']; ?>">
                            </div>

							<div class="form-group">
                                <label>Tanggal Surat</label>
                                <input type="date" class="form-control" name="tgl_surat" required="required" value="<?php echo $d['tgl_surat']; ?>">
                            </div>
							
							<div class="form-group">
								<label>Jumlah Monev</label>
								<input type="text" class="form-control" name="jml_monev" required="required" value="<?php echo $d['jml_monev']; ?>">
							</div>
							
                            <div class="form-group">
                                <label>File</label>
                                <input type="file" name="file">
                                <small>Kosongkan jika tidak ingin mengubah file</small>
                            </div>

                            <div class="form-group">
                                <label></label>
                                <input type="submit" class="btn btn-primary" value="Upload">
                            </div>

                        </form>

                        <?php 
                    }
                    ?>

                </div>
            </div>
        </div>
    </div>


</div>


<?php include 'footer.php'; ?>