43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
class RadiusDB_UserInfo {
|
|
private $id;
|
|
private $Username;
|
|
private $custnum;
|
|
private $custnume;
|
|
private $ContractUp;
|
|
private $ContractDown;
|
|
private $Duraction;
|
|
private $Info;
|
|
private $Wifikey;
|
|
private $ont_sn;
|
|
|
|
public function __construct($db) {
|
|
$this->db = $db;
|
|
}
|
|
|
|
public function load($username) {
|
|
if(!$username) {
|
|
return false;
|
|
}
|
|
|
|
$this->username = $username;
|
|
|
|
$res = $this->db->select("Hotspot_Usersettings", "*", "Username='$username'");
|
|
if($this->db->num_rows($res)) {
|
|
$rad = $this->db->fetch_object($res);
|
|
|
|
$this->id = $rad->id;
|
|
$this->Username = $rad->Username;
|
|
$this->Custnum = $rad->Custnum;
|
|
$this->Custnume = $rad->Custnume;
|
|
$this->ContractUp = $rad->ContratUp;
|
|
$this->ContractDown = $rad->ContractDown;
|
|
$this->Duration = $rad->Duration;
|
|
$this->Info = $rad->Info;
|
|
$this->Wifikey = $rad->Wifikey;
|
|
$this->ont_sn = $rad->ont_sn;
|
|
|
|
}
|
|
}
|
|
} |