diff options
-rw-r--r-- | inc/session-overview.inc.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/inc/session-overview.inc.php b/inc/session-overview.inc.php new file mode 100644 index 0000000..a6d46b8 --- /dev/null +++ b/inc/session-overview.inc.php @@ -0,0 +1,24 @@ +<?php + +$SESSION_DIR="/fast_scratch/simianer/lfpe/sessions"; +$json = file_get_contents($SESSION_DIR."/".$_GET["key"]."/data.json"); +$db = json_decode($json); + +$class = ""; +$i = 0; +foreach($db->raw_source_segments as $s) { + if (in_array($i, $db->docs)) { + $class = "doc_title"; + } else { + $class = ""; + } + $translation = ""; + if ($i < $db->progress) { + $translation = $db->post_edits_display[$i]; + } + echo "<tr class='".$class."' id='seg_".$i."'><td class='num'>".($i+1).".</td><td>".$s."</td><td class='seg_text' id='seg_".$i."_t'>".$translation."</td></tr>"; + $i += 1; +} + +?> + |