Exemple #1
0
                    ?>
                                <?php 
                } else {
                    ?>
                                <a href="<?php 
                    echo site_url('gudang/edit/' . $valdata[$fkolm] . '/' . $mng . '/' . $fkolm);
                    ?>
"  class="btn btn-sm btn-primary" role="group">edit</a>
                                <a href="<?php 
                    echo site_url('gudang/delete/' . $valdata[$fkolm] . '/' . $mng . '/' . $fkolm);
                    ?>
"  class="btn btn-sm btn-primary" role="group">delete</a>
                               <?php 
                    if ($valdata['acc'] === '1') {
                        $cekinc = cekurlid('invoice', 'kdinv');
                        $kdiin = cekurlid('invoice', 'id');
                        if ($cekinc) {
                            $cekq = array_map(function ($val) {
                                return $val = substr($val, 14);
                            }, $cekinc);
                            if (($kin = array_search($valdata[$fkolm], $cekq)) !== false) {
                                ?>
                                                 <a href="<?php 
                                echo site_url('gudang/createpdf/6/' . $kdiin[$kin] . '/' . $valdata['iduser']);
                                ?>
"  class="btn btn-sm btn-success" role="group">view invoice</a>
                                                    <?php 
                            } else {
                                ?>
                                                <a href="<?php 
                                echo site_url('gudang/createinv/' . $valdata[$fkolm] . '/' . $mng . '/' . $fkolm);
Exemple #2
0
    function setacc($idmng = '', $id = '')
    {
        if (!$this->session->userdata('logged_in')) {
            redirect('login', 'refresh');
        } else {
            $session_data = $this->session->userdata('logged_in');
            $idu = $session_data['id'];
            if (empty($idmng) || empty($id)) {
                echo 'tidak terdaftar ' . anchor('gudang', 'beranda');
            } else {
                $tabel = $this->mweb->getmanage_by_id($idmng);
                $listf = $this->db->list_fields($tabel);
                $fkol = array_shift(array_slice($listf, 0, 1));
                $cekurid = cekurlid($tabel, $fkol);
                if (in_array($id, $cekurid)) {
                    $idne = getusraksi($id, $tabel);
                    $this->db->where('id', $id);
                    switch ($idmng) {
                        case '6':
                            $notifq = array('from' => $idu, 'iduser' => $idne, 'msg' => 'Invoice dengan kode <strong>' . $id . '</strong> telah <u>disetujui</u> owner id=' . $idu, 'time' => date('d-m-Y h:i:s'));
                            $query = $this->db->update('invoice', array('acc' => '1'));
                            break;
                        case '7':
                            $notifq = array('from' => $idu, 'iduser' => $idne, 'msg' => 'Quotation dengan kode <strong>' . $id . '</strong> telah <u>disetujui</u> owner id=' . $idu, 'time' => date('d-m-Y h:i:s'));
                            $query = $this->db->update('quotation', array('acc' => '1'));
                            break;
                        default:
                            ?>
							<script type="text/javascript">alert('maaf terjadi kesalahan pada system :(');</script>
							<?php 
                            redirect('login', 'refresh');
                            break;
                    }
                    $settnotif = $this->mweb->settable('notif', $notifq);
                    if ($query) {
                        redirect('gudang/slug/5/4/' . $idmng, 'refresh');
                    }
                } else {
                    echo 'not allowed ' . anchor('gudang', 'beranda');
                }
            }
        }
    }
Exemple #3
0
    }
}
?>
<!-- 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>
              <?php 
        }
        ?>
              <?php