Add Public Header and Footer in user-ui folder, and use it for public page

This commit is contained in:
Ibnu Maksum 2024-09-20 10:23:01 +07:00
parent 7e9f6123e8
commit 686d2a188a
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
13 changed files with 810 additions and 796 deletions

View File

@ -0,0 +1,114 @@
<?php
/**
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
* by https://t.me/ibnux
**/
$do = '';
if (isset($routes['1'])) {
$do = $routes['1'];
}
$otpPath = $CACHE_PATH . File::pathFixer('/forgot/');
switch ($do) {
case 'post':
$otp_code = _post('otp_code');
$username = alphanumeric(_post('username'), "+_.@-");
$email = _post('email');
$fullname = _post('fullname');
$password = _post('password');
$cpassword = _post('cpassword');
$address = _post('address');
if (!empty($config['sms_url']) && $_c['allow_phone_otp'] == 'yes') {
$phonenumber = Lang::phoneFormat($username);
$username = $phonenumber;
} else if (strlen($username) < 21) {
$phonenumber = $username;
}
$msg = '';
if (Validator::Length($username, 35, 2) == false) {
$msg .= 'Username should be between 3 to 55 characters' . '<br>';
}
if (Validator::Length($fullname, 36, 2) == false) {
$msg .= 'Full Name should be between 3 to 25 characters' . '<br>';
}
if (!Validator::Length($password, 35, 2)) {
$msg .= 'Password should be between 3 to 35 characters' . '<br>';
}
if (!Validator::Email($email)) {
$msg .= 'Email is not Valid<br>';
}
if ($password != $cpassword) {
$msg .= Lang::T('Passwords does not match') . '<br>';
}
if (!empty($config['sms_url']) && $_c['allow_phone_otp'] == 'yes') {
$otpPath .= sha1($username . $db_pass) . ".txt";
run_hook('validate_otp'); #HOOK
//expired 10 minutes
if (file_exists($otpPath) && time() - filemtime($otpPath) > 1200) {
unlink($otpPath);
r2(U . 'register', 's', 'Verification code expired');
} else if (file_exists($otpPath)) {
$code = file_get_contents($otpPath);
if ($code != $otp_code) {
$ui->assign('username', $username);
$ui->assign('fullname', $fullname);
$ui->assign('address', $address);
$ui->assign('email', $email);
$ui->assign('phonenumber', $phonenumber);
$ui->assign('notify', 'Wrong Verification code');
$ui->assign('notify_t', 'd');
$ui->display('user-ui/register-otp.tpl');
exit();
} else {
unlink($otpPath);
}
} else {
r2(U . 'register', 's', 'No Verification code');
}
}
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
if ($d) {
$msg .= Lang::T('Account already axist') . '<br>';
}
if ($msg == '') {
run_hook('register_user'); #HOOK
$d = ORM::for_table('tbl_customers')->create();
$d->username = alphanumeric($username, "+_.@-");
$d->password = $password;
$d->fullname = $fullname;
$d->address = $address;
$d->email = $email;
$d->phonenumber = $phonenumber;
if ($d->save()) {
$user = $d->id();
r2(U . 'login', 's', Lang::T('Register Success! You can login now'));
} else {
$ui->assign('username', $username);
$ui->assign('fullname', $fullname);
$ui->assign('address', $address);
$ui->assign('email', $email);
$ui->assign('phonenumber', $phonenumber);
$ui->assign('notify', 'Failed to register');
$ui->assign('notify_t', 'd');
run_hook('view_otp_register'); #HOOK
$ui->display('user-ui/register-rotp.tpl');
}
} else {
$ui->assign('username', $username);
$ui->assign('fullname', $fullname);
$ui->assign('address', $address);
$ui->assign('email', $email);
$ui->assign('phonenumber', $phonenumber);
$ui->assign('notify', $msg);
$ui->assign('notify_t', 'd');
$ui->display('user-ui/register.tpl');
}
break;
default:
$ui->display('user-ui/forgot.tpl');
break;
}

View File

@ -290,9 +290,11 @@ switch ($do) {
default: default:
run_hook('customer_view_login'); #HOOK run_hook('customer_view_login'); #HOOK
if ($config['disable_registration'] == 'yes') { if ($config['disable_registration'] == 'yes') {
$ui->assign('_title', Lang::T('Activation'));
$ui->assign('code', alphanumeric(_get('code'), "-")); $ui->assign('code', alphanumeric(_get('code'), "-"));
$ui->display('user-ui/login-noreg.tpl'); $ui->display('user-ui/login-noreg.tpl');
} else { } else {
$ui->assign('_title', Lang::T('Login'));
$ui->display('user-ui/login.tpl'); $ui->display('user-ui/login.tpl');
} }
break; break;

View File

@ -62,6 +62,7 @@ switch ($do) {
$ui->assign('phonenumber', $phonenumber); $ui->assign('phonenumber', $phonenumber);
$ui->assign('notify', 'Wrong Verification code'); $ui->assign('notify', 'Wrong Verification code');
$ui->assign('notify_t', 'd'); $ui->assign('notify_t', 'd');
$ui->assign('_title', Lang::T('Register'));
$ui->display('user-ui/register-otp.tpl'); $ui->display('user-ui/register-otp.tpl');
exit(); exit();
} else { } else {
@ -95,6 +96,7 @@ switch ($do) {
$ui->assign('phonenumber', $phonenumber); $ui->assign('phonenumber', $phonenumber);
$ui->assign('notify', 'Failed to register'); $ui->assign('notify', 'Failed to register');
$ui->assign('notify_t', 'd'); $ui->assign('notify_t', 'd');
$ui->assign('_title', Lang::T('Register'));
run_hook('view_otp_register'); #HOOK run_hook('view_otp_register'); #HOOK
$ui->display('user-ui/register-rotp.tpl'); $ui->display('user-ui/register-rotp.tpl');
} }
@ -106,6 +108,7 @@ switch ($do) {
$ui->assign('phonenumber', $phonenumber); $ui->assign('phonenumber', $phonenumber);
$ui->assign('notify', $msg); $ui->assign('notify', $msg);
$ui->assign('notify_t', 'd'); $ui->assign('notify_t', 'd');
$ui->assign('_title', Lang::T('Register'));
$ui->display('user-ui/register.tpl'); $ui->display('user-ui/register.tpl');
} }
break; break;
@ -128,6 +131,7 @@ switch ($do) {
$ui->assign('username', $username); $ui->assign('username', $username);
$ui->assign('notify', 'Please wait ' . (600 - (time() - filemtime($otpPath))) . ' seconds before sending another SMS'); $ui->assign('notify', 'Please wait ' . (600 - (time() - filemtime($otpPath))) . ' seconds before sending another SMS');
$ui->assign('notify_t', 'd'); $ui->assign('notify_t', 'd');
$ui->assign('_title', Lang::T('Register'));
$ui->display('user-ui/register-otp.tpl'); $ui->display('user-ui/register-otp.tpl');
} else { } else {
$otp = rand(100000, 999999); $otp = rand(100000, 999999);
@ -136,9 +140,11 @@ switch ($do) {
$ui->assign('username', $username); $ui->assign('username', $username);
$ui->assign('notify', 'Registration code has been sent to your phone'); $ui->assign('notify', 'Registration code has been sent to your phone');
$ui->assign('notify_t', 's'); $ui->assign('notify_t', 's');
$ui->assign('_title', Lang::T('Register'));
$ui->display('user-ui/register-otp.tpl'); $ui->display('user-ui/register-otp.tpl');
} }
} else { } else {
$ui->assign('_title', Lang::T('Register'));
run_hook('view_otp_register'); #HOOK run_hook('view_otp_register'); #HOOK
$ui->display('user-ui/register-rotp.tpl'); $ui->display('user-ui/register-rotp.tpl');
} }
@ -148,6 +154,7 @@ switch ($do) {
$ui->assign('address', ""); $ui->assign('address', "");
$ui->assign('email', ""); $ui->assign('email', "");
$ui->assign('otp', false); $ui->assign('otp', false);
$ui->assign('_title', Lang::T('Register'));
run_hook('view_register'); #HOOK run_hook('view_register'); #HOOK
$ui->display('user-ui/register.tpl'); $ui->display('user-ui/register.tpl');
} }

