Faserplanung

* Kabelverzeichnis Updates
This commit is contained in:
Daniel Spitzer
2024-06-30 14:26:57 +02:00
parent 0f5711ede0
commit edae9b9061
4 changed files with 37 additions and 21 deletions

View File

@@ -4,6 +4,7 @@ class FiberPlanCableModel
{
private $description;
private $fibers;
private $diameter;
private $fiberPlanPipe_id;
private $fiberPlanPipe_sub;
@@ -25,6 +26,7 @@ class FiberPlanCableModel
private $network_id;
private $comment;
public static $fibersArray = array(1 => 4, 2 => 12, 3 => 24, 4 => 24, 5 => 48, 6 => 96, 7 => 144, 8 => 144, 9 => 192, 10 => 288);
public static function find($data)
{
@@ -153,27 +155,27 @@ class FiberPlanCableModel
$res = $db->query($sql);
if ($db->num_rows($res)) {
while ($data = $db->fetch_object($res)) {
$ok=0;
$ok = 0;
$FiberplanPipeEndpoint = new FiberPlanPipeEndpoint($data);
if ($data->fiberPlanDispatcher_id) {
if ($FiberplanPipeEndpoint->fiberPlanDispatcher->network_id == $network_id) {
$ok=1;
$ok = 1;
}
}
if ($data->building_id) {
if ($FiberplanPipeEndpoint->building->network_id == $network_id) {
$ok=1;
$ok = 1;
}
}
if ($data->pop_id) {
$sql = "SELECT id FROM PopNetwork WHERE pop_id='" . $data->pop_id . "' AND network_id='" . $network_id . "'";
$result = $db->query($sql);
if ($db->num_rows($result)) {
$ok=1;
$ok = 1;
}
}
if ($ok==1) {
if ($ok == 1) {
$items[$FiberplanPipeEndpoint->fiberPlanPipe_id]['description'] = $FiberplanPipeEndpoint->fiberPlanPipe->description;
$items[$FiberplanPipeEndpoint->fiberPlanPipe_id]['id'] = $FiberplanPipeEndpoint->fiberPlanPipe_id;
}