203 lines
12 KiB
PHP
203 lines
12 KiB
PHP
<?php
|
|
$fibersOption[1] = "1x4";
|
|
$fibersOption[2] = "1x12";
|
|
$fibersOption[3] = "1x24";
|
|
$fibersOption[4] = "2x12";
|
|
$fibersOption[5] = "4x12";
|
|
$fibersOption[6] = "8x12";
|
|
$fibersOption[7] = "6x24";
|
|
$fibersOption[8] = "12x12";
|
|
$fibersOption[9] = "8x24";
|
|
$fibersOption[10] = "12x24";
|
|
$stateOption[10] = "Geplant";
|
|
$stateOption[20] = "Umsetzung";
|
|
$stateOption[30] = "Fertiggestellt";
|
|
$responsibleOption[1] = "(F)";
|
|
$responsibleOption[2] = "(P)";
|
|
|
|
|
|
foreach ($lineworkeraddresses as $lineworkeraddress):
|
|
$Lineworker[$lineworkeraddress->id] = $lineworkeraddress->company;
|
|
|
|
endforeach;
|
|
|
|
|
|
foreach ($networks as $network):
|
|
$Networks[$network->id] = $network->name;
|
|
|
|
endforeach;
|
|
|
|
foreach ($fiberplanpipemanufacturers as $fiberplanpipemanufacturer) {
|
|
$colors = json_decode($fiberplanpipemanufacturer->colors, true);
|
|
$pipemanufacturercolors[$fiberplanpipemanufacturer->id]['colors'] = $colors;
|
|
}
|
|
foreach ($fiberplanpipes as $fiberplanpipe) {
|
|
$fiberPlanPipe[$fiberplanpipe->id]['description'] = $fiberplanpipe->description;
|
|
$fiberPlanPipe[$fiberplanpipe->id]['type'] = $fiberplanpipe->type;
|
|
$fiberPlanPipe[$fiberplanpipe->id]['type_description'] = $fiberplanpipe->type_description;
|
|
$fiberPlanPipe[$fiberplanpipe->id]['startpoint_network_id'] = $fiberplanpipe->startpoint_network_id;
|
|
$fiberPlanPipe[$fiberplanpipe->id]['endpoint_network_id'] = $fiberplanpipe->endpoint_network_id;
|
|
$fiberPlanPipe[$fiberplanpipe->id]['fiberPlanPipeManufacturer_id'] = $fiberplanpipe->fiberPlanPipeManufacturer_id;
|
|
$fiberPlanPipe[$fiberplanpipe->id]['pipe7x4'] = $fiberplanpipe->pipe7x4;
|
|
$fiberPlanPipe[$fiberplanpipe->id]['pipe14x10'] = $fiberplanpipe->pipe14x10;
|
|
}
|
|
?>
|
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
|
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
|
type="text/css"/>
|
|
<!-- start page title -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="page-title-box">
|
|
<div class="page-title-right">
|
|
<ol class="breadcrumb m-0">
|
|
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a>
|
|
</li>
|
|
<li class="breadcrumb-item active">Kabelverzeichnis</li>
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title">Kabelverzeichnis</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
|
|
<div class="card">
|
|
<div class="card-body mb-3">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="float-left">
|
|
<h4 class="header-title">Liste aller Kabelverzeichnis</h4>
|
|
</div>
|
|
<div class="float-right">
|
|
<a class="btn btn-primary mb-2" href="<?= self::getUrl("FiberPlanCable", "add") ?>"><i
|
|
class="fas fa-plus"></i> Neues Kabel anlegen</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table id="datatable" class="table table-striped table-hover table-sm font-13">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center">Bezeichnung</th>
|
|
<th class="text-center">Fasern / Dm.</th>
|
|
<th class="text-center">Netzgebiet(e)</th>
|
|
<th class="text-center " style=" white-space: nowrap;">Verwendete(s) Rohr(e)</th>
|
|
<th class="text-center ">Länge (M)</th>
|
|
<th class="text-center">Zuständig</th>
|
|
<th class="text-center">Status</th>
|
|
<th class="edit-width"></th>
|
|
</tr>
|
|
<tr id="filterrow">
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($fiberplancables as $fiberplancable):
|
|
if ($fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['startpoint_network_id'] == $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['endpoint_network_id']) {
|
|
$networkName = $Networks[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['startpoint_network_id']];
|
|
} else {
|
|
$networkName = $Networks[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['startpoint_network_id']] . " / " . $Networks[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['endpoint_network_id']];
|
|
}
|
|
if ($fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['type'] == "3") {
|
|
if ($fiberplancable->fiberPlanPipe_sub <= $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4'] && $fiberplancable->fiberPlanPipe_sub <= 12) {
|
|
$color = $pipemanufacturercolors[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['fiberPlanPipeManufacturer_id']]['colors'][$fiberplancable->fiberPlanPipe_sub - 1]['color'];
|
|
$striped = "";
|
|
$height = "10px";
|
|
$title = $pipemanufacturercolors[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['fiberPlanPipeManufacturer_id']]['colors'][$fiberplancable->fiberPlanPipe_sub - 1]['colordescription'];
|
|
$description = '7x4 ';
|
|
} else if ($fiberplancable->fiberPlanPipe_sub <= $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4'] && $fiberplancable->fiberPlanPipe_sub > 12) {
|
|
$striped = 'style="background-color: #000;height: 100%;width: 45%;text-align: center;margin-left: auto;margin-right: auto;"';
|
|
$color = $pipemanufacturercolors[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['fiberPlanPipeManufacturer_id']]['colors'][$fiberplancable->fiberPlanPipe_sub - 13]['color'];
|
|
$height = "10px";
|
|
$title = $pipemanufacturercolors[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['fiberPlanPipeManufacturer_id']]['colors'][$fiberplancable->fiberPlanPipe_sub - 13]['colordescstriped'];
|
|
$description = '7x4 ';
|
|
} else if ($fiberplancable->fiberPlanPipe_sub - $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4'] <= $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe14x10'] && $fiberplancable->fiberPlanPipe_sub - $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4'] <= 12) {
|
|
$color = $pipemanufacturercolors[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['fiberPlanPipeManufacturer_id']]['colors'][$fiberplancable->fiberPlanPipe_sub - 1 - $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4']]['color'];
|
|
$striped = "";
|
|
$height = "12px";
|
|
$title = $pipemanufacturercolors[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['fiberPlanPipeManufacturer_id']]['colors'][$fiberplancable->fiberPlanPipe_sub - 1 - $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4']]['colordescription'];
|
|
$description = '14x10 ';
|
|
} else if ($fiberplancable->fiberPlanPipe_sub - $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4'] <= $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe14x10'] && $fiberplancable->fiberPlanPipe_sub - $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4'] > 12) {
|
|
$color = $pipemanufacturercolors[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['fiberPlanPipeManufacturer_id']]['colors'][$fiberplancable->fiberPlanPipe_sub - 13 - $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4']]['color'];
|
|
$striped = 'style="background-color: #000;height: 100%;width: 45%;text-align: center;margin-left: auto;margin-right: auto;"';
|
|
$height = "12px";
|
|
$title = $pipemanufacturercolors[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['fiberPlanPipeManufacturer_id']]['colors'][$fiberplancable->fiberPlanPipe_sub - 13 - $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['pipe7x4']]['colordescstriped'];
|
|
$description = '14x10 ';
|
|
}
|
|
if ($color == "#ffffff" || $color == "#ffff01" || $color == "#01ffff") {
|
|
$border = 'border:1px solid #9d9d9d;';
|
|
} else {
|
|
$border = "";
|
|
}
|
|
|
|
$subPipe = '<div style="display:inline-block; text-align: left; width: 90px;"><div title="' . $title . '" style="display:inline-block;height:' . $height . ';width: 50px;margin-top:5px;border-radius: 14px;background-color:' . $color . ';' . $border . '"><div ' . $striped . '></div></div><span style="margin-right:3px;margin-left:3px; font-size:11px;margin-top:3px" >' . $description . '</span><span style="display: none">' . $title . ' </span></div>';
|
|
} else {
|
|
$subPipe = '<div style="display:inline-block; text-align: left; width: 90px;">' . $type_descrition_definition[$fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['type_description']] . ' </div>';
|
|
}
|
|
|
|
|
|
$responsible=$responsibleOption[$fiberplancable->responsible];
|
|
if ($fiberplancable->address_id)
|
|
{
|
|
$responsible.=" ".$Lineworker[$fiberplancable->address_id];
|
|
if ($fiberplancable->responsible_text)
|
|
{
|
|
$responsible.=" (".$fiberplancable->responsible_text.")";
|
|
}
|
|
} else if ($fiberplancable->responsible_text)
|
|
{
|
|
$responsible.=" ".$fiberplancable->responsible_text;
|
|
}
|
|
|
|
?>
|
|
<tr>
|
|
<td><a href="<?= self::getUrl("FiberPlanCable", "Detail", ["id" => $fiberplancable->id]) ?>"><?= $fiberplancable->description ?></a></td>
|
|
<td class="text-center"><?= $fibersOption[$fiberplancable->fibers] . " / " . $fiberplancable->diameter." mm" ?>
|
|
|
|
</td>
|
|
<td><?= $networkName; ?></td>
|
|
<td style=" white-space: nowrap;"><?= $subPipe . $fiberPlanPipe[$fiberplancable->fiberPlanPipe_id]['description'] ?></td>
|
|
|
|
<td class="text-center"><?= $fiberplancable->lenght ?></td>
|
|
<td><?= $responsible ?></td>
|
|
<td><?= $stateOption[$fiberplancable->state] ?></td>
|
|
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
|
<a href="<?= self::getUrl("FiberPlanCable", "edit", ["id" => $fiberplancable->id]) ?>"><i
|
|
class="far fa-edit" title="Bearbeiten"></i></a>
|
|
<a href="<?= self::getUrl("FiberPlanCable", "delete", ["id" => $fiberplancable->id]) ?>"
|
|
onclick="if(!confirm('Kabelverzeichnis wirklich löschen?')) return false;"
|
|
class="text-danger"
|
|
title="Löschen"><i class="fas fa-trash"></i></a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
var hidesearch = [1,4,7];
|
|
var columnfilter = [6];
|
|
var columnoptions='<option class="text-left" value="">Alle</option><option class="text-left" value="Geplant">Geplant</option><option class="text-left" value="Umsetzung">Umsetzung</option><option class="text-left" value="Fertiggestellt">Fertiggestellt</option>';
|
|
$(document).ready(function () {
|
|
|
|
});
|
|
</script>
|
|
<script type="text/javascript"
|
|
src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
|
|
|
|
|
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|