add expired date
This commit is contained in:
parent
9ef181df6d
commit
16e2a6b139
@ -109,6 +109,7 @@ CREATE TABLE `tbl_plans` (
|
|||||||
`is_radius` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 is radius',
|
`is_radius` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 is radius',
|
||||||
`pool` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
`pool` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||||
`plan_expired` int NOT NULL DEFAULT '0',
|
`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',
|
`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',
|
`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',
|
`plan_type` enum('Business','Personal') COLLATE utf8mb4_general_ci DEFAULT 'Personal' COMMENT 'For selecting account type',
|
||||||
|
@ -25,7 +25,7 @@ if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) {
|
|||||||
$json = json_decode($txt, true);
|
$json = json_decode($txt, true);
|
||||||
if (empty($json['plugins']) && empty($json['payment_gateway'])) {
|
if (empty($json['plugins']) && empty($json['payment_gateway'])) {
|
||||||
unlink($cache);
|
unlink($cache);
|
||||||
r2(U . 'dashboard', 'd', $txt);
|
r2(U . 'pluginmanager');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$data = Http::getData($plugin_repository);
|
$data = Http::getData($plugin_repository);
|
||||||
@ -33,6 +33,10 @@ if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) {
|
|||||||
$json = json_decode($data, true);
|
$json = json_decode($data, true);
|
||||||
}
|
}
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
case 'refresh':
|
||||||
|
if (file_exists($cache)) unlink($cache);
|
||||||
|
r2(U . "pluginmanager", 's', 'Refresh success');
|
||||||
|
break;
|
||||||
case 'dlinstall':
|
case 'dlinstall':
|
||||||
if (!is_writeable($CACHE_PATH)) {
|
if (!is_writeable($CACHE_PATH)) {
|
||||||
r2(U . "pluginmanager", 'e', 'Folder cache/ is not writable');
|
r2(U . "pluginmanager", 'e', 'Folder cache/ is not writable');
|
||||||
|
@ -113,5 +113,8 @@
|
|||||||
"2024.6.11" : [
|
"2024.6.11" : [
|
||||||
"ALTER TABLE `tbl_plans` ADD `plan_expired` INT NOT NULL DEFAULT '0' AFTER `pool`;",
|
"ALTER TABLE `tbl_plans` ADD `plan_expired` INT NOT NULL DEFAULT '0' AFTER `pool`;",
|
||||||
"ALTER TABLE `tbl_plans` DROP `pool_expired`, DROP `list_expired`;"
|
"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`;"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,12 +1,15 @@
|
|||||||
{include file="sections/header.tpl"}
|
{include file="sections/header.tpl"}
|
||||||
|
|
||||||
<form method="post" enctype="multipart/form-data" onsubmit="return confirm('Warning, installing unknown source can damage your server, continue?')" action="{$_url}pluginmanager/dlinstall">
|
<form method="post" enctype="multipart/form-data"
|
||||||
|
onsubmit="return confirm('Warning, installing unknown source can damage your server, continue?')"
|
||||||
|
action="{$_url}pluginmanager/dlinstall">
|
||||||
<div class="panel panel-primary panel-hovered">
|
<div class="panel panel-primary panel-hovered">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
{Lang::T('Plugin Installer')}
|
{Lang::T('Plugin Installer')}
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
<a class="btn btn-warning btn-xs" title="save" href="https://github.com/hotspotbilling/phpnuxbill/wiki/Installing-Plugin-or-Payment-Gateway" target="_blank"><span
|
<a class="btn btn-warning btn-xs" title="save"
|
||||||
class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a>
|
href="https://github.com/hotspotbilling/phpnuxbill/wiki/Installing-Plugin-or-Payment-Gateway"
|
||||||
|
target="_blank"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body row">
|
<div class="panel-body row">
|
||||||
@ -16,7 +19,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-7">
|
<div class="form-group col-md-7">
|
||||||
<label>Github url</label>
|
<label>Github url</label>
|
||||||
<input type="url" class="form-control" name="gh_url" placeholder="https://github.com/username/repository">
|
<input type="url" class="form-control" name="gh_url"
|
||||||
|
placeholder="https://github.com/username/repository">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<br>
|
<br>
|
||||||
@ -27,7 +31,12 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="panel panel-primary panel-hovered">
|
<div class="panel panel-primary panel-hovered">
|
||||||
<div class="panel-heading">{Lang::T('Plugin')}</div>
|
<div class="panel-heading">{Lang::T('Plugin')}
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<a class="btn btn-success btn-xs" title="refresh cache" href="{$_url}pluginmanager/refresh"><span
|
||||||
|
class="glyphicon glyphicon-refresh" aria-hidden="true"></span></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="panel-body row">
|
<div class="panel-body row">
|
||||||
{foreach $plugins as $plugin}
|
{foreach $plugins as $plugin}
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
@ -475,8 +475,8 @@
|
|||||||
href="{$_url}logs/radius">Radius</a>
|
href="{$_url}logs/radius">Radius</a>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
|
||||||
{$_MENU_LOGS}
|
{$_MENU_LOGS}
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
{$_MENU_AFTER_LOGS}
|
{$_MENU_AFTER_LOGS}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user