View File

@ -28,7 +28,7 @@ class MikrotikVpn
$cid = self::getIdByCustomer($customer, $client); $cid = self::getIdByCustomer($customer, $client);
if (empty($cid)) { if (empty($cid)) {
$this->addVpnUser($client, $plan, $customer); $this->addVpnUser($client, $plan, $customer);
}else{ } else {
$setRequest = new RouterOS\Request('/ppp/secret/set'); $setRequest = new RouterOS\Request('/ppp/secret/set');
$setRequest->setArgument('numbers', $cid); $setRequest->setArgument('numbers', $cid);
if (!empty($customer['pppoe_password'])) { if (!empty($customer['pppoe_password'])) {
@ -43,13 +43,13 @@ class MikrotikVpn
} }
if (!empty($customer['pppoe_ip'])) { if (!empty($customer['pppoe_ip'])) {
$setRequest->setArgument('remote-address', $customer['pppoe_ip']); $setRequest->setArgument('remote-address', $customer['pppoe_ip']);
}else{ } else {
$setRequest->setArgument('remote-address', '0.0.0.0'); $setRequest->setArgument('remote-address', '0.0.0.0');
} }
$setRequest->setArgument('profile', $plan['name_plan']); $setRequest->setArgument('profile', $plan['name_plan']);
$setRequest->setArgument('comment', $customer['fullname'] . ' | ' . $customer['email'] . ' | ' . implode(', ', User::getBillNames($customer['id']))); $setRequest->setArgument('comment', $customer['fullname'] . ' | ' . $customer['email'] . ' | ' . implode(', ', User::getBillNames($customer['id'])));
$client->sendSync($setRequest); $client->sendSync($setRequest);
if(isset($isChangePlan) && $isChangePlan){ if (isset($isChangePlan) && $isChangePlan) {
$this->removeVpnActive($client, $customer['username']); $this->removeVpnActive($client, $customer['username']);
if (!empty($customer['pppoe_username'])) { if (!empty($customer['pppoe_username'])) {
$this->removeVpnActive($client, $customer['pppoe_username']); $this->removeVpnActive($client, $customer['pppoe_username']);
@ -64,7 +64,7 @@ class MikrotikVpn
$client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']); $client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
if (!empty($plan['plan_expired'])) { if (!empty($plan['plan_expired'])) {
$p = ORM::for_table("tbl_plans")->find_one($plan['plan_expired']); $p = ORM::for_table("tbl_plans")->find_one($plan['plan_expired']);
if($p){ if ($p) {
$this->add_customer($customer, $p); $this->add_customer($customer, $p);
$this->removeVpnActive($client, $customer['username']); $this->removeVpnActive($client, $customer['username']);
if (!empty($customer['pppoe_username'])) { if (!empty($customer['pppoe_username'])) {
@ -117,26 +117,27 @@ class MikrotikVpn
$unitup = 'M'; $unitup = 'M';
} }
$rate = $bw['rate_up'] . $unitup . "/" . $bw['rate_down'] . $unitdown; $rate = $bw['rate_up'] . $unitup . "/" . $bw['rate_down'] . $unitdown;
if(!empty(trim($bw['burst']))){ if (!empty(trim($bw['burst']))) {
$rate .= ' '.$bw['burst']; $rate .= ' ' . $bw['burst'];
} }
$pool = ORM::for_table("tbl_pool")->where("pool_name", $plan['pool'])->find_one(); $pool = ORM::for_table("tbl_pool")->where("pool_name", $plan['pool'])->find_one();
$addRequest = new RouterOS\Request('/ppp/profile/add'); $addRequest = new RouterOS\Request('/ppp/profile/add');
$client->sendSync( $client->sendSync(
$addRequest $addRequest
->setArgument('name', $plan['name_plan']) ->setArgument('name', $plan['name_plan'])
->setArgument('local-address', (!empty($pool['local_ip'])) ? $pool['local_ip']: $pool['pool_name']) ->setArgument('local-address', (!empty($pool['local_ip'])) ? $pool['local_ip'] : $pool['pool_name'])
->setArgument('remote-address', $pool['pool_name']) ->setArgument('remote-address', $pool['pool_name'])
->setArgument('rate-limit', $rate) ->setArgument('rate-limit', $rate)
); );
} }
function getIdByCustomer($customer, $client){ function getIdByCustomer($customer, $client)
{
$printRequest = new RouterOS\Request('/ppp/secret/print'); $printRequest = new RouterOS\Request('/ppp/secret/print');
$printRequest->setQuery(RouterOS\Query::where('name', $customer['username'])); $printRequest->setQuery(RouterOS\Query::where('name', $customer['username']));
$id = $client->sendSync($printRequest)->getProperty('.id'); $id = $client->sendSync($printRequest)->getProperty('.id');
if(empty($id)){ if (empty($id)) {
if (!empty($customer['pppoe_username'])) { if (!empty($customer['pppoe_username'])) {
$printRequest = new RouterOS\Request('/ppp/secret/print'); $printRequest = new RouterOS\Request('/ppp/secret/print');
$printRequest->setQuery(RouterOS\Query::where('name', $customer['pppoe_username'])); $printRequest->setQuery(RouterOS\Query::where('name', $customer['pppoe_username']));
@ -171,15 +172,15 @@ class MikrotikVpn
$unitup = 'M'; $unitup = 'M';
} }
$rate = $bw['rate_up'] . $unitup . "/" . $bw['rate_down'] . $unitdown; $rate = $bw['rate_up'] . $unitup . "/" . $bw['rate_down'] . $unitdown;
if(!empty(trim($bw['burst']))){ if (!empty(trim($bw['burst']))) {
$rate .= ' '.$bw['burst']; $rate .= ' ' . $bw['burst'];
} }
$pool = ORM::for_table("tbl_pool")->where("pool_name", $new_plan['pool'])->find_one(); $pool = ORM::for_table("tbl_pool")->where("pool_name", $new_plan['pool'])->find_one();
$setRequest = new RouterOS\Request('/ppp/profile/set'); $setRequest = new RouterOS\Request('/ppp/profile/set');
$client->sendSync( $client->sendSync(
$setRequest $setRequest
->setArgument('numbers', $profileID) ->setArgument('numbers', $profileID)
->setArgument('local-address', (!empty($pool['local_ip'])) ? $pool['local_ip']: $pool['pool_name']) ->setArgument('local-address', (!empty($pool['local_ip'])) ? $pool['local_ip'] : $pool['pool_name'])
->setArgument('remote-address', $pool['pool_name']) ->setArgument('remote-address', $pool['pool_name'])
->setArgument('rate-limit', $rate) ->setArgument('rate-limit', $rate)
->setArgument('on-up', $new_plan['on_login']) ->setArgument('on-up', $new_plan['on_login'])
@ -205,7 +206,8 @@ class MikrotikVpn
); );
} }
function add_pool($pool){ function add_pool($pool)
{
global $_app_stage; global $_app_stage;
if ($_app_stage == 'demo') { if ($_app_stage == 'demo') {
return null; return null;
@ -220,7 +222,8 @@ class MikrotikVpn
); );
} }
function update_pool($old_pool, $new_pool){ function update_pool($old_pool, $new_pool)
{
global $_app_stage; global $_app_stage;
if ($_app_stage == 'demo') { if ($_app_stage == 'demo') {
return null; return null;
@ -245,7 +248,8 @@ class MikrotikVpn
} }
} }
function remove_pool($pool){ function remove_pool($pool)
{
global $_app_stage; global $_app_stage;
if ($_app_stage == 'demo') { if ($_app_stage == 'demo') {
return null; return null;
@ -304,7 +308,7 @@ class MikrotikVpn
$removeRequest = new RouterOS\Request('/ppp/secret/remove'); $removeRequest = new RouterOS\Request('/ppp/secret/remove');
$removeRequest->setArgument('numbers', $id); $removeRequest->setArgument('numbers', $id);
$client->sendSync($removeRequest); $client->sendSync($removeRequest);
$this->rmNat($client, $cstid); $this->rmNat($client, $cstid);
} }
function addVpnUser($client, $plan, $customer) function addVpnUser($client, $plan, $customer)
@ -324,18 +328,17 @@ class MikrotikVpn
$setRequest->setArgument('name', $customer['username']); $setRequest->setArgument('name', $customer['username']);
} }
if (!empty($customer['pppoe_ip'])) { if (!empty($customer['pppoe_ip'])) {
$ips = $customer['pppoe_ip']; $ips = $customer['pppoe_ip'];
$setRequest->setArgument('remote-address', $customer['pppoe_ip']); $setRequest->setArgument('remote-address', $customer['pppoe_ip']);
} else { } else {
$ips = $this->checkIpAddr($plan['pool'], $customer['id']); $ips = $this->checkIpAddr($plan['pool'], $customer['id']);
$setRequest->setArgument('remote-address', $ips); $setRequest->setArgument('remote-address', $ips);
}
} $this->addNat($client, $plan, $customer, $ips);
$this->addNat($client, $plan, $customer, $ips);
$client->sendSync($setRequest); $client->sendSync($setRequest);
$customer->service_type = 'VPN'; $customer->service_type = 'VPN';
$customer->pppoe_ip = $ips; $customer->pppoe_ip = $ips;
$customer->save(); $customer->save();
} }
function removeVpnActive($client, $username) function removeVpnActive($client, $username)
@ -368,7 +371,6 @@ class MikrotikVpn
->setArgument('comment', $comment) ->setArgument('comment', $comment)
->setArgument('list', $listName) ->setArgument('list', $listName)
); );
} }
function removeIpFromAddressList($client, $ip) function removeIpFromAddressList($client, $ip)
@ -395,110 +397,111 @@ class MikrotikVpn
if ($_app_stage == 'demo') { if ($_app_stage == 'demo') {
return null; return null;
} }
$this->checkPort($cust['id'], 'Winbox', $plan['routers']); $this->checkPort($cust['id'], 'Winbox', $plan['routers']);
$this->checkPort($cust['id'], 'Api', $plan['routers']); $this->checkPort($cust['id'], 'Api', $plan['routers']);
$this->checkPort($cust['id'], 'Web', $plan['routers']); $this->checkPort($cust['id'], 'Web', $plan['routers']);
$tcf = ORM::for_table('tbl_customers_fields') $tcf = ORM::for_table('tbl_customers_fields')
->where('customer_id', $cust['id']) ->where('customer_id', $cust['id'])
->find_many(); ->find_many();
$ip = ORM::for_table('tbl_port_pool') $ip = ORM::for_table('tbl_port_pool')
->where('routers', $plan['routers']) ->where('routers', $plan['routers'])
->find_one(); ->find_one();
foreach ($tcf as $cf) { foreach ($tcf as $cf) {
$dst = $cf['field_value']; $dst = $cf['field_value'];
$cmnt = $cf['field_name']; $cmnt = $cf['field_name'];
if ($cmnt == 'Winbox') { if ($cmnt == 'Winbox') {
$tp = '8291'; } $tp = '8291';
if ($cmnt == 'Web') { }
$tp = '80'; } if ($cmnt == 'Web') {
if ($cmnt == 'Api') { $tp = '80';
$tp = '8728'; } }
if ($cmnt == 'Winbox' || $cmnt == 'Web' || $cmnt == 'Api') { if ($cmnt == 'Api') {
$addRequest = new RouterOS\Request('/ip/firewall/nat/add'); $tp = '8728';
$client->sendSync( }
$addRequest if ($cmnt == 'Winbox' || $cmnt == 'Web' || $cmnt == 'Api') {
->setArgument('chain', 'dstnat') $addRequest = new RouterOS\Request('/ip/firewall/nat/add');
->setArgument('protocol', 'tcp') $client->sendSync(
->setArgument('dst-port', $dst) $addRequest
->setArgument('action', 'dst-nat') ->setArgument('chain', 'dstnat')
->setArgument('to-addresses', $ips) ->setArgument('protocol', 'tcp')
->setArgument('to-ports', $tp) ->setArgument('dst-port', $dst)
->setArgument('dst-address', $ip['public_ip']) ->setArgument('action', 'dst-nat')
->setArgument('comment', $cmnt.' || '.$cust['username']) ->setArgument('to-addresses', $ips)
); ->setArgument('to-ports', $tp)
} ->setArgument('dst-address', $ip['public_ip'])
} ->setArgument('comment', $cmnt . ' || ' . $cust['username'])
);
}
}
} }
function rmNat($client, $cstid) function rmNat($client, $cstid)
{ {
global $_app_stage; global $_app_stage;
if ($_app_stage == 'demo') { if ($_app_stage == 'demo') {
return null; return null;
} }
$cst = ORM::for_table('tbl_customers')->find_one($cstid); $cst = ORM::for_table('tbl_customers')->find_one($cstid);
$printRequest = new RouterOS\Request('/ip/firewall/nat/print'); $printRequest = new RouterOS\Request('/ip/firewall/nat/print');
$printRequest->setQuery(RouterOS\Query::where('to-addresses', $cst['pppoe_ip'])); $printRequest->setQuery(RouterOS\Query::where('to-addresses', $cst['pppoe_ip']));
$nats = $client->sendSync($printRequest); $nats = $client->sendSync($printRequest);
foreach ($nats as $nat) { foreach ($nats as $nat) {
$id = $client->sendSync($printRequest)->getProperty('.id'); $id = $client->sendSync($printRequest)->getProperty('.id');
$removeRequest = new RouterOS\Request('/ip/firewall/nat/remove'); $removeRequest = new RouterOS\Request('/ip/firewall/nat/remove');
$removeRequest->setArgument('numbers', $id); $removeRequest->setArgument('numbers', $id);
$client->sendSync($removeRequest); $client->sendSync($removeRequest);
} }
} }
function checkPort($id, $portn, $router) function checkPort($id, $portn, $router)
{ {
$tcf = ORM::for_table('tbl_customers_fields') $tcf = ORM::for_table('tbl_customers_fields')
->where('customer_id', $id) ->where('customer_id', $id)
->where('field_name', $portn) ->where('field_name', $portn)
->find_one(); ->find_one();
$ports = ORM::for_table('tbl_port_pool') $ports = ORM::for_table('tbl_port_pool')
->where('routers', $router) ->where('routers', $router)
->find_one(); ->find_one();
$port = explode('-',$ports['range_port']); $port = explode('-', $ports['range_port']);
if (empty($tcf) && !empty($ports)) { if (empty($tcf) && !empty($ports)) {
repeat: repeat:
$portr = rand($port['0'], $port['1']); $portr = rand($port['0'], $port['1']);
if (ORM::for_table('tbl_customers_fields')->where('field_value', $portr)->find_one()) { if (ORM::for_table('tbl_customers_fields')->where('field_value', $portr)->find_one()) {
if($portr == $port['1']) if ($portr == $port['1']) {
{ return;
return; }
} goto repeat;
goto repeat; }
} $cf = ORM::for_table('tbl_customers_fields')->create();
$cf = ORM::for_table('tbl_customers_fields')->create(); $cf->customer_id = $id;
$cf->customer_id = $id; $cf->field_name = $portn;
$cf->field_name = $portn; $cf->field_value = $portr;
$cf->field_value = $portr; $cf->save();
$cf->save(); }
} }
}
function checkIpAddr($pname, $id)
function checkIpAddr($pname, $id) { {
$c = ORM::for_table('tbl_customers')->find_one($id); $c = ORM::for_table('tbl_customers')->find_one($id);
$ipp = ORM::for_table('tbl_pool') $ipp = ORM::for_table('tbl_pool')
->where('pool_name', $pname) ->where('pool_name', $pname)
->find_one(); ->find_one();
$ip_r = explode('-',$ipp['range_ip']); $ip_r = explode('-', $ipp['range_ip']);
$ip_1 = explode('.',$ip_r['0']); $ip_1 = explode('.', $ip_r['0']);
$ip_2 = explode('.',$ip_r['1']); $ip_2 = explode('.', $ip_r['1']);
repeat: repeat:
$ipt = rand($ip_1['3'], $ip_2['3']); $ipt = rand($ip_1['3'], $ip_2['3']);
$ips = $ip_1['0'].'.'.$ip_1['1'].'.'.$ip_1['2'].'.'.$ipt; $ips = $ip_1['0'] . '.' . $ip_1['1'] . '.' . $ip_1['2'] . '.' . $ipt;
if (empty($c['pppoe_ip'])) { if (empty($c['pppoe_ip'])) {
if (ORM::for_table('tbl_customers')->where('pppoe_ip' ,$ips)->find_one()) { if (ORM::for_table('tbl_customers')->where('pppoe_ip', $ips)->find_one()) {
if ($ip_2['3'] == $ipt) if ($ip_2['3'] == $ipt) {
{ return;
return; }
} goto repeat;
goto repeat; }
} return $ips;
return $ips; }
} }
}
} }

