diff --git a/.gitignore b/.gitignore
index 1025436b..c9ad216f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-system/config.php
+config.php
.DS_Store
.vscode/
ui/compiled/*.php
diff --git a/system/config.sample.php b/config.sample.php
similarity index 98%
rename from system/config.sample.php
rename to config.sample.php
index 764696dc..d23e7f08 100644
--- a/system/config.sample.php
+++ b/config.sample.php
@@ -1,9 +1,9 @@
-
-
-
-
-
-
-
-
-
PHPMixBill Installer
- = 0) {
- $ltext .= 'To Run PHPMixBill You need at least PHP version 7.2.0, Your PHP Version is: ' . PHP_VERSION . " Tested
---PASSED---";
- $passed .= '1';
- } else {
- $ltext .= 'To Run PHPMixBill You need at least PHP version 7.2.0, Your PHP Version is: ' . PHP_VERSION . " Tested
---FAILED---";
- $passed .= '0';
- }
-
- if (extension_loaded('PDO')) {
- $ltext .= 'PDO is installed on your server: ' . "Tested
---PASSED---";
- $passed .= '1';
- } else {
- $ltext = 'PDO is installed on your server: ' . "Tested
---FAILED---";
- $passed .= '0';
- }
-
- if (extension_loaded('pdo_mysql')) {
- $ltext .= 'PDO MySQL driver is enabled on your server: ' . "Tested
---PASSED---";
- $passed .= '1';
- } else {
- $ltext .= 'PDO MySQL driver is not enabled on your server: ' . "Tested
---FAILED---";
- $passed .= '0';
- }
-
- if ($passed == '111') {
- echo ("
$ltext
Great! System Test Completed. You can run PHPMixBill on your server. Click Continue For Next Step.
-
-
ContinueUpdate System");
- } else {
- echo ("
$ltext
Sorry. The requirements of PHPMixBill is not available on your server.
- Please contact with us- iesien22@yahoo.com with this code- $passed Or contact with your server administrator
-
-
Correct The Problem To Continue");
- }
- ?>
-
-
-
-
-
+
+
+
+
+
+
+
+
+
PHPMixBill Installer
+ = 0) {
+ $ltext .= 'To Run PHPMixBill You need at least PHP version 7.2.0, Your PHP Version is: ' . PHP_VERSION . " Tested
---PASSED---";
+ $passed .= '1';
+ } else {
+ $ltext .= 'To Run PHPMixBill You need at least PHP version 7.2.0, Your PHP Version is: ' . PHP_VERSION . " Tested
---FAILED---";
+ $passed .= '0';
+ }
+
+ if (extension_loaded('PDO')) {
+ $ltext .= 'PDO is installed on your server: ' . "Tested
---PASSED---";
+ $passed .= '1';
+ } else {
+ $ltext = 'PDO is installed on your server: ' . "Tested
---FAILED---";
+ $passed .= '0';
+ }
+
+ if (extension_loaded('pdo_mysql')) {
+ $ltext .= 'PDO MySQL driver is enabled on your server: ' . "Tested
---PASSED---";
+ $passed .= '1';
+ } else {
+ $ltext .= 'PDO MySQL driver is not enabled on your server: ' . "Tested
---FAILED---";
+ $passed .= '0';
+ }
+
+ if ($passed == '111') {
+ echo ("
$ltext
Great! System Test Completed. You can run PHPMixBill on your server. Click Continue For Next Step.
+
+
ContinueUpdate System");
+ } else {
+ echo ("
$ltext
Sorry. The requirements of PHPMixBill is not available on your server.
+ Please contact with us- iesien22@yahoo.com with this code- $passed Or contact with your server administrator
+
+
Correct The Problem To Continue");
+ }
+ ?>
+
+
+
+
+
\ No newline at end of file
diff --git a/system/install/step3.php b/install/step3.php
similarity index 97%
rename from system/install/step3.php
rename to install/step3.php
index 29db1b36..422a3ca9 100644
--- a/system/install/step3.php
+++ b/install/step3.php
@@ -1,72 +1,72 @@
-
-
-
-
-
-
-
-
PHPMixBill Installer
- Unable to Connect Database, Please make sure database info is correct and try again ! ';
- }//
-
- $cururl = (((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')|| $_SERVER['SERVER_PORT'] == 443)?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
- $appurl = str_replace('/install/step3.php', '', $cururl);
- $appurl = str_replace('?_error=1', '', $appurl);
- $appurl = str_replace('/system', '', $appurl);
- ?>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
PHPMixBill Installer
+ Unable to Connect Database, Please make sure database info is correct and try again ! ';
+ }//
+
+ $cururl = (((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')|| $_SERVER['SERVER_PORT'] == 443)?'https':'http').'://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+ $appurl = str_replace('/install/step3.php', '', $cururl);
+ $appurl = str_replace('?_error=1', '', $appurl);
+ $appurl = str_replace('/system', '', $appurl);
+ ?>
+
+
+
+
+
+
+
+
diff --git a/system/install/step4.php b/install/step4.php
similarity index 96%
rename from system/install/step4.php
rename to install/step4.php
index 4027c906..2ff69f68 100644
--- a/system/install/step4.php
+++ b/install/step4.php
@@ -1,102 +1,102 @@
- PDO::ERRMODE_EXCEPTION));
- $cn = '1';
-}
-catch(PDOException $ex){
- $cn = '0';
-}
-
-if ($cn == '1') {
- $input = '$input");
-
- fwrite($fh, $input);
- fclose($fh);
-
- $sql = file_get_contents('phpmixbill.sql');
-
- $qr = $dbh->exec($sql);
-
-} else {
- header("location: step3.php?_error=1");
- exit;
-}
-
-?>
-
-
-
-
-
-
-
-
PHPMixBill Installer
-
-
Config File Created and Database Imported.
-
-
-
MySQL Connection was successfull. An error occured while adding data on MySQL. Unsuccessfull
- Installation. Please refer manual installation in the website github.com/ibnux/phpmixbill or Contact phpmixbill@ibnux.com for
- helping on installation
-
-
MySQL Connection Failed.
-
-
-
-
-
-
-
-
+ PDO::ERRMODE_EXCEPTION));
+ $cn = '1';
+}
+catch(PDOException $ex){
+ $cn = '0';
+}
+
+if ($cn == '1') {
+ $input = '$input");
+
+ fwrite($fh, $input);
+ fclose($fh);
+
+ $sql = file_get_contents('phpmixbill.sql');
+
+ $qr = $dbh->exec($sql);
+
+} else {
+ header("location: step3.php?_error=1");
+ exit;
+}
+
+?>
+
+
+
+
+
+
+
+
PHPMixBill Installer
+
+
Config File Created and Database Imported.
+
+
+
MySQL Connection was successfull. An error occured while adding data on MySQL. Unsuccessfull
+ Installation. Please refer manual installation in the website github.com/ibnux/phpmixbill or Contact phpmixbill@ibnux.com for
+ helping on installation
+
+
MySQL Connection Failed.
+
+
+
+
+
+
+
+
diff --git a/system/install/step5.php b/install/step5.php
similarity index 97%
rename from system/install/step5.php
rename to install/step5.php
index 5c72f25a..44663829 100644
--- a/system/install/step5.php
+++ b/install/step5.php
@@ -1,46 +1,46 @@
-
-
-
-
-
-
-
-
PHPMixBill Installer
-
- Congratulations!
- You have just install PHPMixBill !
- To Login Admin Portal:
- Use this link -
- ' . $appurl . '/admin';
- ?>
-
- Username: admin
- Password: admin
- For security, Delete the install directory inside system folder.
-
-
-
-
-
+
+
+
+
+
+
+
+
PHPMixBill Installer
+
+ Congratulations!
+ You have just install PHPMixBill !
+ To Login Admin Portal:
+ Use this link -
+ ' . $appurl . '/admin';
+ ?>
+
+ Username: admin
+ Password: admin
+ For security, Delete the install directory inside system folder.
+
+
+
+
+
\ No newline at end of file
diff --git a/system/install/update.php b/install/update.php
similarity index 100%
rename from system/install/update.php
rename to install/update.php
diff --git a/system/boot.php b/system/boot.php
index 971a3e3e..c17c0e9e 100644
--- a/system/boot.php
+++ b/system/boot.php
@@ -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);
diff --git a/system/cron.php b/system/cron.php
index 8f3c6856..1fc2b284 100644
--- a/system/cron.php
+++ b/system/cron.php
@@ -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;
diff --git a/system/radius.php b/system/radius.php
index 6de89c63..e3ad01ed 100644
--- a/system/radius.php
+++ b/system/radius.php
@@ -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;