Files
glamore/display/apps/cfg/app.php.example
T
2026-01-22 13:40:54 +07:00

66 lines
2.4 KiB
Plaintext

<?php
/*******************************************************************
App. Name : INVENTORY AND SALES SYSTEMS
Module : /apps/cfg/app.php
Desc. : Konfigurasi Sub Aplikasi Display
Created By : Siau Pheng ([email protected]).
Created Date : November 7th, 2009.
Last Modified : January 1st, 2026.
(c) 2009 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
require_once(__DIR__."/../../../../../vendor/autoload.php");
require_once(__DIR__."/../../../apps/cfg/mysql.php");
use siaupheng\fonia3\DB\MySQL;
$db = $db ?? new MySQL();
if (($_SESSION['__WEB_APP']['APP_DISPLAY'] ?? "")<>"2412870909") {
foreach ($_SESSION as $_key => $_val) {
if (substr($_key,0,5)=="__WEB") unset($_SESSION[$_key]);
if (substr($_key,0,5)=="__APP") unset($_SESSION[$_key]);
}
}
if (!isset($_SESSION['__WEB_APP'])) {
$real_path = str_replace("\\", "/", __DIR__);
$real_path = str_replace("apps/cfg", "", $real_path);
$web_path = str_replace($_SERVER['DOCUMENT_ROOT'], "/", $real_path);
$web_path = str_replace("//", "/", $web_path);
$real_path = str_replace("//", "/", $real_path);
$apps = [];
$apps['APP_DISPLAY'] = "2412870909";
$apps['APP_NAME'] = "DISPLAY INVESA";
$apps['APP_NAMES'] = "Display Inventory And Sales Systems";
$apps['APP_VER'] = "2.0";
$apps['APP_UPDATED'] = "Jan 1st, 2025.";
$apps['APP_SID'] = md5(time());
$apps['APP_LOCALE'] = ['id'=>"Indonesia", 'en'=>"English"];
$apps['DEF_LOCALE'] = "id";
$apps['USER_LOG'] = false;
$apps['CREATOR_YEAR'] = "2012";
$apps['CREATOR_NAME'] = "3FONIA Software";
$apps['CREATOR_WEBSITE'] = "https://www.3fonia.com";
$apps['WEB_PATH'] = $web_path;
$apps['REAL_PATH'] = $real_path;
$db->Query("SELECT * FROM app_config WHERE REG_ID='".$apps['APP_DISPLAY']."' LIMIT 1");
if ($db->Next()) $apps = array_merge($apps, $db->AllRow());
if ($apps['APP_BUILD']<>"") $apps['APP_VER'] = $apps['APP_BUILD'];
$_SESSION['__WEB_APP'] = $apps;
}
if (!isset($_SESSION['__APP_INV'])) {
$_SESSION['__APP_INV'] = [];
$db->Query("SELECT * FROM inv_config WHERE REG_ID='".$_SESSION['__WEB_APP']['APP_DISPLAY']."' LIMIT 1");
if ($db->Next()) $_SESSION['__APP_INV'] = $db->AllRow();
}
?>