Change Header

This commit is contained in:
Ibnu Maksum 2022-09-05 15:12:00 +07:00
parent e6eff99632
commit 9dd85dc38e
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
38 changed files with 173 additions and 161 deletions

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
header('location: ../index.php?_route=admin/');

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
require ('system/boot.php');

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
Class Admin{

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
Class App{

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
Class Paginator

View File

@ -3,10 +3,6 @@
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
class Password

View File

@ -0,0 +1,115 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
**/
// Payment Gateway Server
if($_app_stage = 'Live'){
$xendit_server = 'https://api.xendit.co/v2/';
$midtrans_server = 'https://api.midtrans.com';
$moota_server = 'https://api.xendit.co/v2/';
}else{
$xendit_server = 'https://api.xendit.co/v2/';
$midtrans_server = 'https://api.sandbox.midtrans.com';
$moota_server = 'https://api.xendit.co/v2/';
}
function create_invoice_xendit($trxID, $amount, $phone, $description){
global $xendit_server,$_c;
$json = [
'external_id' => $trxID,
'amount' => $amount,
'description' => $description,
'customer' => [
'mobile_number' => $phone,
],
'customer_notification_preference'=>[
'invoice_created' => ['whatsapp','sms'],
'invoice_reminder' => ['whatsapp','sms'],
'invoice_paid' => ['whatsapp','sms'],
'invoice_expired' => ['whatsapp','sms']
],
'success_redirect_url' => APP_URL,
'failure_redirect_url' => APP_URL
];
return json_decode(postJsonData($xendit_server, $json, [
'Authorization: Basic '.$_c['xendit_secret']
]),true);
/*
{
"id": "631597513897510bace2459d", #gateway_trx_id
"external_id": "test-va-success-1662359375",
"user_id": "599bd7f1ccab55b020bb1147",
"status": "PENDING",
"merchant_name": "Xendit",
"merchant_profile_picture_url": "https://xnd-companies.s3.amazonaws.com/prod/1538466380522_868.png",
"amount": 3000000,
"description": "Test - VA Successful invoice payment",
"expiry_date": "2022-09-06T06:29:37.251Z",
"invoice_url": "https://checkout-staging.xendit.co/web/631597513897510bace2459d"
"created": "2022-09-05T06:29:37.954Z",
"updated": "2022-09-05T06:29:37.954Z"
}
*/
}
function get_invoice_xendit($xendittrxID){
global $xendit_server,$_c;
return json_decode(getData($xendit_server.'invoices/'.$xendittrxID, [
'Authorization: Basic '.$_c['xendit_secret']
]),true);
/*
{
"id": "631597513897510bace2459d", #gateway_trx_id
"external_id": "test-va-success-1662359375",
"user_id": "599bd7f1ccab55b020bb1147",
"status": "PENDING", // CHECK THIS
"merchant_name": "Xendit",
"merchant_profile_picture_url": "https://xnd-companies.s3.amazonaws.com/prod/1538466380522_868.png",
"amount": 3000000,
"description": "Test - VA Successful invoice payment",
"expiry_date": "2022-09-06T06:29:37.251Z",
"invoice_url": "https://checkout-staging.xendit.co/web/631597513897510bace2459d"
"created": "2022-09-05T06:29:37.954Z",
"updated": "2022-09-05T06:29:37.954Z"
}
*/
}
function getData($url, $headers)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
return $server_output;
}
function postJsonData($url, $array_post, $headers = [], $basic = null)
{
$headers[] = 'Content-Type: application/json';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_VERBOSE, false);
curl_setopt($ch, CURLINFO_HEADER_OUT, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($array_post));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
if (!empty($basic)) {
curl_setopt($ch, CURLOPT_USERPWD, $basic);
}
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
return $server_output;
}

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
Class Router{

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
class Timezone {

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
Class User{

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
/**

View File

@ -3,10 +3,6 @@
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
session_start();
function r2($to, $ntype = 'e', $msg = '')

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_auth();
$ui->assign('_title', $_L['My_Account'].'- '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
if (isset($routes['1'])) {
$do = $routes['1'];

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Network'].' - '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Bandwidth_Plans'].' - '. $config['CompanyName']);

View File

@ -3,10 +3,6 @@
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Customers'] . ' - ' . $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Dashboard'].' - '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
r2(APP_URL.'/index.php?_route=dashboard');

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Reports'].'- '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_auth();
$ui->assign('_title', $_L['Dashboard'].' - '. $config['CompanyName']);

View File

@ -3,10 +3,6 @@
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
if (isset($routes['1'])) {

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
if (session_status() == PHP_SESSION_NONE) session_start();
session_destroy();

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Private_Message'].'- '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_auth();
$ui->assign('_title', $_L['Order_Voucher'].'- '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', 'Pages - '. $config['CompanyName']);

View File

@ -0,0 +1,22 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
**/
_admin();
$ui->assign('_system_menu', 'paymentgateway');
$action = $routes['1'];
$admin = Admin::_info();
$ui->assign('_admin', $admin);
switch ($action) {
case 'xendit':
$ui->assign('_title', 'Xendit - Payment Gateway - '. $config['CompanyName']);
$ui->display('a404.tpl');
break;
case 'midtrans':
$ui->assign('_title', 'Midtrans - Payment Gateway - '. $config['CompanyName']);
$ui->display('a404.tpl');
break;
}

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_auth();
$ui->assign('_title', $_L['Private_Message'].'- '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Network'].' - '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Reports'].' - '. $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Network'].' - '. $config['CompanyName']);

View File

@ -3,10 +3,6 @@
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Hotspot_Plans'] . ' - ' . $config['CompanyName']);

View File

@ -3,10 +3,6 @@
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
_admin();
$ui->assign('_title', $_L['Settings'] . '- ' . $config['CompanyName']);

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
require('config.php');
@ -108,7 +103,6 @@ foreach ($d as $ds){
$u->status = 'off';
$u->save();
}else
echo " : ACTIVE \r\n";
}else echo " : ACTIVE \r\n";
}
}

