function loadJupes() { $res = db_query('select * from os_jupes order by jupe_id asc'); while ($row = mysql_fetch_assoc($res)) { $jupe = new DB_Jupe($row); if ($jupe->isExpired()) { $jupe->delete(); continue; } $jupe_key = strtolower($jupe->getServer()); $this->db_jupes[$jupe_key] = $jupe; $this->addJupe($jupe->getServer(), $jupe->getRemainingSecs(), $jupe->getSetTs(), $jupe->getLastMod(), $jupe->getReason(), $jupe->isActive()); } debugf('Loaded %d jupes.', count($this->db_jupes)); }