258 lines
16 KiB
PHP
258 lines
16 KiB
PHP
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
|
|
|
<!-- 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")?>">the-tool</a></li>
|
|
<li class="breadcrumb-item active">CPE Provisioning</li>
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title">CPE Provisioning</h4>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title -->
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
|
|
|
|
|
|
|
|
<div class="card">
|
|
<div class="card-body mb-3">
|
|
<div class="float-left">
|
|
<h4 class="header-title">CPE Provisioning</h4>
|
|
</div>
|
|
|
|
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
|
<nav>
|
|
<ul class="pagination justify-content-center mb-1">
|
|
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
|
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
|
</li>
|
|
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
|
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
|
</li>
|
|
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
|
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
|
<?php endfor; ?>
|
|
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
|
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
|
</li>
|
|
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
|
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<?php endif; ?>
|
|
<div class="pagination justify-content-center">
|
|
<?php if($pagination['maxItems']): ?>
|
|
Zu provisionierende CPEs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
|
<?php else: ?>
|
|
Keine CPEs zum provisionieren gefunden
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<table class="table">
|
|
<?php $prov_count = 0; ?>
|
|
<?php foreach($products as $product): ?>
|
|
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> bottom-no-border">
|
|
<th>Netzgebiet</th>
|
|
<th>Service PIN</th>
|
|
<th>Kunde</th>
|
|
<th>Produkt</th>
|
|
<th>Access Type</th>
|
|
<th>VLANs</th>
|
|
<th></th>
|
|
</tr>
|
|
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> top-no-border">
|
|
<td><?=($product->termination_id) ? $product->termination->building->network->name : $product->order->owner->zip." ".$product->order->owner->city?></td>
|
|
<td class="text-pink"><?=$product->order->owner->spin?></td>
|
|
<td><?=$product->order->owner->getCompanyOrName()?></td>
|
|
<td><?=$product->product->name?></td>
|
|
<td><?=$product->product->attributes['bras_type']->value?></td>
|
|
<td class="text-monospace">
|
|
<?php if($product->termination_id): ?>
|
|
<label class="order-date-pill active pointer">Public: <strong><?=$product->termination->building->pop->vlan_public?></strong> <input type="checkbox" name="router_vlan_public" /></label>
|
|
<label class="order-date-pill active pointer">NAT: <strong><?=$product->termination->building->pop->vlan_nat?></strong> <input type="checkbox" name="router_vlan_nat" /></label>
|
|
<label class="order-date-pill active pointer">IPv6: <strong><?=$product->termination->building->pop->vlan_ipv6?></strong> <input type="checkbox" name="router_vlan_ipv6" /></label>
|
|
<?php else: ?>
|
|
<label class="order-date-pill active pointer">Public: <strong><?=$product->product->attributes['vlan_default_public']->value?></strong> <input type="checkbox" name="router_vlan_public" /></label>
|
|
<label class="order-date-pill active pointer">NAT: <strong><?=$product->product->attributes['vlan_default_nat']->value?></strong> <input type="checkbox" name="router_vlan_nat" /></label>
|
|
<label class="order-date-pill active pointer">IPv6: <strong><?=$product->product->attributes['vlan_default_ipv6']->value?></strong> <input type="checkbox" name="router_vlan_ipv6" /></label>
|
|
<?php endif; ?>
|
|
</td>
|
|
<td style="font-size: 18px; cursor:pointer; min-width: 180px;">
|
|
<?php
|
|
|
|
$vot = false;
|
|
$hw = false;
|
|
$voip = false;
|
|
foreach($product->order->products as $prod) {
|
|
if(is_array($prod->product->attributes) && count($prod->product->attributes)) {
|
|
if(array_key_exists("hw_only", $prod->product->attributes)) {
|
|
if($prod->product->attributes["hw_only"]->value) {
|
|
$hw = true;
|
|
}
|
|
}
|
|
if(array_key_exists("voip_chan", $prod->product->attributes)) {
|
|
if($prod->product->attributes["voip_chan"]->value) {
|
|
$voip = true;
|
|
}
|
|
}
|
|
if(array_key_exists("vot", $prod->product->attributes)) {
|
|
if($prod->product->attributes["vot"]->value) {
|
|
$vot = true;
|
|
}
|
|
}
|
|
if($hw && $voip_chan) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
<?=($vot) ? "<i class='fas fa-tools text-info mr-2' title='Vorortinstallation'></i>" : ""?>
|
|
<?=($hw) ? "<i class='fas fa-shopping-bag text-info mr-2' title='Zusatzprodukt vorhanden'></i>" : ""?>
|
|
<?=($voip) ? "<i class='fas fa-phone text-info mr-2' title='Voice Produkt vorhanden'></i>" : ""?>
|
|
<?=($product->order->note) ? "<i class='fas fa-clipboard-list text-info' title='Kommentar: ".str_replace('"', '"', $product->order->note)."'></i>" : ""?>
|
|
</td>
|
|
</tr>
|
|
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> ">
|
|
<td colspan="6">
|
|
|
|
<div class="row">
|
|
<div class="col-md-2">
|
|
|
|
<div class="form-group">
|
|
<label for="router_type-<?=$product->id?>">Router</label>
|
|
<select class="form-control" name="router_type" id="router_type-<?=$product->id?>">
|
|
<option></option>
|
|
<option value="eigener Router">Eigener Router</option>
|
|
<option value="anderes CPE">Anderes CPE</option>
|
|
<?php if(preg_match('/^(pppoe|dhcp)$/', $product->product->attributes['bras_type']->value)): ?>
|
|
<option value="TP-Link Archer C80">TP-Link Archer C80 (Inet, IPTV)</option>
|
|
<option value="FritzBox 4040">FritzBox 4040 (Inet, IPTV)</option>
|
|
<option value="FritzBox 7530">FritzBox 7530 (Inet, Phone, IPTV)</option>
|
|
<option value="FritzBox 7590">FritzBox 7590 (Inet, Phone, IPTV)</option>
|
|
<?php elseif($product->product->attributes['bras_type']->value = "static"): ?>
|
|
<option value="Mikrotik HAP AC">Mikrotik HAP AC (Inet, IPTV)</option>
|
|
<option value="Mikrotik HEX S">Mikrotik HEX S (Inet, IPTV)</option>
|
|
<option value="Mikrotik RB3011">Mikrotik RB3011 (Inet, IPTV)</option>
|
|
<?php elseif($product->product->attributes['bras_type']->value == "cmts"): ?>
|
|
<option value="FritzBox 6490 Cable">FritzBox 6490 Cable (Inet, Phone, IPTV)</option>
|
|
<?php endif; ?>
|
|
</select>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
|
<div class="form-group text-center">
|
|
<label class="form-label" for="router_wifi_ssid-<?=$product->id?>">WLAN SSID</label>
|
|
<input class="form-control" type="text" name="router_wifi_ssid" id="router_wifi_ssid-<?=$product->id?>" value="" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
|
<div class="form-group">
|
|
<label class="form-label" for="router_wifi_pass-<?=$product->id?>">WLAN Passwort</label>
|
|
<input class="form-control" type="text" name="router_wifi_pass" id="router_wifi_pass-<?=$product->id?>" value="" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
|
<div class="form-group text-center">
|
|
<label class="form-label" for="create_shipment_task-<?=$product->id?>">Versandauftrag</label>
|
|
<input class="form-control" type="checkbox" value="1" name="create_shipment_task" id="create_shipment_task-<?=$product->id?>" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-1">
|
|
<div class="form-group">
|
|
<label class="form-label" for="ship_weight-<?=$product->id?>">Gewicht</label>
|
|
<input class="form-control" type="text" name="ship_weight" id="ship_weight-<?=$product->id?>" value="" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
|
</div>
|
|
</div>
|
|
<div class="col-md-1">
|
|
<div class="form-group">
|
|
<label class="form-label" for="ship_length-<?=$product->id?>">Länge</label>
|
|
<input class="form-control" type="text" name="ship_length" id="ship_length-<?=$product->id?>" value="" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
|
</div>
|
|
</div>
|
|
<div class="col-md-1">
|
|
<div class="form-group">
|
|
<label class="form-label" for="ship_width-<?=$product->id?>">Breite</label>
|
|
<input class="form-control" type="text" name="ship_width" id="ship_width-<?=$product->id?>" value="" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
|
</div>
|
|
</div>
|
|
<div class="col-md-1">
|
|
<div class="form-group">
|
|
<label class="form-label" for="ship_height-<?=$product->id?>">Höhe</label>
|
|
<input class="form-control" type="text" name="ship_height" id="ship_height-<?=$product->id?>" value="" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
|
<div class="form-group text-center">
|
|
<label class="form-label text-success" for="routerconfig_finished-<?=$product->id?>">Routerkonfig <i class="fas fa-check"></i></label>
|
|
<input class="form-control" type="checkbox" value="1" name="routerconfig_finished" id="routerconfig_finished-<?=$product->id?>" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
|
<div class="form-group">
|
|
<label class="form-label"> </label>
|
|
<button class="form-control btn btn-primary" type="submit"><i class="fas fa-save"></i> Speichern</button>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
<?php $prov_count++ ?>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
|
|
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
|
<nav>
|
|
<ul class="pagination justify-content-center mb-1">
|
|
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
|
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
|
</li>
|
|
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
|
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
|
</li>
|
|
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
|
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
|
<?php endfor; ?>
|
|
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
|
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
|
</li>
|
|
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
|
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<?php endif; ?>
|
|
<div class="pagination justify-content-center">
|
|
<?php if($pagination['maxItems']): ?>
|
|
Zu provisionierende CPEs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
|
<?php else: ?>
|
|
Keine CPEs zum provisionieren gefunden
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|