comparison views/Extractapp/ExportTable.php @ 47:886f43b26ee2 extractapp

move/remove develop folder
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 17 Mar 2015 10:54:13 +0100
parents
children 97c1e5102a22
comparison
equal deleted inserted replaced
46:b3ca5d2b4d3f 47:886f43b26ee2
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>&nbsp;</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>&nbsp;</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>&nbsp;</td>";
60 echo "<td>&nbsp;</td>";
61 }
62 } else {
63 if ( isset( $trValue[0][$index] ) ) {
64 echo "<td>".$trValue[0][$index]."</td>";
65 } else {
66 echo "<td>&nbsp;</td>";
67 }
68 }
69 }
70 if ( isset( $trValue["other"] ) ) {
71 echo "<td>".$trValue["other"]."</td>";
72 } else {
73 echo "<td>&nbsp;</td>";
74 }
75 if ( isset( $trValue["full"] ) ) {
76 echo "<td>".$trValue["full"]."</td>";
77 } else {
78 echo "<td>&nbsp;</td>";
79 }
80 echo "</tr>";
81 }
82 ?>
83 </table>
84 </body>
85 </html>