Exemple #1
0
</div>
<div class="row">
  <div class="col-xs-6">
         <div class="row">
      <label class="col-xs-4" for="">Website</label>
      <div class="col-xs-8">
        <select class="form-control" name="website">
          <?php 
$listweb = getwebusr();
foreach ($listweb as $valw) {
    ?>
            <option value="<?php 
    echo $valw;
    ?>
"><?php 
    echo geturlweb($valw);
    ?>
</option>
          <?php 
}
?>
        </select>
      </div>
    </div>
  </div>
  <div class="col-xs-6">
         <div class="row">
      <label class="col-xs-4" for="">Catatan</label>
      <div class="col-xs-8">
        <textarea class="form-control" name="catatan"></textarea>
      </div>
Exemple #2
0
        <?php 
            if ($vkol !== 'username' && $vkol !== 'kdcapab' && $vkol !== 'password' && $vkol !== 'acc') {
                ?>
          <tr>
            <td><?php 
                echo $vkol;
                ?>
</td>
            <td>
            <?php 
                switch ($vkol) {
                    case 'website':
                        $pchweb = explode(',', $vdetu[$vkol]);
                        $cpchw = count($pchweb);
                        for ($wb = 0; $wb < $cpchw; $wb++) {
                            echo '<a href="' . geturlweb($pchweb[$wb]) . '" target="blank">' . geturlweb($pchweb[$wb]) . '</a><br>';
                        }
                        break;
                    case 'ttd':
                        ?>
                <?php 
                        if ($vdetu[$vkol] === 0) {
                            echo 'silahkan upload scan ttd';
                        } else {
                            $path = geturl_img($vdetu[$vkol]);
                            $src = substr($path, 21);
                            $urlimg = base_url() . $src;
                            ?>
                <img src="<?php 
                            echo empty($urlimg) || strlen($urlimg) === 0 ? 'kosong' : $urlimg;
                            ?>
Exemple #3
0
        ?>
                            <tr>
                              <td><a href="<?php 
        echo site_url('gudang/profile/wew?tab=5&id=' . $vprod['kdbarang'] . '&tbl=3');
        ?>
"><?php 
        echo $vprod['kdbarang'];
        ?>
</a>
                              <input type="hidden" value="<?php 
        echo $vprod['kdbarang'];
        ?>
" />
                              </td>
                              <td><?php 
        echo geturlweb($vprod['website']);
        ?>
</td>                              
                              <td><a href="<?php 
        echo $vprod['link'];
        ?>
" target="blank"><?php 
        echo $vprod['link'];
        ?>
</a></td>
                              <td><?php 
        echo $vprod['time'];
        ?>
</td>
                            </tr>
                        <?php 
Exemple #4
0
 function createpdf($idtbl, $iddata, $idu)
 {
     $cekmng = cekurlid('manage', 'idmng');
     if (empty($idtbl) || empty($iddata) || strlen($idtbl) === 0 || strlen($iddata) === 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($iddata, $cekurid)) {
                 //--pdf-----------------------------------------------------------------------------
                 $result = $this->mweb->get_tabelandid($tabel, $iddata);
                 $kolom = $this->db->list_fields($tabel);
                 foreach ($result as $isidata) {
                     foreach ($kolom as $kol) {
                         switch ($kol) {
                             case 'id':
                                 $id = $isidata[$kol];
                                 break;
                             case 'kdquo':
                                 $kdquo = $isidata[$kol];
                                 break;
                             case 'iduser':
                                 $iduser = $isidata[$kol];
                                 break;
                             case 'tgl':
                                 $tgl = $isidata[$kol];
                                 break;
                             case 'idcus':
                                 $idcus = $isidata[$kol];
                                 $qcuss = $this->mweb->getcus_byid($idcus);
                                 foreach ($qcuss as $isicus) {
                                     $namacuss = $isicus['nama'];
                                     $kota = $isicus['kota'];
                                 }
                                 break;
                             case 'address':
                                 $address = $isidata[$kol];
                                 break;
                             case 'attn':
                                 $attn = $isidata[$kol];
                                 break;
                             case 'cc':
                                 $cc = $isidata[$kol];
                                 break;
                             case 'telp':
                                 $telp = $isidata[$kol];
                                 break;
                             case 'fax':
                                 $fax = $isidata[$kol];
                                 break;
                             case 'email':
                                 $email = $isidata[$kol];
                                 break;
                             case 'produk':
                                 $produk = $isidata[$kol];
                                 break;
                             case 'Model':
                                 $model = $isidata[$kol];
                                 break;
                             case 'qty':
                                 $qty = $isidata[$kol];
                                 break;
                             case 'disc':
                                 $disc = $isidata[$kol];
                                 break;
                             case 'price':
                                 $price = $isidata[$kol];
                                 break;
                             case 'subtotal':
                                 $subtotal = $isidata[$kol];
                                 break;
                             case 'amount':
                                 $amount = $isidata[$kol];
                                 break;
                             case 'total':
                                 $total = $isidata[$kol];
                                 break;
                             case 'kdinv':
                                 $kdinv = $isidata[$kol];
                                 break;
                             case 'ship_method':
                                 $ship_method = $isidata[$kol];
                                 break;
                             case 'pay_stat':
                                 $pay_stat = $isidata[$kol];
                                 break;
                             case 'note_pay':
                                 $note_pay = $isidata[$kol];
                                 break;
                             case 'cust_address':
                                 $cust_address = $isidata[$kol];
                                 break;
                             case 'cust_telp':
                                 $cust_telp = $isidata[$kol];
                                 break;
                             case 'bill_name':
                                 $bill_name = $isidata[$kol];
                                 break;
                             case 'bill_address':
                                 $bill_address = $isidata[$kol];
                                 break;
                             case 'bill_telp':
                                 $bill_telp = $isidata[$kol];
                                 break;
                             case 'ship_name':
                                 $ship_name = $isidata[$kol];
                                 break;
                             case 'ship_address':
                                 $ship_address = $isidata[$kol];
                                 break;
                             case 'ship_telp':
                                 $ship_telp = $isidata[$kol];
                                 break;
                             case 'ship_cost':
                                 $ship_cost = $isidata[$kol];
                                 break;
                             case 'pay_method':
                                 $pay_method = $isidata[$kol];
                                 break;
                             case 'catatan':
                                 $catatan = $isidata[$kol];
                                 break;
                             case 'website':
                                 $website = geturlweb($isidata[$kol]);
                                 break;
                             case 'total':
                                 $total = $isidata[$kol];
                                 break;
                             default:
                                 $isidata[$kol];
                                 break;
                         }
                     }
                 }
                 $detailu = getdetuser($idu);
                 foreach ($detailu as $valur) {
                     $namaur = $valur['nama'];
                     $telpur = $valur['telp'];
                     $nohpur = $valur['nohp'];
                     $pinbbur = $valur['pinbb'];
                     $ttdur = $valur['ttd'];
                 }
                 $pdf = new PDF_Quotation('P', 'mm', 'A4');
                 $pdf->cMargin = 0;
                 $pdf->AddPage();
                 $pdf->cMargin = 0;
                 switch ($tabel) {
                     case 'invoice':
                         $pdf->Header();
                         $pdf->jdlinv();
                         $pdf->Line(15, 32, 200, 32);
                         $pdf->lefttopinv();
                         $pdf->Kdinv($kdinv);
                         $pdf->rsideinv($tgl, $pay_method, $ship_method, $pay_stat, $note_pay);
                         $pdf->jdl_cusside();
                         $pdf->isi_cusside(!empty($namacuss) ? $namacuss : ($namacuss = '-'), $cust_address, !empty($kota) ? $kota : ($kota = '-'), !empty($cust_telp) ? $cust_telp : ($cust_telp = '-'));
                         $pdf->jdl_billside();
                         $pdf->isi_billside(!empty($bill_name) ? $bill_name : ($bill_name = '-'), !empty($bill_address) ? $bill_address : ($bill_address = '-'), !empty($bill_telp) ? $bill_telp : ($bill_telp = '-'));
                         $pdf->jdl_shipside();
                         $pdf->isi_shipside(!empty($ship_name) ? $ship_name : ($ship_name = '-'), !empty($ship_address) ? $ship_address : ($ship_address = '-'), !empty($ship_telp) ? $ship_telp : ($ship_telp = '-'));
                         $pdf->Ln(15);
                         $kdbrgg = explode('|', $produk);
                         $jml = explode('|', $qty);
                         $hrg = explode('|', $price);
                         $potong = explode('|', $disc);
                         $subhrg = explode('|', $subtotal);
                         $n = count($kdbrgg);
                         //SetFillColor(int r [, int g, int b])
                         //$pdf->theadinv();
                         $pdf->SetX(14);
                         $html = '<table border="1">';
                         $html .= '<tr><td width="348" align="center"><b> Product</b></td>';
                         $html .= '<td width="28"><b> Qty </b></td>';
                         $html .= '<td width="140"><b>  Unit Price </b></td>';
                         $html .= '<td width="40"><b>  disc </b></td>';
                         $html .= '<td width="160"><b>  Subtotal</b></td>';
                         $html .= '</tr></table>';
                         $pdf->WriteHTML($html);
                         for ($i = 0; $i < $n; $i++) {
                             $pdf->SetX(14);
                             $nmmbrg = $this->mweb->get_Descriptionbyid($kdbrgg[$i]);
                             $pdf->Cell(87, 7, '  ' . $nmmbrg, 1, 0, 'L');
                             $pdf->Cell(7, 7, $jml[$i], 1, 0, 'C');
                             $pdf->Cell(35, 7, $hrg[$i], 1, 0, 'C');
                             $pdf->Cell(10, 7, $potong[$i], 1, 0, 'C');
                             $pdf->Cell(40, 7, $subhrg[$i] . ' ', 1, 0, 'R');
                             $pdf->Ln();
                         }
                         $pdf->totalinv($total);
                         break;
                     case 'quotation':
                         $pdf->addlogo("");
                         $pdf->addjvm("");
                         $idtbl == '7' ? $titlle = "QUOTATION " : ($titlle = "INVOICE ");
                         $pdf->fact_dev($titlle, " ");
                         $pdf->temporaire("CV. Java Multi Mandiri");
                         $pdf->descr("");
                         $pdf->addHeadAlamat(": Jl. Raya Baturaden Timur KM 7 No. 17 Rempoah, Baturaden - Jawa Tengah - 53100");
                         $pdf->addHeadTelp(": 0281-6572222 / 0281-6572606, Email : info@jvm.co.id, Website : http://www.jvm.co.id");
                         $pdf->addTabelDate($tgl);
                         $pdf->addTabelAttn(!empty($attn) ? $attn : ($attn = '-'));
                         $pdf->addTabelQuNo($kdquo);
                         $pdf->addTabelCc("-");
                         // cc
                         $pdf->addTabelTo(!empty($namacuss) ? $namacuss : ($namacuss = '-'));
                         //penerima
                         $pdf->addTabelTelp(!empty($telp) ? $telp : ($telp = '-'));
                         // telp
                         $pdf->addTabelAddress();
                         //alamat
                         $pdf->addressisi(!empty($address) ? $address : ($address = '-'));
                         //alamat
                         $pdf->addTabelFaks(!empty($fax) ? $fax : ($fax = '-'));
                         // faks
                         $pdf->addEmail(!empty($email) ? $email : ($email = '-'));
                         // email
                         $pdf->AddWeAre("");
                         $pdf->Ln();
                         $pdf->Ln();
                         $kdbrgg = explode('|', $produk);
                         $jml = explode('|', $qty);
                         $hrg = explode('|', $price);
                         $potong = explode('|', $disc);
                         $subhrg = explode('|', $subtotal);
                         $n = count($kdbrgg);
                         //SetFillColor(int r [, int g, int b])
                         //$pdf->theadinv();
                         $pdf->SetX(14);
                         $html = '<table border="1">';
                         $html .= '<tr><td width="360"><b> Product </b></td>';
                         $html .= '<td width="48"><b> Qty </b></td>';
                         $html .= '<td width="140"><b> Unit Price </b></td>';
                         $html .= '<td width="48"><b> Disc </b></td>';
                         $html .= '<td width="140"><b> Subtotal </b></td>';
                         $html .= '</tr></table>';
                         $pdf->WriteHTML($html);
                         for ($i = 0; $i < $n; $i++) {
                             $pdf->SetX(14);
                             $nmmbrg = $this->mweb->get_Descriptionbyid($kdbrgg[$i]);
                             $pdf->Cell(90, 7, ' ' . $nmmbrg, 1, 0, 'L');
                             $pdf->Cell(12, 7, ' ' . $jml[$i], 1, 0, 'C');
                             $pdf->Cell(35, 7, ' ' . $hrg[$i], 1, 0, 'C');
                             $pdf->Cell(12, 7, ' ' . $potong[$i], 1, 0, 'C');
                             $pdf->Cell(35, 7, ' ' . $subhrg[$i], 1, 0, 'R');
                             $pdf->Ln();
                         }
                         $pdf->addGrandTotal(array_sum($subhrg));
                         $pdf->addExVAT("");
                         $pdf->addPriceStok("");
                         $pdf->addTerm("DP 50% with order balances 50% before delivery (Full Amount)");
                         $pdf->addDeliv("1 Day After Payment");
                         // bisa ganti
                         $pdf->addwarranty("");
                         $pdf->addwarrantyy("1st Month (Replacement)");
                         $pdf->addwarrantyyy("12nd Month (Repair / Service Hardware & Software)");
                         break;
                     default:
                         $pdf->Cell(40, 5, "No Result !", 0, 0, 'L');
                         break;
                 }
                 $pdf->addBank("");
                 $pdf->addBCA("");
                 $pdf->addMDR("");
                 $pdf->addBNI("");
                 if ($tabel == 'quotation') {
                     $pdf->addThk("");
                     if (empty($ttdur) || strlen($ttdur) === 0 || $ttdur === '0') {
                         $src = 'asset/img/ttd.jpg';
                     } else {
                         $path = geturl_img($ttdur);
                         $src = substr($path, 21);
                     }
                     $pdf->addttd($src);
                     $pdf->addstamp("");
                     $pdf->addCv("");
                     if (empty($namaur) || empty($nohpur) || empty($pinbbur)) {
                         $pdf->addFootTelp("Eka Setiawati Irawan", "0281-5755222/087837160608/Pin BB 29433756");
                     } else {
                         $pdf->addFootTelp($namaur, $telpur . "/" . $nohpur . "/Pin BB " . $pinbbur);
                     }
                 }
                 $detuser = getdetuser($iduser);
                 if ($detuser) {
                     foreach ($detuser as $valuser) {
                         $namau = $valuser['nama'];
                         $pinbbu = $valuser['pinbb'];
                         $emailu = $valuser['email'];
                         $nohpu = $valuser['nohp'];
                     }
                 } else {
                     $detown = getdetuser(1);
                     foreach ($detown as $valuser) {
                         $namau = $valuser['nama'];
                         $pinbbu = $valuser['pinbb'];
                         $emailu = $valuser['email'];
                         $nohpu = $valuser['nohp'];
                     }
                 }
                 $pdf->SetXY(15, 235);
                 $pdf->SetFont('Arial', 'B', 14);
                 $pdf->WriteHTML("<a  href='" . $website . "'>" . $website . "</a>");
                 //$pdf->Contactus($namau,$pinbbu,$emailu,$nohpu);
                 $pdf->hcatatn();
                 $pdf->catatan($catatan);
                 $pdf->Output();
                 //--pdf-----------------------------------------------------------------------------
                 echo 'ada';
             } else {
                 echo 'tidak ada';
             }
         }
     }
 }
Exemple #5
0
echo !empty($catt) ? trim($catt) : '';
?>
</textarea>
                                  </td>
                                </tr>
                                  <tr>
                                      <td>
                                        website
                                      </td>
                                  <td>
                                    <select class="form-control" name="website">
                                      <option value="<?php 
echo $web;
?>
"><?php 
echo geturlweb($web);
?>
</option>
                                      <?php 
if (count($website) > 0 && $website) {
    foreach ($website as $vweb) {
        if ($vweb['id'] !== $web) {
            ?>
                                            <option value="<?php 
            echo $vweb['id'];
            ?>
"><?php 
            echo $vweb['website'];
            ?>
</option>
                                          <?php 
Exemple #6
0
                                </tr>
                                <tr>
                                    <td>Website</td>
                                    <td>
                                    
                                   <select name="website" class="form-control">
                                    <?php 
        $kdweb = explode(',', $valuser['website']);
        $nw = count($kdweb);
        for ($ww = 0; $ww < $nw; $ww++) {
            ?>
<option value="<?php 
            echo $kdweb[$ww];
            ?>
"><?php 
            echo geturlweb($kdweb[$ww]);
            ?>
</option>
<?php 
        }
        ?>
                                    </select>
                                    </td>
                                </tr>
                                    <?php 
    }
    ?>
                                <?php 
} else {
    ?>
                                <tr>