Mercurial > hg > extraction-interface
comparison develop/views/Extractapp/ExportTable.php @ 36:e078e1500cc2 extractapp
config for localgazetteers-dev
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 06 Mar 2015 14:13:18 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
35:04736430d961 | 36:e078e1500cc2 |
---|---|
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 ?> | |
12 | |
13 <html> | |
14 <head> | |
15 <title></title> | |
16 | |
17 </head> | |
18 | |
19 <body> | |
20 <table width="100%" border="1" id="tableMain"> | |
21 | |
22 <?php | |
23 $count=1; | |
24 foreach ( $outputTableArray as $trIndex =>$trValue ) { | |
25 echo "<tr>"; | |
26 if ( $trIndex==0 ) { | |
27 echo "<td>#</td>"; | |
28 echo "<td>Book ID</td>"; | |
29 echo "<td>Section ID</td>"; | |
30 echo "<td>方志</td>"; | |
31 echo "<td>部</td>"; | |
32 } else { | |
33 echo "<td>".$count++."</td>"; | |
34 echo "<td>".$bookId."</td>"; | |
35 echo "<td>".$sectionid."</td>"; | |
36 echo "<td>".$bookName."</td>"; | |
37 echo "<td>".$sectionName."</td>"; | |
38 } | |
39 if ( isset( $trValue["page"] ) ) { | |
40 echo "<td>".$trValue["page"]."</td>"; | |
41 } else { | |
42 echo "<td> </td>"; | |
43 } | |
44 /* | |
45 foreach ( $outputTableArray[0][1] as $index => $value ) { | |
46 if ( isset( $trValue[1][$index] ) ) { | |
47 echo "<td>".$trValue[1][$index]."</td>"; | |
48 } else { | |
49 echo "<td> </td>"; | |
50 } | |
51 } | |
52 */ | |
53 foreach ( $outputTableArray[0][0] as $index => $value ) { | |
54 if ( $index == "time" ) { | |
55 if ( isset( $trValue[0][$index] ) ) { | |
56 echo "<td>".$trValue[0][$index]."</td>"; | |
57 echo "<td>".$trValue[0][$index]."</td>"; | |
58 } else { | |
59 echo "<td> </td>"; | |
60 echo "<td> </td>"; | |
61 } | |
62 } else { | |
63 if ( isset( $trValue[0][$index] ) ) { | |
64 echo "<td>".$trValue[0][$index]."</td>"; | |
65 } else { | |
66 echo "<td> </td>"; | |
67 } | |
68 } | |
69 } | |
70 if ( isset( $trValue["other"] ) ) { | |
71 echo "<td>".$trValue["other"]."</td>"; | |
72 } else { | |
73 echo "<td> </td>"; | |
74 } | |
75 if ( isset( $trValue["full"] ) ) { | |
76 echo "<td>".$trValue["full"]."</td>"; | |
77 } else { | |
78 echo "<td> </td>"; | |
79 } | |
80 echo "</tr>"; | |
81 } | |
82 ?> | |
83 </table> | |
84 </body> | |
85 </html> |