forked from kevinowino869/mitrobill
Plugin Manager, install belum
This commit is contained in:
33
system/controllers/pluginmanager.php
Normal file
33
system/controllers/pluginmanager.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
|
||||
**/
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Plugin Manager']);
|
||||
$ui->assign('_system_menu', 'settings');
|
||||
|
||||
$action = $routes['1'];
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
|
||||
if ($admin['user_type'] != 'Admin') {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
|
||||
default:
|
||||
$cache = 'system/cache/plugin_repository.json';
|
||||
if (file_exists($cache) && time() - filemtime($cache) > (24 * 60 * 60)) {
|
||||
$json = json_decode(file_get_contents($cache), true);
|
||||
}
|
||||
$data = file_get_contents('https://hotspotbilling.github.io/Plugin-Repository/repository.json');
|
||||
file_put_contents($cache, $data);
|
||||
$json = json_decode($data, true);
|
||||
$ui->assign('plugins', $json['plugins']);
|
||||
$ui->assign('pgs', $json['payment_gateway']);
|
||||
$ui->display('plugin-manager.tpl');
|
||||
}
|
@ -306,3 +306,6 @@ $_L['Verification_Code'] = 'Verification Code';
|
||||
$_L['SMS_Verification_Code'] = 'SMS Verification Code';
|
||||
$_L['Please_enter_your_email_address'] = 'Please enter your email address';
|
||||
$_L['Failed_to_create_Paypal_transaction'] = 'Failed to create Paypal transaction.';
|
||||
$_L['Plugin'] = 'Plugin';
|
||||
$_L['Plugin_Manager'] = 'Plugin Manager';
|
||||
$_L['Plugin_Manager'] = 'Plugin Manager';
|
||||
|
Reference in New Issue
Block a user