diff --git a/install/phpnuxbill.sql b/install/phpnuxbill.sql index efcb8987..98ce533a 100644 --- a/install/phpnuxbill.sql +++ b/install/phpnuxbill.sql @@ -109,6 +109,7 @@ CREATE TABLE `tbl_plans` ( `is_radius` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 is radius', `pool` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `plan_expired` int NOT NULL DEFAULT '0', + `expired_date` TINYINT(1) NOT NULL DEFAULT '20', `enabled` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0 disabled\r\n', `prepaid` enum('yes','no') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'yes' COMMENT 'is prepaid', `plan_type` enum('Business','Personal') COLLATE utf8mb4_general_ci DEFAULT 'Personal' COMMENT 'For selecting account type', diff --git a/system/controllers/pluginmanager.php b/system/controllers/pluginmanager.php index db2d4709..f6a1b5d0 100644 --- a/system/controllers/pluginmanager.php +++ b/system/controllers/pluginmanager.php @@ -25,7 +25,7 @@ if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) { $json = json_decode($txt, true); if (empty($json['plugins']) && empty($json['payment_gateway'])) { unlink($cache); - r2(U . 'dashboard', 'd', $txt); + r2(U . 'pluginmanager'); } } else { $data = Http::getData($plugin_repository); @@ -33,6 +33,10 @@ if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) { $json = json_decode($data, true); } switch ($action) { + case 'refresh': + if (file_exists($cache)) unlink($cache); + r2(U . "pluginmanager", 's', 'Refresh success'); + break; case 'dlinstall': if (!is_writeable($CACHE_PATH)) { r2(U . "pluginmanager", 'e', 'Folder cache/ is not writable'); diff --git a/system/updates.json b/system/updates.json index 18b1f665..9a862d4e 100644 --- a/system/updates.json +++ b/system/updates.json @@ -113,5 +113,8 @@ "2024.6.11" : [ "ALTER TABLE `tbl_plans` ADD `plan_expired` INT NOT NULL DEFAULT '0' AFTER `pool`;", "ALTER TABLE `tbl_plans` DROP `pool_expired`, DROP `list_expired`;" + ], + "2024.6.19" : [ + "ALTER TABLE `tbl_plans` ADD `expired_date` TINYINT(1) NOT NULL DEFAULT '20' AFTER `plan_expired`;" ] } \ No newline at end of file diff --git a/ui/ui/plugin-manager.tpl b/ui/ui/plugin-manager.tpl index a8015acc..de6a85a2 100644 --- a/ui/ui/plugin-manager.tpl +++ b/ui/ui/plugin-manager.tpl @@ -1,12 +1,15 @@ {include file="sections/header.tpl"} -
+
{Lang::T('Plugin Installer')}
- +
@@ -16,7 +19,8 @@
- +

@@ -27,7 +31,12 @@
-
{Lang::T('Plugin')}
+
{Lang::T('Plugin')} +
+ +
+
{foreach $plugins as $plugin}
diff --git a/ui/ui/sections/header.tpl b/ui/ui/sections/header.tpl index 286db7fe..f71d8889 100644 --- a/ui/ui/sections/header.tpl +++ b/ui/ui/sections/header.tpl @@ -475,8 +475,8 @@ href="{$_url}logs/radius">Radius {/if} + {$_MENU_LOGS} - {$_MENU_LOGS} {/if} {$_MENU_AFTER_LOGS}