View File

@ -1,4 +1,5 @@
{include file="user-ui/header.tpl"} {include file="user-ui/header-public.tpl"}
<div class="hidden-xs" style="height:100px"></div>
<div class="page page-err clearfix"> <div class="page page-err clearfix">
<div class="err-container"> <div class="err-container">
@ -6,5 +7,4 @@
<p class="text-desc mb20">{Lang::T('Coming Soon! Next Version...')}</p> <p class="text-desc mb20">{Lang::T('Coming Soon! Next Version...')}</p>
</div> </div>
</div> </div>
{include file="user-ui/footer-public.tpl"}
{include file="user-ui/footer.tpl"}

View File

@ -0,0 +1,39 @@
</div>
<!-- Modal -->
<div class="modal fade" id="HTMLModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body" id="HTMLModal_konten"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">&times;</button>
</div>
</div>
</div>
</div>
{if $_c['tawkto'] != ''}
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API = Tawk_API || {},
Tawk_LoadStart = new Date();
(function() {
var s1 = document.createElement("script"),
s0 = document.getElementsByTagName("script")[0];
s1.async = true;
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
s1.charset = 'UTF-8';
s1.setAttribute('crossorigin', '*');
s0.parentNode.insertBefore(s1, s0);
})();
</script>
<!--End of Tawk.to Script-->
{/if}
<script src="ui/ui/scripts/vendors.js?v=1"></script>
</body>
</html>

