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