phpnuxbill/system/autoload/User.php

29 lines
596 B
PHP
Raw Normal View History

2017-03-11 03:51:06 +08:00
<?php
2023-06-15 16:26:38 +08:00
2017-03-11 03:51:06 +08:00
/**
2023-10-12 16:55:42 +08:00
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
* by https://t.me/ibnux
2023-06-15 16:26:38 +08:00
**/
2017-03-11 03:51:06 +08:00
2023-10-12 16:55:42 +08:00
2023-06-15 16:26:38 +08:00
class User
{
public static function _info()
{
2017-03-11 03:51:06 +08:00
$id = $_SESSION['uid'];
$d = ORM::for_table('tbl_customers')->find_one($id);
if(empty($d['username'])){
r2(U . 'logout', 'd', '');
}
2017-03-11 03:51:06 +08:00
return $d;
}
2023-06-15 16:26:38 +08:00
public static function _billing()
{
2017-03-11 03:51:06 +08:00
$id = $_SESSION['uid'];
2023-06-15 16:26:38 +08:00
$d = ORM::for_table('tbl_user_recharges')->where('customer_id', $id)->find_one();
2017-03-11 03:51:06 +08:00
return $d;
}
2023-06-15 16:26:38 +08:00
}