add hook when recharge
This commit is contained in:
parent
699289662b
commit
de3312055a
4
init.php
4
init.php
@ -238,7 +238,7 @@ function r2($to, $ntype = 'e', $msg = '')
|
||||
exit;
|
||||
}
|
||||
|
||||
function _alert($text, $type = 'success', $url = "home")
|
||||
function _alert($text, $type = 'success', $url = "home", $time = 3)
|
||||
{
|
||||
global $ui;
|
||||
if (!isset($ui)) return;
|
||||
@ -251,8 +251,10 @@ function _alert($text, $type = 'success', $url = "home")
|
||||
}
|
||||
$ui->assign('text', $text);
|
||||
$ui->assign('type', $type);
|
||||
$ui->assign('time', $time);
|
||||
$ui->assign('url', $url);
|
||||
$ui->display('alert.tpl');
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,6 +94,9 @@ class Package
|
||||
->where('Type', $p['type'])
|
||||
->find_one();
|
||||
|
||||
run_hook("recharge_user");
|
||||
|
||||
|
||||
$mikrotik = Mikrotik::info($router_name);
|
||||
if ($p['validity_unit'] == 'Months') {
|
||||
$date_exp = date("Y-m-d", strtotime('+' . $p['validity'] . ' month'));
|
||||
@ -357,8 +360,8 @@ class Package
|
||||
"\nChannel: " . $channel .
|
||||
"\nPrice: " . Lang::moneyFormat($p['price']));
|
||||
}
|
||||
|
||||
Message::sendInvoice($c, $t);
|
||||
run_hook("recharge_user_finish");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||
<meta http-equiv="refresh" content="3; url={$url}">
|
||||
<meta http-equiv="refresh" content="{$time}; url={$url}">
|
||||
</head>
|
||||
|
||||
<body class="hold-transition lockscreen">
|
||||
@ -20,7 +20,7 @@
|
||||
{$text}
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="{$url}" id="button" class="btn btn-{$type} btn-block btn-block">{Lang::T('Click Here')} (3)</a>
|
||||
<a href="{$url}" id="button" class="btn btn-{$type} btn-block btn-block">{Lang::T('Click Here')} ({$time})</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lockscreen-footer text-center">
|
||||
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var time = 3;
|
||||
var time = {$time};
|
||||
timer();
|
||||
|
||||
function timer() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user