dynamin base url
This commit is contained in:
+14
-22
@@ -1,22 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//<><><><><><><><> MAIN TRCLOUD <><><><><><><><>//
|
//<><><><><><><><> MAIN CONFIG <><><><><><><><>//
|
||||||
if(true){
|
if(true){
|
||||||
$isTest = "master";
|
$isTest = "master";
|
||||||
$server_url = "/mn3wms/app/"; // URL path to the app root
|
$base_url = "/your-app-folder/"; // e.g. "/wms-app/" — folder name under web root
|
||||||
$include_url = $_SERVER['DOCUMENT_ROOT']."/mn3wms/app/";
|
$server_url = $base_url."app/";
|
||||||
|
$include_url = $_SERVER['DOCUMENT_ROOT'].$server_url;
|
||||||
|
|
||||||
$db_server = "localhost"; // usually localhost
|
$db_server = "localhost";
|
||||||
$db_user = "root"; // usually root
|
$db_user = "root";
|
||||||
$db_pass = "CHANGE_ME"; // database password
|
$db_pass = "YOUR_DB_PASSWORD";
|
||||||
$db_type = "mysql"; // database type
|
$db_type = "mysql";
|
||||||
$db_database = "wms"; // database name main
|
$db_database = "wms";
|
||||||
|
$db_database2 = "wms2";
|
||||||
//~ $db_server2 = "";
|
|
||||||
//~ $db_user2 = "";
|
|
||||||
//~ $db_pass2 = "";
|
|
||||||
//~ $db_type2 = "";
|
|
||||||
$db_database2 = "wms2"; // database for client
|
|
||||||
|
|
||||||
$db_server2 = (!empty($db_server2))?$db_server2:$db_server;
|
$db_server2 = (!empty($db_server2))?$db_server2:$db_server;
|
||||||
$db_user2 = (!empty($db_user2))?$db_user2:$db_user;
|
$db_user2 = (!empty($db_user2))?$db_user2:$db_user;
|
||||||
@@ -24,22 +20,18 @@ if(true){
|
|||||||
$db_type2 = (!empty($db_type2))?$db_type2:$db_type;
|
$db_type2 = (!empty($db_type2))?$db_type2:$db_type;
|
||||||
|
|
||||||
$time_zone = "Asia/Bangkok";
|
$time_zone = "Asia/Bangkok";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// unique key
|
// unique key — used for SMTP password encryption, keep consistent across deploys
|
||||||
$pinkey = "wms";
|
$pinkey = "wms";
|
||||||
/**
|
|
||||||
* default smtp server
|
|
||||||
*/
|
|
||||||
$SMTP = [];
|
$SMTP = [];
|
||||||
$SMTP['server'] = "smtp.gmail.com";
|
$SMTP['server'] = "smtp.gmail.com";
|
||||||
$SMTP['username'] = "your_email@gmail.com"; // Gmail address
|
$SMTP['username'] = "YOUR_EMAIL@gmail.com";
|
||||||
$SMTP['port'] = "587";
|
$SMTP['port'] = "587";
|
||||||
$SMTP['password'] = "CHANGE_ME"; // Gmail app password (not your login password)
|
$SMTP['password'] = "YOUR_GMAIL_APP_PASSWORD"; // Gmail app password, not your login password
|
||||||
// password encoding
|
|
||||||
$method = "AES-256-CBC";
|
$method = "AES-256-CBC";
|
||||||
$iv = "1234567890123456"; // Must be exactly 16 bytes
|
$iv = "1234567890123456"; // Must be exactly 16 bytes
|
||||||
$SMTP['password'] = openssl_encrypt($SMTP['password'], $method, $pinkey, 0, $iv);
|
$SMTP['password'] = openssl_encrypt($SMTP['password'], $method, $pinkey, 0, $iv);
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
<?php header('Location: /mn3wms/landing/'); exit;
|
<?php
|
||||||
|
require __DIR__ . '/app/config.php';
|
||||||
|
header('Location: ' . $base_url . 'landing/');
|
||||||
|
exit;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$base = $base ?? '/mn3wms/landing';
|
$base = $base ?? '/landing';
|
||||||
$app_url = $app_url ?? '/mn3wms/app';
|
$app_url = $app_url ?? '/app';
|
||||||
?>
|
?>
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Caller may define $page_title and $page_description before requiring this file.
|
// Caller may define $page_title and $page_description before requiring this file.
|
||||||
$page_title = $page_title ?? 'MN3 WMS — Warehouse Management System';
|
$page_title = $page_title ?? 'MN3 WMS — Warehouse Management System';
|
||||||
$page_description = $page_description ?? 'MN3 WMS — A cloud-ready Warehouse Management System for stock control, order fulfillment, and barcode labeling.';
|
$page_description = $page_description ?? 'MN3 WMS — A cloud-ready Warehouse Management System for stock control, order fulfillment, and barcode labeling.';
|
||||||
$base = $base ?? '/mn3wms/landing';
|
$base = $base ?? '/landing';
|
||||||
?>
|
?>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$base = $base ?? '/mn3wms/landing';
|
$base = $base ?? '/landing';
|
||||||
$app_url = $app_url ?? '/mn3wms/app';
|
$app_url = $app_url ?? '/app';
|
||||||
?>
|
?>
|
||||||
<nav id="navbarExample" class="navbar navbar-expand-lg fixed-top navbar-light" aria-label="Main navigation">
|
<nav id="navbarExample" class="navbar navbar-expand-lg fixed-top navbar-light" aria-label="Main navigation">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php $base = $base ?? '/mn3wms/landing'; ?>
|
<?php $base = $base ?? '/landing'; ?>
|
||||||
<script src="<?= $base ?>/js/bootstrap.min.js"></script>
|
<script src="<?= $base ?>/js/bootstrap.min.js"></script>
|
||||||
<script src="<?= $base ?>/js/swiper.min.js"></script>
|
<script src="<?= $base ?>/js/swiper.min.js"></script>
|
||||||
<script src="<?= $base ?>/js/purecounter.min.js"></script>
|
<script src="<?= $base ?>/js/purecounter.min.js"></script>
|
||||||
|
|||||||
+3
-2
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$base = '/mn3wms/landing';
|
require __DIR__ . '/../app/config.php';
|
||||||
$app_url = '/mn3wms/app';
|
$base = rtrim($base_url, '/') . '/landing';
|
||||||
|
$app_url = rtrim($base_url, '/') . '/app';
|
||||||
$active_nav = 'home';
|
$active_nav = 'home';
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|||||||
+3
-2
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$base = '/mn3wms/landing';
|
require __DIR__ . '/../app/config.php';
|
||||||
$app_url = '/mn3wms/app';
|
$base = rtrim($base_url, '/') . '/landing';
|
||||||
|
$app_url = rtrim($base_url, '/') . '/app';
|
||||||
$page_title = 'Privacy Policy — MN3 WMS';
|
$page_title = 'Privacy Policy — MN3 WMS';
|
||||||
$page_description = 'Privacy Policy for MN3 WMS.';
|
$page_description = 'Privacy Policy for MN3 WMS.';
|
||||||
$active_nav = '';
|
$active_nav = '';
|
||||||
|
|||||||
+3
-2
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$base = '/mn3wms/landing';
|
require __DIR__ . '/../app/config.php';
|
||||||
$app_url = '/mn3wms/app';
|
$base = rtrim($base_url, '/') . '/landing';
|
||||||
|
$app_url = rtrim($base_url, '/') . '/app';
|
||||||
$page_title = 'Terms of Service — MN3 WMS';
|
$page_title = 'Terms of Service — MN3 WMS';
|
||||||
$page_description = 'Terms of Service for MN3 WMS.';
|
$page_description = 'Terms of Service for MN3 WMS.';
|
||||||
$active_nav = '';
|
$active_nav = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user