# HG changeset patch # User Zoe Hong # Date 1423481289 -3600 # Node ID da10158c6d0a0dc8aa41cd2f9400f6d05527db9b # Parent 0e9a7c69f22c60f09e6de8677d5fb35170875083 add toc_correction status in books table. On TOC correction list page, providing the status checking box for users. diff -r 0e9a7c69f22c -r da10158c6d0a develop/index.php --- a/develop/index.php Fri Feb 06 09:44:17 2015 +0100 +++ b/develop/index.php Mon Feb 09 12:28:09 2015 +0100 @@ -2,10 +2,16 @@ + - + + + + + + -
"; - echo mysql_num_rows($result)." result(s)

"; - echo ""; - echo ""; - echo ""; - $str.="
book namelevel1level2perioddynastystart_year"; - while ($row = mysql_fetch_assoc($result)) { - $str="
".$row['book_name']; - $str.="".$row['level1']; - $str.="".$row['level2']; - $str.="".$row['period']; - $str.="".$row['dynasty']; - $str.="".$row['start_year']; - $str.=""."click here".""; - echo $str; - } - echo "
"; - break; - - case 'time': - $query="(SELECT name AS book_name,level1,level2,period,dynasty,start_year,id from books ORDER BY start_year)"; - $result = mysql_query($query); - if (!$result){ - echo ("Failed during selecting books table."); - } - - - echo mysql_num_rows($result)." result(s)

"; + echo "
"; echo ""; echo ""; echo "
book namelevel1level2 perioddynastystart_yearlast_editoredit_time"; @@ -116,7 +117,8 @@ $str.="".$row['period']; $str.="".$row['dynasty']; $str.="".$row['start_year']; - + $id = $row['id']; + // query last_editor and last_edit_time $query_editor = "(SELECT editor, date from sections_versions WHERE books_id='".$row['id']."' ORDER BY version DESC)"; $row_sections_versions = mysql_fetch_assoc(mysql_query($query_editor)); // the first one @@ -126,9 +128,33 @@ $str.="".$last_edit_time; $str.=""."click here".""; + + //$str.=" NotFinished"; + switch ($row['toc_correction']) { + case '0': + $str.=" Not Finished"; + $str.=" Works-in-progress"; + $str.=" Finished"; + break; + case '1': + $str.=" Not Finished"; + $str.=" Works-in-progress"; + $str.=" Finished"; + break; + case '2': + $str.=" Not Finished"; + $str.=" Works-in-progress"; + $str.=" Finished"; + break; + + default: + break; + } + echo $str; } echo "
"; + echo "
"; break; default: @@ -168,5 +194,58 @@ ?> + + + + + + + + diff -r 0e9a7c69f22c -r da10158c6d0a interface/check_sections_details.php --- a/interface/check_sections_details.php Fri Feb 06 09:44:17 2015 +0100 +++ b/interface/check_sections_details.php Mon Feb 09 12:28:09 2015 +0100 @@ -113,8 +113,7 @@ - - +
...
@@ -139,14 +138,14 @@ ?> - Show editing record: + Show editing records: - - + + @@ -187,6 +186,8 @@ document.getElementById("show_all").onclick = function(){showAll()}; function showAll() { + document.getElementById("editor_th").innerHTML = "Editor(version)"; + document.getElementById("date_th").innerHTML = "Date/Time";
Editor(version)Date/Time