Mercurial > hg > extraction-interface
annotate 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 |
rev | line source |
---|---|
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
1 <?php |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
2 include_once('Lib_mb_utf8.php'); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
3 include_once('config.php'); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
4 include_once('edit_section_db.php'); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
5 set_time_limit(0); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
6 ini_set('memory_limit', '-1'); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
7 |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
8 $link_mysql = mysql_connect($mysql_server, $mysql_user, $mysql_password); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
9 mysql_query("SET NAMES utf8"); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
10 |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
11 if (!$link_mysql) { |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
12 die('Could not connect: ' . mysql_error()); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
13 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
14 |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
15 $db_selected = mysql_select_db($mysql_database, $link_mysql); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
16 if (!$db_selected) { |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
17 die ('Can\'t use foo : ' . mysql_error()); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
18 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
19 function getBookInfo($bookId){ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
20 $query="SELECT * FROM books WHERE id=".$bookId; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
21 $result=mysql_query($query); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
22 $bookInfo=mysql_fetch_assoc($result); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
23 return $bookInfo; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
24 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
25 function printBookInfo($bookInfo){ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
26 $str="<table>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
27 $str.="<tr><td class='bookId'>book id |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
28 <td class='bookName'>book name |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
29 <td class='level1'>level1 |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
30 <td class='level2'>level2 |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
31 <td class='period'>period |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
32 <td class='bookId'>pages |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
33 <td class='bookId'>version |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
34 <td class='bookName'>last_editor |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
35 <td class='bookName'>date"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
36 $str.="<tr>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
37 $str.="<td>".$bookInfo['id']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
38 $str.="<td>".$bookInfo['name']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
39 $str.="<td>".$bookInfo['level1']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
40 $str.="<td>".$bookInfo['level2']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
41 $str.="<td>".$bookInfo['period']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
42 $str.="<td>".$bookInfo['line']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
43 $str.="<td>".$bookInfo['version']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
44 $str.="<td>".$bookInfo['editor']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
45 $str.="<td>".$bookInfo['date']; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
46 $str.="</table>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
47 echo $str; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
48 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
49 function printSectionArray($sectionArray,$missingPageArray){ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
50 $str="<div id='bookContainer'>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
51 echo $str; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
52 $i=0; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
53 foreach($sectionArray as $idx=>$row){ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
54 /* |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
55 $flag=""; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
56 if($i!=sizeof($pageArray) && $pageArray[$i]['start_page']==$row['start_page'] && $pageArray[$i]['end_page']==$row['end_page']){ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
57 $flag="overlapper"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
58 $i++; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
59 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
60 if($i!=0 && $pageArray[$i-1]['start_page']==$row['start_page'] && $pageArray[$i-1]['end_page']==$row['end_page']){ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
61 $flag="overlapper"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
62 }*/ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
63 if(!($idx!=0 && $sectionArray[$idx-1]['start_page']==$row['start_page'] && $sectionArray[$idx-1]['end_page']==$row['end_page']) |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
64 && $i<sizeof($missingPageArray) && $missingPageArray[$i]['end_page']==$row['start_page']){ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
65 $str="<div class='missingPageContainer'><div class='missingPage'>Missing pages: ".$missingPageArray[$i]['start_page']." - ".$missingPageArray[$i]['end_page']."</div></div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
66 //$str.="<br>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
67 $i++; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
68 echo $str; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
69 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
70 |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
71 $str="<div class='entry level".$row['level']." ".$row['flag']." ".$row['deleted']."'>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
72 $str.="<div class='hiddenInfo'>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
73 $str.="<div class='id'>".$row['id']."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
74 $str.="<div class='booksId'>".sprintf("%05d",$row['books_id'])."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
75 $str.="<div class='splitFrom'>".$row['split_from']."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
76 $str.="<div class='sectionAfter'>".$row['section_after']."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
77 $str.="</div>";//end of hiddenInfo |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
78 $str.="<div class='sequence'>".($idx+1)."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
79 $str.="<div class='name'>".$row['name']."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
80 $str.="<div class='page'>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
81 $str.="<div class='startPage'>".$row['start_page']."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
82 $str.=" - "; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
83 $str.="<div class='endPage'>".$row['end_page']."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
84 $str.="</div>";//end of page |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
85 $str.="</div>"; //end of class entry |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
86 echo $str; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
87 |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
88 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
89 if($i<sizeof($missingPageArray)){ |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
90 $str="<div class='missingPage'>Missing pages: ".$missingPageArray[$i]['start_page']." - ".$missingPageArray[$i]['end_page']."</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
91 echo $str; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
92 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
93 $str="</div>"; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
94 echo $str; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
95 } |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
96 |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
97 function show_history() { |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
98 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
99 } |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
100 |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
101 ?> |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
102 |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
103 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
104 <html> |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
105 <head> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
106 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
107 <link href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" type="text/css" rel="stylesheet"/> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
108 <!-- <link href="css/search.css" type="text/css" rel="stylesheet"/> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
109 --> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
110 <link href="css/check_sections.css" type="text/css" rel="stylesheet"/> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
111 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
112 <script src="js/check_sections_details.js" type="text/javascript"></script> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
113 <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js" type="text/javascript"></script> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
114 <!--<script src="js/check_sections.js" charset="utf-8"></script>!--> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
115 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
116 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
117 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
118 </head> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
119 <body> |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
120 <div id="loading">...</div> |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
121 <div id="container"> |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
122 <?php |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
123 $version=0; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
124 $editor=""; |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
125 $date=""; |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
126 if(isset($_GET['book_id']) && isset($_GET['count']) && is_numeric($_GET['count'])){ |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
127 $bookId=$_GET['book_id']; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
128 $count=$_GET['count']; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
129 $bookInfo=getBookInfo($bookId); |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
130 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
131 $info=checkSectionInfo($bookId); |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
132 $version=$info['version']; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
133 $editor=$info['editor']; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
134 $date=$info['date']; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
135 $bookInfo=array_merge($bookInfo,["version"=>$version,"editor"=>$editor,"date"=>$date]); |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
136 printBookInfo($bookInfo); |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
137 //echo "version: ".$version."<br>last editor: ".$editor; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
138 $missingPageArray=checkMissingPage($bookInfo,$info); |
2
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
1
diff
changeset
|
139 |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
140 ?> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
141 <table> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
142 <thead>Show editing record: |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
143 <button id="show_all">Show all</button> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
144 <button id="close">Close</button> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
145 </thead> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
146 <tbody> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
147 <tr> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
148 <td>Editor(version)</td> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
149 <td>Date/Time</td> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
150 </tr> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
151 <tr> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
152 <td><div id="editor"></div></td> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
153 <td><div id="date"></div></td> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
154 </tr> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
155 </tbody> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
156 </table> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
157 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
158 <div id="searchResults"> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
159 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
160 <?php |
2
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
1
diff
changeset
|
161 |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
162 $sectionArray=getSectionArray($bookId,$count,$info); |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
163 printSectionArray($sectionArray,$missingPageArray); |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
164 }else{ |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
165 echo "Cannot process the data due to incomplete input."; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
166 } |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
167 |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
168 ?> |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
169 </div> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
170 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
171 |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
172 </div> |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
173 <div id="panel"></div> |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
174 <script>var version=<?php echo $version;?>;</script> |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
175 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
176 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
177 <script type="text/javascript"> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
178 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
179 /* |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
180 document.getElementById("participator").onclick = function(){participator()}; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
181 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
182 function participator() { |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
183 document.getElementById("editor").innerHTML = 'some_one\'s_name('+1+')'; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
184 document.getElementById("date").innerHTML = Date()+"<br>"+"asdfasdf"+"<br>"+"asdfasdf"+"<br>"+"asdfasdf"; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
185 } |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
186 */ |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
187 document.getElementById("show_all").onclick = function(){showAll()}; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
188 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
189 function showAll() { |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
190 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
191 <?php |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
192 $editors = ""; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
193 $editing_time = ""; |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
194 |
7
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
195 $query_editor = "(SELECT editor, date, version from sections_versions WHERE books_id='".$bookId."' ORDER BY version DESC)"; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
196 $result = mysql_query($query_editor); |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
197 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
198 while ($row = mysql_fetch_assoc($result)) { |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
199 $editor = $row['editor']; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
200 $edit_time = $row['date']; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
201 $version = $row['version']; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
202 ?> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
203 document.getElementById("editor").innerHTML += '<?php echo $editor; ?>' +'('+'<?php echo $version;?>' +')<br>'; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
204 document.getElementById("date").innerHTML += '<?php echo $edit_time; ?>' + '<br>'; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
205 <?php |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
206 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
207 } |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
208 ?> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
209 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
210 } |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
211 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
212 document.getElementById("close").onclick = function(){closeAll()}; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
213 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
214 function closeAll() { |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
215 document.getElementById("editor").innerHTML = ""; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
216 document.getElementById("date").innerHTML = ""; |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
217 } |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
218 </script> |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
219 |
0e9a7c69f22c
add editing records/log into TOC correction list page, more editing records could be shown on the TOC page
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
4
diff
changeset
|
220 </body> |
2
da5309d54083
add missing books to sections as dummy entries for further modification.
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
1
diff
changeset
|
221 |
0
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
222 </html> |
b12c99b7c3f0
commit for previous development
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
223 |