include "../../../config.php"; include LIB_DIR . "header.php"; $php_self = "dict_info.php"; if (!isset($lang_id)) { $lang_id = TLang::getIDByLangCode("ru"); } ?> <h2>Dictionary info</h2> Database version: <?php echo NAME_DB; ?> <form action="<?php echo $php_self; ?> " method="GET"> <p>Language: <?php echo TLang::getDropDownList($lang_id, "lang_id", 1); ?> </p> <p><input type="submit" name="view_list" value="search"></p> </form> <?php if (isset($view_list) && $view_list && $lang_id) { $lang_name = TLang::getNameByID($lang_id); $lang_code = TLang::getCodeByID($lang_id); $relation_type_name = 'synonyms'; $pos_name = 'phrase'; print "<p>Total number of {$lang_name} entries : <b>" . PWStats::countEntries($lang_code) . "</b>, and <b>" . PWStats::countLangPOS($lang_code, $pos_name) . "</b> of them are phrases</p>" . "<p>Total number of {$lang_name} words with definitions: <b>" . PWStats::countLangPOSWithDefinitions($lang_code) . "</b></p>" . "<p>Total number of {$relation_type_name} pairs: <b>" . PWStats::countRelations($lang_code, $relation_type_name) . "</b></p>"; } include LIB_DIR . "footer.php";
if (!isset($lang)) { $lang = TLang::getIDByLangCode("ru"); } $limit = 200000; ?> <h1>Reverse dictionary (LIMIT <?php echo $limit; ?> )</h1> <form action="<?php echo $php_self; ?> " method="GET"> <p>Language: <?php echo TLang::getDropDownList($lang, "lang", ''); ?> </p> <p>Part of speech: <?php echo TPOS::getDropDownList($pos, "pos", ''); ?> </p> <p><input type="submit" name="view_dict" value="view"></p> </form> <?php if (isset($view_dict) && $view_dict) { $query = "SELECT pw_reverse_dict.page_id, reverse_page_title FROM pw_reverse_dict"; if ($pos > 0 || $lang > 0) { $query .= ", lang_pos WHERE lang_pos.page_id=pw_reverse_dict.page_id"; if (TPOS::isExist($pos)) { $query .= " and pos_id=" . (int) $pos;