diff --git a/system/autoload/Message.php b/system/autoload/Message.php index e2b06294..a5bc9449 100644 --- a/system/autoload/Message.php +++ b/system/autoload/Message.php @@ -64,7 +64,7 @@ class Message public static function MikrotikSendSMS($router_name, $to, $message) { - global $_app_stage, $client_m; + global $_app_stage, $client_m, $config; if ($_app_stage == 'demo') { return null; } @@ -73,7 +73,10 @@ class Message $iport = explode(":", $mikrotik['ip_address']); $client_m = new RouterOS\Client($iport[0], $mikrotik['username'], $mikrotik['password'], ($iport[1]) ? $iport[1] : null); } - $smsRequest = new RouterOS\Request('/tool sms send'); + if(empty($config['mikrotik_sms_command'])){ + $config['mikrotik_sms_command'] = "/tool sms send"; + } + $smsRequest = new RouterOS\Request($config['mikrotik_sms_command']); $smsRequest ->setArgument('phone-number', $to) ->setArgument('message', $message); @@ -231,7 +234,7 @@ class Message $msg = str_replace('[[payment_link]]', '', $msg); } } - + if ( !empty($customer['phonenumber']) && strlen($customer['phonenumber']) > 5 diff --git a/system/controllers/settings.php b/system/controllers/settings.php index 8fe7cbdc..698101b6 100644 --- a/system/controllers/settings.php +++ b/system/controllers/settings.php @@ -133,6 +133,9 @@ switch ($action) { $d->save(); } } + if(empty($config['mikrotik_sms_command'])){ + $config['mikrotik_sms_command'] = "/tool sms send"; + } $ui->assign('template_files', $templates); $ui->assign('_c', $config); $ui->assign('php', $php); diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 882d9507..6d4d030d 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -20,16 +20,16 @@
- -
+ +
{Lang::T('This Name will be shown on the Title')}
- -
+ +
{Lang::T('For PDF Reports | Best size 1078 x 200 | uploaded image will be autosize')} @@ -39,39 +39,39 @@
- -
+ +
{Lang::T('Will show below user pages')}
- -
+ +
{Lang::T('You can use html tag')}
- -
+ +
- -
+ +
{Lang::T('You can use html tag')}
-