menu - convert width to int
move printing class to new folder
This commit is contained in:
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
|
||||||
Module : /Web/HTMLPrint.php
|
Module : /Print/HTML.php
|
||||||
Desc. : v4 - Class cetak HTML
|
Desc. : v4 - Class cetak HTML
|
||||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||||
Created Date : June 15th, 2008.
|
Created Date : June 15th, 2008.
|
||||||
Last Modified : October 13th, 2023.
|
Last Modified : November 1st, 2023.
|
||||||
|
|
||||||
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace siaupheng\fonia3\Web;
|
namespace siaupheng\fonia3\Print;
|
||||||
|
|
||||||
final class HTMLPrint {
|
final class PrintHTML {
|
||||||
private $__avalue = [];
|
private $__avalue = [];
|
||||||
private $__atabel = [];
|
private $__atabel = [];
|
||||||
private $__css = "table";
|
private $__css = "table";
|
||||||
@@ -2,34 +2,34 @@
|
|||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
|
||||||
Module : /Web/POSPrint.php
|
Module : /Print/POS.php
|
||||||
Desc. : v4 - Class cetak POS
|
Desc. : v4 - Class cetak POS
|
||||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||||
Created Date : June 15th, 2008.
|
Created Date : June 15th, 2008.
|
||||||
Last Modified : May 6th, 2021.
|
Last Modified : November 1st, 2023.
|
||||||
|
|
||||||
(c) 2008 - 2021, 3FONIA Software; WWW.3FONIA.COM.
|
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace siaupheng\fonia3\Web;
|
namespace siaupheng\fonia3\Print;
|
||||||
|
|
||||||
/* VERSI BARU DENGAN MULTI SHEET */
|
/* VERSI BARU DENGAN MULTI SHEET */
|
||||||
class POSPrint {//up: 20180108
|
class PrintPOS {//up: 20180108
|
||||||
private $_header = array();
|
private $_header = [];
|
||||||
private $_avalue = array();
|
private $_avalue = [];
|
||||||
private $_astyle = array();
|
private $_astyle = [];
|
||||||
private $_ncont = 0;
|
private $_ncont = 0;
|
||||||
private $_maxchr = 40;
|
private $_maxchr = 40;
|
||||||
private $_config = array(
|
private $_config = [
|
||||||
'fontsize' => 1,
|
'fontsize' => 1,
|
||||||
'nvlogo' => false,
|
'nvlogo' => false,
|
||||||
'opendraw' => false,
|
'opendraw' => false,
|
||||||
'opendrawbegin' => true,
|
'opendrawbegin' => true,
|
||||||
'cutpaper' => false,
|
'cutpaper' => false,
|
||||||
'logo' => null );
|
'logo' => null ];
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
}
|
}
|
||||||
@@ -2,33 +2,33 @@
|
|||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
|
||||||
Module : /Web/RAWPrint.php
|
Module : /Print/RAW.php
|
||||||
Desc. : v4 - Class cetak RAW
|
Desc. : v4 - Class cetak RAW
|
||||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||||
Created Date : June 15th, 2008.
|
Created Date : June 15th, 2008.
|
||||||
Last Modified : May 6th, 2021.
|
Last Modified : November 1st, 2023.
|
||||||
|
|
||||||
(c) 2008 - 2021, 3FONIA Software; WWW.3FONIA.COM.
|
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace siaupheng\fonia3\Web;
|
namespace siaupheng\fonia3\Print;
|
||||||
|
|
||||||
class RAWPrint {
|
class PrintRAW {
|
||||||
private $_header = array();
|
private $_header = [];
|
||||||
private $_avalue = array();
|
private $_avalue = [];
|
||||||
private $_atabel = array();
|
private $_atabel = [];
|
||||||
private $_ncont = 0;
|
private $_ncont = 0;
|
||||||
private $_maxchr = 40;
|
private $_maxchr = 40;
|
||||||
private $_spacekol = " ";
|
private $_spacekol = " ";
|
||||||
private $_config = array(
|
private $_config = [
|
||||||
'fontsize' => "01",
|
'fontsize' => "01",
|
||||||
'nvlogo' => false,
|
'nvlogo' => false,
|
||||||
'opendraw' => false,
|
'opendraw' => false,
|
||||||
'opendrawbegin' => false,
|
'opendrawbegin' => false,
|
||||||
'cutpaper' => false );
|
'cutpaper' => false ];
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ class RAWPrint {
|
|||||||
$this->_config['nvlogo'] = true;
|
$this->_config['nvlogo'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add_header($nvlogo = false, $extra = array()) {//up: 2016-11-12
|
public function add_header($nvlogo = false, $extra = []) {//up: 2016-11-12
|
||||||
$this->_config['nvlogo'] = $nvlogo;
|
$this->_config['nvlogo'] = $nvlogo;
|
||||||
$this->_header[] = $_SESSION['__WEB_APP']['REG_NAME'];
|
$this->_header[] = $_SESSION['__WEB_APP']['REG_NAME'];
|
||||||
if (count($extra) > 0) {
|
if (count($extra) > 0) {
|
||||||
@@ -71,7 +71,7 @@ class RAWPrint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function add_field($tnama="", $nlebar=0, $talign="L", $ffunc="") {
|
public function add_field($tnama="", $nlebar=0, $talign="L", $ffunc="") {
|
||||||
$this->_atabel[] = array($tnama, $nlebar, $ffunc, $talign);
|
$this->_atabel[] = [$tnama, $nlebar, $ffunc, $talign];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show_fields() {
|
public function show_fields() {
|
||||||
+8
-7
@@ -6,7 +6,7 @@
|
|||||||
Desc. : v3 - Class menu
|
Desc. : v3 - Class menu
|
||||||
Created By : Siau Pheng ([email protected]).
|
Created By : Siau Pheng ([email protected]).
|
||||||
Created Date : January 16th, 2008.
|
Created Date : January 16th, 2008.
|
||||||
Last Modified : January 13th, 2023.
|
Last Modified : November 1st, 2023.
|
||||||
|
|
||||||
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||||
|
|
||||||
@@ -122,19 +122,20 @@ final class Menu {
|
|||||||
static function MenuJSON($db = null, $page = "", $tquery = "") {//oke
|
static function MenuJSON($db = null, $page = "", $tquery = "") {//oke
|
||||||
$_mdb = $db ?? new \siaupheng\fonia3\DB\MySQL();
|
$_mdb = $db ?? new \siaupheng\fonia3\DB\MySQL();
|
||||||
$_query = ($tquery=="") ? "" : ",'".$tquery."'";
|
$_query = ($tquery=="") ? "" : ",'".$tquery."'";
|
||||||
$ajson = array('login' => true);
|
$ajson = ['login' => true];
|
||||||
$apage = array('Link' => "");
|
$apage = ['Link' => ""];
|
||||||
|
|
||||||
$acus_page = array(
|
$acus_page = [
|
||||||
'SYSP' => array('Kode'=>"SYSP", 'Judul'=>"Profil Pengguna", 'Link'=>"sys/profile.php", 'JS'=>"SYSProfileJS", 'Width'=>600, 'Button'=>'[{},{"i":"butBatal"},{"i":"butSave","v":"Simpan","c":"success"}]'),
|
'SYSP' => ['Kode'=>"SYSP", 'Judul'=>"Profil Pengguna", 'Link'=>"sys/profile.php", 'JS'=>"SYSProfileJS", 'Width'=>600, 'Button'=>'[{},{"i":"butBatal"},{"i":"butSave","v":"Simpan","c":"success"}]'],
|
||||||
'SYSC' => array('Kode'=>"SYSC", 'Judul'=>"Ubah Password", 'Link'=>"sys/chpasswd.php", 'JS'=>"SYSChpasswdJS", 'Width'=>500, 'Button'=>'[{},{"i":"butBatal"},{"i":"butSave","v":"Simpan","c":"success"}]')
|
'SYSC' => ['Kode'=>"SYSC", 'Judul'=>"Ubah Password", 'Link'=>"sys/chpasswd.php", 'JS'=>"SYSChpasswdJS", 'Width'=>500, 'Button'=>'[{},{"i":"butBatal"},{"i":"butSave","v":"Simpan","c":"success"}]']
|
||||||
);
|
];
|
||||||
|
|
||||||
if ($acus_page[$page]) {
|
if ($acus_page[$page]) {
|
||||||
$apage = $acus_page[$page];
|
$apage = $acus_page[$page];
|
||||||
} else if ($page <> "") {
|
} else if ($page <> "") {
|
||||||
$_mdb->Query("SELECT * FROM app_menu WHERE Kode='".$page."'");
|
$_mdb->Query("SELECT * FROM app_menu WHERE Kode='".$page."'");
|
||||||
if ($_mdb->Next()) $apage = $_mdb->AllRow();
|
if ($_mdb->Next()) $apage = $_mdb->AllRow();
|
||||||
|
$apage['Width'] = intval($apage['Width']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ajson['iswindow'] = ($apage['Width'] > 0) ? true : false;
|
$ajson['iswindow'] = ($apage['Width'] > 0) ? true : false;
|
||||||
|
|||||||
Reference in New Issue
Block a user