Пример #1
0
                            ?>
                <?php 
                            if (isset($_GET['ubahkd'])) {
                                ?>
                    <?php 
                                include APPPATH . 'views/fields/kdbarang.php';
                                ?>
                    <a href="<?php 
                                echo site_url('gudang/edit/' . $this->uri->segment(3) . '/' . $this->uri->segment(4) . '/' . $this->uri->segment(5));
                                ?>
">Batal</a>
                <?php 
                            } else {
                                ?>
                    <input type="text" class="form-control" name="namaprod" value="<?php 
                                echo getnamabrg($row[$kolom[$x]]);
                                ?>
">
                    <input type="hidden" class="form-control" name="<?php 
                                echo $kolom[$x];
                                ?>
" value="<?php 
                                echo $row[$kolom[$x]];
                                ?>
">
                    <a href="<?php 
                                echo current_url() . '?ubahkd';
                                ?>
">Edit</a>
                <?php 
                            }
Пример #2
0
        $kdb[] = $valada['kdbarang'];
        $qtye[] = $valada['qty'];
        $disko[] = $valada['disc'];
        $hrge[] = $valada['price'];
        $subt[] = $valada['subtotal'];
        ?>
          <tr <?php 
        echo isset($_GET['isi2']) && $valada['kdbarang'] === $_GET['isi2'] ? 'style="display:none;"' : '';
        ?>
>
            <td><?php 
        echo $no;
        ?>
</td>
            <td><?php 
        echo getnamabrg($valada['kdbarang']);
        ?>
<input type="hidden" id="<?php 
        echo 'idkdb' . $no;
        ?>
" value="<?php 
        echo $valada['kdbarang'];
        ?>
" /></td>
            <td><?php 
        echo $valada['qty'];
        ?>
</td>
            <td><?php 
        echo strlen($valada['disc']) >= 4 ? 'Rp ' . $valada['disc'] : $valada['disc'] . ' %';
        ?>
Пример #3
0
    public function setemail($id, $idtbl)
    {
        if ($this->session->userdata('logged_in')) {
            $cekmng = cekurlid('manage', 'idmng');
            if (empty($idtbl) || empty($id) || strlen($idtbl) === 0 || strlen($id) === 0) {
                $this->session->unset_userdata('logged_in');
                $this->session->sess_destroy();
                redirect('login', 'refresh');
            } else {
                if (!in_array($idtbl, $cekmng)) {
                    echo 'tidak terdaftar';
                } else {
                    $tabel = $this->mweb->getmanage_by_id($idtbl);
                    $listf = $this->db->list_fields($tabel);
                    $fkol = array_shift(array_slice($listf, 0, 1));
                    $cekurid = cekurlid($tabel, $fkol);
                    if (in_array($id, $cekurid)) {
                        //sendemail------------------------------------------------------------------------------------
                        $isine = $this->mweb->gettable($tabel);
                        $e = '*****@*****.**';
                        foreach ($isine as $valisine) {
                            switch ($tabel) {
                                case 'invoice':
                                    $listprod = explode('|', $valisine['produk']);
                                    $e = $valisine['email'];
                                    $s = 'Invoice kode ' . $valisine['kdinv'];
                                    $cusee = $this->mweb->getcusaksi($id, $idtbl);
                                    $m = '<html><head></head>
									<body>
									Yth. Bapak/Ibu ' . getnamacus($cusee);
                                    $m .= "<br/>berikut kami lampirkan penagihan produk, di antaranya : \n";
                                    $m .= '<ul>';
                                    $cpd = count($listprod);
                                    $no = 1;
                                    for ($pd = 0; $pd < $cpd; $pd++) {
                                        $m .= '<li>' . $no . ' ' . getnamabrg($listprod[$pd]) . '</li>';
                                        $no++;
                                    }
                                    $m .= '</ul></body></html>';
                                    break;
                                case 'quotation':
                                    $e = $valisine['email'];
                                    $s = 'Quotation kode ' . $valisine['kdquo'];
                                    $listprod = explode('|', $valisine['produk']);
                                    $cusee = $this->mweb->getcusaksi($id, $idtbl);
                                    // Always set content-type when sending HTML email
                                    $m = '<html><head></head>
									<body>
									Yth. Bapak/Ibu ' . getnamacus($cusee);
                                    $m .= "<br/>berikut kami lampirkan penagihan produk,di antaranya : \n\t\t\t\t\t\t\t\t\t";
                                    $m .= '<ul>';
                                    $cpd = count($listprod);
                                    $no = 1;
                                    for ($pd = 0; $pd < $cpd; $pd++) {
                                        $m .= '<li>' . $no . ' ' . getnamabrg($listprod[$pd]) . '</li>';
                                        $no++;
                                    }
                                    $m .= '</ul></body></html>';
                                    break;
                                default:
                                    $m = 'salah';
                                    $s = 'no subject';
                                    break;
                            }
                        }
                        $idur = $this->mweb->getusraksi($id, $idtbl);
                        $this->sendEmail($e, $s, $m, $idtbl, $id, $idur);
                        ///echo('proses kirim ke user');
                        //
                        //kirimemail_att($id,$tabel,$email);
                        //redirect('login','refresh');
                        //sendemail------------------------------------------------------------------------------------
                    } else {
                        echo 'tidak ada';
                    }
                }
            }
        } else {
            redirect('login', 'refresh');
        }
    }
Пример #4
0
    $databrg = mysql_query("SELECT * FROM barang WHERE kdbarang='" . $kdbarange . "'");
    if ($databrg) {
        while ($barisbrg = mysql_fetch_array($databrg)) {
            $price = $barisbrg['Harga_Lama'];
            $discc = $barisbrg['disc'];
            $Modelnya = $barisbrg['Model'];
            $nmbrgnya = $barisbrg['Description'];
            $jmlnya = $barisbrg['qty'];
        }
    }
}
//4 =mng 3 =id 2 =func
//getnamabrg(
if ($this->uri->segment(2) === 'edit' && $this->uri->segment(5) === '20') {
    $kdb = $this->uri->segment(3);
    $nmbrgnya = getnamabrg($kdb);
    ?>
<input type="text" class="form-control" value="<?php 
    echo !empty($nmbrgnya) ? $nmbrgnya : '';
    ?>
" readonly>
<input type="hidden" name="kdbarang" value="<?php 
    echo empty($kdb) ? '' : $kdb;
    ?>
">
<?php 
} else {
    ?>
<input type="text" class="form-control" onkeyup="showHintprod(this.value)" value="<?php 
    echo !empty($nmbrgnya) ? $nmbrgnya : '';
    ?>
Пример #5
0
                                    <?php 
    foreach ($barang as $valbrg) {
        $kdbrg = explode('|', $valbrg['produk']);
        $pbrg = explode('|', $valbrg['price']);
        $qbrg = explode('|', $valbrg['qty']);
        $dsbrg = explode('|', $valbrg['disc']);
        $sbrg = explode('|', $valbrg['subtotal']);
    }
    ?>
                                     <?php 
    $n = count($kdbrg);
    for ($xx = 0; $xx < $n; $xx++) {
        ?>
                                     <tr>
                                         <td><?php 
        echo getnamabrg($kdbrg[$xx]);
        ?>
<input type="hidden" name="produk" value="<?php 
        echo $valbrg['produk'];
        ?>
" /></td>
                                         <td><?php 
        echo $pbrg[$xx];
        ?>
<input type="hidden" name="price" value="<?php 
        echo $valbrg['price'];
        ?>
" /></td>
                                         <td><?php 
        echo $qbrg[$xx];
        ?>