• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP setIt函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中setIt函数的典型用法代码示例。如果您正苦于以下问题:PHP setIt函数的具体用法?PHP setIt怎么用?PHP setIt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setIt函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: substr

 }
 //get jam lembur
 $sGetLembur = "select jamaktual, jamlembur,tipelembur from " . $dbname . ".sdm_5lembur where kodeorg = '" . substr($kdeOrg, 0, 4) . "'";
 //exit("Error".$sGetLembur);
 $rGetLembur = fetchData($sGetLembur);
 foreach ($rGetLembur as $row => $kar) {
     $GetLembur[$kar['tipelembur']][$kar['jamaktual']] = $kar['jamlembur'];
 }
 //semua data lembur
 $sLembur = "select  uangkelebihanjam,a.karyawanid,jamaktual,tipelembur from " . $dbname . ".sdm_lemburdt b\r\n                  LEFT JOIN " . $dbname . ".datakaryawan a on a.karyawanid = b.karyawanid\r\n                  WHERE b.tanggal between  '" . $tgl_1 . "' and '" . $tgl_2 . "' " . $where2 . " " . $where3 . " " . $where4 . " order by namakaryawan asc ";
 $qLembur = mysql_query($sLembur) or die(mysql_error($conn));
 $dtKaryawan = array();
 while ($rLembur = mysql_fetch_assoc($qLembur)) {
     setIt($jlhJmLembur[$rLembur['karyawanid']], 0);
     setIt($jlhJamLemburKali[$rLembur['karyawanid']], 0);
     setIt($jlhUang[$rLembur['karyawanid']], 0);
     $jlhJmLembur[$rLembur['karyawanid']] += $GetLembur[$rLembur['tipelembur']][$rLembur['jamaktual']];
     //jumlah jam sblm perkalian
     $jlhJamLemburKali[$rLembur['karyawanid']] += $rLembur['jamaktual'];
     $jlhUang[$rLembur['karyawanid']] += $rLembur['uangkelebihanjam'];
     $dtKaryawan[$rLembur['karyawanid']] = $rLembur['karyawanid'];
 }
 $iGaji = "select jumlah,karyawanid from " . $dbname . ".sdm_5gajipokok where tahun='" . substr($periodeGaji, 0, 4) . "' " . " and idkomponen=1";
 $nGaji = mysql_query($iGaji) or die(mysql_error($conn));
 while ($dGaji = mysql_fetch_assoc($nGaji)) {
     $gajiPokok[$dGaji['karyawanid']] = $dGaji['jumlah'];
 }
 $tab .= "<table cellspacing='1' border='" . $brdr . "' class='sortable'>\r\n        <thead class=rowheader>\r\n        <tr>\r\n        <td " . $bgclr . ">No.</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['nama'] . "</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['subbagian'] . "</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['tipekaryawan'] . "</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['bagian'] . "</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['jabatan'] . "</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['total'] . " " . $_SESSION['lang']['absensi'] . "</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['totLembur'] . " Actual</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['totLembur'] . "</td>\r\n        <td " . $bgclr . ">" . $_SESSION['lang']['jumlah'] . " (Rp)</td>";
 $tab .= "<td " . $bgclr . ">" . $_SESSION['lang']['gaji'] . "</td><td  " . $bgclr . ">" . $_SESSION['lang']['persen'] . " " . $_SESSION['lang']['lembur'] . "</td>";
 $tab .= "</tr><thead><tbody>";
 foreach ($dtKaryawan as $dtKary) {
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_2laporanLembur_rekap.php


示例2: setIt

            #tunjangan Provesi
            #gaji pokok
            if ($nojms[$val['karyawanid']] != '') {
                #jika No. JMS diisi maka ada potongan jamsostek
                setIt($tjms[$val['karyawanid']], 0);
                $tjms[$val['karyawanid']] += $val['jumlah'];
            }
        }
    } else {
        #BHL
        //diabaikan yang dari gaji pokok
    }
    #bentuk BPJS di sini
    if ($val['idkomponen'] == 1) {
        if ($nobpjs[$val['karyawanid']] != '') {
            setIt($bpjs[$val['karyawanid']], 0);
            $bpjs[$val['karyawanid']] = $val['jumlah'];
        }
    }
}
#ambil komponen pengurang dari sdm_5gajipokok untuk PHL
$strphl = "select a.*,b.namakaryawan from " . $dbname . ".sdm_5gajipokok a left join \r\n              " . $dbname . ".datakaryawan b on a.karyawanid=b.karyawanid\r\n               where a.tahun=" . substr($tanggal1, 0, 4) . " and b.tipekaryawan='4' and b.lokasitugas='" . $param['kodeorg'] . "' \r\n               and  (b.tanggalkeluar>='" . $tanggal1 . "' or b.tanggalkeluar='0000-00-00') and b.alokasi=0    \r\n               and sistemgaji='Harian' and idkomponen in (select id from " . $dbname . ".sdm_ho_component where plus=0 and type='basic')";
$resphl = fetchData($strphl);
foreach ($resphl as $idx => $val) {
    $readyData[] = array('kodeorg' => $param['kodeorg'], 'periodegaji' => $param['periodegaji'], 'karyawanid' => $val['karyawanid'], 'idkomponen' => $val['idkomponen'], 'jumlah' => $val['jumlah'], 'pengali' => 1);
}
###################update indra ini sudah tidak dipakai lagi, pembentukan di bawah semua
#### 8 januari 2015
#masukin BPJS ke sini
/*foreach($bpjs as $key=>$nilai){
          #add bpjs to ready data====================================
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_3prosesgjharian.php


示例3: setIt

    if ($rData['kodetransaksi'] == 'PNB') {
        $dzArr[$rData['batch']]['kirimbibit'] += $rData['jumlah'];
    }
}
setIt($dzTot['kecambahterima'], 0);
setIt($dzTot['seleksiawal'], 0);
setIt($dzTot['kecambahtanam'], 0);
setIt($dzTot['seleksibibitpn'], 0);
setIt($dzTot['pindahbibitpnmn'], 0);
setIt($dzTot['saldobibitpn'], 0);
setIt($dzTot['seleksibibitmn'], 0);
setIt($dzTot['totalseleksi'], 0);
setIt($dzTot['bibitdoubletone'], 0);
setIt($dzTot['kirimbibit'], 0);
setIt($dzTot['saldobibitmn'], 0);
setIt($dzTot['saldobibit'], 0);
if (!empty($batches)) {
    foreach ($batches as $bat) {
        $stab .= "<tr class=rowcontent>";
        $stab .= "<td align=center>" . $dzArr[$bat]['batch'] . "</td>";
        $stab .= "<td align=center>" . $dzArr[$bat]['tanggaltanam'] . "</td>";
        $stab .= "<td align=left>" . $dzArr[$bat]['jenisbibit'] . "</td>";
        $stab .= "<td align=right>" . number_format($dzArr[$bat]['kecambahterima']) . "</td>";
        //b
        $stab .= "<td align=right>" . number_format($dzArr[$bat]['seleksiawal']) . "</td>";
        //c
        $stab .= "<td align=right>" . number_format($dzArr[$bat]['kecambahtanam']) . "</td>";
        //d=b-c
        $stab .= "<td align=right>" . number_format($dzArr[$bat]['seleksibibitpn'] * -1) . "</td>";
        //e
        $stab .= "<td align=right>" . number_format($dzArr[$bat]['pindahbibitpnmn'] * -1) . "</td>";
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:bibit_2_slave_keluar_masuk.php


示例4: createSaldoAwal

function createSaldoAwal($dariperiode, $keperiode, $kodeorg)
{
    global $conn;
    global $dbname;
    global $akunRAT;
    global $akunCLM;
    global $akunCLY;
    $sawal = array();
    $mtdebet = array();
    $mtkredit = array();
    $salak = array();
    #ambil saldoawal bulan berjalan
    $str = "select awal" . substr($dariperiode, 5, 2) . ",noakun from " . $dbname . ".keu_saldobulanan\n          where periode='" . str_replace("-", "", $dariperiode) . "' and kodeorg='" . $kodeorg . "'";
    $res = mysql_query($str);
    while ($bar = mysql_fetch_array($res)) {
        $sawal[$bar[1]] = $bar[0];
        $mtdebet[$bar[1]] = 0;
        $mtkredit[$bar[1]] = 0;
        $salak[$bar[1]] = $bar[0];
    }
    #ambil transaksi transaksi bln berjalan
    $str = "select debet,kredit,noakun from " . $dbname . ".keu_jurnalsum_vw \n          where periode='" . $dariperiode . "' and kodeorg='" . $kodeorg . "'";
    $res = mysql_query($str);
    while ($bar = mysql_fetch_object($res)) {
        setIt($sawal[$bar->noakun], 0);
        $mtdebet[$bar->noakun] = $bar->debet;
        $mtkredit[$bar->noakun] = $bar->kredit;
        $salak[$bar->noakun] = $mtdebet[$bar->noakun] + $sawal[$bar->noakun] - $mtkredit[$bar->noakun];
    }
    #ambil semu nomor akun
    $str = "select noakun from " . $dbname . ".keu_5akun where length(noakun)=7";
    $res = mysql_query($str);
    $temp = '';
    while ($bar = mysql_fetch_object($res)) {
        #create string update current
        if ($sawal[$bar->noakun] != '') {
            #jika sudah ada di database maka update
            if ($mtdebet[$bar->noakun] == '') {
                $mtdebet[$bar->noakun] = 0;
            }
            if ($mtkredit[$bar->noakun] == '') {
                $mtkredit[$bar->noakun] = 0;
            }
            $temp = "update " . $dbname . ".keu_saldobulanan \n                set debet" . substr($dariperiode, 5, 2) . "=" . $mtdebet[$bar->noakun] . ",\n                kredit" . substr($dariperiode, 5, 2) . "=" . $mtkredit[$bar->noakun] . "\n                where periode='" . str_replace("-", "", $dariperiode) . "'\n                and kodeorg='" . $kodeorg . "' and noakun='" . $bar->noakun . "';";
            if (!mysql_query($temp)) {
                exit("Error update mutasi bulanan " . mysql_error($conn));
            }
        } else {
            #jika belum ada maka insert
            if (isset($sawal[$bar->noakun]) and ($sawal[$bar->noakun] != '' or $mtdebet[$bar->noakun] != '' or $mtkredit[$bar->noakun] != '')) {
                if ($mtdebet[$bar->noakun] == '') {
                    $mtdebet[$bar->noakun] = 0;
                }
                if ($mtkredit[$bar->noakun] == '') {
                    $mtkredit[$bar->noakun] = 0;
                }
                $temp = "insert into  " . $dbname . ".keu_saldobulanan (kodeorg,periode,noakun,\n                  awal" . substr($dariperiode, 5, 2) . ",debet" . substr($dariperiode, 5, 2) . ",\n                  kredit" . substr($dariperiode, 5, 2) . ")values('" . $kodeorg . "','" . str_replace("-", "", $dariperiode) . "','" . $bar->noakun . "',0," . $mtdebet[$bar->noakun] . "," . $mtkredit[$bar->noakun] . ");";
                if (!mysql_query($temp)) {
                    exit("Error insert mutasi bulanan " . mysql_error($conn));
                }
            }
        }
    }
    #delete saldo awal bulan selanjutnya;
    $str = "delete from " . $dbname . ".keu_saldobulanan where periode='" . str_replace("-", "", $keperiode) . "'\n          and kodeorg='" . $kodeorg . "';";
    if (mysql_query($str)) {
        $saldoditahan = 0;
        foreach ($salak as $key => $val) {
            if ($salak[$key] != '') {
                $temp = "insert into  " . $dbname . ".keu_saldobulanan (kodeorg,periode,noakun,\n                      awal" . substr($keperiode, 5, 2) . ")values('" . $kodeorg . "','" . str_replace("-", "", $keperiode) . "','" . $key . "'," . $salak[$key] . ")";
                if (substr($keperiode, 5, 2) != '01') {
                    if (!mysql_query($temp)) {
                        exit("Error insert saldo awal " . mysql_error($conn) . ":" . $temp);
                    }
                } else {
                    if ($key < $akunRAT) {
                        #jika awal tahun maka hanya akan membawa aktiva saja ke bulan selanjutnya
                        #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                        #deteksi jika saldo ditahan
                        #sudah mengakomodasi tutup akhir tahun
                        if ($key == $akunCLY) {
                            $saldoditahan += $salak[$key];
                        } else {
                            if ($key == $akunCLM) {
                                $saldoditahan += $salak[$key];
                                #tampung laba tahun berjalan ke laba ditahan
                                $salak[$key] = 0;
                            }
                            $temp1 = "insert into  " . $dbname . ".keu_saldobulanan (kodeorg,periode,noakun,\n                                  awal" . substr($keperiode, 5, 2) . ")values('" . $kodeorg . "','" . str_replace("-", "", $keperiode) . "','" . $key . "'," . $salak[$key] . ")";
                            #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                            if (!mysql_query($temp1)) {
                                exit("Error insert saldo awal " . mysql_error($conn));
                            }
                        }
                    }
                }
            }
        }
        //masukkan saldo laba ditahan
        if (substr($keperiode, 5, 2) == '01') {
//.........这里部分代码省略.........
开发者ID:halimc17,项目名称:magsys,代码行数:101,代码来源:keu_slave_3tutupbulan_12112015.php


示例5: array_sum

                                     {
         		setIt($arrTotal[$peng1],0);
         		setIt($arrTotal[$peng2],0);
                                         $stream.="<td>-".number_format($arrTotal[$peng1],2)."</td>";
                                         $stream.="<td>-".number_format($arrTotal[$peng2],2)."</td>";
                                     }*/
     }
     $totDpt = array_sum($arrPlus);
     //$totDpt=array_sum($arrPlus)-($arrTotal[$peng1]+$arrTotal[$peng2]);
     $stream .= "<td align=right>" . number_format($totDpt, 2) . "</td>";
     $arrMin = array();
     $q = 0;
     foreach ($arrIdKompMin as $lstKompMin) {
         //if(($lstKompMin!=37)&&($lstKompMin!=36))
         //{
         setIt($arrTotal[$lstKompMin], 0);
         $stream .= "<td align=right>" . number_format($arrTotal[$lstKompMin]) . "</td>";
         $arrMin[$q] = $arrTotal[$lstKompMin];
         $q++;
         // }
     }
     $gajiBersih = $totDpt - array_sum($arrMin);
     //$stream.="<td align=right>".number_format(array_sum($arrPlus),2)."</td>";
     $stream .= "<td align=right>" . number_format(array_sum($arrMin), 2) . "</td>";
     $stream .= "<td align=right>" . number_format($gajiBersih, 0) . "</td>";
     $stream .= "</tr>";
 } else {
     $stream .= "<tr><td colspan=20>&nbsp;</td></tr>";
 }
 //echo "warning:".$strx;
 //=================================================
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_2slipGajiBulananAfd.php


