Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <?php
  2.  
  3. $length = count($xml->monitor) / 3
  4. $prevIndex = 0;
  5.  
  6. for($i = 0; $i <= $length; $i++){
  7.  
  8. echo '<div class="row">';
  9.  
  10. if($i == 0){
  11. $maxIndex = 1;
  12. }else{
  13. $maxIndex += 1;
  14. }
  15.  
  16. for($j = $prevIndex; $j < $maxIndex*3; $j++){
  17.  
  18. if($xml->monitor[$j] != null){
  19. echo '<div class="col span_4 box">';
  20. echo $xml->monitor[$j]['friendlyname'];
  21.  
  22. if ($xml->monitor[$j]['status'] == 2) {
  23. echo '<i class="fa fa-check tick"></i></div>';
  24. }
  25. elseif ($xml->monitor[$j]['status'] == 9) {
  26. echo '<i class="fa fa-times cross"></i></div>';
  27. }
  28. else {
  29. echo '<i class="fa fa-times cross"></i></div>';
  30. }
  31.  
  32. echo '</div>';
  33. }
  34. }
  35.  
  36. $prevIndex += 3;
  37.  
  38. echo "</div>";
  39.  
  40. }
  41.  
  42. echo '<div class="col span_4 box">Hinzufügen <i class="fa fa-plus add"></i></div>';
  43.  
  44. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement