Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $js = $this->config->item('js');
- $css = $this->config->item('css');
- $img = $this->config->item('img');
- $images = $this->config->item('images');
- ?>
- <!-- header -->
- <?php
- include_once dirname(__FILE__) . '/../layouts/header.php';
- ?>
- <div class="content">
- <!-- left -->
- <?php
- include_once dirname(__FILE__) . '/../layouts/left.php';
- ?>
- <div id="middle">
- <!-- ========== pencarian dukcapil-->
- <br />
- <br />
- <form method="GET" action>
- <div style="float:left; width:70px;"><strong><font color="000000">DUKCAPIL</font></strong></div>
- <input type="search" style="width:300px" placeholder="Masukan nomor nik" name="nik">
- <button type="submit" value="submit" >CARI</button>
- </form>
- <br />
- <div>
- <?php
- if (isset($_GET['submit']) || isset($_GET['nik'])) {
- $url = "http://10.11.4.34/csf-ws/dukcapil/customer/index_get?nik=" . $_GET['nik'];
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_URL, $url);
- $result = curl_exec($ch);
- curl_close($ch);
- $raw = json_decode($result, TRUE);
- $key = isset($raw['content']) ? $raw['content'] : FALSE;
- if (is_array($key)) {
- ?>
- <table>
- <?php
- foreach ($key as $index => $baris):
- ?> <!-- Mulai loop -->
- <tr>
- <td><?php
- echo $index;
- ?></td>
- <td><?php
- echo "<pre>" . print_r($baris, 1) . "</pre>";
- ?></td>
- <td>
- ..
- </td>
- </tr>
- <?php
- endforeach;
- ?> <!-- Selesai loop -->
- </table>
- <?php
- }
- //if (is_array($key) )
- echo "<div class='col-sm-12'> </div>";
- } else {
- // if (isset($_GET['submit']) || isset($_GET['nik'])) {
- if (isset($key) && $key != '') {
- echo "
- <h4>
- <div class='col-md-12 alert alert-danger'>
- Isikan NIK!
- </div>
- </h4>
- ";
- } else {
- echo "
- <h4>
- <div class='col-md-12 alert alert-danger'>
- Nomor NIK <b>" . "</b> Tidak Ditemukan!
- </div>
- </h4>
- ";
- }
- echo "<div class='col-sm-12'> </div>";
- }
- //}//???
- ?>
- </div>
- </div>
- <!-- footer -->
- <?php
- include_once dirname(__FILE__) . '/../layouts/footer.php';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement