warranty_report.php: indentation
authorDenis Ovsienko <infrastation@yandex.ru>
Sat, 7 Apr 2012 09:16:11 +0000 (13:16 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Sat, 7 Apr 2012 09:16:11 +0000 (13:16 +0400)
warranty_report.php

index 732577a..b0b3a29 100644 (file)
@@ -31,8 +31,8 @@ function scanAttrRelativeDays ($attr_id, $date_format, $not_before_days, $not_af
 
 function hwExpireReport ()
 {
-    global $nextorder;
-    addCSS ('
+       global $nextorder;
+       addCSS ('
 tr.has_problems_even {
 background-color: #ffa0a0;
 }
@@ -41,47 +41,47 @@ background-color: #ffd0d0;
 }
 ', TRUE);
 
-    $breakdown = array
-    (
-        array ('from' => -365, 'to' => 0, 'title' => 'HW warranty has expired'),
-        array ('from' => 0, 'to' => 30, 'title' => 'HW warranty expires within 30 days'),
-        array ('from' => 30, 'to' => 60, 'title' => 'HW warranty expires within 60 days'),
-        array ('from' => 60, 'to' => 90, 'title' => 'HW warranty expires within 90 days'),
-    );
-
-    foreach ($breakdown as $section)
-    {
-        $count = 0;
-       $result = scanAttrRelativeDays (22, '%m/%d/%Y', $section['from'], $section['to']);
-       if (! count ($result))
-               continue;
+       $breakdown = array
+       (
+               array ('from' => -365, 'to' => 0, 'title' => 'HW warranty has expired'),
+               array ('from' => 0, 'to' => 30, 'title' => 'HW warranty expires within 30 days'),
+               array ('from' => 30, 'to' => 60, 'title' => 'HW warranty expires within 60 days'),
+               array ('from' => 60, 'to' => 90, 'title' => 'HW warranty expires within 90 days'),
+       );
 
-       startPortlet ($section['title']);
-        echo "<table align=center width=60% border=0 cellpadding=5 cellspacing=0 align=center class=cooltable><tr valign=top>";
+       foreach ($breakdown as $section)
+       {
+               $count = 0;
+               $result = scanAttrRelativeDays (22, '%m/%d/%Y', $section['from'], $section['to']);
+               if (! count ($result))
+                       continue;
 
-        echo "<th align=center>Count</th>";
-        echo "<th align=center>Name</th>";
-        echo "<th align=center>Assett Tag</th>";
-        echo "<th align=center>Date Warranty <br> Expires</th>";
+               startPortlet ($section['title']);
+               echo "<table align=center width=60% border=0 cellpadding=5 cellspacing=0 align=center class=cooltable><tr valign=top>";
 
-        $order = 'odd';
-        while ($row = $result->fetch (PDO::FETCH_ASSOC))
-        {
-            if ($days == 0) {
-              echo "<tr class=has_problems_${order} valign=top>";
-            } else {
-              echo "<tr class=row_${order} valign=top>";
-            }
-            printf("<td>%s</td>", $count += 1);
-            echo "<td><a href='".makeHref(array('page'=>'object', 'object_id'=>$row['id']))."'>${row['name']}</a></td>";
-            printf("<td>%s</td>", $row['asset_no']);
-            printf("<td>%s</td>", $row['string_value']);
-            echo "</tr>\n";
-            $order = $nextorder[$order];
-        }
-        echo "</table>\n";
-       finishPortlet ();
-    }
+               echo "<th align=center>Count</th>";
+               echo "<th align=center>Name</th>";
+               echo "<th align=center>Assett Tag</th>";
+               echo "<th align=center>Date Warranty <br> Expires</th>";
 
+               $order = 'odd';
+               while ($row = $result->fetch (PDO::FETCH_ASSOC))
+               {
+                       if ($days == 0) {
+                               echo "<tr class=has_problems_${order} valign=top>";
+                       } else {
+                               echo "<tr class=row_${order} valign=top>";
+                       }
+                       printf("<td>%s</td>", $count += 1);
+                       echo "<td><a href='".makeHref(array('page'=>'object', 'object_id'=>$row['id']))."'>${row['name']}</a></td>";
+                       printf("<td>%s</td>", $row['asset_no']);
+                       printf("<td>%s</td>", $row['string_value']);
+                       echo "</tr>\n";
+                       $order = $nextorder[$order];
+               }
+               echo "</table>\n";
+               finishPortlet ();
+       }
 }
+
 ?>