Mercurial > hg > extraction-interface
view views/Extractapp/ExportTable.php @ 61:c6fa7f83c5bf extractapp
New: 1.display messages(style) 2.handle saving conflict:up-to-date or reload text
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 31 Mar 2015 12:34:57 +0200 |
parents | 886f43b26ee2 |
children | 97c1e5102a22 |
line wrap: on
line source
<?php // --- initialize --- $outputTableArray = $viewmodel['outputTableArray']; $bookId = $viewmodel['bookId']; $sectionid = $viewmodel['section_id']; $bookName = $viewmodel['bookName']; $sectionName = $viewmodel['sectionName']; ?> <html> <head> <title></title> </head> <body> <table width="100%" border="1" id="tableMain"> <?php $count=1; foreach ( $outputTableArray as $trIndex =>$trValue ) { echo "<tr>"; if ( $trIndex==0 ) { echo "<td>#</td>"; echo "<td>Book ID</td>"; echo "<td>Section ID</td>"; echo "<td>方志</td>"; echo "<td>部</td>"; } else { echo "<td>".$count++."</td>"; echo "<td>".$bookId."</td>"; echo "<td>".$sectionid."</td>"; echo "<td>".$bookName."</td>"; echo "<td>".$sectionName."</td>"; } if ( isset( $trValue["page"] ) ) { echo "<td>".$trValue["page"]."</td>"; } else { echo "<td> </td>"; } /* foreach ( $outputTableArray[0][1] as $index => $value ) { if ( isset( $trValue[1][$index] ) ) { echo "<td>".$trValue[1][$index]."</td>"; } else { echo "<td> </td>"; } } */ foreach ( $outputTableArray[0][0] as $index => $value ) { if ( $index == "time" ) { if ( isset( $trValue[0][$index] ) ) { echo "<td>".$trValue[0][$index]."</td>"; echo "<td>".$trValue[0][$index]."</td>"; } else { echo "<td> </td>"; echo "<td> </td>"; } } else { if ( isset( $trValue[0][$index] ) ) { echo "<td>".$trValue[0][$index]."</td>"; } else { echo "<td> </td>"; } } } if ( isset( $trValue["other"] ) ) { echo "<td>".$trValue["other"]."</td>"; } else { echo "<td> </td>"; } if ( isset( $trValue["full"] ) ) { echo "<td>".$trValue["full"]."</td>"; } else { echo "<td> </td>"; } echo "</tr>"; } ?> </table> </body> </html>