Example #1
0
function getbyidreq($id, $tbl)
{
    $CI =& get_instance();
    $tabel = getnamatbl($tbl);
    $query = $CI->db->get_where($tabel, array('idreq' => $id));
    if ($query->num_rows() === 0) {
        return false;
    } else {
        return $query->result_array();
    }
}
Example #2
0
        <?php 
    } else {
        echo 'tak terdaftar';
    }
}
?>
<!-- table req details -->


<!-- table details -->

<?php 
if (isset($_GET['id']) && isset($_GET['tbl'])) {
    $tbl = htmlspecialchars($_GET['tbl']);
    $tabel = getnamatbl($tbl);
    $dafkol = $this->db->list_fields($tabel);
    $fkol = array_shift(array_slice($dafkol, 0, 1));
    $id = rtrim(htmlspecialchars($_GET['id']));
    $cekurld = cekurlid($tabel, $fkol);
    if (in_array($id, $cekurld)) {
        $datanya = get_details($id, $tbl);
        ?>
            <div class="table-responsive">
            <table class="table table-bordered">
            <thead>
              <tr>
              <?php 
        if (is_admin() || is_mimin()) {
            ?>
                    <th>Aksi</th>