Beispiel #1
0
function loop($data, $parent)
{
    if (isset($data[$parent])) {
        // jika ada anak dari menu maka tampilkan
        /* setiap menu ditampilkan dengan tag <ul> dan apabila nilai $parent bukan 0 maka sembunyikan element 
         * karena bukan merupakan menu utama melainkan sub menu */
        $str = '<ul parent="' . $parent . '" style="display:' . ($parent > 0 ? 'none' : '') . '">';
        foreach ($data[$parent] as $value) {
            /* variable $child akan bernilai sebuah string apabila ada sub menu dari masing-masing menu utama
             * dan akan bernilai negatif apabila tidak ada sub menu */
            if ($value->TglBaca == "0000-00-00 00:00:00") {
                $statusbaca = "<font color=\"#CC0000\"> Belum dibaca. </font>";
            } else {
                $statusbaca = "Telah dibaca pada " . ViewDateTimeFormat($value->TglBaca) . ".";
            }
            $child = loop($data, $value->IdDisposisi);
            $str .= '<table><tr><td><li>';
            /* beri tanda sebuah folder dengan warna yang mencolok apabila terdapat sub menu di bawah menu utama 	  	   
             * dan beri juga event javascript untuk membuka sub menu di dalamnya */
            $str .= $child ? '<a href="javascript:openTree(' . $value->IdDisposisi . ')"><img src="images/icons/folderclose2.jpg" id="img' . $value->IdDisposisi . '" border="0"></a>' : '<img src="images/icons/folderclose1.jpg">';
            $str .= '<a href="' . $value->url . '"></a> => ' . GetNama($value->IdPenerima) . ' pada ' . ViewDateTimeFormat($value->TglDisposisi) . ' </td></tr><tr><td><font color=#E238EC>Instruksi/Berita : ' . $value->Instruksi . ' </font></td></tr><tr><td><font color=#0000FF>Tanggapan : ' . $value->Tanggapan . '</font></td></tr><tr><td> Status : ' . $statusbaca . ' </td></tr></table></li>';
            if ($child) {
                $str .= $child;
            }
        }
        $str .= '</ul>';
        return $str;
    } else {
        return false;
    }
}
          <td class="tablebody">
            <?php 
  echo $i;
  ?>
          .</td>
          
        
 
          <td class="tablebody">
            <?php 
  echo $List->Penerima;
  ?>
          </td>
          <td class="tablebody">
            <?php 
  echo ViewDateTimeFormat($List->WaktuBaca, 2);
  ?>
         </td>
         
         
          
      
          
        </tr>
        <?php 
  if ($bgcolor == "#efefef") {
      $bgcolor = "#dedede";
  } else {
      $bgcolor = "#efefef";
  }
  $i++;
                  <td> <input name="TglSurat" type="text" readonly  class="form" id="TglSurat" value="<?php 
echo ViewDateTimeFormat($TglSurat, 6);
?>
" size="30"></td>
                </tr>
                <tr> 
                  <td class="key"><strong>No. Surat</strong></td>
                  <td><input name="NoSurat" type="text" readonly  class="form" id="NoSurat" value="<?php 
echo $NoSurat;
?>
" size="50"></td>
                </tr>
                <tr> 
                  <td class="key"><strong>Diterima Tanggal</strong></td>
                  <td> <input name="TglTerima" type="text" readonly  class="form" id="TglTerima" value="<?php 
echo ViewDateTimeFormat($TglTerima, 6);
?>
" size="30"></td>
                </tr>
                <tr> 
                  <td class="key"><strong>Asal Surat</strong></td>
                  <td><input name="AsalSurat" readonly type="text" class="form" id="AsalSurat" value="<?php 
echo $AsalSurat;
?>
" size="50"></td>
                </tr>
                <tr> 
                  <td class="key"><strong>Isi Ringkas</strong></td>
                  <td><textarea name="Perihal" cols="50" readonly id="Perihal" class="form"><?php 
