Merge pull request #392 from ahmadhusein17/Development

Back button tidied up
This commit is contained in:
iBNu Maksum 2025-02-05 09:38:20 +07:00 committed by GitHub
commit 40d8a4edfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 1 deletions

View File

@ -72,6 +72,22 @@ EOT;
$message = str_replace('[[user_name]]', $c['username'], $message);
$message = str_replace('[[phone]]', $c['phonenumber'], $message);
$message = str_replace('[[company_name]]', $config['CompanyName'], $message);
if (strpos($message, '[[payment_link]]') !== false) {
// token only valid for 1 day, for security reason
$token = User::generateToken($c['id'], 1);
if (!empty($token['token'])) {
$tur = ORM::for_table('tbl_user_recharges')
->where('customer_id', $c['id'])
//->where('namebp', $package)
->find_one();
if ($tur) {
$url = '?_route=home&recharge=' . $tur['id'] . '&uid=' . urlencode($token['token']);
$message = str_replace('[[payment_link]]', $url, $message);
}
} else {
$message = str_replace('[[payment_link]]', '', $message);
}
}
//Send the message

View File

@ -34,9 +34,10 @@
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<button type="submit" class="btn btn-primary btn-block btn-flat">{Lang::T('Login')}</button>
<a href="{$_url}login">{Lang::T('Go Back')}</a>
</form>
</div>
</div>
</body>
</html>
</html>

View File

@ -45,6 +45,8 @@
<b>[[phone]]</b> - {Lang::T('Customer Phone')}
<br>
<b>[[company_name]]</b> - {Lang::T('Your Company Name')}
<br>
<b>[[payment_link]]</b> - <a href="./docs/#Reminder%20with%20payment%20link" target="_blank">read documentation</a>.
</p>
</div>