73
ui/ui/user-ui/forgot.tpl Normal file
View File

@ -0,0 +1,73 @@
{include file="user-ui/header-public.tpl"}
<div class="row">
<div class="col-sm-6 col-sm-offset-1">
<div class="panel panel-info">
<div class="panel-heading">{Lang::T('Announcement')}</div>
<div class="panel-body">
{$Announcement = "{$PAGES_PATH}/Announcement.html"}
{if file_exists($Announcement)}
{include file=$Announcement}
{/if}
</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Log in to Member Panel')}</div>
<div class="panel-body">
<form action="{$_url}login/post" method="post">
<div class="form-group">
<label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
<div class="input-group">
{if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span>
{else}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-user"></i></span>
{/if}
<input type="text" class="form-control" name="username"
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</div>
</div>
<div class="form-group">
<label>{Lang::T('Password')}</label>
<div class="input-group">
<span class="input-group-addon" id="basic-addon2"><i
class="glyphicon glyphicon-lock"></i></span>
<input type="password" class="form-control" name="password"
placeholder="{Lang::T('Password')}">
</div>
</div>
<div class="clearfix hidden">
<div class="ui-checkbox ui-checkbox-primary right">
<label>
<input type="checkbox">
<span>Remember me</span>
</label>
</div>
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}register" class="btn btn-success">{Lang::T('Register')}</a>
</div>
<div class="btn-group">
<button type="submit" class="btn btn-primary">{Lang::T('Login')}</button>
</div>
</div>
<br>
<center>
<a href="{$_url}forgot" class="btn btn-link">{Lang::T('Forgot Password')}</a>
<br>
<a href="javascript:showPrivacy()">Privacy</a>
&bull;
<a href="javascript:showTaC()">T &amp; C</a>
</center>
</form>
</div>
</div>
</div>
</div>
{include file="user-ui/footer-public.tpl"}

