<section class="content-header">
	<div class="container-fluid">
		<div id="flash" data-flash="<?= $this->session->flashdata('success'); ?>"></div>
		<div class="row ">
			<div class="col-sm-6">
				<h1>GUDANG CABANG </h1>

			</div>
		</div>
	</div>
</section>
<section class="content">

	<!-- start pencarian -->
	<div class="container-fluid">
		<form action="" method="get">
			<div class="row mb-2 ">
				<div class="col-12">
					<?php if (isset($_GET['Cab'])) {
						$in = $_GET['Cab'];
					} else {
						$in = null;
					} ?>
					<div class="input-group align-center">
						<div class="input-group-prepend">
							<span class="input-group-text"><i class="fas fa-warehouse"></i></span>
						</div>
						<select name="Cab" class="custom-select text-dark text-uppercase">
							<option value="0" selected>Melihat Stok Barang Pilih Lokasi Cabang </option>
							<?php foreach ($lokcabID->result() as $key => $data) { ?>
								<option value="<?= $data->id_cabang ?>" <?= $in == $data->id_cabang ? "selected" : null ?>> <?= $data->cabang ?></option>
							<?php } ?>
						</select>
						<div style="width: 100px" class="input-group-prepend">
							<button type="submit" class="btn btn-outline-secondary w-100">Pilih</button>
						</div>
					</div>
				</div>
		</form>
	</div>
	<!-- ending pencarian -->

	<div class="row">
		<?php foreach ($invid->result() as $am => $data) : ?>
			<div class="col-12 col-sm-6  align-items-stretch">
				<div class="card bg-light">
					<div class="card-header text-muted border-bottom-0">
						<span class="right badge badge-secondary"><?= $data->invkm_tipe ?></span> Support
					</div>
					<div class="card-body pt-0">
						<div class="row">
							<div class="col-7">
								<h2 class="lead"><b><?= $data->invkm_nama ?></b></h2>
								<p class="text-muted text-sm"><b>IG: </b> <?= $data->invkm_sosmed ?> </p>
								<ul class="ml-4 mb-0 fa-ul text-muted">
									<li class="small"><span class="fa-li"></span> <b>Address :</b> <?= $data->invkm_alamat ?></li>
									<li class="small"><span class="fa-li"></span> <b>Phone #:</b> <?= $data->invkm_nohp ?></li>
								</ul>
							</div>
							<div class="col-5 text-center">
								<img src="<?= base_url() ?>/upload/foto/invkm/<?= $data->invkm_foto ?>" alt="" class="img-circle img-fluid">
							</div>
						</div>
					</div>
					<div class="card-footer">

						<a href="https://wa.me/<?= $data->invkm_nohp ?>?text=Hai Apa Kabar, Ada yg bisa di bantu ?" target="black" class="btn btn-sm bg-success">
							<i class="fab fa-whatsapp"></i>
						</a>
						<a id="btn-hapus" href="<?= site_url('invid/delinvkm/' . $data->id_invkm) ?>" class="btn btn-sm btn-secondary">
							<i class="fas fa-trash-restore-alt"></i>
						</a>

					</div>
				</div>
			</div>
		<?php endforeach ?>
	</div>
</section>

<!-- Start modal add invid -->
<form action="<?= base_url('invid/addinv'); ?>" enctype="multipart/form-data" method="post">
	<div class="modal fade bd-example-modal-lg" id="foaminv" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg modal-dialog-centered">
			<div class="modal-content">
				<div class="modal-header bg-secondary">
					<h5 class="modal-title" id="exampleModalLabel">Foam Data Investor Baru</h5>
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
				</div>
				<div class="modal-body">
					<div class="col mb-3 text-center text-secondary ">
						<i class="fas fa-user-check"></i> <strong> Data Personal</strong>
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-id-card"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="invkm_ktp" type="text" placeholder="No.Ktp">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-user-circle"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="invkm_nama" type="text" placeholder="Nama Lengkap">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-home"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="invkm_alamat" type="text" placeholder="Alamat Rumah">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-phone"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="invkm_nohp" type="text" placeholder="No. Handphone">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-envelope"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="invkm_email" type="text" placeholder="Email">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-at"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="invkm_sosmed" type="text" placeholder="Akun Sosial Media">
					</div>

					<div class="input-group mt-2 col-sm-12">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-user-circle"></i>
							</span>
						</div>
						<div class="custom-file ">
							<input type="file" name="invkm_foto" class="custom-file-input " id="validatedInputGroupCustomFile">
							<label class="custom-file-label " for="validatedInputGroupCustomFile">Pilih Foto Wajah</label>
						</div>
					</div>

					<div class="col mb-3 mt-2 text-center text-secondary ">
						<i class="fas fa-money-bill-wave"></i> <strong> Data Pembayaran</strong>
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-calendar-alt"></i>
							</span>
						</div>
						<input required id="waktumitra" class="form-control text-uppercase" name="invkm_tgl" placeholder="Masa Kemitraan">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-pen-alt"></i>
							</span>
						</div>
						<input autocomplete="off" class="form-control text-uppercase" name="invkm_noreg" type="text" placeholder="No.Rekening">
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-building"></i>
							</span>
						</div>
						<select class="form-control" name="invkm_bank" required>
							<option value="">- Pilih Bank -</option>
							<option value="BSI"> Bank BSI </option>
							<option value="BNI"> Bank BNI </option>
							<option value="BNI"> Bank BRI </option>
							<option value="BTN"> Bank BTN </option>
							<option value="Mandiri"> Bank Mandiri </option>
							<option value="BCA"> Bank BCA </option>
						</select>
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-wrench"></i>
							</span>
						</div>
						<select class="form-control" name="invkm_tipe" required>
							<option value="">- Pilih Tipe Investor -</option>
							<option value="Pendanan"> Pendanaan </option>
							<option value="Ruko"> Ruko </option>

						</select>
					</div>

					<div class="input-group mt-2 col-sm-12 ">
						<div class="input-group-prepend">
							<span class="input-group-text">
								<i class="fas fa-warehouse"></i>
							</span>
						</div>
						<select class="form-control" name="id_cabang" required>
							<option value="">- Pilih Cabang -</option>
							<?php foreach ($lokcabID->result() as $key => $data) { ?>
								<option value="<?= $data->id_cabang  ?>"> <?= $data->cabang ?></option>
							<?php } ?>
						</select>
					</div>

					<div class="modal-footer">
						<button type="submit" class="btn btn-secondary w-100">Simpan Data Investor </button>
					</div>
				</div>
			</div>
		</div>
	</div>

</form>
<!-- ending modal add mekanik -->