Mercurial > hg > LGToc
comparison check_sections.php @ 4:373c8ecad8b4
deploy to development server
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 24 Mar 2015 11:32:31 +0100 |
parents | 1f9d2bfe1d13 |
children | 7e04cbe8b2a0 |
comparison
equal
deleted
inserted
replaced
3:5d0bfd909857 | 4:373c8ecad8b4 |
---|---|
1 <?php | 1 <?php |
2 include_once('Lib_mb_utf8.php'); | 2 include_once('config/Lib_mb_utf8.php'); |
3 include_once('config.php'); | 3 include_once('config/config.php'); |
4 include_once('edit_section_db.php'); | 4 include_once('edit_section_db.php'); |
5 set_time_limit(0); | 5 set_time_limit(0); |
6 ini_set('memory_limit', '-1'); | 6 ini_set('memory_limit', '-1'); |
7 | 7 |
8 $link_mysql = mysql_connect($mysql_server, $mysql_user, $mysql_password); | 8 $link_mysql = mysql_connect($mysql_server, $mysql_user, $mysql_password); |
76 WHERE deleted=0 | 76 WHERE deleted=0 |
77 GROUP BY books_id, versions_id,start_page, end_page | 77 GROUP BY books_id, versions_id,start_page, end_page |
78 HAVING COUNT( * ) >=".$count.") | 78 HAVING COUNT( * ) >=".$count.") |
79 ORDER BY count DESC "; | 79 ORDER BY count DESC "; |
80 */ | 80 */ |
81 $query="(SELECT books.name AS book_name, books.level1, books.level2, books.period, books.id, sections.name, start_page, end_page, COUNT( * ) AS count | 81 $query="(SELECT books.name AS book_name, books.level1, books.level2, books.period, books.id, sections_index.name, start_page, end_page, COUNT( * ) AS count |
82 FROM sections_index | 82 FROM sections_index |
83 JOIN books ON sections_index.books_id = books.id | 83 JOIN books ON sections_index.books_id = books.id |
84 WHERE NOT EXISTS | 84 WHERE NOT EXISTS |
85 (SELECT 1 FROM sections_versions WHERE books_id=sections_index.books_id) | 85 (SELECT 1 FROM sections_versions WHERE books_id=sections_index.books_id) |
86 GROUP BY books_id, start_page, end_page | 86 GROUP BY books_id, start_page, end_page |
97 WHERE deleted=0 | 97 WHERE deleted=0 |
98 GROUP BY books_id, versions_id,start_page, end_page | 98 GROUP BY books_id, versions_id,start_page, end_page |
99 HAVING COUNT( * ) >=".$count.") | 99 HAVING COUNT( * ) >=".$count.") |
100 ORDER BY count DESC "; | 100 ORDER BY count DESC "; |
101 $result = mysql_query($query); | 101 $result = mysql_query($query); |
102 if (!$result) { | |
103 echo mysql_error(); | |
104 return; | |
105 } | |
102 echo mysql_num_rows($result)." result(s)<br><br>"; | 106 echo mysql_num_rows($result)." result(s)<br><br>"; |
103 echo "<table>"; | 107 echo "<table>"; |
104 echo "<tr>"; | 108 echo "<tr>"; |
105 echo "<td class='bookName'>book name<td class='level1'>level1<td class='level2'>level2<td class='period'>period<td class='sectionName'>section name<td class='sectionName'>page<td class='page'>count"; | 109 echo "<td class='bookName'>book name<td class='level1'>level1<td class='level2'>level2<td class='period'>period<td class='sectionName'>section name<td class='sectionName'>page<td class='page'>count"; |
106 while ($row = mysql_fetch_assoc($result)) { | 110 while ($row = mysql_fetch_assoc($result)) { |
193 | 197 |
194 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | 198 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
195 <html> | 199 <html> |
196 <head> | 200 <head> |
197 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | 201 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
198 <link href="css/search.css" type="text/css" rel="stylesheet"/> | 202 <!-- <link href="css/search.css" type="text/css" rel="stylesheet"/> --> |
199 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> | 203 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> |
200 <!--<script src="js/check_sections.js" charset="utf-8"></script>!--> | 204 <!--<script src="js/check_sections.js" charset="utf-8"></script>!--> |
201 </head> | 205 </head> |
202 <body> | 206 <body> |
203 <form action='check_sections.php' method='GET'> | 207 <form action='check_sections.php' method='GET'> |