Added banned FCPs to preordercampaign

This commit is contained in:
Frank Schubert
2023-10-18 13:42:32 +02:00
parent ac3685371f
commit cd22605b64
14 changed files with 720 additions and 7 deletions

View File

@@ -85,11 +85,30 @@ class AddressDB {
}
}
}
public function getAllFcpNames($netzgebiet_id) {
$fcps = [];
if($netzgebiet_id) {
$res = $this->db->query("SELECT rimo_fcp_name FROM `Hausnummer` WHERE netzgebiet_id=$netzgebiet_id GROUP BY rimo_fcp_name ORDER BY LENGTH(rimo_fcp_name), rimo_fcp_name");
} else {
$res = $this->db->query("SELECT rimo_fcp_name FROM `Hausnummer` WHERE GROUP BY rimo_fcp_name ORDER BY rimo_fcp_name");
}
if($this->db->num_rows($res)) {
while($data = $this->db->fetch_object($res)) {
if($data->rimo_fcp_name) {
$fcps[] = $data->rimo_fcp_name;
}
}
}
$fcps = array_unique($fcps);
return $fcps;
}
/*
* methods to create or update an Address from strings
*/
public function createUpdateHausnummer($data) {
$netzgebiet_id = 0;
$netzgebiet = null;