function KodeBooking() { //jumlah panjang karakter angka dan huruf. $length_abjad = "2"; $length_angka = "4"; //huruf yg dimasukan, kecuali I,L dan O $huruf = "ABCDEFGHJKMNPRSTUVWXYZ"; //mulai proses generate huruf $i = 1; $txt_abjad = ""; while ($i <= $length_abjad) { $txt_abjad .= $huruf[mt_rand(0, strlen($huruf))]; $i++; } //mulai proses generate angka $datejam = date("His"); $time_md5 = rand(time(), $datejam); $cut = substr($time_md5, 0, $length_angka); //mennggabungkan dan mengacak hasil generate huruf dan angka $acak = str_shuffle($txt_abjad . $cut); //menghitung dan memeriksa hasil generate di database menggunakan fungsi getTotalRow(), //jika hasil generate sudah ada di database maka proses generate akan diulang $cek = getTotalRow('SELECT kd_booking FROM booking WHERE kd_booking = "' . $acak . '"'); if ($cek > 0) { $cek = KodeBooking(); } return $acak; }
$ctl = array(); # Control $tmpWhere = json_encode($whereContArr); $jsWhere = str_replace('"', "'", $tmpWhere); $ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/addbig.png title='" . $_SESSION['lang']['new'] . "' onclick=\"showAdd('" . $tipeVal . "')\"><br><span align='center'>" . $_SESSION['lang']['new'] . "</span></div>"; $ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/list.png title='" . $_SESSION['lang']['list'] . "' onclick=\"defaultList('" . $tipeVal . "')\"><br><span align='center'>" . $_SESSION['lang']['list'] . "</span></div>"; # Search $ctl[] = "<fieldset><legend><b>" . $_SESSION['lang']['find'] . "</b></legend>" . makeElement('sNoTrans', 'label', $_SESSION['lang']['notransaksi']) . makeElement('sNoTrans', 'text', '') . makeElement('sFind', 'btn', $_SESSION['lang']['find'], array('onclick' => "searchTrans('" . $tipe . "','" . $tipeVal . "')")) . "</fieldset>"; #=== Table Aktivitas # Header $header = array($_SESSION['lang']['nomor'], $_SESSION['lang']['organisasi'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['nikmandor'], $_SESSION['lang']['nikmandor1'], $_SESSION['lang']['keraniproduksi'], $_SESSION['lang']['keranimuat'], 'updateby'); # Content $cols = "notransaksi,kodeorg,tanggal,nikmandor,nikmandor1,nikasisten,keranimuat,jurnal,updateby"; $query = selectQuery($dbname, 'kebun_aktifitas', $cols, $whereCont . " and kodeorg='" . $_SESSION['empl']['lokasitugas'] . "'", "tanggal desc, notransaksi desc", false, 10, 1); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'kebun_aktifitas', $whereCont); if (!empty($data)) { $whereKarRow = "karyawanid in ("; $notFirst = false; foreach ($data as $key => $row) { if ($row['jurnal'] == 1) { $data[$key]['switched'] = true; } $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); unset($data[$key]['jurnal']); if ($notFirst == false) { if ($row['nikmandor'] != '') { $whereKarRow .= $row['nikmandor']; $notFirst = true; } if ($row['nikmandor1'] != '') {
$ctl[] = "<fieldset><legend><b>" . $_SESSION['lang']['find'] . "</b></legend>" . makeElement('sNoKonosemen', 'label', $_SESSION['lang']['nokonosemen']) . makeElement('sNoKonosemen', 'text', '') . makeElement('sFind', 'btn', $_SESSION['lang']['find'], array('onclick' => "searchTrans()")) . "</fieldset>"; #=== Table Aktivitas # Header $header = array($_SESSION['lang']['nokonosemen'], $_SESSION['lang']['nokonosemen'] . ' Expeditor', $_SESSION['lang']['pt'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['tanggalberangkat'], $_SESSION['lang']['tanggaltiba'], 'postingterimaby'); //cari nama orang $str = "select karyawanid, namakaryawan from " . $dbname . ".datakaryawan"; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $nama[$bar->karyawanid] = $bar->namakaryawan; } # Content $cols = "nokonosemen,nokonosemenexp,kodept,tanggal,tanggalberangkat,tanggaltiba,postingby,posting,postingkirim"; $order = "nokonosemen desc"; $query = selectQuery($dbname, 'log_konosemenht', $cols, null, $order, false, 10, 1); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'log_suratjalanht'); foreach ($data as $key => $row) { if ($row['postingkirim'] == 1) { $data[$key]['switched'] = true; } if ($row['posting'] == 1) { $data[$key]['switched'] = true; } unset($data[$key]['posting']); unset($data[$key]['postingkirim']); $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); $data[$key]['tanggalberangkat'] = tanggalnormal($row['tanggalberangkat']); $data[$key]['tanggaltiba'] = tanggalnormal($row['tanggaltiba']); if ($row['postingby'] != 0) { $data[$key]['postingby'] = $nama[$row['postingby']]; } else {
$where .= " and tanggal between '" . $tanggal1 . "' and '" . $tanggal2 . "' "; } elseif (!empty($tanggal1)) { $where .= " and tanggal >= '" . $tanggal1 . "'"; } elseif (!empty($tanggal2)) { $where .= " and tanggal <= '" . $tanggal2 . "'"; } } } # Header & Align $header = array($_SESSION['lang']['notransaksi'], $_SESSION['lang']['unitkerja'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['noakun'], $_SESSION['lang']['tipe'], $_SESSION['lang']['matauang'], $_SESSION['lang']['jumlah'], 'Balance', $_SESSION['lang']['remark']); $align = explode(',', 'C,L,C,L,C,C,R,C'); # Content $cols = "notransaksi,kodeorg,tanggal,noakun,tipetransaksi,matauang,jumlah,'balan',keterangan,posting"; $query = selectQuery($dbname, 'keu_kasbankht', $cols, $where, "tanggal desc, notransaksi desc", false, $param['shows'], $param['page']); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'keu_kasbankht', $where); $whereAkun = ""; $whereOrg = ""; $i = 0; foreach ($data as $key => $row) { if ($row['posting'] == 1) { $data[$key]['switched'] = true; } $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); unset($data[$key]['posting']); # Build Condition if ($i == 0) { $whereAkun .= "noakun='" . $row['noakun'] . "'"; $whereOrg .= "kodeorganisasi='" . $row['kodeorg'] . "'"; } else { $whereAkun .= " or noakun='" . $row['noakun'] . "'";
if (isset($param['where'])) { $arrWhere = json_decode(str_replace('\\', '', $param['where']), true); if (!empty($arrWhere)) { foreach ($arrWhere as $key => $r1) { $where .= " and " . $r1[0] . " like '%" . $r1[1] . "%'"; } } } # Header $header = array($_SESSION['lang']['kebun'], $_SESSION['lang']['notransaksi'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['subunit'], $_SESSION['lang']['koderekanan'], $_SESSION['lang']['nilaikontrak'], $_SESSION['lang']['matauang'], $_SESSION['lang']['jumlahrealisasi'], $_SESSION['lang']['status']); # Content $cols = "kodeorg,notransaksi,tanggal,divisi,koderekanan,nilaikontrak,matauang"; $query = selectQuery($dbname, 'log_spkht', $cols, $where . " order by tanggal desc", "", false, $param['shows'], $param['page']); $data = fetchData($query); // print_r($query); $totalRow = getTotalRow($dbname, 'log_spkht', $where); foreach ($data as $key => $row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); $data[$key]['nilaikontrak'] = number_format($row['nilaikontrak']); //=================ambil realisasi $data[$key]['realisasi'] = 0; $strx = "select sum(jumlahrealisasi) as test from " . $dbname . ".log_baspk \r\n where notransaksi='" . $data[$key]['notransaksi'] . "' and statusjurnal = '1'"; $resx = mysql_query($strx); // print_R($strx); while ($barx = mysql_fetch_array($resx)) { $data[$key]['realisasi'] = number_format($barx['test']); } //lihat postingan-============================= $data[$key]['status'] = ''; $strx = "select statusjurnal from " . $dbname . ".log_baspk \r\n where notransaksi='" . $data[$key]['notransaksi'] . "' and statusjurnal=0"; $resx = mysql_query($strx);
$str = "select karyawanid, namakaryawan from " . $dbname . ".datakaryawan"; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $nama[$bar->karyawanid] = $bar->namakaryawan; } # Header $header = array($_SESSION['lang']['nokonosemen'], $_SESSION['lang']['nokonosemen'] . ' Expeditor', $_SESSION['lang']['pt'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['tanggalberangkat'], $_SESSION['lang']['tanggaltiba'], 'postingterimaby'); # Content $cols = "nokonosemen,nokonosemenexp,kodept,tanggal,tanggalberangkat,tanggaltiba,postingby,posting,postingkirim"; $order = "nokonosemen desc"; $query = selectQuery($dbname, 'log_konosemenht', $cols, $where, $order, false, $param['shows'], $param['page']); $data = fetchData($query); if (empty($where)) { $where = null; } $totalRow = getTotalRow($dbname, 'log_konosemenht', $where); foreach ($data as $key => $row) { if ($row['postingkirim'] == 1) { $data[$key]['switched'] = true; } if ($row['posting'] == 1) { $data[$key]['switched'] = true; } unset($data[$key]['posting']); unset($data[$key]['postingkirim']); $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); $data[$key]['tanggalberangkat'] = tanggalnormal($row['tanggalberangkat']); if (!empty($row['tanggaltiba'])) { $data[$key]['tanggaltiba'] = tanggalnormal($row['tanggaltiba']); } if ($row['postingby'] != 0) {
} else { $where .= null; } } else { $where .= null; } // exit("Error".$where); # Header $header = array($_SESSION['lang']['afdeling'], $_SESSION['lang']['blok'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['bulan'], $_SESSION['lang']['tahun'], $_SESSION['lang']['jumlah'], $_SESSION['lang']['jumlahha'], $_SESSION['lang']['jumlahpremi'], $_SESSION['lang']['jumlahpokok']); # Content $optNamaOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $cols = "kodeorg,kodeblok,tanggal,bulan,tahun,jumlah,jumlahha,jumlahpremi,jumlahpokok"; $query = selectQuery($dbname, 'kebun_rencanapanen', $cols, $where, "", false, $param['shows'], $param['page']); //exit("error".$query); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'kebun_rencanapanen', $where); foreach ($data as $key => $row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); $data[$key]['kodeorg'] = $optNamaOrg[$row['kodeorg']]; $data[$key]['kodeblok'] = $row['kodeblok']; } # Make Table $tHeader = new rTable('headTable', 'headTableBody', $header, $data); #$tHeader->addAction('showDetail','Detail','images/'.$_SESSION['theme']."/detail.png"); $tHeader->addAction('showEdit', 'Edit', 'images/' . $_SESSION['theme'] . "/edit.png"); //$tHeader->addAction('deleteData','Delete','images/'.$_SESSION['theme']."/delete.png"); #$tHeader->addAction('approveData','Approve','images/'.$_SESSION['theme']."/approve.png"); #$tHeader->addAction('postingData','Posting','images/'.$_SESSION['theme']."/posting.png"); #$tHeader->_actions[2]->setAltImg('images/'.$_SESSION['theme']."/posted.png"); $tHeader->pageSetting($param['page'], $totalRow, $param['shows']); if (isset($arrWhere)) {
} } } else { $where .= null; } } else { $where .= null; } $where .= " order by tanggal desc"; # Header $header = array($_SESSION['lang']['nopengolahan'], $_SESSION['lang']['pabrik'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['shift']); # Content $cols = "nopengolahan,kodeorg,tanggal,shift,posting"; $query = selectQuery($dbname, 'pabrik_pengolahan', $cols, $where, "", false, $param['shows'], $param['page']); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'pabrik_pengolahan', $where); foreach ($data as $key => $row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); if ($row['posting'] == 1) { $data[$key]['switched'] = true; } unset($data[$key]['posting']); } # Make Table $tHeader = new rTable('headTable', 'headTableBody', $header, $data); $tHeader->addAction('showEdit', 'Edit', 'images/' . $_SESSION['theme'] . "/edit.png"); $tHeader->addAction('deleteData', 'Delete', 'images/' . $_SESSION['theme'] . "/delete.png"); $tHeader->addAction('postingData', 'Posting', 'images/' . $_SESSION['theme'] . "/posting.png"); $tHeader->_actions[2]->setAltImg('images/' . $_SESSION['theme'] . "/posted.png"); $tHeader->addAction('detailPDF', 'Print Data Detail', 'images/' . $_SESSION['theme'] . "/pdf.jpg"); $tHeader->_actions[3]->addAttr('event');
$header = array($_SESSION['lang']['kebun'], $_SESSION['lang']['notransaksi'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['subunit'], $_SESSION['lang']['koderekanan'], $_SESSION['lang']['nilaikontrak'], $_SESSION['lang']['matauang'], $_SESSION['lang']['jumlahrealisasi'], $_SESSION['lang']['status']); # Content $kdOrganisasi = $_SESSION['empl']['kodeorganisasi']; $cols = "kodeorg,notransaksi,tanggal,divisi,koderekanan,nilaikontrak,matauang"; if ($_SESSION['empl']['tipelokasitugas'] == 'HOLDING') { $where = "length(kodeorg)=4"; } else { if ($_SESSION['empl']['tipelokasitugas'] == 'TRAKSI' or $_SESSION['empl']['tipelokasitugas'] == 'KANWIL') { $where = "length(kodeorg)=4 and kodeorg in (select kodeorganisasi from " . $dbname . ".organisasi where induk = '" . $kdOrganisasi . "')"; } else { $where = "kodeorg='" . $_SESSION['empl']['lokasitugas'] . "'"; } } $query = selectQuery($dbname, 'log_spkht', $cols, $where . " order by tanggal desc", "", false, 10, 1); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'log_spkht'); foreach ($data as $key => $row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); $data[$key]['nilaikontrak'] = number_format($row['nilaikontrak']); //=================ambil realisasi $data[$key]['realisasi'] = 0; $strx = "select sum(jumlahrealisasi) from " . $dbname . ".log_baspk \r\n where notransaksi='" . $data[$key]['notransaksi'] . "' and statusjurnal = '1'"; $resx = mysql_query($strx); while ($barx = mysql_fetch_array($resx)) { $data[$key]['realisasi'] = number_format($barx[0]); } //lihat postingan-============================= $data[$key]['status'] = ''; $strx = "select statusjurnal from " . $dbname . ".log_baspk \r\n where notransaksi='" . $data[$key]['notransaksi'] . "' and statusjurnal=0"; $resx = mysql_query($strx); if (mysql_num_rows($resx) > 0) {
$res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $nama[$bar->karyawanid] = $bar->namakaryawan; } $optFranco = makeOption($dbname, 'setup_franco', 'id_franco,franco_name'); # Header $header = array($_SESSION['lang']['nosj'], $_SESSION['lang']['pt'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['tgl_kirim'], 'Release', $_SESSION['lang']['franco'], $_SESSION['lang']['tanggaltiba']); # Content $cols = "nosj,kodept,tanggal,tanggalkirim,postingby,franco,tanggaltiba,posting"; $order = "nosj desc"; $query = selectQuery($dbname, 'log_suratjalanht', $cols, $where, $order, false, $param['shows'], $param['page']); $data = fetchData($query); if (empty($where)) { $where = null; } $totalRow = getTotalRow($dbname, 'log_suratjalanht', $where); foreach ($data as $key => $row) { if ($row['posting'] == 1) { $data[$key]['switched'] = true; } unset($data[$key]['posting']); $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); $data[$key]['tanggalkirim'] = tanggalnormal($row['tanggalkirim']); if (!empty($row['tanggaltiba'])) { $data[$key]['tanggaltiba'] = tanggalnormal($row['tanggaltiba']); } if ($row['postingby'] != 0) { $data[$key]['postingby'] = $nama[$row['postingby']]; } $data[$key]['franco'] = $optFranco[$row['franco']]; }
<?php #=== Prep Control & Search $ctl = array(); # Control $ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/addbig.png title='" . $_SESSION['lang']['new'] . "' onclick=\"showAdd()\"><br><span align='center'>" . $_SESSION['lang']['new'] . "</span></div>"; $ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/list.png title='" . $_SESSION['lang']['list'] . "' onclick=\"defaultList()\"><br><span align='center'>" . $_SESSION['lang']['list'] . "</span></div>"; # Search $ctl[] = "<fieldset><legend><b>" . $_SESSION['lang']['find'] . "</b></legend>" . makeElement('sNoTrans', 'label', $_SESSION['lang']['notransaksi']) . makeElement('sNoTrans', 'text', '') . makeElement('sFind', 'btn', $_SESSION['lang']['find'], array('onclick' => "searchTrans()")) . "</fieldset>"; #=== Table Aktivitas # Header $header = array('Nomor', 'Tanggal', 'Pabrik', 'Kode Tangki', 'Kuantitas CPO', 'Kuantitas PK'); # Content $cols = "notransaksi,tanggal,kodeorg,kodetangki,kuantitas,kernelquantity"; $query = selectQuery($dbname, 'pabrik_masukkeluartangki', $cols, "kodeorg='" . $_SESSION['empl']['lokasitugas'] . "'", "", false, 10, 1); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'pabrik_masukkeluartangki'); foreach ($data as $key => $row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); } # Make Table $tHeader = new rTable('headTable', 'headTableBody', $header, $data); $tHeader->addAction('showEdit', 'Edit', 'images/' . $_SESSION['theme'] . "/edit.png"); $tHeader->addAction('deleteData', 'Delete', 'images/' . $_SESSION['theme'] . "/delete.png"); //$tHeader->addAction('postingData','Posting','images/'.$_SESSION['theme']."/posting.png"); $tHeader->_actions[1]->setAltImg('images/' . $_SESSION['theme'] . "/posted.png"); $tHeader->pageSetting(1, $totalRow, 10); #echo "<pre>"; #print_r($tHeader); #=== Display View # Title & Control OPEN_BOX();
$where .= " and " . $r1[0] . " like '%" . $r1[1] . "%'"; } } } else { $where = null; } } else { $where = null; } # Header $header = array($_SESSION['lang']['kodeorg'], $_SESSION['lang']['namalaporan'], $_SESSION['lang']['periode'], $_SESSION['lang']['ket1']); # Content $cols = "kodeorg,namalaporan,periode,ket1"; $query = selectQuery($dbname, 'keu_5mesinlaporanht', $cols, $where, "", false, $param['shows'], $param['page']); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'keu_5mesinlaporanht', $where); # Make Table $tHeader = new rTable('headTable', 'headTableBody', $header, $data); $tHeader->addAction('showEdit', 'Edit', 'images/' . $_SESSION['theme'] . "/edit.png"); $tHeader->addAction('deleteData', 'Delete', 'images/' . $_SESSION['theme'] . "/delete.png"); $tHeader->pageSetting($param['page'], $totalRow, $param['shows']); if (isset($param['where'])) { $tHeader->setWhere($arrWhere); } # View $tHeader->renderTable(); break; # Form Add Header # Form Add Header case 'showAdd': // View
<?php #=== Prep Control & Search $ctl = array(); # Control $ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/addbig.png title='" . $_SESSION['lang']['new'] . "' onclick=\"showAdd()\"><br><span align='center'>" . $_SESSION['lang']['new'] . "</span></div>"; $ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/list.png title='" . $_SESSION['lang']['list'] . "' onclick=\"defaultList()\"><br><span align='center'>" . $_SESSION['lang']['list'] . "</span></div>"; # Search $ctl[] = "<fieldset><legend><b>" . $_SESSION['lang']['find'] . "</b></legend>" . makeElement('sNoTrans', 'label', $_SESSION['lang']['nopengolahan']) . makeElement('sNoTrans', 'text', '') . makeElement('sFind', 'btn', $_SESSION['lang']['find'], array('onclick' => "searchTrans()")) . "</fieldset>"; #=== Table Aktivitas # Header $header = array($_SESSION['lang']['nopengolahan'], $_SESSION['lang']['pabrik'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['shift']); # Content $cols = "nopengolahan,kodeorg,tanggal,shift,posting"; $query = selectQuery($dbname, 'pabrik_pengolahan', $cols, "kodeorg='" . $_SESSION['empl']['lokasitugas'] . "' order by tanggal desc", "", false, 10, 1); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'pabrik_pengolahan'); /*foreach($data as $key=>$row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); }*/ foreach ($data as $key => $row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); if ($row['posting'] == 1) { $data[$key]['switched'] = true; } unset($data[$key]['posting']); } # Make Table $tHeader = new rTable('headTable', 'headTableBody', $header, $data); #$tHeader->addAction('showDetail','Detail','images/'.$_SESSION['theme']."/detail.png"); $tHeader->addAction('showEdit', 'Edit', 'images/' . $_SESSION['theme'] . "/edit.png"); $tHeader->addAction('deleteData', 'Delete', 'images/' . $_SESSION['theme'] . "/delete.png");
# Options $optAfd = getOrgBelow($dbname, $_SESSION['empl']['lokasitugas'], false, 'afdeling'); #$optAfd = makeOption($dbname,'organisasi','kodeorganisasi,namaorganisasi', # "kodeorganisasi='".$_SESSION['empl']['lokasitugas']."'"); $optBulan = optionMonth(substr($_SESSION['language'], 0, 1), 'long'); # Search $ctl[] = "<fieldset><legend><b>" . $_SESSION['lang']['find'] . "</b></legend>" . makeElement('sAfdeling', 'label', $_SESSION['lang']['afdeling']) . makeElement('sAfdeling', 'select', '', array(), $optAfd) . " " . makeElement('sPeriode', 'label', $_SESSION['lang']['periode']) . makeElement('sBulan', 'select', '', array(), $optBulan) . "/" . makeElement('sTahun', 'text', date('Y'), array('style' => 'width:50px')) . makeElement('sFind', 'btn', $_SESSION['lang']['find'], array('onclick' => "searchTrans('" . $tipe . "','" . $tipeVal . "')")) . "</fieldset>"; #=== Table Aktivitas # Header $header = array($_SESSION['lang']['afdeling'], $_SESSION['lang']['blok'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['bulan'], $_SESSION['lang']['tahun'], $_SESSION['lang']['jumlah'], $_SESSION['lang']['jumlahha'], $_SESSION['lang']['jumlahpremi'], $_SESSION['lang']['jumlahpokok']); # Content $optNamaOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $cols = "kodeorg,kodeblok,tanggal,bulan,tahun,jumlah,jumlahha,jumlahpremi,jumlahpokok"; $query = selectQuery($dbname, 'kebun_rencanapanen', $cols, "left(kodeorg,4)='" . $_SESSION['empl']['lokasitugas'] . "'", "", false, 10, 1); $data = fetchData($query); $totalRow = getTotalRow($dbname, 'kebun_rencanapanen'); foreach ($data as $key => $row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); $data[$key]['kodeorg'] = $optNamaOrg[$row['kodeorg']]; $data[$key]['kodeblok'] = $row['kodeblok']; } # Make Table $tHeader = new rTable('headTable', 'headTableBody', $header, $data); #$tHeader->addAction('showDetail','Detail','images/'.$_SESSION['theme']."/detail.png"); $tHeader->addAction('showEdit', 'Edit', 'images/' . $_SESSION['theme'] . "/edit.png"); //$tHeader->addAction('deleteData','Delete','images/'.$_SESSION['theme']."/delete.png"); #$tHeader->addAction('approveData','Approve','images/'.$_SESSION['theme']."/approve.png"); #$tHeader->addAction('postingData','Posting','images/'.$_SESSION['theme']."/posting.png"); #$tHeader->_actions[2]->setAltImg('images/'.$_SESSION['theme']."/posted.png"); $tHeader->pageSetting(1, $totalRow, 10); $tHeader->setWhere($whereContArr);