~ihris+uganda/ihris-uganda/ahpc-qualify

« back to all changes in this revision

Viewing changes to cron/cache_reports.php

  • Committer: Luke Duncan
  • Date: 2012-05-15 09:48:17 UTC
  • Revision ID: lduncan@intrahealth.org-20120515094817-1utkver8qqadaj6e
Updated cron cache reports script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
    <h1>$name</h1>
97
97
    <h2>$desc</h2>
98
98
    <h3>Report generated on: $date_str</h3>
 
99
    <h3>Total Rows: ROW_COUNT</h3>
99
100
 
100
101
    <div id="report_table">
101
102
        
102
103
    <table class="customReportsTable">
103
104
      <tr>
 
105
        <th>#</th>
104
106
 
105
107
START2;
106
108
  
115
117
    $output_str .= "      </tr>\n";
116
118
 
117
119
    $rows = $qry->query( "//reportData/dataRow" );
 
120
    $rowCount = 0;
118
121
    foreach( $rows as $row ) {
119
122
        $output_str .= "      <tr>\n";
 
123
        $rowCount++;
 
124
        $output_str .= "        <td>$rowCount</td>\n";
120
125
        foreach( $headers as $name => $value ) {
121
126
            $text = $qry->query( "dataElement[@name='$name']", $row )->item(0)->nodeValue;
122
127
            $output_str .= "        <td>$text</td>\n";
123
128
        }
124
129
        $output_str .= "      </tr>\n";
125
130
    }
 
131
    $output_str = str_replace("ROW_COUNT", $rowCount, $output_str );
126
132
 
127
133
 
128
134
    $output_str .= <<<FINISH