adding php isMobile function, change framework header config.
This commit is contained in:
+5
-3
@@ -4,7 +4,7 @@
|
||||
Desc. : JS - Fonia Custom Class v3
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : June 19th, 2009.
|
||||
Last Modified : June 6th, 2025.
|
||||
Last Modified : September 21st, 2025.
|
||||
|
||||
(c) 2009 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
@@ -19,6 +19,7 @@ var FoniaJS = {
|
||||
WEB_HOST: "",
|
||||
WEB_PATH: "",
|
||||
WEB_FULLPATH: "",
|
||||
WEB_MOBILE: 0,
|
||||
AUTH_LEVEL: 9,
|
||||
User: {ID:null, UID:null, GID:0, Level:0},
|
||||
phpversion: "",
|
||||
@@ -36,8 +37,9 @@ var FoniaJS = {
|
||||
this.WEB_HOST = _adata[2];
|
||||
this.WEB_PATH = _adata[3];
|
||||
this.WEB_FULLPATH = _adata[4];
|
||||
this.AUTH_LEVEL = parseInt(_adata[5]);
|
||||
this.phpversion = _adata[6];
|
||||
this.WEB_MOBILE = _adata[5];
|
||||
this.AUTH_LEVEL = parseInt(_adata[6]);
|
||||
this.phpversion = _adata[7];
|
||||
}
|
||||
if (typeof(skey) === 'string' && skey !== '') {
|
||||
_hasil = $.base64.decode(skey);
|
||||
|
||||
File diff suppressed because one or more lines are too long
+3
-4
@@ -6,9 +6,9 @@
|
||||
Desc. : v3 - HTML5 Page Generator (jQuery & Bootstrap)
|
||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||
Created Date : January 10th, 2008.
|
||||
Last Modified : January 21st, 2024.
|
||||
Last Modified : September 21st, 2025.
|
||||
|
||||
(c) 2008 - 2024, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2008 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -35,7 +35,6 @@ final class App {
|
||||
if (isset($_SESSION['__WEB_USER'])) {
|
||||
$this->apps['TEMPLATE'] = "index.php";
|
||||
$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";
|
||||
@@ -77,7 +76,7 @@ final class App {
|
||||
$headers .= '<script type="text/javascript" src="'.$this->cache->Main("js").'"></script>'."\n";
|
||||
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;
|
||||
$_secret = $this->apps['APP_CODE'] .";". $this->apps['APP_SID'] .";". $_SERVER['HTTP_HOST'] .";". $this->apps['WEB_PATH'] .";". "http://".$_SERVER['HTTP_HOST'].$this->apps['WEB_PATH'] .";". isMobile() .";". ($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'] : "nobody;999;999;9";
|
||||
$tnaviside = $tnavihead = "";
|
||||
$headers .= '<script type="text/javascript" language="javascript">'."\n";
|
||||
|
||||
+18
-7
@@ -6,9 +6,9 @@
|
||||
Desc. : v3 - Fungsi Custom Lain Lain
|
||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||
Created Date : January 27th, 2008.
|
||||
Last Modified : March 30th, 2023.
|
||||
Last Modified : September 21st, 2025.
|
||||
|
||||
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2008 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -292,17 +292,28 @@ if (!function_exists('isi_nol')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('isMobile')) {
|
||||
function isMobile() {
|
||||
$agen = $_SERVER['HTTP_USER_AGENT'];
|
||||
$amobile = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone', 'Mobile'];
|
||||
foreach ($amobile as $keyword) {
|
||||
if (stripos($agen,$keyword) !== false) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('isLinux')) {
|
||||
function isLinux() {
|
||||
$agen = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
if (stripos($agen, 'linux') !== false) return true;
|
||||
$agen = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (stripos($agen,'linux') !== false) return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('isIE')) {
|
||||
function isIE() {
|
||||
$agen = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
$agen = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (stripos($agen,'msie') !== false) return true;
|
||||
return false;
|
||||
}
|
||||
@@ -310,7 +321,7 @@ if (!function_exists('isIE')) {
|
||||
|
||||
if (!function_exists('isChrome')) {
|
||||
function isChrome() {
|
||||
$agen = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
$agen = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (stripos($agen,'chrome') !== false) return true;
|
||||
return false;
|
||||
}
|
||||
@@ -318,7 +329,7 @@ if (!function_exists('isChrome')) {
|
||||
|
||||
if (!function_exists('isFirefox')) {
|
||||
function isFirefox() {
|
||||
$agen = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
$agen = $_SERVER['HTTP_USER_AGENT'];
|
||||
if (stripos($agen,'firefox') !== false) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user