コード例 #1
0
ファイル: lib_dict.php プロジェクト: ayunah/opencorpora
function get_all_forms_by_lemma_text($lemma)
{
    $lemmata = get_dict_search_results(array('search_lemma' => $lemma));
    $forms = array($lemma);
    foreach ($lemmata['lemma']['found'] as $l) {
        $forms = array_merge($forms, get_all_forms_by_lemma_id($l['id']));
    }
    return array_unique($forms);
}
コード例 #2
0
ファイル: dict.php プロジェクト: ayunah/opencorpora
     header("Location:dict.php?act=edit&id=" . $_POST['from_id']);
     break;
 case 'del_link':
     del_link($_GET['id']);
     header("Location:dict.php?act=edit&id=" . $_GET['lemma_id']);
     break;
 case 'change_link_dir':
     change_link_direction($_GET['id']);
     header("Location:dict.php?act=edit&id=" . $_GET['lemma_id']);
     break;
 case 'del_lemma':
     del_lemma($_GET['lemma_id']);
     header("Location:dict.php");
     break;
 case 'lemmata':
     $smarty->assign('search', get_dict_search_results($_GET));
     $smarty->display('dict/lemmata.tpl');
     break;
 case 'gram':
     $order = isset($_GET['order']) ? $_GET['order'] : '';
     $smarty->assign('grammems', get_grammem_editor($order));
     $smarty->assign('order', $order);
     $smarty->assign('select', dict_get_select_gram());
     $smarty->display('dict/gram.tpl');
     break;
 case 'gram_restr':
     $smarty->assign('restrictions', get_gram_restrictions(isset($_GET['hide_auto'])));
     $smarty->display('dict/restrictions.tpl');
     break;
 case 'edit':
     $smarty->assign('editor', get_lemma_editor($_GET['id']));