Mercurial > hg > extraction-interface
comparison develop/views/Extractapp/exporttable.php @ 6:63e08b98032f
rewrite extraction interface into PHP MVC architecture.
(Although js hasn't been rewritten into MVC, it's fitted into the current PHP MVC architecture.)
- The root of the new PHP MVC is at 'develop/'.
- extraction interface is called "Extractapp" with several action, eg TaggingText, EditWordlist, EditTaglist, ExportTable.
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Thu, 05 Feb 2015 16:07:53 +0100 |
| parents | |
| children | cc36a20a68ab |
comparison
equal
deleted
inserted
replaced
| 5:cbbb7ef22394 | 6:63e08b98032f |
|---|---|
| 1 <?php | |
| 2 // --- initialize --- | |
| 3 $outputTableArray = $viewmodel['outputTableArray']; | |
| 4 $bookId = $viewmodel['bookId']; | |
| 5 $sectionid = $viewmodel['section_id']; | |
| 6 $bookName = $viewmodel['bookName']; | |
| 7 $sectionName = $viewmodel['sectionName']; | |
| 8 | |
| 9 ?> | |
| 10 | |
| 11 <html> | |
| 12 <head> | |
| 13 <title></title> | |
| 14 | |
| 15 </head> | |
| 16 | |
| 17 <body> | |
| 18 <table width="100%" border="1" id="tableMain"> | |
| 19 | |
| 20 <?php | |
| 21 $count=1; | |
| 22 foreach ( $outputTableArray as $trIndex =>$trValue ) { | |
| 23 echo "<tr>"; | |
| 24 if ( $trIndex==0 ) { | |
| 25 echo "<td>#</td>"; | |
| 26 echo "<td>Book ID</td>"; | |
| 27 echo "<td>Section ID</td>"; | |
| 28 echo "<td>方志</td>"; | |
| 29 echo "<td>部</td>"; | |
| 30 } else { | |
| 31 echo "<td>".$count++."</td>"; | |
| 32 echo "<td>".$bookId."</td>"; | |
| 33 echo "<td>".$sectionid."</td>"; | |
| 34 echo "<td>".$bookName."</td>"; | |
| 35 echo "<td>".$sectionName."</td>"; | |
| 36 } | |
| 37 if ( isset( $trValue["page"] ) ) { | |
| 38 echo "<td>".$trValue["page"]."</td>"; | |
| 39 } else { | |
| 40 echo "<td> </td>"; | |
| 41 } | |
| 42 /* | |
| 43 foreach ( $outputTableArray[0][1] as $index => $value ) { | |
| 44 if ( isset( $trValue[1][$index] ) ) { | |
| 45 echo "<td>".$trValue[1][$index]."</td>"; | |
| 46 } else { | |
| 47 echo "<td> </td>"; | |
| 48 } | |
| 49 } | |
| 50 */ | |
| 51 foreach ( $outputTableArray[0][0] as $index => $value ) { | |
| 52 if ( $index == "time" ) { | |
| 53 if ( isset( $trValue[0][$index] ) ) { | |
| 54 echo "<td>".$trValue[0][$index]."</td>"; | |
| 55 echo "<td>".$trValue[0][$index]."</td>"; | |
| 56 } else { | |
| 57 echo "<td> </td>"; | |
| 58 echo "<td> </td>"; | |
| 59 } | |
| 60 } else { | |
| 61 if ( isset( $trValue[0][$index] ) ) { | |
| 62 echo "<td>".$trValue[0][$index]."</td>"; | |
| 63 } else { | |
| 64 echo "<td> </td>"; | |
| 65 } | |
| 66 } | |
| 67 } | |
| 68 if ( isset( $trValue["other"] ) ) { | |
| 69 echo "<td>".$trValue["other"]."</td>"; | |
| 70 } else { | |
| 71 echo "<td> </td>"; | |
| 72 } | |
| 73 if ( isset( $trValue["full"] ) ) { | |
| 74 echo "<td>".$trValue["full"]."</td>"; | |
| 75 } else { | |
| 76 echo "<td> </td>"; | |
| 77 } | |
| 78 echo "</tr>"; | |
| 79 } | |
| 80 ?> | |
| 81 </table> | |
| 82 </body> | |
| 83 </html> |