View File

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{$_title} - {$_c['CompanyName']}</title>
<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">
<link rel="stylesheet" href="ui/ui/styles/sweetalert2.min.css" />
<script src="ui/ui/scripts/sweetalert2.all.min.js"></script>
</head>
<body id="app" class="app off-canvas body-full">
<div class="container">
<div class="form-head mb20">
<h1 class="site-logo h2 mb5 mt5 text-center text-uppercase text-bold"
style="text-shadow: 2px 2px 4px #757575;">{$_c['CompanyName']}</h1>
<hr>
</div>
{if isset($notify)}
<script>
// Display SweetAlert toast notification
Swal.fire({
icon: '{if $notify_t == "s"}success{else}warning{/if}',
title: '{$notify}',
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 5000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
});
</script>
{/if}

View File

@ -1,118 +1,83 @@
<!DOCTYPE html> {include file="user-ui/header-public.tpl"}
<html> <div class="hidden-xs" style="height:100px"></div>
<div class="row">
<head> <div class="col-sm-8">
<meta charset="utf-8"> <div class="panel panel-info">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <div class="panel-heading">{Lang::T('Announcement')}</div>
<title>{Lang::T('Login')} - {$_c['CompanyName']}</title> <div class="panel-body">
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" /> {include file="$_path/../pages/Announcement.html"}
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
</head>
<body>
<div class="container">
<div class="hidden-xs" style="height:150px"></div>
<div class="form-head mb20">
<h1 class="site-logo h2 mb5 mt5 text-center text-uppercase text-bold"
style="text-shadow: 2px 2px 4px #757575;">{$_c['CompanyName']}</h1>
<hr>
</div>
{if isset($notify)}
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true">×</span>
</button>
<div>{$notify}</div>
</div>
{/if}
<div class="row">
<div class="col-sm-8">
<div class="panel panel-info">
<div class="panel-heading">{Lang::T('Announcement')}</div>
<div class="panel-body">
{include file="$_path/../pages/Announcement.html"}
</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Login / Activate Voucher')}</div>
<div class="panel-body">
<form action="{$_url}login/activation" method="post">
<div class="form-group">
<label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
<div class="input-group">
{if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span>
{else}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-user"></i></span>
{/if}
<input type="text" class="form-control" name="username" required
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</div>
</div>
<div class="form-group">
<label>{Lang::T('Enter voucher code here')}</label>
<div class="input-group">
<input type="text" class="form-control" id="voucher" name="voucher" required
value="{$code}" placeholder="{Lang::T('Enter voucher code here')}">
<span class="input-group-btn">
<a class="btn btn-default"
href="{APP_URL}/scan/?back={urlencode($_url)}{urlencode("login&code=")}"><i
class="glyphicon glyphicon-qrcode"></i></a>
</span>
</div>
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<button type="submit"
class="btn btn-primary">{Lang::T('Login / Activate Voucher')}</button>
</div>
</div>
</form>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Activate Voucher')}</div>
<div class="panel-body">
<form action="{$_url}login/activation" method="post">
<div class="form-group">
<label>{Lang::T('Enter voucher code here')}</label>
<div class="input-group">
<input type="text" class="form-control" id="voucher_only" name="voucher_only" required
value="{$code}" placeholder="{Lang::T('Enter voucher code here')}">
<span class="input-group-btn">
<a class="btn btn-default"
href="{APP_URL}/scan/?back={urlencode($_url)}{urlencode("login&code=")}"><i
class="glyphicon glyphicon-qrcode"></i></a>
</span>
</div>
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<button type="submit"
class="btn btn-primary">{Lang::T('Activate Voucher')}</button>
</div>
</div>
</form>
</div>
</div>
<br>
<center>
<a href="./pages/Privacy_Policy.html" target="_blank">Privacy</a>
&bull;
<a href="./pages/Terms_of_Conditions.html" target="_blank">ToC</a>
</center>
</div> </div>
</div> </div>
</div> </div>
<script src="ui/ui/scripts/vendors.js"></script> <div class="col-sm-4">
</body> <div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Login / Activate Voucher')}</div>
</html> <div class="panel-body">
<form action="{$_url}login/activation" method="post">
<div class="form-group">
<label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
<div class="input-group">
{if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span>
{else}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-user"></i></span>
{/if}
<input type="text" class="form-control" name="username" required
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</div>
</div>
<div class="form-group">
<label>{Lang::T('Enter voucher code here')}</label>
<div class="input-group">
<input type="text" class="form-control" id="voucher" name="voucher" required value="{$code}"
placeholder="{Lang::T('Enter voucher code here')}">
<span class="input-group-btn">
<a class="btn btn-default"
href="{APP_URL}/scan/?back={urlencode($_url)}{urlencode("login&code=")}"><i
class="glyphicon glyphicon-qrcode"></i></a>
</span>
</div>
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<button type="submit" class="btn btn-primary">{Lang::T('Login / Activate Voucher')}</button>
</div>
</div>
</form>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Activate Voucher')}</div>
<div class="panel-body">
<form action="{$_url}login/activation" method="post">
<div class="form-group">
<label>{Lang::T('Enter voucher code here')}</label>
<div class="input-group">
<input type="text" class="form-control" id="voucher_only" name="voucher_only" required
value="{$code}" placeholder="{Lang::T('Enter voucher code here')}">
<span class="input-group-btn">
<a class="btn btn-default"
href="{APP_URL}/scan/?back={urlencode($_url)}{urlencode("login&code=")}"><i
class="glyphicon glyphicon-qrcode"></i></a>
</span>
</div>
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<button type="submit" class="btn btn-primary">{Lang::T('Activate Voucher')}</button>
</div>
</div>
</form>
</div>
</div>
<br>
<center>
<a href="./pages/Privacy_Policy.html" target="_blank">Privacy</a>
&bull;
<a href="./pages/Terms_of_Conditions.html" target="_blank">ToC</a>
</center>
</div>
</div>
{include file="user-ui/footer-public.tpl"}

View File

@ -1,119 +1,92 @@
<!DOCTYPE html> {include file="user-ui/header-public.tpl"}
<html>
<head> <div class="hidden-xs" style="height:100px"></div>
<meta charset="utf-8"> <div class="row">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <div class="col-sm-6 col-sm-offset-1">
<title>{Lang::T('Login')} - {$_c['CompanyName']}</title> <div class="panel panel-info">
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" /> <div class="panel-heading">{Lang::T('Announcement')}</div>
<div class="panel-body">
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css"> {$Announcement = "{$PAGES_PATH}/Announcement.html"}
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css"> {if file_exists($Announcement)}
</head> {include file=$Announcement}
{/if}
<body> </div>
<div class="container">
<div class="hidden-xs" style="height:150px"></div>
<div class="form-head mb20">
<h1 class="site-logo h2 mb5 mt5 text-center text-uppercase text-bold"
style="text-shadow: 2px 2px 4px #757575;">{$_c['CompanyName']}</h1>
<hr>
</div> </div>
{if isset($notify)} </div>
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}"> <div class="col-sm-4">
<button type="button" class="close" data-dismiss="alert"> <div class="panel panel-primary">
<span aria-hidden="true">×</span> <div class="panel-heading">{Lang::T('Log in to Member Panel')}</div>
</button> <div class="panel-body">
<div>{$notify}</div> <form action="{$_url}login/post" method="post">
</div> <div class="form-group">
{/if} <label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
<div class="row"> <div class="input-group">
<div class="col-sm-6 col-sm-offset-1"> {if $_c['country_code_phone']!= ''}
<div class="panel panel-info"> <span class="input-group-addon" id="basic-addon1"><i
<div class="panel-heading">{Lang::T('Announcement')}</div>
<div class="panel-body">
{$Announcement = "{$PAGES_PATH}/Announcement.html"}
{if file_exists($Announcement)}
{include file=$Announcement}
{/if}
</div>
</div>
</div>
<div class="col-sm-4">
<div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Log in to Member Panel')}</div>
<div class="panel-body">
<form action="{$_url}login/post" method="post">
<div class="form-group">
<label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
<div class="input-group">
{if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span> class="glyphicon glyphicon-phone-alt"></i></span>
{else} {else}
<span class="input-group-addon" id="basic-addon1"><i <span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-user"></i></span> class="glyphicon glyphicon-user"></i></span>
{/if} {/if}
<input type="text" class="form-control" name="username" <input type="text" class="form-control" name="username"
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}"> placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>{Lang::T('Password')}</label> <label>{Lang::T('Password')}</label>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon" id="basic-addon2"><i class="glyphicon glyphicon-lock"></i></span> <span class="input-group-addon" id="basic-addon2"><i
<input type="password" class="form-control" name="password" placeholder="{Lang::T('Password')}"> class="glyphicon glyphicon-lock"></i></span>
<input type="password" class="form-control" name="password"
placeholder="{Lang::T('Password')}">
</div>
</div>
<div class="clearfix hidden">
<div class="ui-checkbox ui-checkbox-primary right">
<label>
<input type="checkbox">
<span>Remember me</span>
</label>
</div>
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}register" class="btn btn-success">{Lang::T('Register')}</a>
</div>
<div class="btn-group">
<button type="submit" class="btn btn-primary">{Lang::T('Login')}</button>
</div>
</div>
<br>
<center>
<a href="{$_url}forgot" class="btn btn-link">{Lang::T('Forgot Password')}</a>
<br>
<a href="javascript:showPrivacy()">Privacy</a>
&bull;
<a href="javascript:showTaC()">T &amp; C</a>
</center>
</form>
</div>
</div>
</div> </div>
</div> </div>
<div class="clearfix hidden"> <!-- Modal -->
<div class="ui-checkbox ui-checkbox-primary right"> <div class="modal fade" id="HTMLModal" tabindex="-1" role="dialog">
<label> <div class="modal-dialog">
<input type="checkbox"> <div class="modal-content">
<span>Remember me</span> <div class="modal-header">
</label> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
</div> aria-hidden="true">&times;</span></button>
</div> </div>
<div class="btn-group btn-group-justified mb15"> <div class="modal-body" id="HTMLModal_konten"></div>
<div class="btn-group"> <div class="modal-footer">
<a href="{$_url}register" class="btn btn-success">{Lang::T('Register')}</a> <button type="button" class="btn btn-default" data-dismiss="modal">&times;</button>
</div>
<div class="btn-group">
<button type="submit" class="btn btn-primary">{Lang::T('Login')}</button>
</div>
</div>
<br>
<center>
<a href="javascript:showPrivacy()">Privacy</a>
&bull;
<a href="javascript:showTaC()">T &amp; C</a>
</center>
</form>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- Modal --> {include file="user-ui/footer-public.tpl"}
<div class="modal fade" id="HTMLModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body" id="HTMLModal_konten"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">&times;</button>
</div>
</div>
</div>
</div>
<script src="ui/ui/scripts/vendors.js?v=1"></script>
</body>
</html>

