Update 2024-02-08: datatable show-detail fixed, change icon. Close-all function except sidebar modal.
This commit is contained in:
+7
-7
@@ -6,9 +6,9 @@
|
||||
Desc. : v3 - HTML5 Page Generator (jQuery & Bootstrap)
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : January 10th, 2008.
|
||||
Last Modified : October 17th, 2022.
|
||||
Last Modified : January 21st, 2024.
|
||||
|
||||
(c) 2008 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2008 - 2024, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -33,9 +33,9 @@ final class App {
|
||||
|
||||
$this->apps = $_SESSION['__WEB_APP'];
|
||||
if (isset($_SESSION['__WEB_USER'])) {
|
||||
$this->auser = $_SESSION['__WEB_USER'];
|
||||
$this->apps['TEMPLATE'] = "index.php";
|
||||
$this->auser['user_info'] = tgl_sql2str($this->auser['Last_Date'], true) ." // ". $this->auser['Last_IP'].'<input type="hidden" id="Desktop_User_ID" value="'.intval($this->auser['UserID']).'"><input type="hidden" id="Desktop_User_Level" value="'.intval($this->auser['Level']).'"><input type="hidden" id="Desktop_User_UID" value="'.$this->auser['Username'].'">';
|
||||
$this->auser = $_SESSION['__WEB_USER'];
|
||||
//$this->auser['user_info'] = tgl_sql2str($this->auser['Last_Date'], true) ." // ". $this->auser['Last_IP'].'<input type="hidden" id="Desktop_User_ID" value="'.intval($this->auser['UserID']).'"><input type="hidden" id="Desktop_User_Level" value="'.intval($this->auser['Level']).'"><input type="hidden" id="Desktop_User_UID" value="'.$this->auser['Username'].'">';
|
||||
$this->auser['user_img'] = "profile.png";
|
||||
if (file_exists($this->apps['REAL_PATH']."assets/images/profiles/".$this->auser['UserID'].".png")) {
|
||||
$this->auser['user_img'] = $this->auser['UserID'].".png";
|
||||
@@ -78,7 +78,7 @@ final class App {
|
||||
if (user_logged()) $headers .= '<script type="text/javascript" src="'.$this->cache->Apps().'"></script>'."\n";
|
||||
|
||||
$_secret = $this->apps['APP_CODE'] .";". $this->apps['APP_SID'] .";". $_SERVER['HTTP_HOST'] .";". $this->apps['WEB_PATH'] .";". "http://".$_SERVER['HTTP_HOST'].$this->apps['WEB_PATH'] .";". ($this->apps['AUTH_LEVEL']?$this->apps['AUTH_LEVEL']:0) .";". $this->version;
|
||||
$_suser = (user_logged()) ? $this->auser['Username'] .";". $this->auser['UserID'] .";". $this->auser['Grup_MenuID'] .";". $this->auser['Level'] : "";
|
||||
$_suser = (user_logged()) ? $this->auser['Username'] .";". $this->auser['UserID'] .";". $this->auser['Grup_MenuID'] .";". $this->auser['Level'] : "nobody;999;999;9";
|
||||
$tnaviside = $tnavihead = "";
|
||||
$headers .= '<script type="text/javascript" language="javascript">'."\n";
|
||||
$headers .= 'FoniaJS.setConfig("'.base64_encode($_secret).'", "'.base64_encode($_suser).'");';
|
||||
@@ -99,8 +99,8 @@ final class App {
|
||||
}
|
||||
|
||||
// perubahan variabel dari data konfigurasi
|
||||
$asrc = array("[_CREATOR_NAME_]", "[_CREATOR_WEBSITE_]", "[_CREATOR_YEAR_]", "[_APP_NAME_VER_]", "[_APP_NAMES_VER_]", "[_APP_NAME_]", "[_APP_NAMES_]", "[_APP_NAMES_UP_]", "[_APP_VER_]", "[_APP_UPDATED_]", "[_REG_ID_]", "[_REG_NAME_]", "[_REG_NAME_UP_]", "[_REG_ADDRESS_]", "[_REG_CITY_]", "[_REG_CITY_UP_]", "[_REG_PHONE_]", "[_REG_FAX_]", "[_REG_EMAIL_]", "[_REG_POSTCODE_]", "[_REG_WEBSITE_]", "[_REG_YEAR_]", "[_USER_LASTLOG_]", "[_USER_IMG_]", "[_WEB_PATH_]", "[_NAVI_SIDEBAR_]", "[_NAVI_HEADER_]");
|
||||
$adst = array($this->apps['CREATOR_NAME'], $this->apps['CREATOR_WEBSITE'], $this->apps['CREATOR_YEAR'], $this->apps['APP_NAME']." v".$this->apps['APP_VER'], $this->apps['APP_NAMES']." v".$this->apps['APP_VER'], $this->apps['APP_NAME'], $this->apps['APP_NAMES'], strtoupper($this->apps['APP_NAMES']??""), $this->apps['APP_VER'], $this->apps['APP_UPDATED'], $this->reg->reg_id(), $this->apps['REG_NAME'], strtoupper($this->apps['REG_NAME']??""), $this->apps['REG_ADDRESS'], $this->apps['REG_CITY'], strtoupper($this->apps['REG_CITY']??""), $this->apps['REG_PHONE'], $this->apps['REG_FAX'], $this->apps['REG_EMAIL'], $this->apps['REG_POSTCODE'], $this->apps['REG_WEBSITE'], $this->apps['REG_YEAR'], $this->auser['user_info'] ?? "[none]", "profiles/".$this->auser['user_img'], $this->apps['WEB_PATH'], $tnaviside, $tnavihead);
|
||||
$asrc = array("[_CREATOR_NAME_]", "[_CREATOR_WEBSITE_]", "[_CREATOR_YEAR_]", "[_APP_NAME_VER_]", "[_APP_NAMES_VER_]", "[_APP_NAME_]", "[_APP_NAMES_]", "[_APP_NAMES_UP_]", "[_APP_VER_]", "[_APP_UPDATED_]", "[_REG_ID_]", "[_REG_NAME_]", "[_REG_NAME_UP_]", "[_REG_ADDRESS_]", "[_REG_CITY_]", "[_REG_CITY_UP_]", "[_REG_PHONE_]", "[_REG_FAX_]", "[_REG_EMAIL_]", "[_REG_POSTCODE_]", "[_REG_WEBSITE_]", "[_REG_YEAR_]", "[_USER_IMG_]", "[_WEB_PATH_]", "[_NAVI_SIDEBAR_]", "[_NAVI_HEADER_]");
|
||||
$adst = array($this->apps['CREATOR_NAME'], $this->apps['CREATOR_WEBSITE'], $this->apps['CREATOR_YEAR'], $this->apps['APP_NAME']." v".$this->apps['APP_VER'], $this->apps['APP_NAMES']." v".$this->apps['APP_VER'], $this->apps['APP_NAME'], $this->apps['APP_NAMES'], strtoupper($this->apps['APP_NAMES']??""), $this->apps['APP_VER'], $this->apps['APP_UPDATED'], $this->reg->reg_id(), $this->apps['REG_NAME'], strtoupper($this->apps['REG_NAME']??""), $this->apps['REG_ADDRESS'], $this->apps['REG_CITY'], strtoupper($this->apps['REG_CITY']??""), $this->apps['REG_PHONE'], $this->apps['REG_FAX'], $this->apps['REG_EMAIL'], $this->apps['REG_POSTCODE'], $this->apps['REG_WEBSITE'], $this->apps['REG_YEAR'], "profiles/".$this->auser['user_img'], $this->apps['WEB_PATH'], $tnaviside, $tnavihead);
|
||||
$buffer = str_replace($asrc, $adst, $buffer);
|
||||
|
||||
if (isset($this->auser) && is_array($this->auser)) {
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
Desc. : v4 - Fungsi Custom Auth
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : January 27th, 2008.
|
||||
Last Modified : May 6th, 2021.
|
||||
Last Modified : January 21st, 2024.
|
||||
|
||||
(c) 2008 - 2021, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2008 - 2024, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -21,6 +21,13 @@ if (!function_exists('user_level')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('user_level_not')) {
|
||||
function user_level_not($level = 9) {
|
||||
if ($_SESSION['__WEB_USER']['Level'] !== $level) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('user_logged')) {
|
||||
function user_logged() {
|
||||
if (isset($_SESSION['__WEB_USER'])) return true;
|
||||
|
||||
+9
-13
@@ -6,9 +6,9 @@
|
||||
Desc. : v3 - Button Generator (jQuery & Bootstrap)
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : February 27th, 2008.
|
||||
Last Modified : April 4th, 2022.
|
||||
Last Modified : January 22nd, 2024.
|
||||
|
||||
(c) 2008 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2008 - 2024, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -17,18 +17,16 @@ declare(strict_types=1);
|
||||
namespace siaupheng\fonia3\Web;
|
||||
|
||||
class Button {
|
||||
private $__abutton = array();
|
||||
private $__bsepa = false;
|
||||
private $__abutton =[];
|
||||
|
||||
public function __construct() {}
|
||||
private function add($type="info", $id="", $label="", $bmiss=false) {
|
||||
if ($id=="") $id = "random".rand(1000, 10000);
|
||||
$this->__abutton[] = array('type'=>$type, 'id'=>$id, 'label'=>$label, 'bmiss'=>$bmiss);
|
||||
$this->__abutton[] = ['type'=>$type, 'id'=>$id, 'label'=>$label, 'bmiss'=>$bmiss];
|
||||
}
|
||||
|
||||
public function separator() {
|
||||
$this->__abutton[] = array('type'=>"separator");
|
||||
$this->__bsepa = true;
|
||||
$this->__abutton[] = ['type'=>"separator"];
|
||||
}
|
||||
public function primary($id="", $label="", $bmiss=false) {
|
||||
$this->add("primary", $id, $label, $bmiss);
|
||||
@@ -51,17 +49,15 @@ class Button {
|
||||
|
||||
public function Button($size=2) {
|
||||
if (0==count($this->__abutton)) return "";
|
||||
$items = count($this->__abutton) - ($this->__bsepa==true ? 1 : 0);
|
||||
$sepa_size = (12 == $items*$size) ? 0 : 12 - ($items*$size);
|
||||
$_out = '<div class="row mb-2">';
|
||||
$_out = '<div class="row mb-1"><div class="col-12 col-sm-6 my-0 mx-sm-0 text-center text-sm-start">'; $_ma = ' me-sm-2';
|
||||
foreach ($this->__abutton as $item) {
|
||||
if ("separator" == $item['type']) {
|
||||
if (0 < $sepa_size) $_out .= '<div class="d-none d-lg-block col-lg-'.$sepa_size.'"> </div>';
|
||||
$_out .= '</div><div class="col-12 col-sm-6 my-0 mx-sm-0 text-center text-sm-end">'; $_ma = ' ms-sm-2';
|
||||
} else {
|
||||
$_out .= '<div class="col-md-'.floor($size*2).' col-lg-'.$size.' mb-sm-0"><button type="button" class="btn btn-block btn-'.$item['type'].' shadow-none" id="'.$item['id'].'"'.(true==$item['bmiss']?' data-bs-dismiss="modal"':'').'>'.$item['label'].'</button></div>';
|
||||
$_out .= '<button type="button" class="btn btn-'.$item['type'].' mb-2 mb-sm-0'.$_ma.' col-10 col-sm-auto shadow-none" id="'.$item['id'].'"'.(true==$item['bmiss']?' data-bs-dismiss="modal"':'').'>'.$item['label'].'</button>';
|
||||
}
|
||||
}
|
||||
$_out .= '</div>';
|
||||
$_out .= '</div></div>';
|
||||
return $_out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user