Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
4de849fe34 | |||
18d68d68c8 | |||
1b15da5c04 | |||
51416626fb | |||
5a10c19853 | |||
44cdd8f594 | |||
00cf90e6ea | |||
341e26f4d6 |
@ -2,6 +2,12 @@
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
## 2023.8.30
|
||||
|
||||
- Upload Logo from settings
|
||||
- Fix Print value
|
||||
- Fix Time when editing prepaid
|
||||
|
||||
## 2023.8.28
|
||||
|
||||
- Extend expiration if buy same package
|
||||
|
@ -16,11 +16,8 @@
|
||||
|
||||
<body style='background-color: #FBFBFB;'>
|
||||
<div id='main-container'>
|
||||
<div class='header'>
|
||||
<div class="header-box wrapper">
|
||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||
<hr>
|
||||
<!-- contents area start -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
@ -16,11 +16,8 @@
|
||||
|
||||
<body style='background-color: #FBFBFB;'>
|
||||
<div id='main-container'>
|
||||
<div class='header'>
|
||||
<div class="header-box wrapper">
|
||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||
<hr>
|
||||
|
||||
<div class="span12">
|
||||
<h4> PHPNuxBill Installer </h4>
|
||||
|
@ -15,11 +15,8 @@
|
||||
|
||||
<body style='background-color: #FBFBFB;'>
|
||||
<div id='main-container'>
|
||||
<div class='header'>
|
||||
<div class="header-box wrapper">
|
||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||
<hr>
|
||||
|
||||
<div class="span12">
|
||||
<h4> PHPNuxBill Installer </h4>
|
||||
|
@ -82,11 +82,8 @@ $wConfig = "../config.php";
|
||||
|
||||
<body style='background-color: #FBFBFB;'>
|
||||
<div id='main-container'>
|
||||
<div class='header'>
|
||||
<div class="header-box wrapper">
|
||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||
<hr>
|
||||
|
||||
<div class="span12">
|
||||
<h4> PHPNuxBill Installer </h4>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>PHPNuxBill Installer</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
||||
@ -12,20 +13,27 @@
|
||||
<link type='text/css' href='css/style.css' rel='stylesheet' />
|
||||
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<?php if (!file_exists('../pages')) rename('../pages_template', '../pages'); ?>
|
||||
|
||||
<body style='background-color: #FBFBFB;'>
|
||||
<div id='main-container'>
|
||||
<div class='header'>
|
||||
<div class="header-box wrapper">
|
||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||
<hr>
|
||||
<div class="span12">
|
||||
<h4> PHPNuxBill Installer </h4>
|
||||
<p>
|
||||
<strong>Congratulations!</strong><br>
|
||||
You have just install PHPNuxBill !<br>
|
||||
You have just install PHPNuxBill !<br><br>
|
||||
<span class="text-danger">But wait!!<br>
|
||||
<ol>
|
||||
<li>Don't forget to rename folder <b>pages_example</b> to <b>pages</b>.<br>
|
||||
if it not yet renamed</li>
|
||||
<li>Activate <a href="https://github.com/hotspotbilling/phpnuxbill/wiki/Cron-Jobs" target="_blank">Cronjob</a> for Expired and Reminder.</li>
|
||||
<li>Check <a href="https://github.com/hotspotbilling/phpnuxbill/wiki/How-It-Works---Cara-kerja" target="_blank">how PHPNuxbill Works</a></li>
|
||||
<li><a href="https://github.com/hotspotbilling/phpnuxbill/wiki#login-page-mikrotik" target="_blank">how to link Mikrotik Login to PHPNuxBill</a></li>
|
||||
<li>or use <a href="https://github.com/hotspotbilling/phpnuxbill-mikrotik-login-template" target="_blank">Mikrotik Login Template for PHPNuxBill</a></li>
|
||||
</ol>
|
||||
</span><br><br>
|
||||
To Login Admin Portal:<br>
|
||||
Use this link -
|
||||
<?php
|
||||
@ -43,4 +51,5 @@
|
||||
</div>
|
||||
<div class="footer">Copyright © 2021 PHPNuxBill. All Rights Reserved<br /><br /></div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -16,11 +16,8 @@
|
||||
|
||||
<body style='background-color: #FBFBFB;'>
|
||||
<div id='main-container'>
|
||||
<div class='header'>
|
||||
<div class="header-box wrapper">
|
||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||
<hr>
|
||||
|
||||
<div class="span12">
|
||||
<h4> PHPNuxBill Updater </h4>
|
||||
|
@ -33,6 +33,63 @@ class File
|
||||
rmdir($path);
|
||||
}
|
||||
|
||||
public static function resizeCropImage($source_file, $dst_dir, $max_width, $max_height, $quality = 80)
|
||||
{
|
||||
$imgsize = getimagesize($source_file);
|
||||
$width = $imgsize[0];
|
||||
$height = $imgsize[1];
|
||||
$mime = $imgsize['mime'];
|
||||
|
||||
switch ($mime) {
|
||||
case 'image/gif':
|
||||
$image_create = "imagecreatefromgif";
|
||||
$image = "imagegif";
|
||||
break;
|
||||
|
||||
case 'image/png':
|
||||
$image_create = "imagecreatefrompng";
|
||||
$image = "imagepng";
|
||||
$quality = 7;
|
||||
break;
|
||||
|
||||
case 'image/jpeg':
|
||||
$image_create = "imagecreatefromjpeg";
|
||||
$image = "imagejpeg";
|
||||
$quality = 80;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($max_width == 0) {
|
||||
$max_width = $width;
|
||||
}
|
||||
|
||||
if ($max_height == 0) {
|
||||
$max_height = $height;
|
||||
}
|
||||
|
||||
$widthRatio = $max_width / $width;
|
||||
$heightRatio = $max_height / $height;
|
||||
$ratio = min($widthRatio, $heightRatio);
|
||||
$nwidth = (int)$width * $ratio;
|
||||
$nheight = (int)$height * $ratio;
|
||||
|
||||
$dst_img = imagecreatetruecolor($nwidth, $nheight);
|
||||
$white = imagecolorallocate($dst_img, 255, 255, 255);
|
||||
imagefill($dst_img, 0, 0, $white);
|
||||
$src_img = $image_create($source_file);
|
||||
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $nwidth, $nheight, $width, $height);
|
||||
|
||||
$image($dst_img, $dst_dir, $quality);
|
||||
|
||||
if ($dst_img) imagedestroy($dst_img);
|
||||
if ($src_img) imagedestroy($src_img);
|
||||
return file_exists($dst_dir);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* file path fixer
|
||||
|
@ -114,7 +114,6 @@ switch ($action) {
|
||||
|
||||
case 'print':
|
||||
$id = _post('id');
|
||||
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('d', $d);
|
||||
|
||||
@ -367,19 +366,17 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'refill-post':
|
||||
$user = _post('id_customer');
|
||||
$code = _post('code');
|
||||
|
||||
$user = ORM::for_table('tbl_customers')->where('id', _post('id_customer'))->find_one();
|
||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||
|
||||
run_hook('refill_customer'); #HOOK
|
||||
if ($v1) {
|
||||
if (Package::rechargeUser($user, $v1['routers'], $v1['id_plan'], "Refill", "Voucher")) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Refill", "Voucher")) {
|
||||
$v1->status = "1";
|
||||
$v1->user = $c['username'];
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $id_customer)->find_one();
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $user['username'])->order_by_desc('id')->find_one();
|
||||
$ui->assign('in', $in);
|
||||
$ui->assign('date', date("Y-m-d H:i:s"));
|
||||
$ui->display('invoice.tpl');
|
||||
|
@ -17,6 +17,12 @@ switch ($action) {
|
||||
if ($admin['user_type'] != 'Admin') {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
}
|
||||
if (file_exists('system/uploads/logo.png')) {
|
||||
$logo = 'system/uploads/logo.png?' . time();
|
||||
} else {
|
||||
$logo = 'system/uploads/logo.default.png';
|
||||
}
|
||||
$ui->assign('logo', $logo);
|
||||
run_hook('view_app_settings'); #HOOK
|
||||
$ui->display('app-settings.tpl');
|
||||
break;
|
||||
@ -221,6 +227,15 @@ switch ($action) {
|
||||
$tawkto = _post('tawkto');
|
||||
$radius_mode = _post('radius_mode') * 1;
|
||||
run_hook('save_settings'); #HOOK
|
||||
|
||||
|
||||
if ($_FILES['logo']['error'] > 0) {
|
||||
r2(U . 'settings/app', 'e', 'Failed to process logo');
|
||||
}
|
||||
if (!empty($_FILES['logo']['name'])) {
|
||||
if (file_exists('system/uploads/logo.png')) unlink('system/uploads/logo.png');
|
||||
File::resizeCropImage($_FILES['logo']['tmp_name'], 'system/uploads/logo.png', 1078, 200, 100);
|
||||
}
|
||||
if ($company == '') {
|
||||
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
||||
} else {
|
||||
|
@ -384,3 +384,4 @@ $_L['Send_Balance'] = 'Send Balance';
|
||||
$_L['Received_Balance'] = 'Received Balance';
|
||||
$_L['Minimum_Balance_Transfer'] = 'Minimum Balance Transfer';
|
||||
$_L['Minimum_Transfer'] = 'Minimum Transfer';
|
||||
$_L['Company_Logo'] = 'Company Logo';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}settings/app-post">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}settings/app-post" enctype="multipart/form-data">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
@ -17,10 +17,19 @@
|
||||
<div class="col-md-6">
|
||||
<input type="text" required class="form-control" id="company" name="company"
|
||||
value="{$_c['CompanyName']}">
|
||||
|
||||
</div>
|
||||
<span class="help-block col-md-4">{$_L['App_Name_Help_Text']}</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Company Logo')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="file" class="form-control" id="logo" name="logo" accept="image/*">
|
||||
<span class="help-block">For PDF Reports | Beset size 1078 x 200 | uploaded image will be autosize</span>
|
||||
</div>
|
||||
<span class="help-block col-md-4">
|
||||
<a href="./{$logo}" target="_blank"><img src="./{$logo}" height="48" alt="logo for PDF"></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Company Footer')}</label>
|
||||
<div class="col-md-6">
|
||||
|
@ -33,7 +33,7 @@
|
||||
============================================<br>
|
||||
{$_L['Type']} : <b>{$d['type']}</b><br>
|
||||
{$_L['Plan_Name']} : <b>{$d['plan_name']}</b><br>
|
||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($in['price'])}</b><br>
|
||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($d['price'])}</b><br>
|
||||
<br>
|
||||
{$_L['Username']} : <b>{$d['username']}</b><br>
|
||||
{$_L['Password']} : **********<br>
|
||||
|
@ -43,7 +43,7 @@
|
||||
value="{$d['expiration']}">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="time" class="form-control" id="time" name="time"
|
||||
<input type="text" class="form-control" id="time" name="time" placeholder="00:00:00"
|
||||
value="{$d['time']}">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2023.8.28"
|
||||
"version": "2023.8.30"
|
||||
}
|
Reference in New Issue
Block a user