1 Commits
17 changed files with 264 additions and 59 deletions
+16 -3
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /DB/CheckSQL.php
Desc. : Class Check SQL / Repair Database
Created By : Siau Pheng ([email protected]).
Created Date : May 11th, 2011.
Last Modified : August 21st, 2026.
@@ -20,14 +19,28 @@ use \Exception;
use \flight\Engine;
use \flight\database\SimplePdo;
/**
* Class CheckSQL
*
* Check Database Mysql/MariaDB dan Repair.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <[email protected]>
*
* @package Webapp\DB
*/
final class CheckSQL {
private Array $__atabel = [];
protected Engine $app;
protected SimplePdo $db;
public function __construct(Engine $app, SimplePdo $db) {
/**
* @param Engine $app
*/
public function __construct(Engine $app) {
$this->app = $app;
$this->db = $db;
$this->db = $app->db();
$nama_db = $this->db->fetchField('SELECT DATABASE()');
$arow = $this->db->fetchAll("SELECT TABLE_NAME,ENGINE,TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='".$nama_db."' AND TABLE_TYPE='BASE TABLE'");
foreach ($arow as $row) {
+17 -4
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /DB/SQL.php
Desc. : Class Query database
Created By : Siau Pheng ([email protected]).
Created Date : February 2nd, 2007.
Last Modified : August 21st, 2026.
@@ -21,6 +20,17 @@ use \flight\Session;
use \flight\database\SimplePdo;
use Webapp\Web\Param;
/**
* Class SQL
*
* Database CRUD dengan data dari GET/POST.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <[email protected]>
*
* @package Webapp\DB
*/
final class SQL {
private string $_ttable;
private array $_afield = [];
@@ -29,10 +39,13 @@ final class SQL {
protected SimplePdo $db;
protected array webuser;
public function __construct(Engine $app, Ssssion $session, SimplePdo $db){
/**
* @param Engine $app
*/
public function __construct(Engine $app){
$this->app = $app;
$this->db = $db;
$this->webuser = $session->get('__WEB_USER', ['UserID'=>0, 'UNIX'=>0]);
$this->db = $app->db();
$this->webuser = $app->session()->get('__WEB_USER', ['UserID'=>0, 'UNIX'=>0]);
}
//todo: deprecated
+11 -1
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Data/CSV.php
Desc. : Class pembuatan file CSV
Created By : Siau Pheng ([email protected]).
Created Date : April 2rd, 2011.
Last Modified : August 21st, 2026.
@@ -19,6 +18,17 @@ namespace Webapp\Data;
define( DELI_CSV, ";" );
define( CRLF_CSV, "\r\n" );
/**
* Class CSV
*
* Membuat file CSV.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <[email protected]>
*
* @package Webapp\Data
*/
final class CSV {
private $__avalue = [];
private $__atabel = [];
+17 -3
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Data/Cache.php
Desc. : Class cache css dan js aplikasi
Created By : Siau Pheng ([email protected]).
Created Date : March 16th, 2008.
Last Modified : August 21st, 2026.
@@ -22,6 +21,17 @@ use \FilesystemIterator;
use \MatthiasMullie\Minify;
use \SplFileInfo;
/**
* Class Cache
*
* Membuat Cache gabungan CSS dan JS sesuai dengan session.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <[email protected]>
*
* @package Webapp\Data
*/
final class Cache {
private $__cachedir = "";
private $__cssdir = "";
@@ -34,9 +44,13 @@ final class Cache {
protected Session $session;
protected array $__asset = [];
public function __construct(Engine $app, Session $session) {
/**
* @param Engine $app
*/
public function __construct(Engine $app) {
$this->app = $app;
$this->session = $session;
$this->session = $app->session();
$rootdir = (defined('PROJECT_ROOT')) ? PROJECT_ROOT : $this->app->get('app.project_root');
$this->__cachedir = $rootdir . '/public/chunks/';
$this->__localedir = $rootdir . '/app/Scripts/locale/';
+19 -5
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Data/PDF.php
Desc. : Class pembuatan file PDF
Created By : Siau Pheng ([email protected]).
Created Date : April 18th, 2015.
Last Modified : August 21st, 2026.
@@ -16,9 +15,20 @@ declare(strict_types=1);
namespace Webapp\Data;
use \flight\Session;
use \flight\Engine;
use \Mpdf;
/**
* Class PDF
*
* Membuat file PDF.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <[email protected]>
*
* @package Webapp\Data
*/
final class PDF {
private $__avalue = [];
private $__atabel = [];
@@ -27,9 +37,13 @@ final class PDF {
protected array $webapp;
protected array $webuser;
public function __construct(Session $session) {
$this->webapp = $session->get('__WEB_APP', ['REG_NAME'=>'', 'APP_NAME'=>'', 'APP_VER'=>'']);
$this->webuser = $session->get('__WEB_USER', ['UserID'=>0, 'Username'=>'']);
/**
* @param Engine $app
*/
public function __construct(Engine $app) {
$this->webapp = $app->session()->get('__WEB_APP', ['REG_NAME'=>'', 'APP_NAME'=>'', 'APP_VER'=>'']);
$this->webuser = $app->session()->get('__WEB_USER', ['UserID'=>0, 'Username'=>'']);
}
public function add_field(string $nama, string|int $lebar=0, string $align="L", string $func="", int $kol=1): void {
+21 -8
View File
@@ -3,10 +3,9 @@
/*******************************************************************
Module : /Printer/PrintHTML.php
Desc. : Class cetak HTML
Created By : Siau Pheng ([email protected]).
Created Date : June 15th, 2008.
Last Modified : August 21st, 2026.
Last Modified : August 26th, 2026.
(c) 3FONIA Software; WWW.3FONIA.COM.
@@ -16,7 +15,18 @@ declare(strict_types=1);
namespace Webapp\Printer;
use \flight\Session;
use \flight\Engine;
/**
* Class PrintHTML
*
* Menghasilkan bentuk laporan dalam format HTML.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <[email protected]>
*
* @package Webapp\Printer
*/
final class PrintHTML {
private $__avalue = [];
@@ -25,10 +35,13 @@ final class PrintHTML {
private $__tstamp = "";
protected array $webapp;
protected array $webuser;
public function __construct(Session $session) {
$this->webapp = $session->get('__WEB_APP', ['APP_NAME'=>'', 'APP_VER'=>'']);
$this->webuser = $session->get('__WEB_USER', ['UserID'=>0, 'Username'=>'']);
/**
* @param Engine $app
*/
public function __construct(Engine $app) {
$this->webapp = $app->session()->get('__WEB_APP', ['APP_NAME'=>'', 'APP_VER'=>'']);
$this->webuser = $app->session()->get('__WEB_USER', ['UserID'=>0, 'Username'=>'']);
}
public function set_css(string $style): void {
@@ -54,7 +67,7 @@ final class PrintHTML {
} else if (function_exists($this->__atabel[$i][2]) && trim("".$tmp_val)<>"") {
$tmp_val = call_user_func($this->__atabel[$i][2], $tmp_val);
}
$tmp_val = $this->set_align($tmp_val, $this->__atabel[$i][1], $this->__atabel[$i][3]);
$tmp_val = $this->set_align((string) $tmp_val, $this->__atabel[$i][1], $this->__atabel[$i][3]);
$tmp_out .= $tmp_val;
}
$tmp_out .= "</tr>";
+17 -5
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Printer/PrintPOS.php
Desc. : Class cetak POS
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : June 15th, 2008.
Last Modified : August 21st, 2026.
@@ -17,7 +16,17 @@ declare(strict_types=1);
namespace Webapp\Printer;
use \flight\Engine;
use \flight\Session;
/**
* Class PrintPOS
*
* Pembuatan Nota/Struk untuk cetak ke Printer POS.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Printer
*/
class PrintPOS {
private $_header = [];
@@ -35,10 +44,13 @@ class PrintPOS {
private array $webuser;
protected Engine $app;
public function __construct(Engine $app, Session $session) {
/**
* @param Engine $app
*/
public function __construct(Engine $app) {
$this->app = $app;
$this->webapp = $session->get('__WEB_APP', ['APP_NAME'=>'', 'APP_VER'=>'']);
$this->webuser = $session->get('__WEB_USER', ['UserID'=>0, 'Username'=>'']);
$this->webapp = $app->session()->get('__WEB_APP', ['APP_NAME'=>'', 'APP_VER'=>'']);
$this->webuser = $app->session()->get('__WEB_USER', ['UserID'=>0, 'Username'=>'']);
}
public function set_opendrawer(): void {
+17 -5
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Printer/PrintRAW.php
Desc. : Class cetak RAW
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : June 15th, 2008.
Last Modified : November 1st, 2023.
@@ -17,7 +16,17 @@ declare(strict_types=1);
namespace Webapp\Printer;
use \flight\Engine;
use \flight\Session;
/**
* Class PrintRAW
*
* Pembuatan Laporan dalam bentuk RAW / Natural.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Printer
*/
class PrintRAW {
private $_header = [];
@@ -36,10 +45,13 @@ class PrintRAW {
private array $webuser;
protected Engine $app;
public function __construct(Engine $app, Session $session) {
/**
* @param Engine $app
*/
public function __construct(Engine $app) {
$this->app = $app;
$this->webapp = $session->get('__WEB_APP', ['APP_NAME'=>'', 'APP_VER'=>'']);
$this->webuser = $session->get('__WEB_USER', ['UserID'=>0, 'Username'=>'']);
$this->webapp = $app->session()->get('__WEB_APP', ['APP_NAME'=>'', 'APP_VER'=>'']);
$this->webuser = $app->session()->get('__WEB_USER', ['UserID'=>0, 'Username'=>'']);
}
public function set_opendrawer(): void {
+17 -4
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Auth.php
Desc. : Class User Control dan Manajemen
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : March 16th, 2008.
Last Modified : August 22nd, 2026.
@@ -20,16 +19,30 @@ use \flight\Engine;
use \flight\Session;
use \flight\database\SimplePdo;
/**
* Class Auth
*
* Kontrol dan Manajemen User Session.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
final class Auth {
private int $__id_reg = 0;
protected Engine $app;
protected SimplePdo $db;
protected Session $session;
public function __construct(Engine $app, SimplePdo $db, Session $session){
/**
* @param Engine $app
*/
public function __construct(Engine $app){
$this->app = $app;
$this->db = $db;
$this->session = $session;
$this->db = $app->db();
$this->session = $app->session();
$this->__id_reg = (int)$this->session->get('__WEB_APP', ['REG_ID'=>0])['REG_ID'];
}
+11 -1
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Button.php
Desc. : Button Generator (jQuery & Bootstrap)
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : February 27th, 2008.
Last Modified : August 22nd, 2026.
@@ -16,6 +15,17 @@ declare(strict_types=1);
namespace Webapp\Web;
/**
* Class Button
*
* Pembuatan tombol aplikasi (jQuery & Bootstrap).
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
class Button {
private $__abutton =[];
+17 -4
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Form.php
Desc. : Form Generator (jQuery & Bootstrap)
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : February 27th, 2008.
Last Modified : August 22nd, 2026.
@@ -20,6 +19,17 @@ use \flight\Engine;
use \flight\Session;
use \flight\database\SimplePdo;
/**
* Class Form
*
* Pembuatan form (jQuery & Bootstrap).
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
final class Form {
private $__aform = [];
private $__ahide = [];
@@ -27,10 +37,13 @@ final class Form {
protected SimplePdo $db;
protected Session $session;
public function __construct(Engine $app, SimplePdo $db, Session $session){
/**
* @param Engine $app
*/
public function __construct(Engine $app){
$this->app = $app;
$this->db = $db;
$this->session = $session;
$this->db = $app->db();
$this->session = $app->session();
}
public function option(string $label, string $field, mixed $value=null, bool $enable=true, bool $req=false, array $arr=[], ?string $help=null, ?string $change=null, bool $multi=false, bool $group=false): string {
+19 -6
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Menu.php
Desc. : Class Menu Manajemen
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : January 16th, 2008.
Last Modified : August 22nd, 2026.
@@ -20,6 +19,17 @@ use \flight\Engine;
use \flight\Session;
use \flight\database\SimplePdo;
/**
* Class Menu
*
* Manajemen Menu aplikasi.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
final class Menu {
private array $webapp;
private array $webuser;
@@ -27,12 +37,15 @@ final class Menu {
protected SimplePdo $db;
protected Session $session;
public function __construct(Engine $app, SimplePdo $db, Session $session){
/**
* @param Engine $app
*/
public function __construct(Engine $app){
$this->app = $app;
$this->db = $db;
$this->session = $session;
$this->webapp = $session->get('__WEB_APP', ['APP_MODULE'=>'', 'PARENT_SITE'=>'', 'PARENT_SUB'=>false]);
$this->webuser = $session->get('__WEB_USER', ['Menu'=>'', 'Menu_Grup'=>'', 'MENU_MODUL'=>[]]);
$this->db = $app->db();
$this->session = $app->session();
$this->webapp = $this->session->get('__WEB_APP', ['APP_MODULE'=>'', 'PARENT_SITE'=>'', 'PARENT_SUB'=>false]);
$this->webuser = $this->session->get('__WEB_USER', ['Menu'=>'', 'Menu_Grup'=>'', 'MENU_MODUL'=>[]]);
}
public function Sidebar(): string {
+11 -1
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Param.php
Desc. : Class Parameter Manajemen
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : November 14th, 2013.
Last Modified : August 22nd, 2026.
@@ -18,6 +17,17 @@ namespace Webapp\Web;
use \flight\Engine;
/**
* Class Param
*
* Manajemen Variable Request dari GET / POST.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
final class Param {
private static $__ahasil = [];
+11 -1
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Register.php
Desc. : Class Registrasi Aplikasi
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : November 23th, 2011.
Last Modified : August 22nd, 2026.
@@ -20,6 +19,17 @@ use \flight\Engine;
use \flight\Session;
use \flight\database\SimplePdo;
/**
* Class Register
*
* Registrasi aplikasi.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
final class Register {
public function __construct(){
}
+16 -3
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Table.php
Desc. : Datatable (jQuery & Bootstrap)
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : January 16th, 2008.
Last Modified : August 22nd, 2026.
@@ -19,6 +18,17 @@ namespace Webapp\Web;
use \flight\Engine;
use \flight\database\SimplePdo;
/**
* Class Table
*
* Pembuatan DataTable (jQuery & Bootstrap).
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
final class Table {
private $__ttable = "";
private $__tfield = "";
@@ -45,9 +55,12 @@ final class Table {
protected SimplePdo $db;
protected array $data;
public function __construct(Engine $app, SimplePdo $db) {
/**
* @param Engine $app
*/
public function __construct(Engine $app) {
$this->app = $app;
$this->db = $db;
$this->db = $app->db();
$this->data = $this->app->request()->data->getData();
}
+11 -1
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Terbilang.php
Desc. : Class Format Angka & Terbilang
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : February 12th, 2009.
Last Modified : August 22nd, 2026.
@@ -16,6 +15,17 @@ declare(strict_types=1);
namespace Webapp\Web;
/**
* Class Terbilang
*
* Pembuatan text terbilang.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
final class Terbilang {
private $numb = ["","Satu","Dua","Tiga","Empat","Lima","Enam","Tujuh","Delapan","Sembilan"];
+16 -4
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /Web/Update.php
Desc. : Class Update Aplikasi Otomatis
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : June 14th, 2013.
Last Modified : August 22nd, 2026.
@@ -17,16 +16,29 @@ declare(strict_types=1);
namespace Webapp\Web;
use \flight\Engine;
use \flight\Session;
/**
* Class Update
*
* Update Otomatis Aplikasi berbasis GIT.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <siaupheng@3fonia.com>
*
* @package Webapp\Web
*/
final class Update {
private Array $__conf = [];
private Bool $is_git = false;
protected Engine $app;
public function __construct(Engine $app, Session $session){
/**
* @param Engine $app
*/
public function __construct(Engine $app){
$this->app = $app;
$this->__conf = $session->get('__WEB_APP');
$this->__conf = $app->session()->get('__WEB_APP');
$this->current();
}