View File

@ -1,170 +1,122 @@
<!DOCTYPE html> {include file="user-ui/header-public.tpl"}
<html> <div class="hidden-xs" style="height:100px"></div>
<head> <div class="row">
<meta charset="utf-8"> <div class="col-md-4">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <div class="panel panel-info">
<title>{Lang::T('Register')} - {$_c['CompanyName']}</title> <div class="panel-heading">{Lang::T('Registration Info')}</div>
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" /> <div class="panel-body">
{include file="$_path/../pages/Registration_Info.html"}
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
<link rel="stylesheet" href="ui/ui/styles/sweetalert2.min.css" />
<script src="ui/ui/scripts/sweetalert2.all.min.js"></script>
</head>
<body id="app" class="app off-canvas body-full">
<div class="container">
<div class="hidden-xs" style="height:150px"></div>
<div class="form-head mb20">
<h1 class="site-logo h2 mb5 mt5 text-center text-uppercase text-bold"
style="text-shadow: 2px 2px 4px #757575;">{$_c['CompanyName']}</h1>
<hr>
</div>
{if isset($notify)}
<script>
// Display SweetAlert toast notification
Swal.fire({
icon: '{if $notify_t == "s"}success{else}warning{/if}',
title: '{$notify}',
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 5000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
});
</script>
{/if}
<div class="row">
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading">{Lang::T('Registration Info')}</div>
<div class="panel-body">
{include file="$_path/../pages/Registration_Info.html"}
</div>
</div>
</div>
<form action="{$_url}register/post" method="post">
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">1. {Lang::T('Register as Member')}</div>
<div class="panel-body">
<div class="form-container">
<div class="form-group">
<label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
<div class="input-group">
{if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span>
{else}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-user"></i></span>
{/if}
<input type="text" class="form-control" name="username" value="{$username}"
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</div>
</div>
<div class="form-group">
<label>{Lang::T('SMS Verification Code')}</label>
<input type="text" required class="form-control" id="otp_code" value=""
placeholder="{Lang::T('Verification Code')}" name="otp_code">
</div>
<div class="form-group">
<label>{Lang::T('Full Name')}</label>
<input type="text" required class="form-control" id="fullname" value="{$fullname}"
name="fullname">
</div>
<div class="form-group">
<label>{Lang::T('Email')}</label>
<input type="text" class="form-control" placeholder="xxxxxx@xxx.xx"
id="email" value="{$email}" name="email">
</div>
<div class="form-group">
<label>{Lang::T('Address')}</label>
<input type="text" name="address" id="address" value="{$address}"
class="form-control">
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">2. {Lang::T('Password')}</div>
<div class="panel-body">
<div class="form-container">
<div class="form-group">
<label>{Lang::T('Password')}</label>
<input type="password" required class="form-control" id="password" name="password">
</div>
<div class="form-group">
<label>{Lang::T('Confirm Password')}</label>
<input type="password" required class="form-control" id="cpassword"
name="cpassword">
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}register" class="btn btn-success">{Lang::T('Cancel')}</a>
</div>
<div class="btn-group">
<button class="btn btn-primary" type="submit">{Lang::T('Register')}</button>
</div>
</div>
<br>
<center>
<a href="javascript:showPrivacy()">Privacy</a>
&bull;
<a href="javascript:showTaC()">T &amp; C</a>
</center>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="HTMLModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body" id="HTMLModal_konten"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">&times;</button>
</div>
</div> </div>
</div> </div>
</div> </div>
{if $_c['tawkto'] != ''} <form action="{$_url}register/post" method="post">
<!--Start of Tawk.to Script--> <div class="col-md-4">
<script type="text/javascript"> <div class="panel panel-primary">
var Tawk_API = Tawk_API || {}, <div class="panel-heading">1. {Lang::T('Register as Member')}</div>
Tawk_LoadStart = new Date(); <div class="panel-body">
(function() { <div class="form-container">
var s1 = document.createElement("script"), <div class="form-group">
s0 = document.getElementsByTagName("script")[0]; <label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
s1.async = true; <div class="input-group">
s1.src='https://embed.tawk.to/{$_c['tawkto']}'; {if $_c['country_code_phone']!= ''}
s1.charset = 'UTF-8'; <span class="input-group-addon" id="basic-addon1"><i
s1.setAttribute('crossorigin', '*'); class="glyphicon glyphicon-phone-alt"></i></span>
s0.parentNode.insertBefore(s1, s0); {else}
})(); <span class="input-group-addon" id="basic-addon1"><i
</script> class="glyphicon glyphicon-user"></i></span>
<!--End of Tawk.to Script--> {/if}
{/if} <input type="text" class="form-control" name="username" value="{$username}"
<script src="ui/ui/scripts/vendors.js?v=1"></script> placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</body> </div>
</div>
<div class="form-group">
<label>{Lang::T('SMS Verification Code')}</label>
<input type="text" required class="form-control" id="otp_code" value=""
placeholder="{Lang::T('Verification Code')}" name="otp_code">
</div>
<div class="form-group">
<label>{Lang::T('Full Name')}</label>
<input type="text" required class="form-control" id="fullname" value="{$fullname}"
name="fullname">
</div>
<div class="form-group">
<label>{Lang::T('Email')}</label>
<input type="text" class="form-control" placeholder="xxxxxx@xxx.xx" id="email"
value="{$email}" name="email">
</div>
<div class="form-group">
<label>{Lang::T('Address')}</label>
<input type="text" name="address" id="address" value="{$address}" class="form-control">
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">2. {Lang::T('Password')}</div>
<div class="panel-body">
<div class="form-container">
<div class="form-group">
<label>{Lang::T('Password')}</label>
<input type="password" required class="form-control" id="password" name="password">
</div>
<div class="form-group">
<label>{Lang::T('Confirm Password')}</label>
<input type="password" required class="form-control" id="cpassword" name="cpassword">
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}register" class="btn btn-success">{Lang::T('Cancel')}</a>
</div>
<div class="btn-group">
<button class="btn btn-primary" type="submit">{Lang::T('Register')}</button>
</div>
</div>
<br>
<center>
<a href="javascript:showPrivacy()">Privacy</a>
&bull;
<a href="javascript:showTaC()">T &amp; C</a>
</center>
</div>
</div>
</div>
</div>
</form>
</div>
</html> <!-- Modal -->
<div class="modal fade" id="HTMLModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body" id="HTMLModal_konten"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">&times;</button>
</div>
</div>
</div>
</div>
{if $_c['tawkto'] != ''}
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API = Tawk_API || {},
Tawk_LoadStart = new Date();
(function() {
var s1 = document.createElement("script"),
s0 = document.getElementsByTagName("script")[0];
s1.async = true;
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
s1.charset = 'UTF-8';
s1.setAttribute('crossorigin', '*');
s0.parentNode.insertBefore(s1, s0);
})();
</script>
<!--End of Tawk.to Script-->
{/if}
{include file="user-ui/footer-public.tpl"}

