| Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия |
| cross2 [2024/05/07 13:28] – super | cross2 [2024/05/21 12:35] (текущий) – super |
|---|
| ~~NOCACHE~~ | ~~NOCACHE~~ |
| ====== 5 букв с другим словарем ====== | ====== 5 букв, версия 2 ====== |
| |
| <bootnote>Буквы можно указывать подряд, без разделителей и пробелов.</bootnote> | <bootnote>Буквы можно указывать подряд, без разделителей и пробелов.</bootnote> |
| Использованы слова из [[https://shra.ru/2017/03/baza-dannykh-russkikh-slov-sushhestvitelnye/|базы данных.]] | Использованы слова из [[https://shra.ru/2017/03/baza-dannykh-russkikh-slov-sushhestvitelnye/|базы данных.]]\\ |
| | [[cross2|Начать сначала]] |
| |
| ===== Укажите буквы ===== | ===== Укажите буквы ===== |
| <html> | <html> |
| <!-- HTML Form for Filtering --> | <!-- HTML Form for Filtering --> |
| <form method="post" action="#"> | <form method="post"> |
| <table><tr><th>Фильтр букв</th><th>Присутствуют</th><th>Отсутствуют</th></tr> | <table><tr><th>Фильтр букв</th><th>Присутствуют</th><th>Отсутствуют</th></tr> |
| <tr><td>Любое место</td><td><input type="text" name="wExists" id="wExists" size="12"></td><td><input type="text" name="wAbsent" id="wAbsent" size="12"> | <tr><td>Любое место</td><td><input type="text" name="wExists" id="wExists" size="12"></td><td><input type="text" name="wAbsent" id="wAbsent" size="12"> |
| echo "<table>"; | echo "<table>"; |
| echo "<tr>"; | echo "<tr>"; |
| echo "<th>Найдено слов: " . $result->num_rows . " шт.</th>"; | echo "<th>Найдено " . $result->num_rows . " слов</th>"; |
| echo "<th>Дополнительно</th>"; | echo "<th> </th>"; |
| //echo "<th>Род</th>"; | |
| //echo "<th>Падеж</th>"; | |
| //echo "<th>Признак одушевленности</th>"; | |
| echo "</tr>"; | echo "</tr>"; |
| | |
| while($row = $result->fetch_assoc()) { | while($row = $result->fetch_assoc()) { |
| | |
| if ($row["soul"] == 1) { $sup_text = "| одушевленный"; } | if ($row["soul"] == 1) { $sup_text = " | одушевленный"; } |
| if ($row["soul"] == 0) { $sup_text = "| неодушевленный"; } | if ($row["soul"] == 0) { $sup_text = " | неодушевленный"; } |
| if (($row["soul"] <> 0) && ($row["soul"] <> 1)) { $sup_text = ""; } | if (($row["soul"] <> 0) && ($row["soul"] <> 1)) { $sup_text = ""; } |
| $sup_text = $row["gender"] . " | " . $row["wcase"] . $sup_text; | |
| | if ($row["wcase"] <> "") { $sup_text = " | " . $row["wcase"] . $sup_text; } |
| | $sup_text = $row["gender"] . $sup_text; |
| | |
| echo "<tr>"; | echo "<tr>"; |
| echo "<td>" . mb_strtolower($row["word"]) . "</td>"; | echo "<td><font style='font-size: 16px; font-family:monospace'>" . mb_strtolower($row["word"]) . "</font></td>"; |
| echo "<td>" . "<small>" . $sup_text . "</small>" . "</td>"; | echo "<td>" . "<small>" . $sup_text . "</small>" . "</td>"; |
| //echo "<td>" . mb_strtolower($row["gender"]) . "</td>"; | |
| //echo "<td>" . mb_strtolower($row["wcase"]) . "</td>"; | |
| | |
| echo "</tr>"; | echo "</tr>"; |
| | |
| } | } |
| | |
| echo "</table>"; | echo "</table>"; |
| | |
| } else { | } else { |
| | |
| echo "По текущему фильтру данных не найдено."; | echo "По текущему фильтру данных не найдено."; |
| | |
| } | } |
| $conn->close(); | $conn->close(); |
| } else { | } else { |
| | |
| echo "Фильтр не установлен, данные не отображаются<br>"; | echo "Фильтр не установлен, данные не отображаются<br>"; |
| | |
| } | } |
| |