Update 2024-01-19: css for optgroup select2, update option+optgroup from json, sub-modul menu with base url.

This commit is contained in:
2024-01-19 15:00:03 +07:00
parent b5dcfd9f79
commit 1eb4b369d3
4 changed files with 49 additions and 11 deletions
+14 -1
View File
@@ -117,14 +117,27 @@ final class App {
$href1 = $this->apps['WEB_PATH'].'../';
$href2 = "";
} else {
$_prot = 'http';
$_host = $_SERVER['HTTP_HOST'];
if (isset($_SERVER['HTTPS'])) {
$_prot = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http";
}
$_prot .= "://";
if ($this->apps['PARENT_SUB']==true) {
$href1 = $_prot;
$href2 = ".". $_host;
} else {
$href1 = $_prot . $_host .'/';
$href2 = "";
}
/*if ($this->apps['PARENT_SUB']==true) {
$tmp_url = parse_url($this->apps['PARENT_SITE']);
$href1 = $tmp_url['scheme'] . "://";
$href2 = ".".$tmp_url['host'];
} else {
$href1 = $this->apps['PARENT_SITE'].'/';
$href2 = "";
}
}*/
}
foreach ($this->auser['MENU_MODUL'] as $modul) {
$href = $href1.$modul['APP_PATH'].$href2;
+4 -5
View File
@@ -6,9 +6,9 @@
Desc. : v3 - Form Generator (jQuery & Bootstrap)
Created By : Siau Pheng ([email protected]).
Created Date : February 27th, 2008.
Last Modified : July 5th, 2023.
Last Modified : January 19th, 2024.
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
(c) 2008 - 2024, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
@@ -43,15 +43,14 @@ final class Form {
$_val2 = $val[0];
if ($bgroup) {
if (1==$val[1]) {
if (0<$n_group++) $tout .= '</optgroup>';
if (0 < $n_group++) $tout .= '</optgroup>';
$tout .= '<optgroup label="'.$_val2.'">';
//$n_group++;
continue;
}
} else {
$olabel = (isset($val[1])) ? ' olabel="'.$val[1].'"' : "";
}
}
if ($bgroup && $val[1]==1) continue;
$tout .= '<option value="'.$key.'"'.$olabel;
$aval = array($tvalue);
if ($bmulti==true) $aval = explode(",", ($tvalue ?? "0"));