View File

@ -1,131 +1,55 @@
<!DOCTYPE html> {include file="user-ui/header-public.tpl"}
<html>
<head> <div class="hidden-xs" style="height:100px"></div>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{Lang::T('Register')} - {$_c['CompanyName']}</title>
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css"> <div class="row">
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css"> <div class="col-md-2">
<link rel="stylesheet" href="ui/ui/styles/sweetalert2.min.css" /> </div>
<script src="ui/ui/scripts/sweetalert2.all.min.js"></script> <div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Registration Info')}</div>
<div class="panel-body">
</head> {include file="$_path/../pages/Registration_Info.html"}
</div>
<body id="app" class="app off-canvas body-full">
<div class="container">
<div class="hidden-xs" style="height:150px"></div>
<div class="form-head mb20">
<h1 class="site-logo h2 mb5 mt5 text-center text-uppercase text-bold"
style="text-shadow: 2px 2px 4px #757575;">{$_c['CompanyName']}</h1>
<hr>
</div> </div>
{if isset($notify)} </div>
<script> <form action="{$_url}register" method="post">
// Display SweetAlert toast notification <div class="col-md-4">
Swal.fire({ <div class="panel panel-primary">
icon: '{if $notify_t == "s"}success{else}warning{/if}', <div class="panel-heading">1. {Lang::T('Register as Member')}</div>
title: '{$notify}', <div class="panel-body">
toast: true, <div class="form-group">
position: 'top-end', <label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
showConfirmButton: false, <div class="input-group">
timer: 5000, {if $_c['country_code_phone']!= ''}
timerProgressBar: true, <span class="input-group-addon" id="basic-addon1"><i
didOpen: (toast) => { class="glyphicon glyphicon-phone-alt"></i></span>
toast.addEventListener('mouseenter', Swal.stopTimer) {else}
toast.addEventListener('mouseleave', Swal.resumeTimer) <span class="input-group-addon" id="basic-addon1"><i
} class="glyphicon glyphicon-user"></i></span>
}); {/if}
</script> <input type="text" class="form-control" name="username"
{/if} placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Registration Info')}</div>
<div class="panel-body">
{include file="$_path/../pages/Registration_Info.html"}
</div>
</div>
</div>
<form action="{$_url}register" method="post">
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">1. {Lang::T('Register as Member')}</div>
<div class="panel-body">
<div class="form-group">
<label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
<div class="input-group">
{if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span>
{else}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-user"></i></span>
{/if}
<input type="text" class="form-control" name="username"
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</div>
</div>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}login" class="btn btn-warning">{Lang::T('Cancel')}</a>
</div>
<div class="btn-group">
<button class="btn btn-success" type="submit">{Lang::T('Request OTP')}</button>
</div>
</div>
<br>
<center>
<a href="javascript:showPrivacy()">Privacy</a>
&bull;
<a href="javascript:showTaC()">T &amp; C</a>
</center>
</div> </div>
</div> </div>
</div> <div class="btn-group btn-group-justified mb15">
</form> <div class="btn-group">
</div> <a href="{$_url}login" class="btn btn-warning">{Lang::T('Cancel')}</a>
</div> </div>
<div class="btn-group">
<!-- Modal --> <button class="btn btn-success" type="submit">{Lang::T('Request OTP')}</button>
<div class="modal fade" id="HTMLModal" tabindex="-1" role="dialog"> </div>
<div class="modal-dialog"> </div>
<div class="modal-content"> <br>
<div class="modal-header"> <center>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span <a href="javascript:showPrivacy()">Privacy</a>
aria-hidden="true">&times;</span></button> &bull;
</div> <a href="javascript:showTaC()">T &amp; C</a>
<div class="modal-body" id="HTMLModal_konten"></div> </center>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">&times;</button>
</div> </div>
</div> </div>
</div> </div>
</div> </form>
{if $_c['tawkto'] != ''} </div>
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API = Tawk_API || {},
Tawk_LoadStart = new Date();
(function() {
var s1 = document.createElement("script"),
s0 = document.getElementsByTagName("script")[0];
s1.async = true;
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
s1.charset = 'UTF-8';
s1.setAttribute('crossorigin', '*');
s0.parentNode.insertBefore(s1, s0);
})();
</script>
<!--End of Tawk.to Script-->
{/if}
<script src="ui/ui/scripts/vendors.js?v=1"></script>
</body>
</html> {include file="user-ui/footer-public.tpl"}

