Merge pull request #341 from Focuslinkstech/Development

send welcome email bug
This commit is contained in:
iBNu Maksum 2024-11-05 19:15:49 +07:00 committed by GitHub
commit fec7780f50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 31 additions and 34 deletions

View File

@ -523,7 +523,7 @@ switch ($action) {
'args' => [$d['phonenumber'], $welcomeMessage]
],
'email' => [
'enabled' => isset($_POST['email']),
'enabled' => isset($_POST['mail']),
'method' => 'Message::sendEmail',
'args' => [$d['email'], $emailSubject, $welcomeMessage, $d['email']]
]

View File

@ -214,7 +214,7 @@ class MikrotikHotspot
function getClient($ip, $user, $pass)
{
global $_app_stage;
if ($_app_stage == 'demo') {
if ($_app_stage == 'Demo') {
return null;
}
$iport = explode(":", $ip);
@ -224,7 +224,7 @@ class MikrotikHotspot
function removeHotspotUser($client, $username)
{
global $_app_stage;
if ($_app_stage == 'demo') {
if ($_app_stage == 'Demo') {
return null;
}
$printRequest = new RouterOS\Request(
@ -242,7 +242,7 @@ class MikrotikHotspot
function addHotspotUser($client, $plan, $customer)
{
global $_app_stage;
if ($_app_stage == 'demo') {
if ($_app_stage == 'Demo') {
return null;
}
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
@ -310,7 +310,7 @@ class MikrotikHotspot
function setHotspotUser($client, $user, $pass)
{
global $_app_stage;
if ($_app_stage == 'demo') {
if ($_app_stage == 'Demo') {
return null;
}
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
@ -327,7 +327,7 @@ class MikrotikHotspot
function setHotspotUserPackage($client, $username, $plan_name)
{
global $_app_stage;
if ($_app_stage == 'demo') {
if ($_app_stage == 'Demo') {
return null;
}
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
@ -344,7 +344,7 @@ class MikrotikHotspot
function removeHotspotActiveUser($client, $username)
{
global $_app_stage;
if ($_app_stage == 'demo') {
if ($_app_stage == 'Demo') {
return null;
}
$onlineRequest = new RouterOS\Request('/ip/hotspot/active/print');
@ -360,7 +360,7 @@ class MikrotikHotspot
function getIpHotspotUser($client, $username)
{
global $_app_stage;
if ($_app_stage == 'demo') {
if ($_app_stage == 'Demo') {
return null;
}
$printRequest = new RouterOS\Request(

View File

@ -1049,32 +1049,29 @@
</div>
</form>
<div class="well well-sm">
<legend>{Lang::T('Settings For Mikrotik')}</legend>
<pre>/ip hotspot walled-garden
add dst-host={$_domain}
add dst-host=*.{$_domain}</pre>
<legend>{Lang::T('Settings For Cron Expired')}</legend>
<pre>
# {Lang::T('Expired Cronjob Every 5 Minutes')}
*/5 * * * * cd {$dir} && {$php} cron.php
</pre>
{Lang::T('Choose one, above or below')}
<pre>
# {Lang::T('Expired Cronjob Every 1 Hour')}
0 * * * * cd {$dir} && {$php} cron.php
</pre>
<legend>{Lang::T('Settings For Cron Reminder')}</legend>
<pre>
# {Lang::T('Reminder Cronjob Every 7 AM')}
0 7 * * * cd {$dir} && {$php} cron_reminder.php
</pre>
<div class="bs-callout bs-callout-info" id="callout-navbar-role">
<h4><b>{Lang::T('Settings For Mikrotik')}</b></h4>
<p>/ip hotspot walled-garden <br>
add dst-host={$_domain} <br>
add dst-host=*.{$_domain}
</p>
<br>
<h4><b>{Lang::T('Settings For Cron Expired')}</b></h4>
<p>
# {Lang::T('Expired Cronjob Every 5 Minutes [Recommended]')}<br>
*/5 * * * * cd {$dir} && {$php} cron.php
<br><br>
# {Lang::T('Expired Cronjob Every 1 Hour')}<br>
0 * * * * cd {$dir} && {$php} cron.php
</p>
<br>
<h4><b>{Lang::T('Settings For Cron Reminder')}</b></h4>
<p>
# {Lang::T('Reminder Cronjob Every 7 AM')}<br>
0 7 * * * cd {$dir} && {$php} cron_reminder.php
</p>
</div>
<script>
function testWa() {
var target = prompt("Phone number\nSave First before Test", "");

View File

@ -115,7 +115,7 @@
<label class="col-md-3 control-label">Remote IP <span class="label label-danger" id="warning_ip"></span></label>
<div class="col-md-9">
<input type="text" class="form-control" id="pppoe_ip" name="pppoe_ip" onkeyup="checkIP(this, '0')">
<span class="help-block">{Lang::T('Not Working for freeradius')}</span>
<span class="help-block">{Lang::T('Also Working for freeradius')}</span>
</div>
</div>
<span class="help-block">
@ -139,7 +139,7 @@
{Lang::T('SMS')}</label>
<label class="col-md-2 control-label"><input type="checkbox" name="wa" value="1">
{Lang::T('WA')}</label>
<label class="col-md-2 control-label"><input type="checkbox" name="email" value="1">
<label class="col-md-2 control-label"><input type="checkbox" name="mail" value="1">
{Lang::T('Email')}</label>
</div>
</div>