Mercurial > hg > extraction-interface
comparison interface/check_sections_details.php @ 7:0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
| author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
|---|---|
| date | Fri, 06 Feb 2015 09:44:17 +0100 |
| parents | 883ad980a43b |
| children | da10158c6d0a |
comparison
equal
deleted
inserted
replaced
| 6:63e08b98032f | 7:0e9a7c69f22c |
|---|---|
| 29 <td class='level1'>level1 | 29 <td class='level1'>level1 |
| 30 <td class='level2'>level2 | 30 <td class='level2'>level2 |
| 31 <td class='period'>period | 31 <td class='period'>period |
| 32 <td class='bookId'>pages | 32 <td class='bookId'>pages |
| 33 <td class='bookId'>version | 33 <td class='bookId'>version |
| 34 <td class='bookName'>editor | 34 <td class='bookName'>last_editor |
| 35 <td class='bookName'>date"; | 35 <td class='bookName'>date"; |
| 36 $str.="<tr>"; | 36 $str.="<tr>"; |
| 37 $str.="<td>".$bookInfo['id']; | 37 $str.="<td>".$bookInfo['id']; |
| 38 $str.="<td>".$bookInfo['name']; | 38 $str.="<td>".$bookInfo['name']; |
| 39 $str.="<td>".$bookInfo['level1']; | 39 $str.="<td>".$bookInfo['level1']; |
| 92 } | 92 } |
| 93 $str="</div>"; | 93 $str="</div>"; |
| 94 echo $str; | 94 echo $str; |
| 95 } | 95 } |
| 96 | 96 |
| 97 function show_history() { | |
| 98 | |
| 99 } | |
| 100 | |
| 97 ?> | 101 ?> |
| 98 | 102 |
| 99 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | 103 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 100 <html> | 104 <html> |
| 101 <head> | 105 <head> |
| 102 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | 106 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| 103 <link href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" type="text/css" rel="stylesheet"/> | 107 <link href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" type="text/css" rel="stylesheet"/> |
| 104 <!-- <link href="css/search.css" type="text/css" rel="stylesheet"/> | 108 <!-- <link href="css/search.css" type="text/css" rel="stylesheet"/> |
| 105 --> | 109 --> |
| 106 <link href="css/check_sections.css" type="text/css" rel="stylesheet"/> | 110 <link href="css/check_sections.css" type="text/css" rel="stylesheet"/> |
| 107 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> | 111 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> |
| 108 <script src="js/check_sections_details.js" type="text/javascript"></script> | 112 <script src="js/check_sections_details.js" type="text/javascript"></script> |
| 109 <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js" type="text/javascript"></script> | 113 <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js" type="text/javascript"></script> |
| 110 <!--<script src="js/check_sections.js" charset="utf-8"></script>!--> | 114 <!--<script src="js/check_sections.js" charset="utf-8"></script>!--> |
| 111 </head> | 115 |
| 112 <body> | 116 |
| 117 | |
| 118 </head> | |
| 119 <body> | |
| 113 <div id="loading">...</div> | 120 <div id="loading">...</div> |
| 114 <div id="container"> | 121 <div id="container"> |
| 115 <?php | 122 <?php |
| 116 $version=0; | 123 $version=0; |
| 117 $editor=""; | 124 $editor=""; |
| 118 $date=""; | 125 $date=""; |
| 119 if(isset($_GET['book_id']) && isset($_GET['count']) && is_numeric($_GET['count'])){ | 126 if(isset($_GET['book_id']) && isset($_GET['count']) && is_numeric($_GET['count'])){ |
| 120 $bookId=$_GET['book_id']; | 127 $bookId=$_GET['book_id']; |
| 121 $count=$_GET['count']; | 128 $count=$_GET['count']; |
| 122 $bookInfo=getBookInfo($bookId); | 129 $bookInfo=getBookInfo($bookId); |
| 123 | 130 |
| 124 $info=checkSectionInfo($bookId); | 131 $info=checkSectionInfo($bookId); |
| 125 $version=$info['version']; | 132 $version=$info['version']; |
| 126 $editor=$info['editor']; | 133 $editor=$info['editor']; |
| 127 $date=$info['date']; | 134 $date=$info['date']; |
| 128 $bookInfo=array_merge($bookInfo,["version"=>$version,"editor"=>$editor,"date"=>$date]); | 135 $bookInfo=array_merge($bookInfo,["version"=>$version,"editor"=>$editor,"date"=>$date]); |
| 129 printBookInfo($bookInfo); | 136 printBookInfo($bookInfo); |
| 130 //echo "version: ".$version."<br>last editor: ".$editor; | 137 //echo "version: ".$version."<br>last editor: ".$editor; |
| 131 $missingPageArray=checkMissingPage($bookInfo,$info); | 138 $missingPageArray=checkMissingPage($bookInfo,$info); |
| 132 ?> | 139 |
| 133 <div id="searchResults"> | 140 ?> |
| 134 <?php | 141 <table> |
| 142 <thead>Show editing record: | |
| 143 <button id="show_all">Show all</button> | |
| 144 <button id="close">Close</button> | |
| 145 </thead> | |
| 146 <tbody> | |
| 147 <tr> | |
| 148 <td>Editor(version)</td> | |
| 149 <td>Date/Time</td> | |
| 150 </tr> | |
| 151 <tr> | |
| 152 <td><div id="editor"></div></td> | |
| 153 <td><div id="date"></div></td> | |
| 154 </tr> | |
| 155 </tbody> | |
| 156 </table> | |
| 157 | |
| 158 <div id="searchResults"> | |
| 159 | |
| 160 <?php | |
| 135 | 161 |
| 136 $sectionArray=getSectionArray($bookId,$count,$info); | 162 $sectionArray=getSectionArray($bookId,$count,$info); |
| 137 printSectionArray($sectionArray,$missingPageArray); | 163 printSectionArray($sectionArray,$missingPageArray); |
| 138 }else{ | 164 }else{ |
| 139 echo "Cannot process the data due to incomplete input."; | 165 echo "Cannot process the data due to incomplete input."; |
| 140 } | 166 } |
| 167 | |
| 141 ?> | 168 ?> |
| 142 </div> | 169 </div> |
| 170 | |
| 171 | |
| 143 </div> | 172 </div> |
| 144 <div id="panel"></div> | 173 <div id="panel"></div> |
| 145 <script>var version=<?php echo $version;?>;</script> | 174 <script>var version=<?php echo $version;?>;</script> |
| 146 </body> | 175 |
| 147 | 176 |
| 177 <script type="text/javascript"> | |
| 178 | |
| 179 /* | |
| 180 document.getElementById("participator").onclick = function(){participator()}; | |
| 181 | |
| 182 function participator() { | |
| 183 document.getElementById("editor").innerHTML = 'some_one\'s_name('+1+')'; | |
| 184 document.getElementById("date").innerHTML = Date()+"<br>"+"asdfasdf"+"<br>"+"asdfasdf"+"<br>"+"asdfasdf"; | |
| 185 } | |
| 186 */ | |
| 187 document.getElementById("show_all").onclick = function(){showAll()}; | |
| 188 | |
| 189 function showAll() { | |
| 190 | |
| 191 <?php | |
| 192 $editors = ""; | |
| 193 $editing_time = ""; | |
| 194 | |
| 195 $query_editor = "(SELECT editor, date, version from sections_versions WHERE books_id='".$bookId."' ORDER BY version DESC)"; | |
| 196 $result = mysql_query($query_editor); | |
| 197 | |
| 198 while ($row = mysql_fetch_assoc($result)) { | |
| 199 $editor = $row['editor']; | |
| 200 $edit_time = $row['date']; | |
| 201 $version = $row['version']; | |
| 202 ?> | |
| 203 document.getElementById("editor").innerHTML += '<?php echo $editor; ?>' +'('+'<?php echo $version;?>' +')<br>'; | |
| 204 document.getElementById("date").innerHTML += '<?php echo $edit_time; ?>' + '<br>'; | |
| 205 <?php | |
| 206 | |
| 207 } | |
| 208 ?> | |
| 209 | |
| 210 } | |
| 211 | |
| 212 document.getElementById("close").onclick = function(){closeAll()}; | |
| 213 | |
| 214 function closeAll() { | |
| 215 document.getElementById("editor").innerHTML = ""; | |
| 216 document.getElementById("date").innerHTML = ""; | |
| 217 } | |
| 218 </script> | |
| 219 | |
| 220 </body> | |
| 148 | 221 |
| 149 </html> | 222 </html> |
| 150 | 223 |