View File

@ -1,166 +1,85 @@
<!DOCTYPE html> {include file="user-ui/header-public.tpl"}
<html> <div class="hidden-xs" style="height:100px"></div>
<head> <div class="row">
<meta charset="utf-8"> <div class="col-md-4">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <div class="panel panel-primary">
<title>{Lang::T('Register')} - {$_c['CompanyName']}</title> <div class="panel-heading">{Lang::T('Registration Info')}</div>
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" /> <div class="panel-body">
{include file="$_path/../pages/Registration_Info.html"}
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
<link rel="stylesheet" href="ui/ui/styles/sweetalert2.min.css" />
<script src="ui/ui/scripts/sweetalert2.all.min.js"></script>
</head>
<body id="app" class="app off-canvas body-full">
<div class="container">
<div class="hidden-xs" style="height:150px"></div>
<div class="form-head mb20">
<h1 class="site-logo h2 mb5 mt5 text-center text-uppercase text-bold"
style="text-shadow: 2px 2px 4px #757575;">{$_c['CompanyName']}</h1>
<hr>
</div>
{if isset($notify)}
<script>
// Display SweetAlert toast notification
Swal.fire({
icon: '{if $notify_t == "s"}success{else}warning{/if}',
title: '{$notify}',
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 5000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
});
</script>
{/if}
<div class="row">
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">{Lang::T('Registration Info')}</div>
<div class="panel-body">
{include file="$_path/../pages/Registration_Info.html"}
</div>
</div>
</div>
<form class="form-horizontal" action="{$_url}register/post" method="post">
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">1. {Lang::T('Register as Member')}</div>
<div class="panel-body">
<div class="form-container">
<div class="md-input-container">
<label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
<div class="input-group">
{if $_c['country_code_phone']!= ''}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-phone-alt"></i></span>
{else}
<span class="input-group-addon" id="basic-addon1"><i
class="glyphicon glyphicon-user"></i></span>
{/if}
<input type="text" class="form-control" name="username"
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</div>
</div>
<div class="md-input-container md-float-label">
<label>{Lang::T('Full Name')}</label>
<input type="text" required class="form-control" id="fullname" value="{$fullname}"
name="fullname">
</div>
<div class="md-input-container md-float-label">
<label>{Lang::T('Email')}</label>
<input type="text" class="form-control" id="email" placeholder="xxxxxxx@xxxx.xx"
value="{$email}" name="email">
</div>
<div class="md-input-container md-float-label">
<label>{Lang::T('Address')}</label>
<input type="text" name="address" id="address" value="{$address}"
class="form-control">
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">2. {Lang::T('Password')}</div>
<div class="panel-body">
<div class="form-container">
<div class="md-input-container md-float-label">
<label>{Lang::T('Password')}</label>
<input type="password" required class="form-control" id="password" name="password">
</div>
<div class="md-input-container md-float-label">
<label>{Lang::T('Confirm Password')}</label>
<input type="password" required class="form-control" id="cpassword"
name="cpassword">
</div>
<br>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}login" class="btn btn-warning">{Lang::T('Cancel')}</a>
</div>
<div class="btn-group">
<button class="btn btn-success" type="submit">{Lang::T('Register')}</button>
</div>
</div>
<br>
<center>
<a href="javascript:showPrivacy()">Privacy</a>
&bull;
<a href="javascript:showTaC()">T &amp; C</a>
</center>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="HTMLModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body" id="HTMLModal_konten"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">&times;</button>
</div>
</div> </div>
</div> </div>
</div> </div>
{if $_c['tawkto'] != ''} <form class="form-horizontal" action="{$_url}register/post" method="post">
<!--Start of Tawk.to Script--> <div class="col-md-4">
<script type="text/javascript"> <div class="panel panel-primary">
var Tawk_API = Tawk_API || {}, <div class="panel-heading">1. {Lang::T('Register as Member')}</div>
Tawk_LoadStart = new Date(); <div class="panel-body">
(function() { <div class="form-container">
var s1 = document.createElement("script"), <div class="md-input-container">
s0 = document.getElementsByTagName("script")[0]; <label>{if $_c['country_code_phone']!= ''}{Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}</label>
s1.async = true; <div class="input-group">
s1.src='https://embed.tawk.to/{$_c['tawkto']}'; {if $_c['country_code_phone']!= ''}
s1.charset = 'UTF-8'; <span class="input-group-addon" id="basic-addon1"><i
s1.setAttribute('crossorigin', '*'); class="glyphicon glyphicon-phone-alt"></i></span>
s0.parentNode.insertBefore(s1, s0); {else}
})(); <span class="input-group-addon" id="basic-addon1"><i
</script> class="glyphicon glyphicon-user"></i></span>
<!--End of Tawk.to Script--> {/if}
{/if} <input type="text" class="form-control" name="username"
<script src="ui/ui/scripts/vendors.js?v=1"></script> placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
</body> </div>
</div>
</html> <div class="md-input-container md-float-label">
<label>{Lang::T('Full Name')}</label>
<input type="text" required class="form-control" id="fullname" value="{$fullname}"
name="fullname">
</div>
<div class="md-input-container md-float-label">
<label>{Lang::T('Email')}</label>
<input type="text" class="form-control" id="email" placeholder="xxxxxxx@xxxx.xx"
value="{$email}" name="email">
</div>
<div class="md-input-container md-float-label">
<label>{Lang::T('Address')}</label>
<input type="text" name="address" id="address" value="{$address}" class="form-control">
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading">2. {Lang::T('Password')}</div>
<div class="panel-body">
<div class="form-container">
<div class="md-input-container md-float-label">
<label>{Lang::T('Password')}</label>
<input type="password" required class="form-control" id="password" name="password">
</div>
<div class="md-input-container md-float-label">
<label>{Lang::T('Confirm Password')}</label>
<input type="password" required class="form-control" id="cpassword" name="cpassword">
</div>
<br>
<div class="btn-group btn-group-justified mb15">
<div class="btn-group">
<a href="{$_url}login" class="btn btn-warning">{Lang::T('Cancel')}</a>
</div>
<div class="btn-group">
<button class="btn btn-success" type="submit">{Lang::T('Register')}</button>
</div>
</div>
<br>
<center>
<a href="javascript:showPrivacy()">Privacy</a>
&bull;
<a href="javascript:showTaC()">T &amp; C</a>
</center>
</div>
</div>
</div>
</div>
</form>
</div>
{include file="user-ui/footer-public.tpl"}