add simak to git repo
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
include("koneksi.php");
|
||||
include("../../koneksi.php");
|
||||
$key=$_POST['key'];
|
||||
$thn=$_POST['thn'];
|
||||
if ($key=='cek_jumlah') {
|
||||
$hitung=mssql_query("SELECT COUNT(anggaran)
|
||||
FROM t_kegiatan
|
||||
WHERE thn='$thn' AND anggaran IS NOT NULL
|
||||
");
|
||||
while($h=mssql_fetch_array($hitung)) {$j=$h[0];}
|
||||
if ($j==0) {echo "kosong";} else {echo "ada";}
|
||||
} else
|
||||
if ($key=='import') {
|
||||
$del=pg_query("DELETE FROM sub_kegiatan WHERE thn='$thn'");
|
||||
$data=mssql_query("SELECT thn,kpa,pptk,UPPER(kegiatan),A,B,C,D,E,F,G,H,REPLACE(sub_kg,':',''),anggaran
|
||||
FROM t_kegiatan
|
||||
WHERE thn='$thn' AND anggaran IS NOT NULL ORDER BY H ASC,kegiatan ASC
|
||||
");
|
||||
while(($xx=mssql_fetch_array($data)) !== FALSE) {
|
||||
$thn=$xx[0];$kpa=$xx[1];$pptk=$xx[2];$kegiatan=$xx[3];$ra=$xx[4];$rb=$xx[5];
|
||||
$rc=$xx[6];$rd=$xx[7];$re=$xx[8];$rf=$xx[9];$rg=$xx[10];$rh=$xx[11];$sub_kegiatan=$xx[12];$anggaran=$xx[13];
|
||||
$ins=pg_query("INSERT INTO sub_kegiatan (thn,kpa,pptk,kegiatan,ra,rb,rc,rd,re,rf,rg,rh,sub_kegiatan,anggaran)
|
||||
VALUES ('$thn','$kpa','$pptk','$kegiatan','$ra','$rb','$rc','$rd','$re','$rf','$rg','$rh','$sub_kegiatan','$anggaran');
|
||||
");
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user