diff --git a/.gitignore b/.gitignore
index bfd3e7e3..5a2ce6e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,4 +16,7 @@ system/paymentgateway/**
!system/paymentgateway/index.html
!system/plugin/ui/
system/plugin/ui/*
-!system/plugin/ui/index.html
\ No newline at end of file
+!system/plugin/ui/index.html
+ui/ui_custom/**
+!ui/ui_custom/index.html
+!ui/ui_custom/README.md
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4aac06d8..e65825bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
# CHANGELOG
+## 2023.8.1
+
+- Add Update file script, one click updating PHPNuxBill
+- Add Custom UI folder, to custome your own template
+- Delete debug text
+- Fix Vendor JS
## 2023.7.28
- Fix link buy Voucher
diff --git a/system/autoload/File.php b/system/autoload/File.php
index d704f240..9f94b7c2 100644
--- a/system/autoload/File.php
+++ b/system/autoload/File.php
@@ -5,21 +5,16 @@ class File
public static function copyFolder($from, $to, $exclude = [])
{
- echo "copyFolder($from, $to);
";
$files = scandir($from);
- print_r($files);
foreach ($files as $file) {
if (is_file($from . $file) && !in_array($file, $exclude)) {
if (file_exists($to . $file)) unlink($to . $file);
rename($from . $file, $to . $file);
- echo "rename($from$file, $to$file);
";
} else if (is_dir($from . $file) && !in_array($file, ['.', '..'])) {
if (!file_exists($to . $file)) {
- echo "mkdir($to$file);;
";
mkdir($to . $file);
}
- echo "File::copyFolder($from$file, $to$file);
";
- File::copyFolder($from . $file . DIRECTORY_SEPARATOR, $to . $file . DIRECTORY_SEPARATOR);
+ File::copyFolder($from . $file . DIRECTORY_SEPARATOR, $to . $file . DIRECTORY_SEPARATOR, $exclude);
}
}
}
@@ -29,15 +24,12 @@ class File
$files = scandir($path);
foreach ($files as $file) {
if (is_file($path . $file)) {
- echo "unlink($path$file);
";
unlink($path . $file);
} else if (is_dir($path . $file) && !in_array($file, ['.', '..'])) {
File::deleteFolder($path . $file . DIRECTORY_SEPARATOR);
- echo "rmdir($path$file);
";
rmdir($path . $file);
}
}
- echo "rmdir($path);
";
rmdir($path);
}
diff --git a/system/boot.php b/system/boot.php
index 6f98ab7a..c2e0c637 100644
--- a/system/boot.php
+++ b/system/boot.php
@@ -55,7 +55,7 @@ ORM::configure('username', $db_user);
ORM::configure('password', $db_password);
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
ORM::configure('return_result_sets', true);
-if($_app_stage != 'Live'){
+if ($_app_stage != 'Live') {
ORM::configure('logging', true);
}
@@ -67,7 +67,7 @@ foreach ($result as $value) {
date_default_timezone_set($config['timezone']);
$_c = $config;
-if($config['radius_mode']){
+if ($config['radius_mode']) {
ORM::configure("mysql:host=$radius_host;dbname=$radius_name", null, 'radius');
ORM::configure('username', $radius_user, 'radius');
ORM::configure('password', $radius_password, 'radius');
@@ -84,7 +84,7 @@ function _notify($msg, $type = 'e')
$lan_file = 'system/lan/' . $config['language'] . '/common.lan.php';
require($lan_file);
$ui = new Smarty();
-$ui->setTemplateDir('ui/ui/');
+$ui->setTemplateDir(['custom' => 'ui/ui_custom/', 'default' => 'ui/ui/']);
$ui->addTemplateDir('system/paymentgateway/ui/', 'pg');
$ui->addTemplateDir('system/plugin/ui/', 'plugin');
$ui->setCompileDir('ui/compiled/');
@@ -130,8 +130,7 @@ include "autoload/Hookers.php";
//register all plugin
-foreach (glob("system/plugin/*.php") as $filename)
-{
+foreach (glob("system/plugin/*.php") as $filename) {
include $filename;
}
@@ -290,25 +289,25 @@ if (file_exists($sys_render)) {
// "function" => $function
$ui->assign('_system_menu', $routes[0]);
foreach ($menu_registered as $menu) {
- if($menu['admin'] && _admin(false)) {
- $menus[$menu['position']] .= '