Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $length = count($xml->monitor) / 3
- $prevIndex = 0;
- for($i = 0; $i <= $length; $i++){
- echo '<div class="row">';
- if($i == 0){
- $maxIndex = 1;
- }else{
- $maxIndex += 1;
- }
- for($j = $prevIndex; $j < $maxIndex*3; $j++){
- if($xml->monitor[$j] != null){
- echo '<div class="col span_4 box">';
- echo $xml->monitor[$j]['friendlyname'];
- if ($xml->monitor[$j]['status'] == 2) {
- echo '<i class="fa fa-check tick"></i></div>';
- }
- elseif ($xml->monitor[$j]['status'] == 9) {
- echo '<i class="fa fa-times cross"></i></div>';
- }
- else {
- echo '<i class="fa fa-times cross"></i></div>';
- }
- echo '</div>';
- }
- }
- $prevIndex += 3;
- echo "</div>";
- }
- echo '<div class="col span_4 box">Hinzufügen <i class="fa fa-plus add"></i></div>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement