function display_word_entry($w, $inflection_hidden = TRUE) { display_word_info($w); display_definitions($w); echo "<br>"; display_inflection($w, $inflection_hidden); }
foreach ($_GET as $k => $v) { if (!startswith($k, "delete_")) { continue; } if ($v != "true") { continue; } $id = explode("_", $k, 2)[1]; $id = intval($id); sql_exec(sql_stmt("form_id->delete from forms"), ["i", $id]); } $list = $db->find_all_words($_GET["name"], $_GET["lang"], $_GET["spart"]); foreach ($list as $w) { ?> <ul><?php display_word_info($w); ?> <br><?php $id = $w->id(); $w->read_paths(); foreach ($w->paths() as $path) { echo "<li>[" . $path->id() . "] ({$path})" . $path->value(); echo " <button onclick='moveloc(" . $path->id() . ")'>Delete</button><br>"; } ?> </ul><hr><?php } } else { $_GET["lang"] = "la"; $_GET["name"] = $_GET["spart"] = NULL; }
if ($limit > 50) { $limit = 50; } if (count($_GET)) { $max_size = NULL; $list = search_GET($limit, $max_size); foreach ($list as $w) { $id = $w->id(); ?> <hr><section id="word<?php echo $id; ?> "><?php $id2val = ""; $dependency = ""; display_word_info($w, $editor); display_definitions($w, $editor); if ($inflection) { display_inflection($w); } if ($editor) { ?> <div id="word<?php echo $id; ?> _edit_button"><br> <?php display_icon("edit", "Edit"); ?> </div> <div id="word<?php
$_GET["spart"] = NULL; } foreach ($_GET as $k => $v) { if (!startswith($k, "delete_")) { continue; } if ($v != "true") { continue; } $id = explode("_", $k, 2)[1]; $id = intval($id); sql_exec(sql_stmt("form_id->delete from forms"), ["i", $id]); } $list = $db->find_all_words($_GET["name"], $_GET["lang"], $_GET["spart"]); foreach ($list as $w) { display_word_info($w, true); ?> <table class="inflection expansive"><tr><th class="rightline">ID</th><th class="rightline">Path</th><th class="rightline">Value</th><th class="rightline">Formatted</th><th>Delete</th></tr><?php $id = $w->id(); $w->read_paths(); $paths = $w->paths(); $d; //$paths = [$paths[0],$paths[1]]; usort($paths, function ($a, $b) use(&$d) { $d = $a->mgr(); foreach ($d->all_sub_keys as $k) { $aa = $a->key_value($k) ? $d->value_index($a->key_value($k)) : NULL; $bb = $b->key_value($k) ? $d->value_index($b->key_value($k)) : NULL; if ($aa !== NULL) { if ($bb !== NULL) { if ($aa > $bb) {