kppnadministration /report/report.php

Language PHP Lines 824
MD5 Hash 984c8727920662e54b0b908d85b57780 Estimated Cost $16,494 (why?)
Repository https://bitbucket.org/metamorph/kppnadministration.git View Raw File View Project SPDX
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
<?php 
		// Panggil semua fungsi yang dibutuhkan (semuanya ada di folder config)
		require("../fpdf/fpdf.php");
		include("../config/koneksi.php");
		class PDF extends FPDF
		{
			function Header()
			{
				// Logo
				$this->Image('../templates/images/logodepkeu.png',10,10,20);
				// Times bold 13
				$this->SetFont('Times','B',13);
				// Move to the right
				$this->Cell(20);
				// Title 1
				$this->Cell(165,5,'KEMENTERIAN KEUANGAN REPUBLIK INDONESIA',0,1,'C');
				// Times bold 12
				$this->SetFont('Times','B',12);
				// Move to the right
				$this->Cell(20);
				// Title 2
				$this->Cell(165,5,'DIREKTORAT JENDERAL PERBENDAHARAAN',0,1,'C');
				// Times bold 12
				$this->SetFont('Times','B',11);
				// Move to the right
				$this->Cell(20);
				// Title 3
				// Query  kanwil
				$qKanwil	= mysql_query("SELECT nmkanwil FROM t_kanwil WHERE aktif='1'")or die(mysql_error);
				$rKanwil	= mysql_fetch_array($qKanwil);
				$nmKanwil	= $rKanwil['nmkanwil'];
				$this->Cell(165,5,'KANTOR WILAYAH '.$nmKanwil,0,1,'C');
				// Times bold 12
				$this->SetFont('Times','',11);
				// Move to the right
				$this->Cell(20);
				// Title 4
				// Query KPPN
				$qKppn		= mysql_query("SELECT nmkppn FROM t_kppn WHERE kddefa='1'")or die(mysql_error);
				$rKppn		= mysql_fetch_array($qKppn);
				$nmKppn	= $rKppn['nmkppn'];
				$this->Cell(165,4,'KANTOR PELAYANAN PERBENDAHARAAN '.$nmKppn,0,1,'C');
				// Times  8
				$this->SetFont('Times','',8);
				// Move to the right
				$this->Cell(20);
				// Title 5
				$qryKppn	= mysql_query("SELECT almkppn,kotakppn,telkppn,email,kodepos,faxkppn,website,smsgateway FROM t_kppn WHERE kddefa='1'")or die(mysql_error);
				$rsltKppn	= mysql_fetch_array($qryKppn);
				$almKppn	= $rsltKppn['almkppn']." ".$rsltKppn['kotakppn']." ".$rsltKppn['kodepos']." Telepon: ".$rsltKppn['telkppn']." Faksimile: ".$rsltKppn['faxkppn'];
				$this->Cell(165,4,$almKppn,0,1,'C');
				// Move to the right
				$this->Cell(20);
				// Title 6
				$queryKppn= mysql_query("SELECT email,website,smsgateway FROM t_kppn WHERE kddefa='1'")or die(mysql_error);
				$resultKppn= mysql_fetch_array($queryKppn);
				$webKppn	= "Website: ".$resultKppn['website']." Email: ".$resultKppn['email']." SMS Gateway: ".$resultKppn['smsgateway'];
				$this->Cell(165,3,$webKppn,0,1,'C');
				// Draw line
				$this->Line(10,39.5,200,39.5);
				$this->Line(10,40,200,40);
				// Line break
				$this->Ln(5);
				$timezone = "Asia/Jakarta";
				if(function_exists('date_default_timezone_set')) date_default_timezone_set($timezone);
				$dateKonsep	= date("Y-m-d H:i:s");
				$idskpp		= $_POST['idSkpp'];
				$username 	= $_POST['username']; 
					// Update user, tanggal, status pencetakan konsep skpp. Status proses ='2'
					if(isset($_POST['reportkonsepskpp']) && $_POST['reportkonsepskpp'] == "Konsep"){
						mysql_query("UPDATE d_skpp SET userctkkonseppd='$username', tgctkkonseppd='$dateKonsep', statproses='2' WHERE id_skpp='$idskpp'");
					}
					// Update user, tanggal, status pencetakan net skpp. Status proses ='4'
					elseif(isset($_POST['reportnetskpp']) && $_POST['reportnetskpp'] == "Net"){
						mysql_query("UPDATE d_skpp SET userctknetpd='$username', tgctknetpd='$dateKonsep', statproses='4' WHERE id_skpp='$idskpp'");
						$nomorsuratkeluar	= $_POST['nomorsuratkeluar'];
						$kodesuratkeluar	= $_POST['kodesuratkeluar'];
						$tujuansurat		= $_POST['tujuansurat'];
						$tglsurat			= $_POST['tglsurat'];
						$perihal			= $_POST['perihal'];
						$userpelaksana		= $_POST['userpelaksana'];
						$timepelaksana		= $_POST['timepelaksana'];
						$userkasi			= $_POST['userkasi'];
						$timekasi			= $_POST['timekasi'];
						$userpejabat		= $_POST['userpejabat'];
						$timepejabat		= $_POST['timetrmpejabat'];
						$usertrmsekret		= $_POST['usertrmsekret'];
						$timetrmsekret		= $_POST['timetrmsekret'];
						$nomorsuratmasuk	= $_POST['nomorsuratmasuk'];
						// Insert into d_suratkeluar
						$qInsert 		= "INSERT INTO d_suratkeluar(nomorsuratkeluar,kodesuratkeluar,tujuansurat,tglsurat,perihal,userpelaksana,timepelaksana,userkasi,timekasi,userpejabat,timetrmpejabat,usertrmsekret,timetrmsekret,nomorsuratmasuk) VALUES('$nomorsuratkeluar','$kodesuratkeluar','$tujuansurat','$tglsurat','$perihal','$userpelaksana','$timepelaksana','$userkasi','$timekasi','$userpejabat','$timepejabat','$usertrmsekret','$timetrmsekret','$nomorsuratmasuk')";
						mysql_query($qInsert);
						$nospskpp			= $_POST['nospskpp'];
						$tglsurat			= $_POST['tgspskpp'];
						$nomorsuratmasuk	= $_POST['noagenda'];
						// Update d_skpp for nospskpp and tgspskpp
						$qUpdateskpp	= "UPDATE d_skpp SET nospskpp='$nospskpp',tgspskpp='$tglsurat' WHERE noagenda='$nomorsuratmasuk'";
						mysql_query($qUpdateskpp);
					}
					// Tayang konsep status proses tetap
					else(isset($_POST['reportkonsepskpp']) && $_POST['reportkonsepskpp'] == "Tayang");
				$this->SetFont('Times','',11);
				// Today's date
				$months 	= Array (1=>"Januari", 2=>"Pebruari", 3=>"Maret", 4=>"April",	5=>"Mei", 6=>"Juni", 7=>"Juli", 8=>"Agustus", 9=>"September", 10=>"Oktober", 11=>"Nopember", 12=>"Desember");
				$bln		= $months[date("n")];
				$tgl		= date("d");
				$thn		= date("Y");
				$this->Cell(190,7,$tgl." ".$bln." ".$thn,0,1,'R');
				// SURAT PENGANTAR
				$this->SetFont('','BUI','');
				$this->Cell(190,6,'SURAT PENGANTAR',0,1,'C');
				$this->SetFont('','','');
				// Status SKPP untuk menentukan nomor surat
				if(isset($_POST['status']) && $_POST['status'] >= '3')
				{
					// Nomor Net SP
					$nosurat = $_POST['nosurat'];
					$this->Cell(190,6,$nosurat,0,1,'C');
				}
				else
				{
					// Nomor Konsep SP
					$this->Cell(190,6,'Nomor: SP-         /WPB.14/KP.02/2012',0,1,'C');
				}
				// Line break
				$this->Ln(7);
			}
			// Footer
			function Footer()
			{
				// Posisi 7 cm dari bawah
				$this->SetY(-70);
				// Times 11
				$this->SetFont('Times','',11);
				// Jika Non GPP
				if($_POST['kdgpp'] == '00'){
					// Tanda terima
					$this->Cell(125,10,'Tanda Terima:',0,0,'L');
					//  Referensi nama jabatan
					$qNmjabatan	= mysql_query("SELECT nmjabatan FROM t_pejabt WHERE ketjabatan='0'");
					$rNmjabatan	= mysql_fetch_array($qNmjabatan);
					$nmjabatan		= $rNmjabatan[0];
					$this->Cell(70,10,$nmjabatan,0,1,'L');
					// Next row
					// Diterima oleh
					$this->Cell(40,6,"Diterima oleh",0,0,'L');
					$this->Cell(5,6,":",0,0,'C');
					$this->Cell(70,6,".................................",0,0,'L');
					$this->Cell(80,6,"",0,1,'L');
					// Next row
					// Nama/NIP
					$this->Cell(40,6,"Nama/NIP",0,0,'L');
					$this->Cell(5,6,":",0,0,'C');
					$this->Cell(70,6,".................................",0,0,'L');
					$this->Cell(80,6,"",0,1,'L');
					// Next row
					// Tanggal
					$this->Cell(40,6,"Tanggal",0,0,'L');
					$this->Cell(5,6,":",0,0,'C');
					$this->Cell(80,6,".................................",0,0,'L');
					// Nama pejabat
					$qNama	= mysql_query("SELECT nama,nip FROM t_pejabt WHERE ketjabatan='0'");
					$rNama		= mysql_fetch_array($qNama);
					$nama		= $rNama[0];
					$this->Cell(70,6,$nama,0,1,'L');
					// Next row
					//  Cap dinas
					$this->Cell(40,6,"Cap dinas",0,0,'L');
					$this->Cell(5,6,":",0,0,'C');
					$this->Cell(80,6,"",0,0,'L');
					$nip		= $rNama[1];
					$this->Cell(70,6,$nip,0,1,'L');
					// Next row
					$this->Cell(40,8,"",0,0,'L');
					$this->Cell(5,8,"",0,0,'C');
					$this->Cell(80,8,"",0,0,'L');
					$this->Cell(70,8,"",0,1,'L');
					//  Catatan dan nama kepala kantor
					// Times 8
					$this->SetFont('Times','',8);
					$this->Cell(20,5,"Catatan",0,0,'L');
					$this->Cell(5,5,":",0,0,'C');
					$this->Cell(170,5,"Harap setelah tanda terima diisi",0,1,'L');
					// Next row
					$this->SetFont('Times','',8);
					$this->Cell(20,5,"",0,0,'L');
					$this->Cell(5,5,"",0,0,'C');
					$this->Cell(170,5,"lembar ke-2 mohon dikirim kembali",0,1,'L');
				}
				else{
					// Tanda terima
					$this->Cell(125,10,'Tanda Terima:',0,0,'L');
					//  Referensi nama jabatan
					$qNmjabatan	= mysql_query("SELECT nmjabatan FROM t_pejabt WHERE ketjabatan='1'");
					$rNmjabatan	= mysql_fetch_array($qNmjabatan);
					$nmjabatan		= $rNmjabatan[0];
					$this->Cell(70,10,$nmjabatan,0,1,'L');
					// Next row
					// Diterima oleh
					$this->Cell(40,6,"Diterima oleh",0,0,'L');
					$this->Cell(5,6,":",0,0,'C');
					$this->Cell(70,6,".................................",0,0,'L');
					$this->Cell(80,6,"",0,1,'L');
					// Next row
					// Nama/NIP
					$this->Cell(40,6,"Nama/NIP",0,0,'L');
					$this->Cell(5,6,":",0,0,'C');
					$this->Cell(70,6,".................................",0,0,'L');
					$this->Cell(80,6,"",0,1,'L');
					// Next row
					// Tanggal
					$this->Cell(40,6,"Tanggal",0,0,'L');
					$this->Cell(5,6,":",0,0,'C');
					$this->Cell(80,6,".................................",0,0,'L');
					// Nama pejabat
					$qNama	= mysql_query("SELECT nama,nip FROM t_pejabt WHERE ketjabatan='1'");
					$rNama		= mysql_fetch_array($qNama);
					$nama		= $rNama[0];
					$this->Cell(70,6,$nama,0,1,'L');
					// Next row
					//  Cap dinas
					$this->Cell(40,6,"Cap dinas",0,0,'L');
					$this->Cell(5,6,":",0,0,'C');
					$this->Cell(80,6,"",0,0,'L');
					$nip		= $rNama[1];
					$this->Cell(70,6,$nip,0,1,'L');
					// Next row
					$this->Cell(40,8,"",0,0,'L');
					$this->Cell(5,8,"",0,0,'C');
					$this->Cell(80,8,"",0,0,'L');
					$this->Cell(70,8,"",0,1,'L');
					//  Catatan dan nama kepala kantor
					// Times 8
					$this->SetFont('Times','',8);
					$this->Cell(20,5,"Catatan",0,0,'L');
					$this->Cell(5,5,":",0,0,'C');
					$this->Cell(170,5,"Harap setelah tanda terima diisi",0,1,'L');
					// Next row
					$this->SetFont('Times','',8);
					$this->Cell(20,5,"",0,0,'L');
					$this->Cell(5,5,"",0,0,'C');
					$this->Cell(170,5,"lembar ke-2 mohon dikirim kembali",0,1,'L');
				}
			}
		}
		// Body
		$pdf = new PDF('P','mm','A4');
		$pdf->AddPage();
		// Konsep SKPP GPP ==========
		//if($_POST['reportkonsepskpp'] == 'Konsep' || $_POST['reportnetskpp'] == 'Net'){
			// Jika SKPP GPP & SKPP Pindah (PNS Pindah surat ditujukan ke KPA satker asal) 
			if($_POST['kdgpp'] == '01' && $_POST['kdjenskpp'] == '01'){
					// Tujuan SKPP
					$Idskpp	= $_POST['idSkpp'];
					$qSkpp	= mysql_query("SELECT a.noskpp,DATE_FORMAT(a.tgskpp,'%d-%m-%y') as tgskpp,a.anskpp,a.tujuanskpp,a.kotatujuan,a.kdsatker,a.satkerbaru,a.nip,a.pangkat,a.alamat,a.kotaasal,b.nmsatker FROM d_skpp a LEFT JOIN t_satker b ON a.kdsatker=b.kdsatker WHERE id_skpp='$Idskpp'")or die(mysql_error);
					$rSkpp	= mysql_fetch_array($qSkpp);
					$tujuanskpp 	= $rSkpp['tujuanskpp'];
					$kotatujuan		= $rSkpp['kotatujuan'];
					$nmsatker		= $rSkpp['nmsatker'];
					$kotaasal		= strtoupper($rSkpp['kotaasal']);
					$pdf->SetFont('','BI','');
					// KPA Satker asal
					$pdf->Cell(190,6,"YTH. KPA ".$nmsatker,0,1,'L');
					$pdf->Cell(190,6,"DI ".$kotaasal,0,1,'L');
					$pdf->Ln(5);
					// Starting with table now
					$pdf->SetFont('','','');
					$pdf->Cell(10,10,"No.",1,0,'C');
					$pdf->Cell(115,10,"Uraian",1,0,'C');
					$pdf->Cell(25,10,"Bilangan",1,0,'C');
					$pdf->Cell(40,10,"Catatan",1,1,'C');
					// Body table
					$pdf->Cell(10,6,"1",'L',0,'C');
					$pdf->Cell(115,6,"Lembar I dan II SKPP Satuan Kerja",'LR',0,'L');
					$pdf->Cell(25,6,"2 (dua)",'R',0,'C');
					$pdf->Cell(40,6,"Disampaikan",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					// Nama Satker
					$kdsatker	= $rSkpp['kdsatker'];
					$nmSatker	= mysql_query("SELECT nmsatker FROM t_satker WHERE kdsatker='$kdsatker'");
					$rnmSatker	= mysql_fetch_array($nmSatker);
					$nmsatker	= $rnmSatker['nmsatker'];
					$pdf->Cell(115,6,$nmsatker.":",'LR',0,'L');
					$pdf->Cell(25,6,"lembar",'R',0,'C');
					$pdf->Cell(40,6,"dengan hormat untuk",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Nomor",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// No SKPP
					$noskpp 	= $rSkpp['noskpp'];
					$pdf->Cell(90,6,$noskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"dipergunakan",'R',1,'C');
					//Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Tanggal",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Tgl SKPP
					$tgskpp		= $rSkpp['tgskpp'];
					$pdf->Cell(90,6,$tgskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"seperlunya",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Atas Nama",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Atas nama SKPP
					$anskpp	= $rSkpp['anskpp'];
					$pdf->Cell(90,6,$anskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"NIP",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// NIP
					$nip	= $rSkpp['nip'];
					$pdf->Cell(90,6,$nip,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Pangkat",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Pangkat
					$qPangkat	= mysql_query("SELECT b.nmgol2,b.nmgol1 FROM d_skpp a LEFT JOIN t_golongan b ON a.pangkat=b.kdgol WHERE a.id_skpp='$Idskpp'");
					$rPangkat	= mysql_fetch_row($qPangkat);
					$pangkat	= trim($rPangkat[0]);
					$golongan	= trim($rPangkat[1]);
					$pdf->Cell(90,6,$pangkat.' ('.$golongan.')','R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,10,"2",'L',0,'C');
					$pdf->Cell(115,10,"Tembusan disampaikan kepada:",'LR',0,'L');
					$pdf->Cell(25,10,"",'R',0,'C');
					$pdf->Cell(40,10,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"1.",0,0,'L');
					$pdf->Cell(110,6,"Lembar I kepada Sdr./Sdri.".$anskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					//Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Alamat
					$alamat		= $rSkpp['alamat'];
					$pdf->Cell(110,6,"d.a.".$alamat,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"2.",0,0,'L');
					// Satker baru
					$pdf->Cell(110,6,"Lembar II untuk Satuan Kerja",'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Satker baru
					$satkerbaru		= $rSkpp['satkerbaru'];
					$pdf->Cell(110,6,$satkerbaru,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"3.",0,0,'L');
					// Nama KPPN
					$qKppn		= mysql_query("SELECT nmkppn FROM t_kppn WHERE kddefa='1'")or die(mysql_error);
					$rKppn		= mysql_fetch_array($qKppn);
					$nmKppn	= $rKppn['nmkppn'];
					$pdf->Cell(110,6,'Lembar III untuk KPPN '.$nmKppn,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"4.",0,0,'L');
					// Nama Satker asal
					$pdf->Cell(110,6,"Lembar IV pertinggal Satuan Kerja",'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Nama Satker asal
					$pdf->Cell(110,6,$nmsatker,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// End's of table
					$pdf->Cell(10,10,"",'BLR',0,'C');
					$pdf->Cell(115,10,"",'BR',0,'L');
					$pdf->Cell(25,10,"",'BR',0,'C');
					$pdf->Cell(40,10,"",'BR',1,'C');
			}
			// Jika SKPP adalah SKPP  GPP & SKPP Pensiun
			elseif($_POST['kdgpp'] == '01' && $_POST['kdjenskpp'] == '02'){
				$IdSkpp	= $_POST['idSkpp'];
				// Tujuan SKPP
				$qSkpp	= mysql_query("SELECT a.noskpp,DATE_FORMAT(a.tgskpp,'%d-%m-%y') as tgskpp,a.anskpp,a.tujuanskpp,a.kotatujuan,a.kdsatker,a.satkerbaru,a.nip,a.pangkat,a.alamat,b.nmsatker FROM d_skpp a LEFT JOIN t_satker b ON a.kdsatker=b.kdsatker WHERE id_skpp='$IdSkpp'")or die(mysql_error);
				$rSkpp	= mysql_fetch_array($qSkpp);
				$tujuanskpp 	= $rSkpp['tujuanskpp'];
				$kotatujuan		= strtoupper($rSkpp['kotatujuan']);
				$pdf->SetFont('','BI','');
					// KPA Asal
					$nmsatker		= $rSkpp['nmsatker'];
					$pdf->Cell(190,6,"YTH. KPA ".$nmsatker,0,1,'L');
					$pdf->Cell(190,6,"DI ".$kotatujuan,0,1,'L');
					$pdf->Ln(5);
					// Starting with table now
					$pdf->SetFont('','','');
					$pdf->Cell(10,10,"No.",1,0,'C');
					$pdf->Cell(115,10,"Uraian",1,0,'C');
					$pdf->Cell(25,10,"Bilangan",1,0,'C');
					$pdf->Cell(40,10,"Catatan",1,1,'C');
					// Body table
					$pdf->Cell(10,6,"1",'L',0,'C');
					$pdf->Cell(115,6,"Lembar I dan II SKPP Satuan Kerja",'LR',0,'L');
					$pdf->Cell(25,6,"2 (dua)",'R',0,'C');
					$pdf->Cell(40,6,"Disampaikan",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					// Nama Satker
					$kdsatker	= $rSkpp['kdsatker'];
					$nmSatker	= mysql_query("SELECT nmsatker FROM t_satker WHERE kdsatker='$kdsatker'");
					$rnmSatker	= mysql_fetch_array($nmSatker);
					$nmsatker	= $rnmSatker['nmsatker'];
					$pdf->Cell(115,6,$nmsatker.":",'LR',0,'L');
					$pdf->Cell(25,6,"lembar",'R',0,'C');
					$pdf->Cell(40,6,"dengan hormat untuk",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Nomor",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// No SKPP
					$noskpp 	= $rSkpp['noskpp'];
					$pdf->Cell(90,6,$noskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"dipergunakan",'R',1,'C');
					//Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Tanggal",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Tgl SKPP
					$tgskpp		= $rSkpp['tgskpp'];
					$pdf->Cell(90,6,$tgskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"seperlunya",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Atas Nama",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Atas nama SKPP
					$anskpp	= $rSkpp['anskpp'];
					$pdf->Cell(90,6,$anskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"NIP",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// NIP
					$nip	= $rSkpp['nip'];
					$pdf->Cell(90,6,$nip,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Pangkat",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Pangkat
					$qPangkat	= mysql_query("SELECT b.nmgol2,b.nmgol1 FROM d_skpp a LEFT JOIN t_golongan b ON a.pangkat=b.kdgol WHERE a.id_skpp='$IdSkpp'");
					$rPangkat	= mysql_fetch_row($qPangkat);
					$pangkat	= trim($rPangkat[0]);
					$golongan	= trim($rPangkat[1]);
					$pdf->Cell(90,6,$pangkat.' ('.$golongan.')','R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,10,"2",'L',0,'C');
					$pdf->Cell(115,10,"Tembusan disampaikan kepada:",'LR',0,'L');
					$pdf->Cell(25,10,"",'R',0,'C');
					$pdf->Cell(40,10,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"1.",0,0,'L');
					$pdf->Cell(110,6,"Lembar I dan II kepada PT Taspen (Persero)",'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					//Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Kota Tujuan
					$pdf->Cell(110,6,"di ".$kotatujuan,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"2.",0,0,'L');
					// Pegawai
					$pdf->Cell(110,6,"Lembar III untuk kepada Sdr./Sdri.".$anskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"3.",0,0,'L');
					// Nama KPPN
					$qKppn		= mysql_query("SELECT nmkppn FROM t_kppn WHERE kddefa='1'")or die(mysql_error);
					$rKppn		= mysql_fetch_array($qKppn);
					$nmKppn	= $rKppn['nmkppn'];
					$pdf->Cell(110,6,'Lembar IV untuk KPPN '.$nmKppn,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"4.",0,0,'L');
					// Nama Satker asal
					$pdf->Cell(110,6,"Lembar V pertinggal Satuan Kerja",'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Nama Satker asal
					$pdf->Cell(110,6,$nmsatker,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// End's of table
					$pdf->Cell(10,10,"",'BLR',0,'C');
					$pdf->Cell(115,10,"",'BR',0,'L');
					$pdf->Cell(25,10,"",'BR',0,'C');
					$pdf->Cell(40,10,"",'BR',1,'C');
			}
			// Jika SKPP Non GPP & SKPP Pindah (TNI Pindah surat ditujukan ke KPPN Tujuan) 
			elseif($_POST['kdgpp'] == '00' && $_POST['kdjenskpp'] == '01'){
					$Idskppn	= $_POST['idSkpp'];
					// Tujuan SKPP
					$qSkpp	= mysql_query("SELECT a.noskpp,DATE_FORMAT(a.tgskpp,'%d-%m-%y') as tgskpp,a.anskpp,a.tujuanskpp,a.kotatujuan,a.kdsatker,a.satkerbaru,a.nip,a.pangkat,a.alamat,a.kotaasal,b.nmsatker FROM d_skpp a LEFT JOIN t_satker b ON a.kdsatker=b.kdsatker WHERE id_skpp='$Idskppn'")or die(mysql_error);
					$rSkpp	= mysql_fetch_array($qSkpp);
					$kotatujuan		= strtoupper($rSkpp['kotatujuan']);
					$nmsatker		= $rSkpp['nmsatker'];
					$kotaasal		= strtoupper($rSkpp['kotaasal']);
					$pdf->SetFont('','BI','');
					// KPA Satker asal
					$tujuanskpp 	= strtoupper($rSkpp['tujuanskpp']);
					$pdf->Cell(190,6,"YTH. KEPALA ".$tujuanskpp,0,1,'L');
					$pdf->Cell(190,6,"DI ".$kotatujuan,0,1,'L');
					$pdf->Ln(5);
					// Starting with table now
					$pdf->SetFont('','','');
					$pdf->Cell(10,10,"No.",1,0,'C');
					$pdf->Cell(115,10,"Uraian",1,0,'C');
					$pdf->Cell(25,10,"Bilangan",1,0,'C');
					$pdf->Cell(40,10,"Catatan",1,1,'C');
					// Body table
					$pdf->Cell(10,6,"1",'L',0,'C');
					$pdf->Cell(115,6,"Lembar I dan II SKPP Satuan Kerja",'LR',0,'L');
					$pdf->Cell(25,6,"2 (dua)",'R',0,'C');
					$pdf->Cell(40,6,"Disampaikan",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					// Nama Satker
					$kdsatker	= $rSkpp['kdsatker'];
					$nmSatker	= mysql_query("SELECT nmsatker FROM t_satker WHERE kdsatker='$kdsatker'");
					$rnmSatker	= mysql_fetch_array($nmSatker);
					$nmsatker	= $rnmSatker['nmsatker'];
					$pdf->Cell(115,6,$nmsatker.":",'LR',0,'L');
					$pdf->Cell(25,6,"lembar",'R',0,'C');
					$pdf->Cell(40,6,"dengan hormat untuk",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Nomor",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// No SKPP
					$noskpp 	= $rSkpp['noskpp'];
					$pdf->Cell(90,6,$noskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"dipergunakan",'R',1,'C');
					//Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Tanggal",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Tgl SKPP
					$tgskpp		= $rSkpp['tgskpp'];
					$pdf->Cell(90,6,$tgskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"seperlunya",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Atas Nama",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Atas nama SKPP
					$anskpp	= $rSkpp['anskpp'];
					$pdf->Cell(90,6,$anskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"NIP",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// NIP
					$nip	= $rSkpp['nip'];
					$pdf->Cell(90,6,$nip,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Pangkat",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Pangkat
					$qPangkat	= mysql_query("SELECT b.nmgol2 FROM d_skpp a LEFT JOIN t_golongan b ON a.pangkat=b.kdgol WHERE a.id_skpp='$Idskppn'");
					$rPangkat	= mysql_fetch_row($qPangkat);
					$pangkat	= trim($rPangkat[0]);
					$pdf->Cell(90,6,$pangkat,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,10,"2",'L',0,'C');
					$pdf->Cell(115,10,"Tembusan disampaikan kepada:",'LR',0,'L');
					$pdf->Cell(25,10,"",'R',0,'C');
					$pdf->Cell(40,10,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"1.",0,0,'L');
					$pdf->Cell(110,6,"Lembar I kepada Sdr./Sdri.".$anskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					//Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Alamat
					$alamat		= $rSkpp['alamat'];
					$pdf->Cell(110,6,"d.a.".$alamat,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"2.",0,0,'L');
					// Satker baru
					$pdf->Cell(110,6,"Lembar II untuk Satuan Kerja",'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Satker baru
					$satkerbaru		= $rSkpp['satkerbaru'];
					$pdf->Cell(110,6,$satkerbaru,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"3.",0,0,'L');
					// Nama KPPN
					$qKppn		= mysql_query("SELECT nmkppn FROM t_kppn WHERE kddefa='1'")or die(mysql_error);
					$rKppn		= mysql_fetch_array($qKppn);
					$nmKppn	= $rKppn['nmkppn'];
					$pdf->Cell(110,6,'Lembar III untuk KPPN '.$nmKppn,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"4.",0,0,'L');
					// Nama Satker asal
					$pdf->Cell(110,6,"Lembar IV pertinggal Satuan Kerja",'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Nama Satker asal
					$pdf->Cell(110,6,$nmsatker,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// End's of table
					$pdf->Cell(10,10,"",'BLR',0,'C');
					$pdf->Cell(115,10,"",'BR',0,'L');
					$pdf->Cell(25,10,"",'BR',0,'C');
					$pdf->Cell(40,10,"",'BR',1,'C');
				}
				// Jika SKPP adalah SKPP  Non GPP & SKPP Pensiun (SKPP TNI ditujukan ke PT Asabri (Persero))
				elseif($_POST['kdgpp'] == '00' && $_POST['kdjenskpp'] == '02'){
				$IdSkppn	= $_POST['idSkpp'];
				// Tujuan SKPP
				$qSkpp	= mysql_query("SELECT a.noskpp,DATE_FORMAT(a.tgskpp,'%d-%m-%y') as tgskpp,a.anskpp,a.tujuanskpp,a.kotatujuan,a.kdsatker,a.satkerbaru,a.nip,a.pangkat,a.alamat,b.nmsatker FROM d_skpp a LEFT JOIN t_satker b ON a.kdsatker=b.kdsatker WHERE id_skpp='$IdSkppn'")or die(mysql_error);
				$rSkpp	= mysql_fetch_array($qSkpp);
				$kotatujuan		= strtoupper($rSkpp['kotatujuan']);
				$nmsatker		= $rSkpp['nmsatker'];
				$pdf->SetFont('','BI','');
					//PT Asabri
					$tujuanskpp 	= "PT ASABRI (PERSERO)";
					$pdf->Cell(190,6,"YTH. PIMPINAN ".$tujuanskpp.' '.$kotatujuan,0,1,'L');
					$pdf->Cell(190,6,"DI ".$kotatujuan,0,1,'L');
					$pdf->Ln(5);
					// Starting with table now
					$pdf->SetFont('','','');
					$pdf->Cell(10,10,"No.",1,0,'C');
					$pdf->Cell(115,10,"Uraian",1,0,'C');
					$pdf->Cell(25,10,"Bilangan",1,0,'C');
					$pdf->Cell(40,10,"Catatan",1,1,'C');
					// Body table
					$pdf->Cell(10,6,"1",'L',0,'C');
					$pdf->Cell(115,6,"Lembar I dan II SKPP Satuan Kerja",'LR',0,'L');
					$pdf->Cell(25,6,"2 (dua)",'R',0,'C');
					$pdf->Cell(40,6,"Disampaikan",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					// Nama Satker
					$kdsatker	= $rSkpp['kdsatker'];
					$nmSatker	= mysql_query("SELECT nmsatker FROM t_satker WHERE kdsatker='$kdsatker'");
					$rnmSatker	= mysql_fetch_array($nmSatker);
					$nmsatker	= $rnmSatker['nmsatker'];
					$pdf->Cell(115,6,$nmsatker.":",'LR',0,'L');
					$pdf->Cell(25,6,"lembar",'R',0,'C');
					$pdf->Cell(40,6,"dengan hormat untuk",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Nomor",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// No SKPP
					$noskpp 	= $rSkpp['noskpp'];
					$pdf->Cell(90,6,$noskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"dipergunakan",'R',1,'C');
					//Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Tanggal",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Tgl SKPP
					$tgskpp		= $rSkpp['tgskpp'];
					$pdf->Cell(90,6,$tgskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"seperlunya",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Atas Nama",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Atas nama SKPP
					$anskpp	= $rSkpp['anskpp'];
					$pdf->Cell(90,6,$anskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"NIP",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// NIP
					$nip	= $rSkpp['nip'];
					$pdf->Cell(90,6,$nip,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'L',0,'C');
					$pdf->Cell(20,6,"Pangkat",'L',0,'L');
					$pdf->Cell(5,6,":",0,0,'C');
					// Pangkat
					$qPangkat	= mysql_query("SELECT b.nmgol2 FROM d_skpp a LEFT JOIN t_golongan b ON a.pangkat=b.kdgol WHERE a.id_skpp='$IdSkppn'");
					$rPangkat	= mysql_fetch_row($qPangkat);
					$pangkat	= trim($rPangkat[0]);
					$pdf->Cell(90,6,$pangkat,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,10,"2",'L',0,'C');
					$pdf->Cell(115,10,"Tembusan disampaikan kepada:",'LR',0,'L');
					$pdf->Cell(25,10,"",'R',0,'C');
					$pdf->Cell(40,10,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"1.",0,0,'L');
					$pdf->Cell(110,6,"Lembar I dan II kepada PT Asabri (Persero)",'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					//Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Kota Tujuan
					$pdf->Cell(110,6,"di ".$kotatujuan,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"2.",0,0,'L');
					// Pegawai
					$pdf->Cell(110,6,"Lembar III untuk kepada Sdr./Sdri.".$anskpp,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"3.",0,0,'L');
					// Nama KPPN
					$qKppn		= mysql_query("SELECT nmkppn FROM t_kppn WHERE kddefa='1'")or die(mysql_error);
					$rKppn		= mysql_fetch_array($qKppn);
					$nmKppn	= $rKppn['nmkppn'];
					$pdf->Cell(110,6,'Lembar IV untuk KPPN '.$nmKppn,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"4.",0,0,'L');
					// Nama Satker asal
					$pdf->Cell(110,6,"Lembar V pertinggal Satuan Kerja",'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// Next Row
					$pdf->Cell(10,6,"",'LR',0,'C');
					$pdf->Cell(5,6,"",0,0,'L');
					// Nama Satker asal
					$pdf->Cell(110,6,$nmsatker,'R',0,'L');
					$pdf->Cell(25,6,"",'R',0,'C');
					$pdf->Cell(40,6,"",'R',1,'C');
					// End's of table
					$pdf->Cell(10,10,"",'BLR',0,'C');
					$pdf->Cell(115,10,"",'BR',0,'L');
					$pdf->Cell(25,10,"",'BR',0,'C');
					$pdf->Cell(40,10,"",'BR',1,'C');
				}
		//}
		$pdf->Output();	
?>
Back to Top