diff options
author | Patrick Simianer <p@simianer.de> | 2016-01-29 18:18:37 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-01-29 18:18:37 +0100 |
commit | 458ca8335981489fffdc0fd932bacf53547a1404 (patch) | |
tree | eb4cb657fa5047a856dcc3f77474169a80e2701d /inc/session-overview.inc.php | |
parent | 1bf6a41d4ee778d4490ace2e43f1c5aae9d596c9 (diff) |
interface.php: ext. session-overview
Diffstat (limited to 'inc/session-overview.inc.php')
-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; +} + +?> + |