echo $Perihal;
?>
Beispiel #4
0
                            <?php 
                break;
        }
        ?>
                  <?php 
        echo GetNama($pengirim[$i]);
        ?>
 </td>
                  <td>
                  <?php 
        echo $perihal[$i];
        ?>
                </td>
                <td>
                  <?php 
        echo ViewDateTimeFormat($waktukirim[$i], 2);
        ?>
               </td>
					<td  align="center">
				<?php 
        if ($statusberita[$i] == 0) {
            ?>
<a href="index.php?p=<?php 
            echo enkripsi($beritakeluarviewlink . "&q=" . $nosurat[$i] . "&r=" . $id[$i]);
            ?>
" title="Lihat">
							<img src="css/images/view.gif" border="0" width="16" height="16" /> 
					  </a>
					<?php 
        } else {
            if ($statusberita[$i] == 3) {
Beispiel #5
0
}
</script>

<table class="admintable" cellspacing="1">
                <tr> 
                  <td align="justify" valign="top" class="key"><div align="right"><strong>Pengirim</strong></div></td>
                  <td> <input name="Pengirim" type="text" readonly  class="form" id="Pengirim" value="<?php 
echo GetNama($Pengirim);
?>
" size="30">
                  </td>
                </tr>
                <tr> 
                  <td align="justify" valign="top" class="key"><div align="right"><strong>Tanggal Kirim</strong></div></td>
                  <td><input name="WaktuKirim" type="text" readonly  class="form" id="WaktuKirim" value="<?php 
echo ViewDateTimeFormat($WaktuKirim, 2);
?>
" size="30">
                  </td>
                </tr>
                <tr> 
                  <td align="justify" valign="top" class="key"><div align="right"><strong>Perihal</strong></div></td>
                  <td> <input name="Perihal" type="text" readonly  class="form" id="Perihal" value="<?php 
echo $Perihal;
?>
" size="100">
                  </td>
                </tr>
                <tr> 
                  <td height="105" align="justify" valign="top" class="key"><div align="right"><strong>Isi Berita</strong></div></td>
                  <td><textarea name="Isi" cols="100" rows="10" readonly class="form" id="Isi"><?php 
        ?>
 
                </td>
                <td>
                  <?php 
        echo $perihal[$i];
        ?>
                </td>
                <td>
                  <?php 
        echo ViewDateTimeFormat($tglterima[$i], 6);
        ?>
               </td>
			   <td>
                  <?php 
        echo ViewDateTimeFormat($waktubuat[$i], 2);
        ?>
               </td>
                <td align="center">
                <?php 
        if ($tl_status[$i] == 1) {
            echo "<font color='#0099FF'>Sudah</font>";
        } else {
            if ($tl_status[$i] == 2) {
                echo "Tidak Perlu";
            } else {
                echo "<font color='#FF0000'>Belum <br> " . $tglakhir[$i] . "</font>";
            }
        }
        ?>
                  <?php 
Beispiel #7
0
    $i++;
}
for ($j = 0; $j < $i; $j++) {
    $m = $pdf->GetY();
    //diganti, aslinya 260 ajie noorseto
    if ($m > 240) {
        //diganti , aslinya 250	ajie noorseto
        $m = $m - 230;
        $pdf->AddPage();
        $m = $pdf->GetY();
    }
    $max = $m;
    $pdf->MultiCell(10, 5, $j + 1 . '.', 'L', 'L');
    $e = $pdf->GetY();
    $pdf->SetXY(15, $m);
    $pdf->MultiCell(95, 5, 'Oleh  ' . GetNama($cell[$j][4]) . '  ke  ' . GetNama($cell[$j][3]) . '  pada  ' . ViewDateTimeFormat($cell[$j][2], 2), 'R', 'L', 0);
    $f = $pdf->GetY();
    $pdf->SetXY(110, $m);
    $pdf->MultiCell(85, 5, $cell[$j][5], 'R', 'L', 0);
    $g = $pdf->GetY();
    $max = (int) max($m, $e, $f, $g);
    $pdf->SetXY(10, $m);
    $pdf->Cell(100, $max - $m, '', 'LR', 0, 'L');
    $pdf->Cell(85, $max - $m, '', 'LR', 0, 'L');
    $pdf->Ln();
}
$pdf->Cell(100, 10, 'CATATAN', 'LRT', 0);
$pdf->Cell(85, 10, 'PARAF DAN TANGGAL', 'LRT', 0);
$pdf->Ln();
$pdf->Cell(100, 20, '', 'LRB', 0);
$pdf->Cell(85, 20, '', 'LRB', 0);