first commit

This commit is contained in:
2026-05-03 13:08:18 +07:00
commit 3d1b44628f
50 changed files with 4028 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
<?php
/*******************************************************************
App. Name : SISTEM INFORMASI MONITORING DAN EVALUASI
Module : /apps/php/func/esapipd.php
Desc. : PHP - Fungsi eSAPIPD
Created By : Siau Pheng ([email protected]).
Created Date : May 15th, 2012.
Last Modified : May 1st, 2026.
(c) 2012 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
require_once(__DIR__."/../../../../../vendor/autoload.php");
use siaupheng\fonia3\DB\MySQL;
$fdb = new MySQL();
function tahun_ang($prefix = "") {
global $fdb;
$atahun = [];
$fdb->Query("SELECT Tahun FROM para_periode WHERE Tahun IN (SELECT Tahun FROM sapi_keg) ORDER BY Tahun");
while ($fdb->Next()){
$atahun[$fdb->Row("Tahun")] = $prefix . $fdb->Row("Tahun");
}
return $atahun;
}
function map_tahun_submap($thn_map = 0) {
$amap = [2021 => 2022, 2024 => 2025];
return $amap[$thn_map] ?? $thn_map;
}
function Kolom_Status1($err = 0) {
$stat = '<i class="icon fs-5 text-danger bi-exclamation-circle me-2" title="Cek dan perbaiki informasi kegiatan!"></i><span class="badge rounded-pill text-bg-danger">'.$err.'</span>';
if ($err == 0) $stat = '<i class="icon text-success fs-5 bi-check-circle"></i>';
return $stat;
}
function Kolom_Status2($err = 0) {
$stat = '<i class="icon fs-5 text-danger bi-exclamation-circle me-2" title="Cek dan perbaiki informasi kegiatan!"></i>';
if ($err == 0) $stat = '<i class="icon text-success fs-5 bi-check-circle"></i>';
return $stat;
}
function Kegiatan_Baru($tahun = 0, $kd_jenis = "R") {
global $fdb;
$ino = 0;
$fdb->Query("SELECT MAX(RIGHT(Kode,6)) Nomor FROM sapi_keg WHERE Tahun='".$tahun."' AND Kode LIKE '".$kd_jenis.substr($tahun,-2)."%'");
if ($fdb->Next()) $ino = (int)$fdb->Row("Nomor", 0);
return $kd_jenis.substr($tahun,-2).isi_nol(++$ino, 6);
}
?>
+36
View File
@@ -0,0 +1,36 @@
<?php
/*******************************************************************
App. Name : SISTEM INFORMASI MONITORING DAN EVALUASI
Module : /apps/php/func/report.php
Desc. : PHP - Fungsi Report
Created By : Siau Pheng ([email protected]).
Created Date : May 15th, 2012.
Last Modified : April 29th, 2026.
(c) 2012 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
require_once(__DIR__."/../../../../../vendor/autoload.php");
use siaupheng\fonia3\DB\MySQL;
$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;
}
?>