commit pertama

This commit is contained in:
2026-01-30 13:07:53 +07:00
commit 48199537d4
303 changed files with 136097 additions and 0 deletions
+72
View File
@@ -0,0 +1,72 @@
<?php
/*******************************************************************
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
Module : /apps/php/func/musrenbang.php
Desc. : PHP - Fungsi Musrenbang
Created By : Siau Pheng ([email protected]).
Created Date : May 15th, 2012.
Last Modified : January 9th, 2026.
(c) 2012 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
require_once(__DIR__."/../../../../../vendor/autoload.php");
use siaupheng\fonia3\DB\MySQL;
use siaupheng\fonia3\DB\SQL;
$fdb = (is_resource($fdb)) ? $fdb : new MySQL();
function ID_Usulan_Desa($id_rpjmd = 0, $tahun = 0) {
global $fdb;
$ino = 1;
$fdb->Query("SELECT MAX(UsulanLID)+1 Nomor FROM mus_usulan_desa WHERE RPJMDID='".$id_rpjmd."' AND Tahun='".$tahun."'");
if ($fdb->Next()) $ino = $fdb->Row("Nomor", 1);
return $ino;
}
function Kode_Usulan_Desa($tahun = 0, $id_desa = 0) {
global $fdb;
$k_desa = "000";
if ($id_desa > 0) {
$fdb->Query("SELECT K_Lokasi FROM para_lokasi WHERE LokasiID='".$id_desa."' LIMIT 1");
if ($fdb->Next()) $k_desa = $fdb->Row("K_Lokasi");
}
$tno = $k_desa . "-"; $ino = 0;
$fdb->Query("SELECT MAX(RIGHT(Kode,3)) Nomor FROM mus_usulan_desa WHERE Tahun='".$tahun."' AND LEFT(Kode,".strlen($tno).")='".$tno."'");
if ($fdb->Next()) $ino = (int)$fdb->Row("Nomor", 0);
$tno .= isi_nol($ino+1, 3);
return $tno;
}
function Kode_Usulan_Kec($tahun = 0, $id_kec = 0) {
global $fdb;
$k_kec = "00";
if ($id_kec > 0) {
$fdb->Query("SELECT RIGHT(K_Lokasi,2) Kode FROM para_lokasi WHERE LokasiID='".$id_kec."' LIMIT 1");
if ($fdb->Next()) $k_kec = $fdb->Row("Kode");
}
$tno = $k_kec . "-"; $ino = 0;
$fdb->Query("SELECT MAX(RIGHT(Kode,3)) Nomor FROM mus_usulan_desa WHERE Tahun='".$tahun."' AND KecID='".$id_kec."' AND JU=3");
if ($fdb->Next()) $ino = (int)$fdb->Row("Nomor", 0);
$tno .= isi_nol($ino+1, 3);
return $tno;
}
function MUSPrio($iprio=0) {
$hasil = '<select class="form-select form-select-sm" onchange="MUsulPrioJS.oc_Prio(this);" required=true aria-label="Pilihan Prioritas" >';
for ($o=0; $o<=5; $o++) {
$hasil .= '<option value="'.$o.'"'.($o==$iprio?' selected="selected"':'').'>'.$o.'</option>';
}
$hasil .= '</select>';
return $hasil;
}
function MusPrio_Array() {
return [0=>"0", 1=>"1", 2=>"2", 3=>"3", 4=>"4", 5=>"5"];
}
?>
+37
View File
@@ -0,0 +1,37 @@
<?php
/*******************************************************************
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
Module : /apps/php/func/report.php
Desc. : PHP - Fungsi Report
Created By : Siau Pheng ([email protected]).
Created Date : May 15th, 2012.
Last Modified : January 9th, 2026.
(c) 2012 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
require_once(__DIR__."/../../../../../vendor/autoload.php");
use siaupheng\fonia3\DB\MySQL;
use siaupheng\fonia3\DB\SQL;
$fdb = (is_resource($fdb)) ? $fdb : new MySQL();
function Report_Empty($ltabel = "") {
global $fdb;
if ($ltabel == "") return false;
$fdb->Query("DELETE FROM rep_".$ltabel." WHERE (Unix='".user_unix()."' OR Unix<'".(user_unix()-604800)."') AND UserID='".user_id()."'");
}
function Report_Header($tlapor="", $tperiod="") {
$thasil = '<div style="text-align:center;font-size:12pt;"><b>'.strtoupper($_SESSION['__WEB_APP']['REG_NAME']);
$thasil .= (($tlapor=="") ? "" : '<br>'.$tlapor) . '</b>';
$thasil .= ($tperiod=="") ? "" : '<br><span style="font-size:11pt;">'.$tperiod.'</span>';
$thasil .= '</div><br>';
echo $thasil;
}
?>