}
if ($kdsatker == '') {
    $pagu = pagu_menteri($th);
} else {
    $pagu = pagu_satker($th, $kdsatker);
}
for ($i = 1; $i <= 12; $i++) {
    if ($kdsatker == '') {
        $real_r[$i] = real_menteri_sdbulan($th, $i);
        if ($pagu != 0) {
            $real_p[$i] = $real_r[$i] / $pagu * 100;
        } else {
            $real_p[$i] = 0;
        }
    } else {
        $real_r[$i] = real_satker_sdbulan($th, $kdsatker, $i);
        if ($pagu != 0) {
            $real_p[$i] = $real_r[$i] / $pagu * 100;
        } else {
            $real_p[$i] = 0;
        }
    }
    if ($th == Date("Y")) {
        if (Date("m") < $i) {
            $real_p[$i] = '';
        }
        if (Date("m") < $i) {
            $real_r[$i] = '';
        }
    }
}
$pagu_9 = $Giat['JML09'] / 1000000000;
$pagu_10 = $Giat['JML10'] / 1000000000;
$pagu_11 = $Giat['JML11'] / 1000000000;
$pagu_12 = $Giat['JML12'] / 1000000000;
$real_1 = real_satker_sdbulan($th, $kdsatker, 1) / 1000000000;
$real_2 = real_satker_sdbulan($th, $kdsatker, 2) / 1000000000;
$real_3 = real_satker_sdbulan($th, $kdsatker, 3) / 1000000000;
$real_4 = real_satker_sdbulan($th, $kdsatker, 4) / 1000000000;
$real_5 = real_satker_sdbulan($th, $kdsatker, 5) / 1000000000;
$real_6 = real_satker_sdbulan($th, $kdsatker, 6) / 1000000000;
$real_7 = real_satker_sdbulan($th, $kdsatker, 7) / 1000000000;
$real_8 = real_satker_sdbulan($th, $kdsatker, 8) / 1000000000;
$real_9 = real_satker_sdbulan($th, $kdsatker, 9) / 1000000000;
$real_10 = real_satker_sdbulan($th, $kdsatker, 10) / 1000000000;
$real_11 = real_satker_sdbulan($th, $kdsatker, 11) / 1000000000;
$real_12 = real_satker_sdbulan($th, $kdsatker, 12) / 1000000000;
switch ($bl) {
    case 1:
        $sbx_grafik_2 = array($real_1);
        break;
    case 2:
        $sbx_grafik_2 = array($real_1, $real_2);
        break;
    case 3:
        $sbx_grafik_2 = array($real_1, $real_2, $real_3);
        break;
    case 4:
        $sbx_grafik_2 = array($real_1, $real_2, $real_3, $real_4);
        break;
    case 5:
        $sbx_grafik_2 = array($real_1, $real_2, $real_3, $real_4, $real_5);
示例#3
0
} else {
    foreach ($col[0] as $k => $val) {
        if ($k % 2 == 1) {
            $class = "row0";
        } else {
            $class = "row0";
        }
        ?>
    <tr class="<?php 
        echo $class;
        ?>
">
      <td width="6%" align="center" valign="top">&nbsp;</td>
      <?php 
        $real_satker_bulan = real_satker_bulan($th, $col[0][$k], $kdbulan);
        $real_satker_sdbulan = real_satker_sdbulan($th, $col[0][$k], $kdbulan);
        ?>
      <td width="6%" align="center" valign="top"><strong><?php 
        echo $col[0][$k];
        ?>
</strong></td>
      <td width="54%" align="left"><strong><?php 
        echo nm_satker($col[0][$k]);
        ?>
</strong></td>
      <td width="12%" align="right" valign="top"><strong><?php 
        echo number_format($col[1][$k], "0", ",", ".");
        ?>
</strong></td>
      <td width="11%" align="right" valign="top"><strong><?php 
        echo number_format($real_satker_bulan, "0", ",", ".");
        $kdsatker = $col[1][$k];
        $sql = "select \tsum(RPHPAGU) as RPHPAGU,\r\n\t\t\t\t\tsum(JML01) as JML01,\r\n\t\t\t\t\tsum(JML01+JML02) as JML02,\r\n\t\t\t\t\tsum(JML01+JML02+JML03) as JML03,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04) as JML04,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05) as JML05,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06) as JML06,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07) as JML07,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08) as JML08,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08+JML09) as JML09,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08+JML09+JML10) as JML10,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08+JML09+JML10+JML11) as JML11,\r\n\t\t\t\t\tsum(JML01+JML02+JML03+JML04+JML05+JML06+JML07+JML08+JML09+JML10+JML11+JML12) as JML12\r\n\t\t\t\t\tfrom d_trktrm WHERE THANG='{$th}' AND KDSATKER = '{$kdsatker}' group by KDSATKER";
        $aTarik = mysql_query($sql);
        $Tarik = mysql_fetch_array($aTarik);
        $real_satker_bulan_1 = real_satker_sdbulan($th, $col[1][$k], 1) / $col[2][$k] * 100;
        $real_satker_bulan_2 = real_satker_sdbulan($th, $col[1][$k], 2) / $col[2][$k] * 100;
        $real_satker_bulan_3 = real_satker_sdbulan($th, $col[1][$k], 3) / $col[2][$k] * 100;
        $real_satker_bulan_4 = real_satker_sdbulan($th, $col[1][$k], 4) / $col[2][$k] * 100;
        $real_satker_bulan_5 = real_satker_sdbulan($th, $col[1][$k], 5) / $col[2][$k] * 100;
        $real_satker_bulan_6 = real_satker_sdbulan($th, $col[1][$k], 6) / $col[2][$k] * 100;
        $real_satker_bulan_7 = real_satker_sdbulan($th, $col[1][$k], 7) / $col[2][$k] * 100;
        $real_satker_bulan_8 = real_satker_sdbulan($th, $col[1][$k], 8) / $col[2][$k] * 100;
        $real_satker_bulan_9 = real_satker_sdbulan($th, $col[1][$k], 9) / $col[2][$k] * 100;
        $real_satker_bulan_10 = real_satker_sdbulan($th, $col[1][$k], 10) / $col[2][$k] * 100;
        $real_satker_bulan_11 = real_satker_sdbulan($th, $col[1][$k], 11) / $col[2][$k] * 100;
        $real_satker_bulan_12 = real_satker_sdbulan($th, $col[1][$k], 12) / $col[2][$k] * 100;
        ?>
      <td width="6%" rowspan="2" align="center"><strong><?php 
        echo $col[1][$k];
        ?>
</strong></td>
      <td width="54%" rowspan="2" align="left"><strong><?php 
        echo nm_satker($col[1][$k]);
        ?>
</strong></td>
      <td width="12%" rowspan="2" align="right"><strong><?php 
        echo number_format($col[2][$k], "0", ",", ".");
        ?>
</strong></td>
      <td width="11%" align="right" valign="top"><strong><?php 
        echo number_format($real_satker_bulan_1, "2", ",", ".");
$pagu_9 = $Giat['JML09'] / $Giat['RPHPAGU'] * 100;
$pagu_10 = $Giat['JML10'] / $Giat['RPHPAGU'] * 100;
$pagu_11 = $Giat['JML11'] / $Giat['RPHPAGU'] * 100;
$pagu_12 = $Giat['JML12'] / $Giat['RPHPAGU'] * 100;
$real_1 = real_satker_sdbulan($th, $kdsatker, 1) / $Giat['RPHPAGU'] * 100;
$real_2 = real_satker_sdbulan($th, $kdsatker, 2) / $Giat['RPHPAGU'] * 100;
$real_3 = real_satker_sdbulan($th, $kdsatker, 3) / $Giat['RPHPAGU'] * 100;
$real_4 = real_satker_sdbulan($th, $kdsatker, 4) / $Giat['RPHPAGU'] * 100;
$real_5 = real_satker_sdbulan($th, $kdsatker, 5) / $Giat['RPHPAGU'] * 100;
$real_6 = real_satker_sdbulan($th, $kdsatker, 6) / $Giat['RPHPAGU'] * 100;
$real_7 = real_satker_sdbulan($th, $kdsatker, 7) / $Giat['RPHPAGU'] * 100;
$real_8 = real_satker_sdbulan($th, $kdsatker, 8) / $Giat['RPHPAGU'] * 100;
$real_9 = real_satker_sdbulan($th, $kdsatker, 9) / $Giat['RPHPAGU'] * 100;
$real_10 = real_satker_sdbulan($th, $kdsatker, 10) / $Giat['RPHPAGU'] * 100;
$real_11 = real_satker_sdbulan($th, $kdsatker, 11) / $Giat['RPHPAGU'] * 100;
$real_12 = real_satker_sdbulan($th, $kdsatker, 12) / $Giat['RPHPAGU'] * 100;
switch ($bl) {
    case 1:
        $sbx_grafik_2 = array($real_1);
        break;
    case 2:
        $sbx_grafik_2 = array($real_1, $real_2);
        break;
    case 3:
        $sbx_grafik_2 = array($real_1, $real_2, $real_3);
        break;
    case 4:
        $sbx_grafik_2 = array($real_1, $real_2, $real_3, $real_4);
        break;
    case 5:
        $sbx_grafik_2 = array($real_1, $real_2, $real_3, $real_4, $real_5);
示例#6
0
        $sql = "select \tsum(RPHPAGU) as RPHPAGU,\r\n\t\t\t\t\tsum(JML01) as JML01,\r\n\t\t\t\t\tsum(JML02) as JML02,\r\n\t\t\t\t\tsum(JML03) as JML03,\r\n\t\t\t\t\tsum(JML04) as JML04,\r\n\t\t\t\t\tsum(JML05) as JML05,\r\n\t\t\t\t\tsum(JML06) as JML06,\r\n\t\t\t\t\tsum(JML07) as JML07,\r\n\t\t\t\t\tsum(JML08) as JML08,\r\n\t\t\t\t\tsum(JML09) as JML09,\r\n\t\t\t\t\tsum(JML10) as JML10,\r\n\t\t\t\t\tsum(JML11) as JML11,\r\n\t\t\t\t\tsum(JML12) as JML12\r\n\t\t\t\t\tfrom d_trktrm WHERE THANG='{$th}' AND KDSATKER = '{$kdsatker}' group by KDSATKER";
        $aTarik = mysql_query($sql);
        $Tarik = mysql_fetch_array($aTarik);
        $real_satker_bulan_1 = real_satker_bulan($th, $col[1][$k], 1);
        $real_satker_bulan_2 = real_satker_bulan($th, $col[1][$k], 2);
        $real_satker_bulan_3 = real_satker_bulan($th, $col[1][$k], 3);
        $real_satker_bulan_4 = real_satker_bulan($th, $col[1][$k], 4);
        $real_satker_bulan_5 = real_satker_bulan($th, $col[1][$k], 5);
        $real_satker_bulan_6 = real_satker_bulan($th, $col[1][$k], 6);
        $real_satker_bulan_7 = real_satker_bulan($th, $col[1][$k], 7);
        $real_satker_bulan_8 = real_satker_bulan($th, $col[1][$k], 8);
        $real_satker_bulan_9 = real_satker_bulan($th, $col[1][$k], 9);
        $real_satker_bulan_10 = real_satker_bulan($th, $col[1][$k], 10);
        $real_satker_bulan_11 = real_satker_bulan($th, $col[1][$k], 11);
        $real_satker_bulan_12 = real_satker_bulan($th, $col[1][$k], 12);
        $real_satker_sdbulan = real_satker_sdbulan($th, $col[1][$k], 12);
        ?>
      <td width="6%" rowspan="2" align="center"><strong><?php 
        echo $col[1][$k];
        ?>
</strong></td>
      <td width="54%" rowspan="2" align="left"><strong><?php 
        echo nm_satker($col[1][$k]);
        ?>
</strong></td>
      <td width="12%" rowspan="2" align="right"><strong><?php 
        echo number_format($col[2][$k], "0", ",", ".");
        ?>
</strong></td>
      <td width="11%" align="right" valign="top"><strong><?php 
        echo number_format($real_satker_bulan_1, "0", ",", ".");