Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
72fbc27f97 | |||
d386dc5eec | |||
41481880ab | |||
f8a879dc0f | |||
da44e3f6da | |||
afdd7edafa | |||
4e1a10d814 | |||
7046aa5ed1 | |||
d81ba5d5fb | |||
a35506db1b | |||
96945ab813 | |||
2b8ca5fd85 | |||
2d095aef08 | |||
c906d47674 | |||
5dd430f9b2 | |||
7c88be8865 | |||
b45f5a5587 | |||
10e788e9a2 | |||
7ceb883826 | |||
80e78d9796 | |||
534d62d944 | |||
1857c145d1 | |||
12cdef4f66 |
13
CHANGELOG.md
13
CHANGELOG.md
@ -2,6 +2,19 @@
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
## 2024.1.19
|
||||
|
||||
- Paid Plugin, Theme, and payment gateway marketplace using codecanyon.net
|
||||
- Fix Plugin manager List
|
||||
|
||||
## 2024.1.18
|
||||
|
||||
- fix(mikrotik): set pool $poolId always empty
|
||||
|
||||
## 2024.1.17
|
||||
|
||||
- Add minor change, for plugin, menu can have notifications by @Focuslinkstech
|
||||
|
||||
## 2024.1.16
|
||||
|
||||
- Add yellow color to table for plan not allowed to purchase
|
||||
|
@ -15,7 +15,7 @@
|
||||
- Hotspot & PPPOE
|
||||
- Easy Installation
|
||||
- Multi Language
|
||||
- Payment Gateway Midtrans, Xendit and Tripay
|
||||
- Payment Gateway
|
||||
- SMS validation for login
|
||||
- Whatsapp Notification to Consumer
|
||||
- Telegram Notification for Admin
|
||||
|
@ -16,8 +16,10 @@ $menu_registered = array();
|
||||
* Admin/Sales menu: AFTER_DASHBOARD, CUSTOMERS, PREPAID, SERVICES, REPORTS, VOUCHER, AFTER_ORDER, NETWORK, SETTINGS, AFTER_PAYMENTGATEWAY
|
||||
* | Customer menu: AFTER_DASHBOARD, ORDER, HISTORY, ACCOUNTS
|
||||
* @param string icon from ion icon, ion-person, only for AFTER_
|
||||
* @param string label for showing label or number of notification or update
|
||||
* @param string color Label color
|
||||
*/
|
||||
function register_menu($name, $admin, $function, $position, $icon = '')
|
||||
function register_menu($name, $admin, $function, $position, $icon = '', $label = '', $color = 'success')
|
||||
{
|
||||
global $menu_registered;
|
||||
$menu_registered[] = [
|
||||
@ -25,7 +27,9 @@ function register_menu($name, $admin, $function, $position, $icon = '')
|
||||
"admin" => $admin,
|
||||
"position" => $position,
|
||||
"icon" => $icon,
|
||||
"function" => $function
|
||||
"function" => $function,
|
||||
"label" => $label,
|
||||
"color" => $color
|
||||
];
|
||||
}
|
||||
|
||||
@ -48,4 +52,3 @@ function run_hook($action){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,17 @@ class Lang
|
||||
if($config['printer_cols']){
|
||||
$cols = $config['printer_cols'];
|
||||
}
|
||||
return str_pad($text, $cols, $pad_string, $pad_type);
|
||||
$text = trim($text);
|
||||
$texts = explode("\n", $text);
|
||||
if(count($texts)>1){
|
||||
$text = '';
|
||||
foreach($texts as $t){
|
||||
$text.= self::pad(trim($t), $pad_string, $pad_type)."\n";
|
||||
}
|
||||
return $text;
|
||||
}else{
|
||||
return str_pad(trim($text), $cols, $pad_string, $pad_type);
|
||||
}
|
||||
}
|
||||
|
||||
public static function pads($textLeft, $textRight, $pad_string = ' '){
|
||||
|
@ -62,15 +62,15 @@ class Message
|
||||
if (!empty($config['wa_url'])) {
|
||||
$waurl = str_replace('[number]', urlencode($phone), $config['wa_url']);
|
||||
$waurl = str_replace('[text]', urlencode($txt), $waurl);
|
||||
Http::getData($waurl);
|
||||
return Http::getData($waurl);
|
||||
}
|
||||
}
|
||||
|
||||
public static function sendPackageNotification($phone, $name, $package, $price, $message, $via)
|
||||
{
|
||||
$msg = str_replace('[[name]]', "$name", $message);
|
||||
$msg = str_replace('[[package]]', "$package", $msg);
|
||||
$msg = str_replace('[[price]]', "$price", $msg);
|
||||
$msg = str_replace('[[name]]', $name, $message);
|
||||
$msg = str_replace('[[package]]', $package, $msg);
|
||||
$msg = str_replace('[[price]]', $price, $msg);
|
||||
if (
|
||||
!empty($phone) && strlen($phone) > 5
|
||||
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||
@ -86,7 +86,7 @@ class Message
|
||||
|
||||
public static function sendBalanceNotification($phone, $name, $balance, $balance_now, $message, $via)
|
||||
{
|
||||
$msg = str_replace('[[name]]', "$name", $message);
|
||||
$msg = str_replace('[[name]]', $name, $message);
|
||||
$msg = str_replace('[[current_balance]]', Lang::moneyFormat($balance_now), $msg);
|
||||
$msg = str_replace('[[balance]]', Lang::moneyFormat($balance), $msg);
|
||||
if (
|
||||
|
@ -130,7 +130,6 @@ class Mikrotik
|
||||
->setArgument('address-pool', $pool)
|
||||
->setArgument('rate-limit', '512K/512K')
|
||||
);
|
||||
die("| $profileID | $name | $pool |");
|
||||
} else {
|
||||
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
||||
$client->sendSync(
|
||||
@ -428,7 +427,7 @@ class Mikrotik
|
||||
'/ip pool print .proplist=.id',
|
||||
RouterOS\Query::where('name', $name)
|
||||
);
|
||||
$poolID = $client->sendSync($printRequest)->getProperty('id');
|
||||
$poolID = $client->sendSync($printRequest)->getProperty('.id');
|
||||
|
||||
if (empty($poolID)) {
|
||||
self::addPool($client, $name, $ip_address);
|
||||
|
@ -20,7 +20,7 @@ class Validator
|
||||
* @param array $hits
|
||||
* @return void
|
||||
*/
|
||||
private static function textHit($string, $exclude = "")
|
||||
public static function textHit($string, $exclude = "")
|
||||
{
|
||||
if (empty($exclude)) return false;
|
||||
if (is_array($exclude)) {
|
||||
|
@ -108,6 +108,21 @@ try {
|
||||
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'), 'radius');
|
||||
ORM::configure('return_result_sets', true, 'radius');
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
$ui = new Smarty();
|
||||
$ui->setTemplateDir(['custom' => File::pathFixer('ui/ui_custom/'), 'default' => File::pathFixer('ui/ui/')]);
|
||||
$ui->assign('_url', APP_URL . '/index.php?_route=');
|
||||
$ui->setCompileDir(File::pathFixer('ui/compiled/'));
|
||||
$ui->setConfigDir(File::pathFixer('ui/conf/'));
|
||||
$ui->setCacheDir(File::pathFixer('ui/cache/'));
|
||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||
if (isset($_SESSION['uid'])) {
|
||||
$ui->assign("error_message", $e->getMessage() . '<br>');
|
||||
} else {
|
||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||
}
|
||||
$ui->display('router-error.tpl');
|
||||
die();
|
||||
} catch (Exception $e) {
|
||||
$ui = new Smarty();
|
||||
$ui->setTemplateDir(['custom' => File::pathFixer('ui/ui_custom/'), 'default' => File::pathFixer('ui/ui/')]);
|
||||
@ -227,7 +242,13 @@ function _admin($login = true)
|
||||
|
||||
function _log($description, $type = '', $userid = '0')
|
||||
{
|
||||
Log::put($type, $description, $userid);
|
||||
$d = ORM::for_table('tbl_logs')->create();
|
||||
$d->date = date('Y-m-d H:i:s');
|
||||
$d->type = $type;
|
||||
$d->description = $description;
|
||||
$d->userid = $userid;
|
||||
$d->ip = $_SERVER["REMOTE_ADDR"];
|
||||
$d->save();
|
||||
}
|
||||
|
||||
function Lang($key)
|
||||
@ -311,7 +332,6 @@ if ($handler == '') {
|
||||
$handler = 'default';
|
||||
}
|
||||
try {
|
||||
|
||||
$sys_render = File::pathFixer('system/controllers/' . $handler . '.php');
|
||||
if (file_exists($sys_render)) {
|
||||
$menus = array();
|
||||
@ -326,12 +346,20 @@ try {
|
||||
if (!empty($menu['icon'])) {
|
||||
$menus[$menu['position']] .= '<i class="' . $menu['icon'] . '"></i>';
|
||||
}
|
||||
if (!empty($menu['label'])) {
|
||||
$menus[$menu['position']] .= '<span class="pull-right-container">';
|
||||
$menus[$menu['position']] .= '<small class="label pull-right bg-' . $menu['color'] . '">' . $menu['label'] . '</small></span>';
|
||||
}
|
||||
$menus[$menu['position']] .= '<span class="text">' . $menu['name'] . '</span></a></li>';
|
||||
} else if (!$menu['admin'] && _auth(false)) {
|
||||
$menus[$menu['position']] .= '<li' . (($routes[1] == $menu['function']) ? ' class="active"' : '') . '><a href="' . U . 'plugin/' . $menu['function'] . '">';
|
||||
if (!empty($menu['icon'])) {
|
||||
$menus[$menu['position']] .= '<i class="' . $menu['icon'] . '"></i>';
|
||||
}
|
||||
if (!empty($menu['label'])) {
|
||||
$menus[$menu['position']] .= '<span class="pull-right-container">';
|
||||
$menus[$menu['position']] .= '<small class="label pull-right bg-' . $menu['color'] . '">' . $menu['label'] . '</small></span>';
|
||||
}
|
||||
$menus[$menu['position']] .= '<span class="text">' . $menu['name'] . '</span></a></li>';
|
||||
}
|
||||
}
|
||||
@ -343,6 +371,14 @@ try {
|
||||
} else {
|
||||
r2(U . 'dashboard', 'e', 'not found');
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
|
||||
r2(U . 'home', 'e', $e->getMessage());
|
||||
}
|
||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||
$ui->display('router-error.tpl');
|
||||
die();
|
||||
} catch (Exception $e) {
|
||||
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
|
||||
r2(U . 'home', 'e', $e->getMessage());
|
||||
|
126
system/controllers/codecanyon.php
Normal file
126
system/controllers/codecanyon.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', 'CodeCanyon.net');
|
||||
$ui->assign('_system_menu', 'settings');
|
||||
|
||||
$plugin_repository = 'https://hotspotbilling.github.io/Plugin-Repository/repository.json';
|
||||
|
||||
$action = $routes['1'];
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
$cache = File::pathFixer('system/cache/codecanyon.json');
|
||||
|
||||
if ($admin['user_type'] != 'Admin') {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
}
|
||||
if (empty($config['envato_token'])) {
|
||||
r2(U . 'settings/app', 'w', '<a href="' . U . 'settings/app#envato' . '">Envato Personal Access Token</a> is not set');
|
||||
}
|
||||
|
||||
switch ($action) {
|
||||
|
||||
case 'install':
|
||||
if (!is_writeable(File::pathFixer('system/cache/'))) {
|
||||
r2(U . "codecanyon", 'e', 'Folder system/cache/ is not writable');
|
||||
}
|
||||
if (!is_writeable(File::pathFixer('system/plugin/'))) {
|
||||
r2(U . "codecanyon", 'e', 'Folder system/plugin/ is not writable');
|
||||
}
|
||||
if (!is_writeable(File::pathFixer('system/paymentgateway/'))) {
|
||||
r2(U . "codecanyon", 'e', 'Folder system/paymentgateway/ is not writable');
|
||||
}
|
||||
set_time_limit(-1);
|
||||
$item_id = $routes['2'];
|
||||
$tipe = $routes['3'];
|
||||
$result = Http::getData('https://api.envato.com/v3/market/buyer/download?item_id=' . $item_id, ['Authorization: Bearer ' . $config['envato_token']]);
|
||||
$json = json_decode($result, true);
|
||||
if (!isset($json['download_url'])) {
|
||||
r2(U . 'codecanyon', 'e', 'Failed to get download url. ' . $json['description']);
|
||||
}
|
||||
$file = File::pathFixer('system/cache/codecanyon/');
|
||||
if (!file_exists($file)) {
|
||||
mkdir($file);
|
||||
}
|
||||
$file .= $item_id . '.zip';
|
||||
if (file_exists($file))
|
||||
unlink($file);
|
||||
//download
|
||||
$fp = fopen($file, 'w+');
|
||||
$ch = curl_init($json['download_url']);
|
||||
curl_setopt($ch, CURLOPT_POST, 0);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_setopt($ch, CURLOPT_FILE, $fp);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
fclose($fp);
|
||||
//extract
|
||||
$target = File::pathFixer('system/cache/codecanyon/' . $item_id . '/');
|
||||
$zip = new ZipArchive();
|
||||
$zip->open($file);
|
||||
$zip->extractTo($target);
|
||||
$zip->close();
|
||||
//moving
|
||||
if (file_exists($target . 'plugin')) {
|
||||
File::copyFolder($target . 'plugin', File::pathFixer('system/plugin/'));
|
||||
} else if (file_exists($target . 'paymentgateway')) {
|
||||
File::copyFolder($target . 'paymentgateway', File::pathFixer('system/paymentgateway/'));
|
||||
} else if (file_exists($target . 'theme')) {
|
||||
File::copyFolder($target . 'theme', File::pathFixer('ui/themes/'));
|
||||
}
|
||||
//Cleaning
|
||||
File::deleteFolder($target);
|
||||
unlink($file);
|
||||
r2(U . "codecanyon", 's', 'Installation success');
|
||||
case 'reload':
|
||||
if (file_exists($cache))
|
||||
unlink($cache);
|
||||
default:
|
||||
if (class_exists('ZipArchive')) {
|
||||
$zipExt = true;
|
||||
} else {
|
||||
$zipExt = false;
|
||||
}
|
||||
$ui->assign('zipExt', $zipExt);
|
||||
|
||||
if (file_exists($cache) && time() - filemtime($cache) < (24 * 60 * 60)) {
|
||||
$txt = file_get_contents($cache);
|
||||
$plugins = json_decode($txt, true);
|
||||
$ui->assign('chached_until', date($config['date_format'] . ' H:i', filemtime($cache) + (24 * 60 * 60)));
|
||||
if (count($plugins) == 0) {
|
||||
unlink($cache);
|
||||
r2(U . 'codecanyon');
|
||||
}
|
||||
} else {
|
||||
$plugins = [];
|
||||
$page = _get('page', 1);
|
||||
back:
|
||||
$result = Http::getData('https://api.envato.com/v3/market/buyer/list-purchases?&page=' . $page, ['Authorization: Bearer ' . $config['envato_token']]);
|
||||
$items = json_decode($result, true);
|
||||
if ($items && count($items['results']) > 0) {
|
||||
foreach ($items['results'] as $item) {
|
||||
$name = strtolower($item['item']['name']);
|
||||
if (strpos($name, 'phpnuxbill') !== false) {
|
||||
$plugins[] = $item;
|
||||
}
|
||||
}
|
||||
$page++;
|
||||
goto back;
|
||||
}
|
||||
if (count($plugins) > 0) {
|
||||
file_put_contents($cache, json_encode($plugins));
|
||||
if (file_exists($cache)) {
|
||||
$ui->assign('chached_until', date($config['date_format'] . ' H:i', filemtime($cache) + (24 * 60 * 60)));
|
||||
}
|
||||
}
|
||||
}
|
||||
$ui->assign('plugins', $plugins);
|
||||
$ui->display('codecanyon.tpl');
|
||||
}
|
@ -23,7 +23,7 @@ switch ($action) {
|
||||
$q = (_post('q') ? _post('q') : _get('q'));
|
||||
$keep = _post('keep');
|
||||
if (!empty($keep)) {
|
||||
ORM::raw_execute("DELETE FROM tbl_logs WHERE date < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))");
|
||||
ORM::raw_execute("DELETE FROM tbl_logs WHERE UNIX_TIMESTAMP(date) < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))");
|
||||
r2(U . "logs/list/", 's', "Delete logs older than $keep days");
|
||||
}
|
||||
if ($q != '') {
|
||||
|
@ -5,7 +5,7 @@
|
||||
**/
|
||||
|
||||
_admin();
|
||||
$ui->assign('_title', $_L['Plugin Manager']);
|
||||
$ui->assign('_title', 'Plugin Manager');
|
||||
$ui->assign('_system_menu', 'settings');
|
||||
|
||||
$plugin_repository = 'https://hotspotbilling.github.io/Plugin-Repository/repository.json';
|
||||
|
@ -159,7 +159,7 @@ switch ($action) {
|
||||
case 'print':
|
||||
$id = _post('id');
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('in', $d);
|
||||
|
||||
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'], $d['recharged_time']));
|
||||
run_hook('print_invoice'); #HOOK
|
||||
|
@ -119,7 +119,7 @@ foreach ($d as $ds) {
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||
$m = Mikrotik::info($ds['routers']);
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
|
||||
$price = Lang::moneyFormat($p['price']);
|
||||
if ($p['is_radius']) {
|
||||
if (empty($p['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($c['username']));
|
||||
@ -136,7 +136,7 @@ foreach ($d as $ds) {
|
||||
}
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
}
|
||||
Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $textExpired, $config['user_notification_expired']);
|
||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $price, $textExpired, $config['user_notification_expired'])."\n";
|
||||
//update database user dengan status off
|
||||
$u->status = 'off';
|
||||
$u->save();
|
||||
@ -174,7 +174,7 @@ foreach ($d as $ds) {
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||
$m = ORM::for_table('tbl_routers')->where('name', $ds['routers'])->find_one();
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
|
||||
$price = Lang::moneyFormat($p['price']);
|
||||
if ($p['is_radius']) {
|
||||
if (empty($p['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($c['username']));
|
||||
@ -191,7 +191,7 @@ foreach ($d as $ds) {
|
||||
}
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
}
|
||||
Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $textExpired, $config['user_notification_expired']);
|
||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $price, $textExpired, $config['user_notification_expired'])."\n";
|
||||
|
||||
$u->status = 'off';
|
||||
$u->save();
|
||||
|
@ -418,3 +418,9 @@ $_L['Voucher_activation_success_now_you_can_login'] = 'Voucher activation succes
|
||||
$_L['Client_Can_Purchase'] = 'Client Can Purchase';
|
||||
$_L['Buy_this_your_active_package_will_be_overwritten'] = 'Buy this? your active package will be overwritten';
|
||||
$_L['Pay_this_with_Balance_your_active_package_will_be_overwritten'] = 'Pay this with Balance? your active package will be overwritten';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active package will be overwrite';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active package will be overwrite';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active package will be overwrite';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active package will be overwrite';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active package will be overwrite';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active package will be overwrite';
|
||||
|
@ -413,6 +413,31 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading" id="envato">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
|
||||
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
Envato / Codecanyon
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Envato Personal Token</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" id="envato_token" name="envato_token"
|
||||
value="{$_c['envato_token']}" placeholder="BldWuBsxxxxxxxxxxxPDzPozHAPui">
|
||||
</div>
|
||||
<span class="help-block col-md-4"><a href="https://build.envato.com/create-token/" target="_blank">Create Token</a></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-offset-2 col-md-8" style="text-align: left;">Envato Permission<br>
|
||||
- View and search Envato sites<br>
|
||||
- Download the user's purchased items<br>
|
||||
- List purchases the user has made<br><br>
|
||||
<a href="https://codecanyon.net/category/php-scripts?term=phpnuxbill" target="_blank" class="btn btn-xs btn-primary">View MarketPlace</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
|
54
ui/ui/codecanyon.tpl
Normal file
54
ui/ui/codecanyon.tpl
Normal file
@ -0,0 +1,54 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-primary panel-hovered">
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-danger btn-xs" href="https://codecanyon.net/category/php-scripts?term=phpnuxbill"
|
||||
target="_blank">Buy Plugin</a>
|
||||
</div>
|
||||
Plugin Purcashed
|
||||
</div>
|
||||
<div class="panel-body row">
|
||||
{if Lang::arrayCount($plugins) > 0}
|
||||
{foreach $plugins as $plugin}
|
||||
<div class="col-md-4">
|
||||
<div class="box box-hovered mb20 box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title text1line">{$plugin['item']['name']}</h3>
|
||||
</div>
|
||||
<div class="box-body"><small><i>@{$plugin['item']['author_username']} • Last update:
|
||||
{Lang::dateFormat($plugin['item']['updated_at'])}</i></small></div>
|
||||
<div class="box-footer ">
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
<a href="{$plugin['item']['author_url']}" target="_blank" class="btn btn-primary"><i
|
||||
class="ion ion-chatboxes"></i> Author</a>
|
||||
<a href="{$plugin['item']['url']}" target="_blank" class="btn btn-success"><i
|
||||
class="ion ion-chatboxes"></i> Product</a>
|
||||
<a {if $zipExt } href="{$_url}codecanyon/install/{$plugin['item']['id']}"
|
||||
onclick="return confirm('Installing plugin will take some time to complete, do not close the page while it loading to install the plugin')"
|
||||
{else} href="#" onclick="alert('PHP ZIP extension is not installed')"
|
||||
{/if}
|
||||
class="btn btn-danger"><i class="ion ion-chatboxes"></i> Install</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{else}
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info">
|
||||
<i class="fa fa-info-circle"></i> No plugins purcashed yet.
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
{if $chached_until}Cached Until {$chached_until} <a href="{$_url}codecanyon/reload">Force reload</a>
|
||||
• {/if}<a
|
||||
href="https://github.com/hotspotbilling/phpnuxbill/wiki/Selling-Paid-Plugin-or-Payment-Gateway"
|
||||
target="_blank"> Sell your own plugin/paymentgateway/theme?</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
@ -8,19 +8,21 @@
|
||||
<div class="col-md-4">
|
||||
<div class="box box-hovered mb20 box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{$plugin['name']}</h3>
|
||||
<h3 class="box-title text1line">{$plugin['name']}</h3>
|
||||
</div>
|
||||
<div class="box-body" style="overflow-y: scroll;">
|
||||
<div style="max-height: 50px; min-height: 50px;">{$plugin['description']}</div>
|
||||
</div>
|
||||
<div class="box-body">{$plugin['description']}<br><small><i>@{$plugin['author']} Last update: {$plugin['last_update']}</i></small></div>
|
||||
<div class="box-footer ">
|
||||
<center><small><i>@{$plugin['author']} Last update: {$plugin['last_update']}</i></small></center>
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
<a href="{$plugin['url']}" target="_blank"
|
||||
class="btn btn-primary"><i class="ion ion-chatboxes"></i> Website</a>
|
||||
<a href="{$plugin['github']}" target="_blank"
|
||||
class="btn btn-success"><i class="ion ion-chatboxes"></i> Github</a>
|
||||
<a {if $zipExt }
|
||||
href="{$_url}pluginmanager/install/plugin/{$plugin['id']}" onclick="return confirm('Installing plugin will take some time to complete, do not close the page while it loading to install the plugin')"
|
||||
{else}
|
||||
href="#" onclick="alert('PHP ZIP extension is not available')"
|
||||
<a href="{$plugin['url']}" target="_blank" class="btn btn-primary"><i
|
||||
class="ion ion-chatboxes"></i> Website</a>
|
||||
<a href="{$plugin['github']}" target="_blank" class="btn btn-success"><i
|
||||
class="ion ion-chatboxes"></i> Github</a>
|
||||
<a {if $zipExt } href="{$_url}pluginmanager/install/plugin/{$plugin['id']}"
|
||||
onclick="return confirm('Installing plugin will take some time to complete, do not close the page while it loading to install the plugin')"
|
||||
{else} href="#" onclick="alert('PHP ZIP extension is not installed')"
|
||||
{/if}
|
||||
class="btn btn-warning"><i class="ion ion-chatboxes"></i> Install</a>
|
||||
</div>
|
||||
@ -37,19 +39,21 @@
|
||||
<div class="col-md-4">
|
||||
<div class="box box-hovered mb20 box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{$pg['name']}</h3>
|
||||
<h3 class="box-title text1line">{$pg['name']}</h3>
|
||||
</div>
|
||||
<div class="box-body" style="overflow-y: scroll;">
|
||||
<div style="max-height: 50px; min-height: 50px;">{$pg['description']}</div>
|
||||
</div>
|
||||
<div class="box-body">{$pg['description']}<br><small><i>@{$pg['author']} Last update: {$pg['last_update']}</i></small></div>
|
||||
<div class="box-footer ">
|
||||
<center><small><i>@{$pg['author']} Last update: {$pg['last_update']}</i></small></center>
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
<a href="{$pg['url']}" target="_blank"
|
||||
class="btn btn-primary"><i class="ion ion-chatboxes"></i> Website</a>
|
||||
<a href="{$pg['github']}" target="_blank"
|
||||
class="btn btn-success"><i class="ion ion-chatboxes"></i> Github</a>
|
||||
<a {if $zipExt }
|
||||
href="{$_url}pluginmanager/install/payment/{$pg['id']}" onclick="return confirm('Installing plugin will take some time to complete, do not close the page while it loading to install the plugin')"
|
||||
{else}
|
||||
href="#" onclick="alert('PHP ZIP extension is not available')"
|
||||
<a href="{$pg['url']}" target="_blank" class="btn btn-primary"><i
|
||||
class="ion ion-chatboxes"></i> Website</a>
|
||||
<a href="{$pg['github']}" target="_blank" class="btn btn-success"><i
|
||||
class="ion ion-chatboxes"></i> Github</a>
|
||||
<a {if $zipExt } href="{$_url}pluginmanager/install/payment/{$pg['id']}"
|
||||
onclick="return confirm('Installing plugin will take some time to complete, do not close the page while it loading to install the plugin')"
|
||||
{else} href="#" onclick="alert('PHP ZIP extension is not available')"
|
||||
{/if}
|
||||
class="btn btn-warning"><i class="ion ion-chatboxes"></i> Install</a>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
||||
|
||||
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||
|
||||
|
||||
<style>
|
||||
::-moz-selection {
|
||||
/* Code for Firefox */
|
||||
@ -57,9 +57,16 @@
|
||||
<div class="box-footer">
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
<a href="./update.php?step=4" class="btn btn-info btn-sm btn-block">Update Database</a>
|
||||
<a href="{$_url}community#update" class="btn btn-primary btn-sm btn-block">Update
|
||||
<a href="{$_url}community#update" class="btn btn-success btn-sm btn-block">Update
|
||||
PHPNuxBill</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
<a href="https://github.com/hotspotbilling/phpnuxbill/discussions" target="_blank"
|
||||
class="btn btn-success btn-sm btn-block">Ask Github Community</a>
|
||||
<a href="https://t.me/phpnuxbill" target="_blank"
|
||||
class="btn btn-primary btn-sm btn-block">Ask Telegram Community</a>
|
||||
</div>
|
||||
<br><br>
|
||||
<a href="javascript::history.back()" onclick="history.back()"
|
||||
class="btn btn-warning btn-block">back</a>
|
||||
|
@ -30,6 +30,23 @@
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.outer {
|
||||
height: 200px
|
||||
/* Or whatever */
|
||||
}
|
||||
}
|
||||
|
||||
.text1line {
|
||||
display: block;
|
||||
/* or inline-block */
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
max-height: 1em;
|
||||
line-height: 1em;
|
||||
}
|
||||
</style>
|
||||
|
||||
{if isset($xheader)}
|
||||
@ -182,7 +199,7 @@
|
||||
<li {if $_routes[1] eq 'by-period'}class="active" {/if}><a
|
||||
href="{$_url}reports/by-period">{$_L['Period_Reports']}</a></li>
|
||||
<li {if $_routes[1] eq 'activation'}class="active" {/if}><a
|
||||
href="{$_url}reports/activation">{Lang::T('Activation History')}</a></li>
|
||||
href="{$_url}reports/activation">{Lang::T('Activation History')}</a></li>
|
||||
{$_MENU_REPORTS}
|
||||
</ul>
|
||||
</li>
|
||||
@ -252,15 +269,20 @@
|
||||
href="{$_url}settings/users">{$_L['Administrator_Users']}</a></li>
|
||||
<li {if $_routes[1] eq 'dbstatus'}class="active" {/if}><a
|
||||
href="{$_url}settings/dbstatus">{$_L['Backup_Restore']}</a></li>
|
||||
<li {if $_routes[0] eq 'pluginmanager'}class="active" {/if}>
|
||||
<a href="{$_url}pluginmanager">{Lang::T('Plugin Manager')}</a>
|
||||
</li>
|
||||
<li {if $_system_menu eq 'paymentgateway'}class="active" {/if}>
|
||||
<a href="{$_url}paymentgateway">
|
||||
<span class="text">{Lang::T('Payment Gateway')}</span>
|
||||
</a>
|
||||
</li>
|
||||
{$_MENU_SETTINGS}
|
||||
<li {if $_routes[0] eq 'pluginmanager'}class="active" {/if}>
|
||||
<a href="{$_url}pluginmanager"><i class="glyphicon glyphicon-tasks"></i>
|
||||
{Lang::T('Plugin Manager')} <small class="label pull-right">Free</small></a>
|
||||
</li>
|
||||
<li {if $_routes[0] eq 'codecanyon'}class="active" {/if}>
|
||||
<a href="{$_url}codecanyon"><i class="glyphicon glyphicon-shopping-cart"></i>
|
||||
Codecanyon.net <small class="label pull-right">Paid</small></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{$_MENU_AFTER_SETTINGS}
|
||||
@ -274,10 +296,10 @@
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'list'}class="active" {/if}><a
|
||||
href="{$_url}logs/phpnuxbill">PhpNuxBill</a></li>
|
||||
{if $_c['radius_enable']}
|
||||
{if $_c['radius_enable']}
|
||||
<li {if $_routes[1] eq 'radius'}class="active" {/if}><a href="{$_url}logs/radius">Radius</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/if}
|
||||
</ul>
|
||||
{$_MENU_LOGS}
|
||||
</li>
|
||||
@ -301,11 +323,11 @@
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
{if isset($notify)}
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{if isset($notify)}
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2024.1.16"
|
||||
"version": "2024.1.19"
|
||||
}
|
Reference in New Issue
Block a user