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
|
||||
.vscode/
|
||||
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;
|
||||
}
|
||||
|
||||
if (file_exists('system/config.php')) {
|
||||
require('system/config.php');
|
||||
if (file_exists('config.php')) {
|
||||
require('config.php');
|
||||
} else {
|
||||
r2('system/install');
|
||||
r2('install');
|
||||
}
|
||||
|
||||
|
||||
@ -220,8 +220,7 @@ function _admin($login = true)
|
||||
|
||||
function _raid($l)
|
||||
{
|
||||
$r = substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
|
||||
return $r;
|
||||
return substr(str_shuffle(str_repeat('0123456789', $l)), 0, $l);
|
||||
}
|
||||
|
||||
function _log($description, $type = '', $userid = '0')
|
||||
@ -263,6 +262,7 @@ function alphanumeric($str, $tambahan = "")
|
||||
function sendTelegram($txt)
|
||||
{
|
||||
global $_c;
|
||||
run_hook('send_telegram'); #HOOK
|
||||
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));
|
||||
}
|
||||
@ -272,6 +272,7 @@ function sendTelegram($txt)
|
||||
function sendSMS($phone, $txt)
|
||||
{
|
||||
global $_c;
|
||||
run_hook('send_sms'); #HOOK
|
||||
if (!empty($_c['sms_url'])) {
|
||||
$smsurl = str_replace('[number]', urlencode($phone), $_c['sms_url']);
|
||||
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
||||
@ -282,6 +283,7 @@ function sendSMS($phone, $txt)
|
||||
function sendWhatsapp($phone, $txt)
|
||||
{
|
||||
global $_c;
|
||||
run_hook('send_whatsapp'); #HOOK
|
||||
if (!empty($_c['wa_url'])) {
|
||||
$waurl = str_replace('[number]', urlencode($phone), $_c['wa_url']);
|
||||
$waurl = str_replace('[text]', urlencode($txt), $waurl);
|
||||
|
@ -3,7 +3,7 @@
|
||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||
**/
|
||||
|
||||
require('config.php');
|
||||
require('../config.php');
|
||||
require('orm.php');
|
||||
|
||||
use PEAR2\Net\RouterOS;
|
||||
|
@ -7,7 +7,7 @@ if(php_sapi_name() !== 'cli'){
|
||||
die("RUN ON COMMAND LINE ONLY BY RADIUS ENGINE");
|
||||
}
|
||||
|
||||
require(__DIR__.'/config.php');
|
||||
require(__DIR__.'/../config.php');
|
||||
require(__DIR__.'/orm.php');
|
||||
|
||||
use PEAR2\Net\RouterOS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user