fixed change of framework
This commit is contained in:
+5
-7
@@ -5,7 +5,7 @@
|
||||
Module : /Web/Table.php
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : January 16th, 2008.
|
||||
Last Modified : August 22nd, 2026.
|
||||
Last Modified : August 27th, 2026.
|
||||
|
||||
(c) 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -144,7 +144,7 @@ final class Table {
|
||||
$this->__bnobutton = true;
|
||||
}
|
||||
|
||||
public function add_field(string $field = "", string $header = "", string $style = "l", string $format = "", string $footer = "", string $otype = ""): void {
|
||||
public function add_field(string $field = "", string $header = "", string $style = "l", mixed $format = "", string $footer = "", string $otype = ""): void {
|
||||
$this->__afield[] = [ 'a' => $field, 'h' => $header, 's' => $style, 'f' => $format, 't' => $footer, 'o' => $otype ];
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ final class Table {
|
||||
$row = $this->db->fetchRow("SELECT ".$this->__tfooter." FROM ".$this->__ttable.$this->__twhere, $this->__aparam);
|
||||
foreach ($this->__afield as $col) {
|
||||
$tval = $row[$col['a']] ?? '';
|
||||
if (is_set($col['t']) && !empty($col['t'])) {
|
||||
if (isset($col['t']) && !empty($col['t'])) {
|
||||
if (is_array($col['t'])) {
|
||||
$tval2 = $col['t'][$tval] ?? '';
|
||||
} else if (function_exists($col['t'])) {
|
||||
@@ -186,8 +186,7 @@ final class Table {
|
||||
// adding all option
|
||||
foreach ($this->__aoption as $opsi) {
|
||||
if (in_array($opsi['type'], ["button","button-dt"])) {
|
||||
if (!isset($opsi['field'])) continue;
|
||||
if (!empty($opsi['field']) && ($row[$opsi['field']] !== (!empty($opsi['value']) ? $opsi['value'] : (string)$this->app->session()->get('__WEB_USER')['UNIX']))) {} else {
|
||||
if (!empty($opsi['field']) && ((string) $row[$opsi['field']] !== (string) $opsi['value'])) {} else {
|
||||
$aoption['button'][] = [ $opsi['icon'], (empty($opsi['field_css'])?'':$opsi['avalue_css'][$row[$opsi['field_css']]]??'') ];
|
||||
}
|
||||
}
|
||||
@@ -270,8 +269,7 @@ final class Table {
|
||||
// adding all option
|
||||
foreach ($this->__aoption as $opsi) {
|
||||
if (in_array($opsi['type'], ["button","button-dt"])) {
|
||||
if (!isset($opsi['field'])) continue;
|
||||
if (!empty($opsi['field']) && ($row[$opsi['field']] !== (!empty($opsi['value']) ? $opsi['value'] : $this->app->session()->get('__WEB_USER')['UNIX']))) {} else {
|
||||
if (!empty($opsi['field']) && ((string) $row[$opsi['field']] !== (string) $opsi['value'])) {} else {
|
||||
$aoption['button'][] = [ $opsi['icon'], (empty($opsi['field_css'])?'':$opsi['avalue_css'][$row[$opsi['field_css']]]??'') ];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user