Mercurial > hg > extraction-interface
comparison interface/check_sections.php @ 1:ef6d0c6a13d7
(1)Add 'sort_by' time entry in main page. (check_sections.php)
Modify check_sections_details page to have level3 option.
(2)Modify map to have default dataset loaded.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 21 Jan 2015 10:49:44 +0100 |
parents | b12c99b7c3f0 |
children | 883ad980a43b |
comparison
equal
deleted
inserted
replaced
0:b12c99b7c3f0 | 1:ef6d0c6a13d7 |
---|---|
64 echo $str; | 64 echo $str; |
65 } | 65 } |
66 echo "</table>"; | 66 echo "</table>"; |
67 } | 67 } |
68 | 68 |
69 | |
70 // sorting by the $sort_by parameter | |
71 function checkSections_sort_by($sort_by){ | |
72 switch ($sort_by) { | |
73 case 'time': | |
74 $query="(SELECT name AS book_name,level1,level2,period,start_year,id from books ORDER BY start_year)"; | |
75 $result = mysql_query($query); | |
76 echo mysql_num_rows($result)." result(s)<br><br>"; | |
77 echo "<table>"; | |
78 echo "<tr>"; | |
79 echo "<td class='bookName'>book name<td class='level1'>level1<td class='level2'>level2<td class='period'>period<td class='start_year'>start_year"; | |
80 while ($row = mysql_fetch_assoc($result)) { | |
81 $str="<tr>"; | |
82 $str.="<td>".$row['book_name']; | |
83 $str.="<td>".$row['level1']; | |
84 $str.="<td>".$row['level2']; | |
85 $str.="<td>".$row['period']; | |
86 $str.="<td>".$row['start_year']; | |
87 $str.="<td><a href='check_sections_details.php?book_id=".$row['id']."&count=100"."' target='_blank'>"."click here"."</a>"; | |
88 echo $str; | |
89 } | |
90 echo "</table>"; | |
91 break; | |
92 | |
93 default: | |
94 # code... | |
95 echo "no sorting parameter set"; | |
96 break; | |
97 } | |
98 } | |
99 | |
69 ?> | 100 ?> |
101 | |
102 | |
70 | 103 |
71 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | 104 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
72 <html> | 105 <html> |
73 <head> | 106 <head> |
74 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | 107 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
85 <div id="search_result"> | 118 <div id="search_result"> |
86 <?php | 119 <?php |
87 if(isset($_GET['find']) && $_GET['count']!='' && is_numeric($_GET['count'])){ | 120 if(isset($_GET['find']) && $_GET['count']!='' && is_numeric($_GET['count'])){ |
88 checkSections($_GET['count']); | 121 checkSections($_GET['count']); |
89 } | 122 } |
123 else if(isset($_GET['sort_by'])){ | |
124 checkSections_sort_by($_GET['sort_by']); | |
125 } | |
90 ?> | 126 ?> |
91 </div> | 127 </div> |
92 </body> | 128 </body> |
93 </html> | 129 </html> |
94 | 130 |