View File

@ -1,11 +1,6 @@
<?php
/**
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
//error_reporting (0);
$appurl = $_POST['appurl'];

View File

@ -34,6 +34,17 @@
</select>
</div>
</div>
<div class="form-group hidden">
<label class="col-md-2 control-label">Payment Gateway</label>
<div class="col-md-6">
<select name="theme" id="theme" class="form-control">
<option value="none">None</option>
<option value="xendit" {if $_c['payment_gateway'] eq 'xendit'}selected="selected" {/if}>Xendit</option>
<option value="midtrans" {if $_c['payment_gateway'] eq 'midtrans'}selected="selected" {/if}>Midtrans</option>
</select>
</div>
</div>
</div>
<div class="panel-heading">Telegram Notification</div>
<div class="panel-body">

View File

@ -262,6 +262,18 @@
<li>&nbsp;</li>
</ul>
</li>
<li {if $_system_menu eq 'paymentgateway'}class="open"{/if}>
<a href="#" onClick="toggleDropdownMobile(this)">
<i class="ion ion-cash"></i>
<span class="text">Payment Gateway</span>
<i class="arrow ion-chevron-left"></i>
</a>
<ul class="inner-drop list-unstyled">
<li {if $_system_menu eq 'paymentgateway'}class="active"{/if}><a href="{$_url}paymentgateway/xendit">Xendit</a></li>
<li {if $_system_menu eq 'paymentgateway'}class="active"{/if}><a href="{$_url}paymentgateway/midtrans">Midtrans</a></li>
<li>&nbsp;</li>
</ul>
</li>
<li {if $_system_menu eq 'disquss'}class="active"{/if}>
<a href="https://github.com/ibnux/phpmixbill/discussions" target="_blank">
<i class="ion ion-chatbubbles"></i>

View File

@ -0,0 +1,12 @@
{include file="sections/user-header.tpl"}
<div class="row">
<div class="col-sm-12">
<div class="panel mb20 panel-primary panel-hovered">
<div class="panel-heading">{$_L[$pageHeader]}</div>
<div class="panel-body">
{include file="$_path/../pages/$PageFile.html"}
</div>
</div>
</div>
</div>
{include file="sections/user-footer.tpl"}