mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 09:45:03 +02:00
Added user Types for Internet Packages
ability to display packages according to the user type. Hotspot users Can now only see hotspot packages PPPoE users can now see only PPPoE Packages Others Can see both Hotspot and PPPoE packages
This commit is contained in:
commit
adc2c808e2
9 changed files with 395 additions and 206 deletions
|
@ -28,7 +28,8 @@ switch ($action) {
|
|||
'username' => '%' . $search . '%',
|
||||
'fullname' => '%' . $search . '%',
|
||||
'phonenumber' => '%' . $search . '%',
|
||||
'email' => '%' . $search . '%'
|
||||
'email' => '%' . $search . '%',
|
||||
'service_type' => '%' . $search . '%'
|
||||
], $search);
|
||||
$d = ORM::for_table('tbl_customers')
|
||||
->where_raw("(`username` LIKE '%$search%' OR `fullname` LIKE '%$search%' OR `phonenumber` LIKE '%$search%' OR `email` LIKE '%$search%')", [$search, $search, $search, $search])
|
||||
|
@ -225,8 +226,9 @@ switch ($action) {
|
|||
$password = _post('password');
|
||||
$pppoe_password = _post('pppoe_password');
|
||||
$email = _post('email');
|
||||
$address = _post('address');
|
||||
$address = _post('address');
|
||||
$phonenumber = _post('phonenumber');
|
||||
$service_type = _post('service_type');
|
||||
run_hook('add_customer'); #HOOK
|
||||
$msg = '';
|
||||
if (Validator::Length($username, 35, 2) == false) {
|
||||
|
@ -253,6 +255,7 @@ switch ($action) {
|
|||
$d->fullname = $fullname;
|
||||
$d->address = $address;
|
||||
$d->phonenumber = Lang::phoneFormat($phonenumber);
|
||||
$d->service_type = $service_type;
|
||||
$d->save();
|
||||
r2(U . 'customers/list', 's', $_L['account_created_successfully']);
|
||||
} else {
|
||||
|
@ -268,6 +271,7 @@ switch ($action) {
|
|||
$email = _post('email');
|
||||
$address = _post('address');
|
||||
$phonenumber = Lang::phoneFormat(_post('phonenumber'));
|
||||
$service_type = _post('service_type');
|
||||
run_hook('edit_customer'); #HOOK
|
||||
$msg = '';
|
||||
if (Validator::Length($username, 16, 2) == false) {
|
||||
|
@ -320,6 +324,7 @@ switch ($action) {
|
|||
$d->email = $email;
|
||||
$d->address = $address;
|
||||
$d->phonenumber = $phonenumber;
|
||||
$d->service_type = $service_type;
|
||||
$d->save();
|
||||
if ($userDiff || $pppoeDiff || $passDiff) {
|
||||
$c = ORM::for_table('tbl_user_recharges')->where('username', ($userDiff) ? $oldusername : $username)->find_one();
|
||||
|
|
|
@ -35,5 +35,8 @@
|
|||
],
|
||||
"2023.10.24" : [
|
||||
"ALTER TABLE `nas` ADD `routers` VARCHAR(32) NOT NULL DEFAULT '' AFTER `description`;"
|
||||
],
|
||||
"2023.12.15": [
|
||||
"ALTER TABLE `tbl_customers` ADD `service_type` ENUM('Hotspot','PPPoE','Others') DEFAULT 'Others' COMMENT 'For selecting user type' AFTER `balance`;"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue