Fixed php short tags

This commit is contained in:
laf
2016-05-02 18:43:06 +00:00
parent 5fe37edfb3
commit f3ee9dcc2e
6 changed files with 33 additions and 33 deletions

View File

@@ -39,7 +39,7 @@ if (is_admin() !== false) {
<div class="modal-body"> <div class="modal-body">
<form method="post" role="form" id="service" class="form-horizontal service-form"> <form method="post" role="form" id="service" class="form-horizontal service-form">
<input type="hidden" name="service_id" id="service_id" value=""> <input type="hidden" name="service_id" id="service_id" value="">
<input type="hidden" name="device_id" id="device_id" value="<?=$device['device_id']?>"> <input type="hidden" name="device_id" id="device_id" value="<?php echo $device['device_id']?>">
<input type="hidden" name="type" id="type" value="create-service"> <input type="hidden" name="type" id="type" value="create-service">
<div class="form-service"> <div class="form-service">
<div class="col-sm-12"> <div class="col-sm-12">
@@ -50,7 +50,7 @@ if (is_admin() !== false) {
<label for='stype' class='col-sm-3 control-label'>Type: </label> <label for='stype' class='col-sm-3 control-label'>Type: </label>
<div class="col-sm-9"> <div class="col-sm-9">
<select id='stype' name='stype' placeholder='type' class='form-control has-feedback'> <select id='stype' name='stype' placeholder='type' class='form-control has-feedback'>
<?=$stype?> <?php echo $stype?>
</select> </select>
</div> </div>
</div> </div>
@@ -63,7 +63,7 @@ if (is_admin() !== false) {
<div class="form-service"> <div class="form-service">
<label for='ip' class='col-sm-3 control-label'>IP Address: </label> <label for='ip' class='col-sm-3 control-label'>IP Address: </label>
<div class="col-sm-9"> <div class="col-sm-9">
<input type='text' id='ip' name='ip' class='form-control has-feedback' placeholder='<?=$device['hostname']?>'/> <input type='text' id='ip' name='ip' class='form-control has-feedback' placeholder='<?php echo $device['hostname']?>'/>
</div> </div>
</div> </div>
<div class="form-service"> <div class="form-service">

View File

@@ -28,17 +28,17 @@ if ($services['total']) {
</div> </div>
<table class="table table-hover table-condensed table-striped"> <table class="table table-hover table-condensed table-striped">
<tr> <tr>
<td title="Total"><img src='images/16/cog.png'> <?=$services['total']?></td> <td title="Total"><img src='images/16/cog.png'> <?php echo $services['total']?></td>
<td title="Status - Ok"><img src='images/16/cog_add.png'> <?=$services[0]?></td> <td title="Status - Ok"><img src='images/16/cog_add.png'> <?php echo $services[0]?></td>
<td title="Status - Warning"><img src='images/16/cog_error.png'> <?=$services[1]?></td> <td title="Status - Warning"><img src='images/16/cog_error.png'> <?php echo $services[1]?></td>
<td title="Status - Critical"><img src='images/16/cog_delete.png'> <?=$services[2]?></td> <td title="Status - Critical"><img src='images/16/cog_delete.png'> <?php echo $services[2]?></td>
</tr> </tr>
<tr> <tr>
<td colspan='4'><?=$string?></td> <td colspan='4'><?php echo $string?></td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
<?php <?php
} }

View File

@@ -28,8 +28,8 @@ foreach ($components as $oid => $overlay) {
$gli = "list-group-item-danger"; $gli = "list-group-item-danger";
} }
?> ?>
<a class="list-group-item <?=$gli?>" data-toggle="collapse" data-target="#<?=$overlay['index']?>" data-parent="#overlays"><?=$overlay['label']?> - <?=$overlay['transport']?> <?=$overlay_status?></a> <a class="list-group-item <?php echo $gli?>" data-toggle="collapse" data-target="#<?php echo $overlay['index']?>" data-parent="#overlays"><?php echo $overlay['label']?> - <?php echo $overlay['transport']?> <?php echo $overlay_status?></a>
<div id="<?=$overlay['index']?>" class="sublinks collapse"> <div id="<?php echo $overlay['index']?>" class="sublinks collapse">
<?php <?php
foreach ($components as $aid => $adjacency) { foreach ($components as $aid => $adjacency) {
if (($adjacency['otvtype'] == 'adjacency') && ($adjacency['index'] == $overlay['index'])) { if (($adjacency['otvtype'] == 'adjacency') && ($adjacency['index'] == $overlay['index'])) {
@@ -42,7 +42,7 @@ foreach ($components as $oid => $overlay) {
$gli = "list-group-item-danger"; $gli = "list-group-item-danger";
} }
?> ?>
<a class="list-group-item <?=$gli?> small"><span class="glyphicon glyphicon-chevron-right"></span> <?=$adjacency['label']?> - <?=$adjacency['endpoint']?> <?=$adj_status?></a> <a class="list-group-item <?php echo $gli?> small"><span class="glyphicon glyphicon-chevron-right"></span> <?php echo $adjacency['label']?> - <?php echo $adjacency['endpoint']?> <?php echo $adj_status?></a>
<?php <?php
} }
} }

View File

@@ -64,20 +64,20 @@ if (count($services) > '0') {
$status = "<span class='grey'>Unknown</span>"; $status = "<span class='grey'>Unknown</span>";
} }
?> ?>
<tr id="row_<?=$service['service_id']?>"> <tr id="row_<?php echo $service['service_id']?>">
<td> <td>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="col-sm-2"><?=$service['service_type']?></div> <div class="col-sm-2"><?php echo $service['service_type']?></div>
<div class="col-sm-6"><?=$service['service_desc']?></div> <div class="col-sm-6"><?php echo $service['service_desc']?></div>
<div class="col-sm-2"><?=$status?></div> <div class="col-sm-2"><?php echo $status?></div>
<div class="pull-right"> <div class="pull-right">
<button type='button' class='btn btn-primary btn-sm' aria-label='Edit' data-toggle='modal' data-target='#create-service' data-service_id='<?=$service['service_id']?>' name='edit-service'><span class='glyphicon glyphicon-pencil' aria-hidden='true'></span></button> <button type='button' class='btn btn-primary btn-sm' aria-label='Edit' data-toggle='modal' data-target='#create-service' data-service_id='<?php echo $service['service_id']?>' name='edit-service'><span class='glyphicon glyphicon-pencil' aria-hidden='true'></span></button>
<button type='button' class='btn btn-danger btn-sm' aria-label='Delete' data-toggle='modal' data-target='#confirm-delete' data-service_id='<?=$service['service_id']?>' name='delete-service'><span class='glyphicon glyphicon-trash' aria-hidden='true'></span></button> <button type='button' class='btn btn-danger btn-sm' aria-label='Delete' data-toggle='modal' data-target='#confirm-delete' data-service_id='<?php echo $service['service_id']?>' name='delete-service'><span class='glyphicon glyphicon-trash' aria-hidden='true'></span></button>
</div> </div>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<div class="col-sm-8"><?=nl2br(trim($service['service_message']))?></div> <div class="col-sm-8"><?php echo nl2br(trim($service['service_message']))?></div>
<div class="col-sm-4"><?=formatUptime(time() - $service['service_changed'])?></div> <div class="col-sm-4"><?php echo formatUptime(time() - $service['service_changed'])?></div>
</div> </div>
<?php <?php
if ($vars['view'] == 'details') { if ($vars['view'] == 'details') {

View File

@@ -10,9 +10,9 @@ $COMPONENTS = $COMPONENT->getComponents(null,$options);
foreach ($COMPONENTS as $DEVICE_ID => $COMP) { foreach ($COMPONENTS as $DEVICE_ID => $COMP) {
$LINK = generate_url(array('page' => 'device', 'device' => $DEVICE_ID, 'tab' => 'routing', 'proto' => 'cisco-otv')); $LINK = generate_url(array('page' => 'device', 'device' => $DEVICE_ID, 'tab' => 'routing', 'proto' => 'cisco-otv'));
?> ?>
<div class="panel panel-default" id="overlays-<?=$DEVICE_ID?>"> <div class="panel panel-default" id="overlays-<?php echo $DEVICE_ID?>">
<div class="panel-heading"> <div class="panel-heading">
<h3 class="panel-title"><a href="<?=$LINK?>"><?=gethostbyid($DEVICE_ID)?> - Overlay's & Adjacencies</a></h3> <h3 class="panel-title"><a href="<?php echo $LINK?>"><?php echo gethostbyid($DEVICE_ID)?> - Overlay's & Adjacencies</a></h3>
</div> </div>
<div class="panel list-group"> <div class="panel list-group">
<?php <?php
@@ -28,8 +28,8 @@ foreach ($COMPONENTS as $DEVICE_ID => $COMP) {
$GLI = "list-group-item-danger"; $GLI = "list-group-item-danger";
} }
?> ?>
<a class="list-group-item <?=$GLI?>" data-toggle="collapse" data-target="#<?=$OVERLAY['index']?>" data-parent="#overlays-<?=$DEVICE_ID?>"><?=$OVERLAY['label']?> - <?=$OVERLAY['transport']?> <?=$OVERLAY_STATUS?></a> <a class="list-group-item <?php echo $GLI?>" data-toggle="collapse" data-target="#<?php echo $OVERLAY['index']?>" data-parent="#overlays-<?php echo $DEVICE_ID?>"><?php echo $OVERLAY['label']?> - <?php echo $OVERLAY['transport']?> <?php echo $OVERLAY_STATUS?></a>
<div id="<?=$OVERLAY['index']?>" class="sublinks collapse"> <div id="<?php echo $OVERLAY['index']?>" class="sublinks collapse">
<?php <?php
foreach ($COMP as $AID => $ADJACENCY) { foreach ($COMP as $AID => $ADJACENCY) {
if (($ADJACENCY['otvtype'] == 'adjacency') && ($ADJACENCY['index'] == $OVERLAY['index'])) { if (($ADJACENCY['otvtype'] == 'adjacency') && ($ADJACENCY['index'] == $OVERLAY['index'])) {
@@ -42,7 +42,7 @@ foreach ($COMPONENTS as $DEVICE_ID => $COMP) {
$GLI = "list-group-item-danger"; $GLI = "list-group-item-danger";
} }
?> ?>
<a class="list-group-item <?=$GLI?> small"><span class="glyphicon glyphicon-chevron-right"></span> <?=$ADJACENCY['label']?> - <?=$ADJACENCY['endpoint']?> <?=$ADJ_STATUS?></a> <a class="list-group-item <?php echo $GLI?> small"><span class="glyphicon glyphicon-chevron-right"></span> <?php echo $ADJACENCY['label']?> - <?php echo $ADJACENCY['endpoint']?> <?php echo $ADJ_STATUS?></a>
<?php <?php
} }
} }

View File

@@ -133,15 +133,15 @@ foreach (dbFetchRows($host_sql, $host_par) as $device) {
$status = "<span class='grey'><b>".$service['service_type']."</b></span>"; $status = "<span class='grey'><b>".$service['service_type']."</b></span>";
} }
?> ?>
<tr id="row_<?=$service['service_id']?>"> <tr id="row_<?php echo $service['service_id']?>">
<td><?=$devlink?></td> <td><?php echo $devlink?></td>
<td><?=$status?></td> <td><?php echo $status?></td>
<td><?=formatUptime(time() - $service['service_changed'])?></td> <td><?php echo formatUptime(time() - $service['service_changed'])?></td>
<td><span class='box-desc'><?=nl2br(trim($service['service_message']))?></span></td> <td><span class='box-desc'><?php echo nl2br(trim($service['service_message']))?></span></td>
<td><span class='box-desc'><?=nl2br(trim($service['service_desc']))?></span></td> <td><span class='box-desc'><?php echo nl2br(trim($service['service_desc']))?></span></td>
<td> <td>
<button type='button' class='btn btn-primary btn-sm' aria-label='Edit' data-toggle='modal' data-target='#create-service' data-service_id='<?=$service['service_id']?>' name='edit-service'><span class='glyphicon glyphicon-pencil' aria-hidden='true'></span></button> <button type='button' class='btn btn-primary btn-sm' aria-label='Edit' data-toggle='modal' data-target='#create-service' data-service_id='<?php echo $service['service_id']?>' name='edit-service'><span class='glyphicon glyphicon-pencil' aria-hidden='true'></span></button>
<button type='button' class='btn btn-danger btn-sm' aria-label='Delete' data-toggle='modal' data-target='#confirm-delete' data-service_id='<?=$service['service_id']?>' name='delete-service'><span class='glyphicon glyphicon-trash' aria-hidden='true'></span></button> <button type='button' class='btn btn-danger btn-sm' aria-label='Delete' data-toggle='modal' data-target='#confirm-delete' data-service_id='<?php echo $service['service_id']?>' name='delete-service'><span class='glyphicon glyphicon-trash' aria-hidden='true'></span></button>
</td> </td>
</tr> </tr>
<?php <?php