示例6: foreach

                     echo "<td bgcolor=pink>" . $hasilAbsn[$hslAkhir[0]][$isiTgl][0]['absensi'] . "</td>";
                 } else {
                     echo "<td><font color=red>" . $hasilAbsn[$hslAkhir[0]][$isiTgl][0]['absensi'] . "</font></td>";
                 }
             } else {
                 if ($hasilAbsn[$hslAkhir[0]][$isiTgl][0]['absensi'] == '0') {
                     echo "<td></td>";
                 } else {
                     echo "<td>" . $hasilAbsn[$hslAkhir[0]][$isiTgl][0]['absensi'] . "</td>";
                 }
             }
             $brt[$hslAkhir[0]][$hasilAbsn[$hslAkhir[0]][$isiTgl][0]['absensi']] += 1;
         }
         foreach ($klmpkAbsn as $brsKet => $hslKet) {
             setIt($subtot[$hslAkhir[0]]['total'], 0);
             setIt($brt[$hslAkhir[0]][$hslKet['kodeabsen']], 0);
             if ($hslKet['kodeabsen'] != 'H') {
                 echo "<td width=5px align=right><font color=red>" . $brt[$hslAkhir[0]][$hslKet['kodeabsen']] . "</font></td>";
             } else {
                 echo "<td width=5px align=right>" . $brt[$hslAkhir[0]][$hslKet['kodeabsen']] . "</td>";
             }
             $subtot[$hslAkhir[0]]['total'] += $brt[$hslAkhir[0]][$hslKet['kodeabsen']];
         }
         echo "<td width=5px>" . $subtot[$hslAkhir[0]]['total'] . "</td>";
         $subtot['total'] = 0;
         echo "</tr>";
     }
 }
 //echo"warning:";
 /*	echo"<pre>";
 	print_r($hasilAbsn);
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_2rekapabsen_kary.php


示例7: sum

$no = 0;
if (mysql_num_rows($res) < 1) {
    echo "<tr class=rowcontent><td colspan=8 style='text-align:center'>" . $_SESSION['lang']['datanotfound'] . "</td></tr>";
} else {
    #ambil jumlah jam per kendaraan
    $str1 = "select sum(jumlah) as jumlah,kodevhc from " . $dbname . ".vhc_rundt a left join \r\n       " . $dbname . ".vhc_runht b on a.notransaksi=b.notransaksi\r\n      where tanggal>='" . $tglAwal . "' and tanggal<='" . $tglAkhir . "' and kodevhc in (select kodevhc from " . $dbname . ".vhc_5master\r\n      where kodetraksi like '" . $unit . "%')\r\n      group by kodevhc";
    $res1 = mysql_query($str1);
    $jumlahjam = array();
    while ($bar1 = mysql_fetch_object($res1)) {
        $jumlahjam[str_replace(" ", "", $bar1->kodevhc)] = $bar1->jumlah;
    }
    #loop per kendaraan
    while ($bar = mysql_fetch_object($res)) {
        $no += 1;
        $total = 0;
        setIt($jumlahjam[str_replace(" ", "", $bar->kodevhc)], 0);
        if ($jumlahjam[str_replace(" ", "", $bar->kodevhc)] > 0) {
            $rpunit = $bar->jumlah / $jumlahjam[str_replace(" ", "", $bar->kodevhc)];
        } else {
            $rpunit = 0;
        }
        if (isset($jumlahjam[str_replace(" ", "", $bar->kodevhc)])) {
            $color = '#dedede';
            $title = 'Normal';
            $tmblDetail = "<img onclick=\"detailAlokasi(event,'" . str_replace(" ", "", $bar->kodevhc) . "','" . $rpunit . "');\" title=\"Detail Alokasi\" class=\"resicon\" src=\"images/zoom.png\">";
        } else {
            $color = 'red';
            $title = 'No activity record';
            $tmblDetail = "";
        }
        $ondiKlik = " style='cursor:pointer;' title='Click' onclick=\"viewDetail(event,'" . str_replace(" ", "", $bar->kodevhc) . "','" . $tglAwal . "','" . $tglAkhir . "','" . substr($unit, 0, 4) . "','" . $periode . "','" . $akunkdari . "','" . $akunksampai . "');\"";
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:vhc_slave_2biayatotalperkendaraan.php


示例8: foreach

$tab .= "<td align=center " . $bg . ">" . $_SESSION['lang']['total'] . "</td>";
$tab .= "</tr><thead><tbody>";
if ($dtblokkedua != 0) {
    foreach ($lstKodeorg as $dtBlok2) {
        setIt($panenHslBln[$dtBlok2], 0);
        setIt($hkBln[$dtBlok2]['KBL'], 0);
        setIt($hkBln[$dtBlok2]['KHT'], 0);
        setIt($hkBln[$dtBlok2]['KHL'], 0);
        setIt($hkBln[$dtBlok2]['Kontrak'], 0);
        setIt($hkBln[$dtBlok2]['Kontrak Karywa (Usia Lanjut)'], 0);
        setIt($panenHslBlnLalu[$dtBlok2], 0);
        setIt($hkBlnLalu[$dtBlok2]['KBL'], 0);
        setIt($hkBlnLalu[$dtBlok2]['KHT'], 0);
        setIt($hkBlnLalu[$dtBlok2]['KHL'], 0);
        setIt($hkBlnLalu[$dtBlok2]['Kontrak'], 0);
        setIt($hkBlnLalu[$dtBlok2]['Kontrak Karywa (Usia Lanjut)'], 0);
        $tab .= "<tr class=rowcontent>";
        $tab .= "<td>" . $dtBlok2 . "</td>";
        $tab .= "<td>611010101</td>";
        $tab .= "<td>" . $optNmkeg[611010101] . "</td>";
        $tab .= "<td align=center>" . $optSatkeg[611010101] . "</td>";
        $tab .= "<td align=right>" . number_format($panenHslBln[$dtBlok2], 2) . "</td>";
        $tab .= "<td align=right>" . number_format($hkBln[$dtBlok2]['KBL'], 0) . "</td>";
        $tab .= "<td align=right>" . number_format($hkBln[$dtBlok2]['KHT'], 0) . "</td>";
        $tab .= "<td align=right>" . number_format($hkBln[$dtBlok2]['KHL'], 0) . "</td>";
        $tab .= "<td align=right>" . number_format($hkBln[$dtBlok2]['Kontrak'], 0) . "</td>";
        $tab .= "<td align=right>" . number_format($hkBln[$dtBlok2]['Kontrak Karywa (Usia Lanjut)'], 0) . "</td>";
        $totSubPanen[$dtBlok2] = $hkBln[$dtBlok2]['KBL'] + $hkBln[$dtBlok2]['KHT'] + $hkBln[$dtBlok2]['KHL'] + $hkBln[$dtBlok2]['Kontrak'] + $hkBln[$dtBlok2]['Kontrak Karywa (Usia Lanjut)'];
        @($hkSatuanPanen[$dtBlok2] = $totSub[$dtBlok2] / $panenHslBln[$dtBlok2]);
        $tab .= "<td align=right>" . number_format($totSubPanen[$dtBlok2], 0) . "</td>";
        $tab .= "<td align=right>" . number_format($hkSatuanPanen[$dtBlok2], 2) . "</td>";
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:kebun_slave_2penggunaanHK.php


示例9: setIt

            setIt($subPerKom[$per][$idKom], '');
            $stream .= "<td align=right>" . number_format((double) $gaji[$idKar][$per][$idKom], 2) . "</td>";
            $subTotKar[$idKar] += $gaji[$idKar][$per][$idKom];
            $subPerKom[$per][$idKom] += $gaji[$idKar][$per][$idKom];
        }
    }
    $granTot = "";
    $granTot += $subTotKar[$idKar];
    //$stream.="<td align=right>".number_format($subTotKar[$idKar])."</td>";
    $stream .= "</tr>";
}
$stream .= "<thead><tr class=rowcontent>";
$stream .= "<td colspan=5 align=right>" . $_SESSION['lang']['grnd_total'] . "</td>";
foreach ($rangePer as $ar => $per) {
    foreach ($idKomponen as $idKom) {
        setIt($subPerKom[$per][$idKom], '');
        $stream .= "<td align=right>" . number_format((double) $subPerKom[$per][$idKom], 2) . "</td>";
    }
}
//$stream.="<td>".number_format($granTot,2)."</td>";
$stream .= "</tr></thead>";
$stream .= "<tbody></table>";
switch ($proses) {
    ######PREVIEW
    case 'preview':
        echo $stream;
        break;
        ######EXCEL
    ######EXCEL
    case 'excel':
        //$stream.="Print Time : ".date('H:i:s, d/m/Y')."<br>By : ".$_SESSION['empl']['name'];
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_2totalkomponengaji.php


示例10: setIt

            $subtotal[$judul]['umum'] += $dz[$list]['umum'];
            $subtotal[$judul]['tbm0'] += $dz[$list]['tbm0'];
            $subtotal[$judul]['tbm1'] += $dz[$list]['tbm1'];
            $subtotal[$judul]['tbm2'] += $dz[$list]['tbm2'];
            $subtotal[$judul]['tbm3'] += $dz[$list]['tbm3'];
            $subtotal[$judul]['tm'] += $dz[$list]['tm'];
            $subtotal[$judul]['total1'] += $dz[$list]['total1'];
            //GranTotal
            setIt($grandtotal[$judul]['umum'], 0);
            setIt($grandtotal['hmkm'], 0);
            setIt($grandtotal['tbm0'], 0);
            setIt($grandtotal['tbm1'], 0);
            setIt($grandtotal['tbm2'], 0);
            setIt($grandtotal['tbm3'], 0);
            setIt($grandtotal['tm'], 0);
            setIt($grandtotal['total1'], 0);
            $grandtotal['hmkm'] += $rowListDetail[$list]['hmkm'];
            $grandtotal['umum'] += $dz[$list]['umum'];
            $grandtotal['tbm0'] += $dz[$list]['tbm0'];
            $grandtotal['tbm1'] += $dz[$list]['tbm1'];
            $grandtotal['tbm2'] += $dz[$list]['tbm2'];
            $grandtotal['tbm3'] += $dz[$list]['tbm3'];
            $grandtotal['tm'] += $dz[$list]['tm'];
            $grandtotal['total1'] += $dz[$list]['total1'];
        }
    }
    $stream .= "<tr class=rowcontent>\r\n\t\t\t\t<td colspan=5 style='text-align:center'><b>SUB TOTAL</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($subtotal[$judul]['hmkm'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($subtotal[$judul]['umum'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($subtotal[$judul]['tbm0'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($subtotal[$judul]['tbm1'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($subtotal[$judul]['tbm2'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($subtotal[$judul]['tbm3'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($subtotal[$judul]['tm'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($subtotal[$judul]['total1'], 2) . "</b></td>\r\n\t\t</tr>";
}
$stream .= "<tr class=rowcontent>\r\n\t\t\t\t<td colspan=13 style='height:10px;'>&nbsp;</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr class=rowcontent>\r\n\t\t\t\t<td colspan=5 style='text-align:center'><b>GRANDTOTAL</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($grandtotal['hmkm'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($grandtotal['umum'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($grandtotal['tbm0'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($grandtotal['tbm1'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($grandtotal['tbm2'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($grandtotal['tbm3'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($grandtotal['tm'], 2) . "</b></td>\r\n\t\t\t\t<td style='text-align:right'><b>" . number_format($grandtotal['total1'], 2) . "</b></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n\t</table><p />";
if (isset($_GET['type']) and $_GET['type'] == 'excel') {
    $handle = '';
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:lbm_slave_transit_kendaraan_detail.php


示例11: display


//.........这里部分代码省略.........
        if ($qwe == 'Sun') {
            foreach ($kehadiran as $key => $val) {
                $sCek = "select distinct catu from " . $dbname . ".sdm_absensidt \r\n                                   where karyawanid='" . $key . "' and tanggal='" . $tglini . "'";
                $qCek = mysql_query($sCek) or die(mysql_error($conn));
                $rCek = mysql_fetch_assoc($qCek);
                if ($rCek['catu'] == 0) {
                    unset($kehadiran[$key][$tglini]);
                }
            }
        }
    }
    //jumlahkan hk masing-masing orang
    $jumlahHK = array();
    foreach ($kehadiran as $key => $val) {
        $jumlahHK[$key] = count($kehadiran[$key]);
    }
    //ambil jumlah porsi catu masing-masing orang
    $str = "select kelompok, jumlah as porsi from " . $dbname . ".sdm_5catu where kodeorg='" . $kodeorg . "' and tahun=" . substr($periode, 0, 4);
    $porsi = array();
    $res = mysql_query($str);
    if (mysql_num_rows($res) == 0) {
        if ($_SESSION['language'] == 'ID') {
            exit("Error:Setup->Natura untuk tahun " . substr($periode, 0, 4) . " belum ada, silahkan isi terlebih dahulu");
        } else {
            exit("Error:Setup->Natura for year " . substr($periode, 0, 4) . " not defined, please define first");
        }
    }
    while ($bar = mysql_fetch_object($res)) {
        $porsi[$bar->kelompok] = $bar->porsi;
    }
    //bentuk rupiah catu masing-masing orang
    $rupiahCatu = array();
    foreach ($jumlahHK as $key => $val) {
        setIt($jumlahHK[$key], 0);
        setIt($kamusKar[$key]['kode'], '');
        setIt($porsi[$kamusKar[$key]['kode']], 0);
        $rupiahCatu[$key] = $jumlahHK[$key] * $porsi[$kamusKar[$key]['kode']] * $harga;
    }
    if ($_POST['aksi'] == 'display') {
        //print
        echo "<font color=red>Scroll down to save</font>\r\n                    <table class=sortable border=0 cellspacing=1>\r\n                    <thead>\r\n                    <tr class=rowheader>\r\n                    <td>No.</td>\r\n                    <td>" . $_SESSION['lang']['kodeorg'] . "</td>\r\n                    <td>" . $_SESSION['lang']['subbagian'] . "</td>\r\n                    <td>" . $_SESSION['lang']['periode'] . "</td>\r\n                    <td>" . $_SESSION['lang']['namakaryawan'] . "</td>\r\n                    <td>" . $_SESSION['lang']['tipe'] . "</td>\r\n                    <td>" . $_SESSION['lang']['jabatan'] . "</td>\r\n                    <td>" . $_SESSION['lang']['status'] . "</td>\r\n                    <td>Ltr/Hk</td>\r\n                    <td>" . $_SESSION['lang']['jumlah'] . " HK</td>\r\n                    <td>" . $_SESSION['lang']['hargasatuan'] . "</td>\r\n                    <td>" . $_SESSION['lang']['total'] . " (Rp)</td>\r\n                    </tr>\r\n                    </thead>\r\n                    <tbody>";
        $no = 0;
        $ttl = 0;
        foreach ($subbagian as $unit => $sub) {
            $SUBTTL = 0;
            foreach ($kamusKar as $key => $val) {
                setIt($kamusKar[$key]['subbagian'], '');
                if ($kamusKar[$key]['subbagian'] == $sub) {
                    $no += 1;
                    setIt($jumlahHK[$key], 0);
                    setIt($rupiahCatu[$key], 0);
                    setIt($rupiahCatu[$key], 0);
                    setIt($porsi[$kamusKar[$key]['kode']], 0);
                    echo "<tr class=rowcontent>\r\n                                <td>" . $no . "</td>\r\n                                <td>" . $kodeorg . "</td>\r\n                                <td>" . $kamusKar[$key]['subbagian'] . "</td>\r\n                                <td>" . $periode . "</td>\r\n                                <td>" . $kamusKar[$key]['nama'] . "</td>\r\n                                <td>" . $kamusKar[$key]['namatipe'] . "</td>\r\n                                <td>" . $kamusKar[$key]['jabatan'] . "</td>\r\n                                <td>" . $kamusKar[$key]['kode'] . "</td>\r\n                                <td>" . number_format($porsi[$kamusKar[$key]['kode']], 2, '.', ',') . "</td>\r\n                                <td align=right>" . number_format($jumlahHK[$key], 0, '.', ',') . "</td>\r\n                                <td align=right>" . number_format($harga, 0, '.', ',') . "</td>     \r\n                                <td align=right>" . number_format($rupiahCatu[$key], 0, '.', ',') . "</td></tr>     \r\n                                ";
                    $ttl += $rupiahCatu[$key];
                    $SUBTTL += $rupiahCatu[$key];
                }
            }
            //print subtotal per afdeling
            echo "<tr class=rowcontent>\r\n                            <td colspan=11>Sub Total " . $sub . "</td>     \r\n                            <td align=right>" . number_format($SUBTTL, 0, '.', ',') . "</td></tr>     \r\n                            ";
        }
        //khusus karyawan kantor
        $SUBTTL = 0;
        foreach ($kamusKar as $key => $val) {
            if ($kamusKar[$key]['subbagian'] == '' or $kamusKar[$key]['subbagian'] == '0') {
                $no += 1;
开发者ID:halimc17,项目名称:magsys,代码行数:67,代码来源:sdm_slave_pembagianCatu.php


示例12: setIt

         if ($pres == '') {
             $mangkir += 1;
         }
         //        $pdf->Cell(2.7/100*$width,$height,$pres,'TRL',0,'L',1);
     }
 }
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Cell(2.7 / 100 * $width, $height, $hadir, 'TRL', 0, 'R', 1);
 $pdf->Cell(2.7 / 100 * $width, $height, $telat, 'TRL', 0, 'R', 1);
 $pdf->Cell(2.7 / 100 * $width, $height, $dinas, 'TRL', 0, 'R', 1);
 $pdf->Cell(2.7 / 100 * $width, $height, $cuti, 'TRL', 0, 'R', 1);
 $pdf->Cell(2.7 / 100 * $width, $height, $mangkir, 'TRL', 0, 'R', 1);
 $pdf->Ln();
 // LINE KEDUA
 setIt($jabakar[$kar['id']], '');
 $pdf->Cell(2 / 100 * $width, $height, '', 'BRL', 0, 'R', 1);
 $pdf->Cell(9.5 / 100 * $width, $height, $jabakar[$kar['id']], 'BRL', 0, 'L', 1);
 if (!empty($tanggaltanggal)) {
     foreach ($tanggaltanggal as $tang) {
         $pres = '';
         if (isset($presensi[$kar['id']]['k' . $tang])) {
             $ontime = true;
             $pres .= substr($presensi[$kar['id']]['k' . $tang], 0, 5);
             if (substr($presensi[$kar['id']]['k' . $tang], 0, 5) >= '17:00') {
                 // pulang ontime
             } else {
                 $ontime = false;
             }
             if ($ontime) {
                 $pdf->SetTextColor(0, 0, 0);
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_2rekapabsenho1.php


示例13: mysql_query

 $sMan = "select a.nikmandor, b.namakaryawan from " . $dbname . ".kebun_aktifitas a\r\n\t\t\tleft join " . $dbname . ".datakaryawan b on a.nikmandor=b.karyawanid\r\n\t\t\twhere a.kodeorg = '" . $kebun . "' and b.subbagian like '%" . $divisi . "%' and a.nikmandor != '' and a.tanggal between '" . $tanggal . "' and '" . $tanggal2 . "'\r\n\t\t\tgroup by a.nikmandor\r\n\t\t\torder by b.namakaryawan";
 // exit("error: ".$sMan);
 $qMan = mysql_query($sMan) or die(mysql_error($conn));
 while ($rMan = mysql_fetch_assoc($qMan)) {
     $namamandor[$rMan['nikmandor']] = $rMan['namakaryawan'];
 }
 $str = "select a.*, b.*, c.namakaryawan from " . $dbname . ".kebun_kehadiran a\r\n        left join " . $dbname . ".kebun_aktifitas b on a.notransaksi = b.notransaksi\r\n        left join " . $dbname . ".datakaryawan c on a.nik = c.karyawanid\r\n        where  b.kodeorg like '" . $kebun . "%' and c.subbagian like '" . $divisi . "%' and b.nikmandor like '" . $mandor . "%' and b.nikmandor != '' and b.tanggal between '" . $tanggal . "' and '" . $tanggal2 . "'       \r\n        ";
 // exit("error: ".$str);
 $res = mysql_query($str);
 $stream .= "<table cellspacing='1' border='" . $border . "' class='sortable'>\r\n\t<thead>\r\n\t<tr class=rowheader>\r\n        <td>" . $_SESSION['lang']['nomor'] . "</td>\r\n        <td>" . $_SESSION['lang']['notransaksi'] . "</td>    \r\n\t\t<td>" . $_SESSION['lang']['tanggal'] . "</td>\r\n\t\t<td>" . $_SESSION['lang']['namakaryawan'] . "</td>\r\n\t\t<td>" . $_SESSION['lang']['jhk'] . "</td>\r\n\t\t<td>" . $_SESSION['lang']['umr'] . "</td>\r\n\t\t<td>" . $_SESSION['lang']['insentif'] . "</td>            \r\n\t</tr></thead>\r\n\t<tbody>";
 $no = $jhk = $umr = $insentif = 0;
 while ($bar = mysql_fetch_object($res)) {
     $dzda[$bar->nikmandor] = $bar->nikmandor;
     setIt($dzdata[$bar->nikmandor]['jhk'], 0);
     setIt($dzdata[$bar->nikmandor]['umr'], 0);
     setIt($dzdata[$bar->nikmandor]['insentif'], 0);
     $dzdata[$bar->nikmandor]['mandor'] = $bar->nikmandor;
     $dzdata[$bar->nikmandor]['jhk'] += $bar->jhk;
     $dzdata[$bar->nikmandor]['umr'] += $bar->umr;
     $dzdata[$bar->nikmandor]['insentif'] += $bar->insentif;
     $niknotransaksi = $bar->nik . $bar->notransaksi;
     $dzdatadetail[$bar->nikmandor][$niknotransaksi]['notransaksi'] = $bar->notransaksi;
     $dzdatadetail[$bar->nikmandor][$niknotransaksi]['tanggal'] = $bar->tanggal;
     $dzdatadetail[$bar->nikmandor][$niknotransaksi]['namakaryawan'] = $bar->namakaryawan;
     $dzdatadetail[$bar->nikmandor][$niknotransaksi]['jhk'] = $bar->jhk;
     $dzdatadetail[$bar->nikmandor][$niknotransaksi]['umr'] = $bar->umr;
     $dzdatadetail[$bar->nikmandor][$niknotransaksi]['insentif'] = $bar->insentif;
     $jhk += $bar->jhk;
     $umr += $bar->umr;
     $insentif += $bar->insentif;
 }
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:kebun_slave_2kehadiranpermandor.php


示例14: number_format

     echo "<td align=right ><font color=red>" . number_format($arey[$tang . 'l'], 2) . "</font></td>";
     echo "<td align=right ><font color=red>" . number_format($arey[$tang . 'h']) . "</font></td>";
 } else {
     echo "<td align=right " . $dbg . " " . $tittle . ">" . number_format($arey[$tang . 'j']) . "</td>";
     echo "<td align=right >" . number_format($arey[$tang . 'k'], 2) . "</td>";
     echo "<td align=right >" . number_format($arey[$tang . 'l'], 2) . "</td>";
     echo "<td align=right >" . number_format($arey[$tang . 'h']) . "</td>";
 }
 setIt($total[$tang . 'j'], 0);
 setIt($total[$tang . 'k'], 0);
 setIt($total[$tang . 'l'], 0);
 setIt($total[$tang . 'h'], 0);
 setIt($totalj, 0);
 setIt($totalk, 0);
 setIt($totall, 0);
 setIt($totalh, 0);
 $total[$tang . 'j'] += $arey[$tang . 'j'];
 // tambahin total bawah
 $total[$tang . 'k'] += $arey[$tang . 'k'];
 // tambahin total bawah
 $total[$tang . 'h'] += $arey[$tang . 'h'];
 // tambahin total bawah
 $total[$tang . 'l'] += $arey[$tang . 'l'];
 // tambahin total bawah
 $totalj += $arey[$tang . 'j'];
 // tambahin total kanan
 $totalk += $arey[$tang . 'k'];
 // tambahin total kanan
 $totalh += $arey[$tang . 'h'];
 // tambahin total kanan
 $totall += $arey[$tang . 'l'];
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:kebun_laporanPanen_tanggal.php


示例15: substr

        $stream .= "<td align=center><font color=red>" . substr($isi, 8, 2) . "</font></td>";
        foreach ($kdAfd as $afd) {
            setIt($bjr[$isi][$afd], '');
            if ($bjr[$isi][$afd] == '') {
                $isiBjr = "";
            } else {
                $isiBjr = $bjr[$isi][$afd];
            }
            $stream .= "<td  align=center>" . number_format((double) $isiBjr, 2) . "</td>";
        }
        $stream .= "</tr>";
    } else {
        $stream .= "<tr class=rowcontent>";
        $stream .= "<td align=center>" . substr($isi, 8, 2) . "</font></td>";
        foreach ($kdAfd as $afd) {
            setIt($bjr[$isi][$afd], '');
            if ($bjr[$isi][$afd] == '') {
                $isiBjr = "";
            } else {
                $isiBjr = $bjr[$isi][$afd];
            }
            $stream .= "<td  align=center>" . number_format((double) $isiBjr, 2) . "</td>";
        }
        $stream .= "</tr>";
    }
}
$stream .= "</thead>";
$stream .= "<tbody></table>";
switch ($proses) {
    ######PREVIEW
    case 'preview':
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:kebun_slave_2bjr.php


示例16: setIt

    $tbgtjam = 0;
    $tab .= "<tr class=rowcontent>\r\n\t\t\t  <td>" . $no . "</td>\r\n\t\t\t  <td>" . $val . "</td>\r\n\t\t\t  <td>" . $jenisvhc[$val] . "</td>\r\n                <td>" . $nmJenis[$jenisvhc[$val]] . "</td>\r\n                     <td>" . $tahunperolehan[$val] . "</td>";
    for ($kk = 1; $kk <= 12; $kk++) {
        if ($kk < 10) {
            $zz = $waktu . "-0" . $kk;
        } else {
            $zz = $waktu . "-" . $kk;
        }
        $color = 'bgcolor=green';
        if (@($realHM[$zz][$val] / $real[$zz][$val]) < @($bgtjam[$zz][$val] / $bgtfis[$zz][$val])) {
            $color = 'bgcolor=red';
        }
        setIt($real[$zz][$val], 0);
        setIt($realHM[$zz][$val], 0);
        setIt($bgtjam[$zz][$val], 0);
        setIt($bgtfis[$zz][$val], 0);
        $tab .= "<td align=right>" . number_format($real[$zz][$val], 2) . "</td><td align=right>" . number_format($realHM[$zz][$val], 2) . "</td><td " . $color . "  align=right>" . @number_format($realHM[$zz][$val] / $real[$zz][$val], 2) . "</td><td align=right>" . number_format($bgtfis[$zz][$val], 2) . "</td><td align=right>" . number_format($bgtjam[$zz][$val], 2) . "</td><td align=right bgcolor=#dedede>" . @number_format($bgtjam[$zz][$val] / $bgtfis[$zz][$val], 2) . "</td>";
        $treal += $real[$ 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP setLang函数代码示例发布时间:2022-05-15
下一篇:
PHP setId函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap