Rollback installation
This commit is contained in:
parent
35a327001b
commit
ab7725b0fb
@ -11,4 +11,16 @@ $ui->assign('_system_menu', 'community');
|
||||
$action = $routes['1'];
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
$ui->display('community.tpl');
|
||||
switch ($action) {
|
||||
case 'rollback':
|
||||
$ui->assign('_title', 'Rollback Update');
|
||||
$masters = json_decode(Http::getData("https://api.github.com/repos/hotspotbilling/phpnuxbill/commits",['User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0']), true);
|
||||
$devs = json_decode(Http::getData("https://api.github.com/repos/hotspotbilling/phpnuxbill/commits?sha=Development",['User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0']), true);
|
||||
|
||||
$ui->assign('masters', $masters);
|
||||
$ui->assign('devs', $devs);
|
||||
$ui->display('community-rollback.tpl');
|
||||
break;
|
||||
default:
|
||||
$ui->display('community.tpl');
|
||||
}
|
@ -604,5 +604,24 @@
|
||||
"Scheduled_maintenance_is_currently_in_progress__Please_check_back_soon_": "Scheduled maintenance is currently in progress. Please check back soon.",
|
||||
"We_apologize_for_any_inconvenience_": "We apologize for any inconvenience.",
|
||||
"The": "The",
|
||||
"Team": "Team"
|
||||
"Team": "Team",
|
||||
"Extend_Package_Expiry": "Extend Package Expiry",
|
||||
"No": "No",
|
||||
"Yes": "Yes",
|
||||
"If_user_buy_same_internet_plan__expiry_date_will_extend": "If user buy same internet plan, expiry date will extend",
|
||||
"Tax_System": "Tax System",
|
||||
"Enable_Tax_System": "Enable Tax System",
|
||||
"Tax_will_be_calculated_in_Internet_Plan_Price": "Tax will be calculated in Internet Plan Price",
|
||||
"Tax_Rate": "Tax Rate",
|
||||
"0_5_": "0.5%",
|
||||
"1_": "1%",
|
||||
"1_5_": "1.5%",
|
||||
"2_": "2%",
|
||||
"5_": "5%",
|
||||
"10_": "10%",
|
||||
"Custom": "Custom",
|
||||
"Tax_Rates_in_percentage": "Tax Rates in percentage",
|
||||
"Custom_Tax_Rate": "Custom Tax Rate",
|
||||
"Enter_Custom_Tax_Rate": "Enter Custom Tax Rate",
|
||||
"Enter_the_custom_tax_rate__e_g___3_75_for_3_75__": "Enter the custom tax rate (e.g., 3.75 for 3.75%)"
|
||||
}
|
55
ui/ui/community-rollback.tpl
Normal file
55
ui/ui/community-rollback.tpl
Normal file
@ -0,0 +1,55 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<center><a href="https://s.id/standwithpalestine" target="_blank"><img
|
||||
src="https://raw.githubusercontent.com/Safouene1/support-palestine-banner/master/banner-support.svg"
|
||||
class="img-responsive"></a></center>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="box box-hovered mb20 box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Master</h3>
|
||||
</div>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
{foreach $masters as $data}
|
||||
<tr>
|
||||
<td>{nl2br($data['commit']['message'])}</td>
|
||||
<td>{Lang::dateTimeFormat(str_replace(['Z','T'],'',$data['commit']['author']['date']))}</td>
|
||||
<td>
|
||||
<a href="/update.php?update_url=https://github.com/hotspotbilling/phpnuxbill/archive/{$data['sha']}.zip"
|
||||
class="btn btn-sm btn-primary">
|
||||
update
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="box box-hovered mb20 box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Development</h3>
|
||||
</div>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
{foreach $devs as $data}
|
||||
<tr>
|
||||
<td>{nl2br($data['commit']['message'])}</td>
|
||||
<td>{Lang::dateTimeFormat(str_replace(['Z','T'],'',$data['commit']['author']['date']))}</td>
|
||||
<td>
|
||||
<a href="/update.php?update_url=https://github.com/hotspotbilling/phpnuxbill/archive/{$data['sha']}.zip"
|
||||
class="btn btn-sm btn-primary">
|
||||
update
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
@ -152,8 +152,9 @@
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
<a href="./update.php" class="btn btn-success btn-sm btn-block">Install Latest Version</a>
|
||||
<a href="https://github.com/hotspotbilling/phpnuxbill/archive/refs/heads/master.zip" target="_blank"
|
||||
class="btn btn-warning btn-sm btn-block">Download Latest Version</a>
|
||||
class="btn btn-warning btn-sm btn-block text-black">Download Latest Version</a>
|
||||
</div>
|
||||
<center><a href="{$_url}community/rollback" class="btn btn-link btn-sm btn-block">Select Old Version</a></center>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
|
@ -14,6 +14,11 @@ if (empty($update_url)) {
|
||||
|
||||
if(isset($_REQUEST['update_url']) && !empty($_REQUEST['update_url'])){
|
||||
$update_url = $_REQUEST['update_url'];
|
||||
$_SESSION['update_url'] = $update_url;
|
||||
}
|
||||
|
||||
if(isset($_SESSION['update_url']) && !empty($_SESSION['update_url']) && $_SESSION['update_url'] != $update_url){
|
||||
$update_url = $_SESSION['update_url'];
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user