<div class="content-wrapper">
    <section class="content-header">
        <h1>Footer <small>Update Footer</small></h1>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-lg-6">
                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">Pengaturan Footer</h3>
                    </div>
                    <div class="box-body">
                        <?php if (isset($_GET['alert']) && $_GET['alert'] == "sukses") { ?>
                            <div class='alert alert-success'>kontak telah diupdate!</div>
                        <?php } ?>
                        <?php foreach ($kontak as $p) { ?>
                            <form method="post" action="<?php echo base_url('dashboard/kontak_update') ?>" enctype="multipart/form-data">
                                
                                <!-- CSRF Protection -->
                                <input type="hidden" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
                                
                                <div class="box-body">
                                    <div class="form-group">
                                        <label>Deskripsi Website</label>
                                        <input type="text" name="nama" class="form-control" placeholder="Masukkan deskripsi.." value="<?php echo $p->nama; ?>">
                                        <?php echo form_error('nama'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label>Alamat</label>
                                        <input type="text" name="alamat" class="form-control" placeholder="Masukkan Alamat.." value="<?php echo $p->alamat; ?>">
                                        <?php echo form_error('alamat'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label>Email</label>
                                        <input type="text" name="email" class="form-control" placeholder="Masukkan Email.." value="<?php echo $p->email; ?>">
                                        <?php echo form_error('email'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label>No.Telp</label>
                                        <input type="text" name="no_telp" class="form-control" placeholder="Masukkan No.Telp.." value="<?php echo $p->no_telp; ?>">
                                        <?php echo form_error('no_telp'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label>Pesan</label>
                                        <input type="text" name="pesan" class="form-control" placeholder="Masukkan Pesan.." value="<?php echo $p->pesan; ?>">
                                        <?php echo form_error('pesan'); ?>
                                    </div>
                                </div>
                                <div class="box-body">
                                    <h3 class="box-title">Lokasi</h3>
                                    <div class="form-group">
                                        <label>Alamat Lokasi</label>
                                        <input type="text" name="lokasi_alamat" class="form-control" placeholder="Masukkan Alamat Lokasi..">
                                        <?php echo form_error('lokasi_alamat'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label>Latitude</label>
                                        <input type="text" name="lokasi_latitude" class="form-control" placeholder="Masukkan Latitude..">
                                        <?php echo form_error('lokasi_latitude'); ?>
                                    </div>
                                    <div class="form-group">
                                        <label>Longitude</label>
                                        <input type="text" name="lokasi_longtitude" class="form-control" placeholder="Masukkan Longtitude..">
                                        <?php echo form_error('lokasi_longtitude'); ?>
                                    </div>
                                </div>
                                
                                <div class="box-footer">
                                    <input type="submit" class="btn btn-success" value="Simpan">
                                </div>
                            </form>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>