move config.php and install to root
This commit is contained in:
parent
ac813ca132
commit
335c5e524b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
system/config.php
|
config.php
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.vscode/
|
.vscode/
|
||||||
ui/compiled/*.php
|
ui/compiled/*.php
|
||||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
@ -17,10 +17,10 @@ function r2($to, $ntype = 'e', $msg = '')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists('system/config.php')) {
|
if (file_exists('config.php')) {
|
||||||
require('system/config.php');
|
require('config.php');
|
||||||
} else {
|
} else {
|
||||||
r2('system/install');
|
r2('install');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -220,8 +220,7 @@ function _admin($login = true)
|
|||||||
|
|
||||||
function _raid($l)
|
function _raid($l)
|
||||||
{
|
{
|
||||||
$r = substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
|
return substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
|
||||||
return $r;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _log($description, $type = '', $userid = '0')
|
function _log($description, $type = '', $userid = '0')
|
||||||
@ -263,6 +262,7 @@ function alphanumeric($str, $tambahan = "")
|
|||||||
function sendTelegram($txt)
|
function sendTelegram($txt)
|
||||||
{
|
{
|
||||||
global $_c;
|
global $_c;
|
||||||
|
run_hook('send_telegram'); #HOOK
|
||||||
if (!empty($_c['telegram_bot']) && !empty($_c['telegram_target_id'])) {
|
if (!empty($_c['telegram_bot']) && !empty($_c['telegram_target_id'])) {
|
||||||
file_get_contents('https://api.telegram.org/bot' . $_c['telegram_bot'] . '/sendMessage?chat_id=' . $_c['telegram_target_id'] . '&text=' . urlencode($txt));
|
file_get_contents('https://api.telegram.org/bot' . $_c['telegram_bot'] . '/sendMessage?chat_id=' . $_c['telegram_target_id'] . '&text=' . urlencode($txt));
|
||||||
}
|
}
|
||||||
@ -272,6 +272,7 @@ function sendTelegram($txt)
|
|||||||
function sendSMS($phone, $txt)
|
function sendSMS($phone, $txt)
|
||||||
{
|
{
|
||||||
global $_c;
|
global $_c;
|
||||||
|
run_hook('send_sms'); #HOOK
|
||||||
if (!empty($_c['sms_url'])) {
|
if (!empty($_c['sms_url'])) {
|
||||||
$smsurl = str_replace('[number]', urlencode($phone), $_c['sms_url']);
|
$smsurl = str_replace('[number]', urlencode($phone), $_c['sms_url']);
|
||||||
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
||||||
@ -282,6 +283,7 @@ function sendSMS($phone, $txt)
|
|||||||
function sendWhatsapp($phone, $txt)
|
function sendWhatsapp($phone, $txt)
|
||||||
{
|
{
|
||||||
global $_c;
|
global $_c;
|
||||||
|
run_hook('send_whatsapp'); #HOOK
|
||||||
if (!empty($_c['wa_url'])) {
|
if (!empty($_c['wa_url'])) {
|
||||||
$waurl = str_replace('[number]', urlencode($phone), $_c['wa_url']);
|
$waurl = str_replace('[number]', urlencode($phone), $_c['wa_url']);
|
||||||
$waurl = str_replace('[text]', urlencode($txt), $waurl);
|
$waurl = str_replace('[text]', urlencode($txt), $waurl);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||||
**/
|
**/
|
||||||
|
|
||||||
require('config.php');
|
require('../config.php');
|
||||||
require('orm.php');
|
require('orm.php');
|
||||||
|
|
||||||
use PEAR2\Net\RouterOS;
|
use PEAR2\Net\RouterOS;
|
||||||
|
@ -7,7 +7,7 @@ if(php_sapi_name() !== 'cli'){
|
|||||||
die("RUN ON COMMAND LINE ONLY BY RADIUS ENGINE");
|
die("RUN ON COMMAND LINE ONLY BY RADIUS ENGINE");
|
||||||
}
|
}
|
||||||
|
|
||||||
require(__DIR__.'/config.php');
|
require(__DIR__.'/../config.php');
|
||||||
require(__DIR__.'/orm.php');
|
require(__DIR__.'/orm.php');
|
||||||
|
|
||||||
use PEAR2\Net\RouterOS;
|
use PEAR2\Net\RouterOS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user