Files
thetool/lib/RadiusDB/UserInfo.php
2024-05-06 13:24:25 +02:00

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;
}
}
}