<option value='sub'<?php echo isset($search_type) && $search_type == 'sub' ? " selected" : ''; ?> >substring search</option> </select> <input type="submit" value="view page"> </form> <?php if (isset($page_title)) { if (isset($search_type) && $search_type == 'sub') { $page_title = "%{$page_title}%"; } $limit_request = 100; Piwidict::setLimitRequest($limit_request); $tpage = new TPage(); $total_num = $tpage->countPageByTitle($page_title); $pageObj_arr = $tpage->getByTitle($page_title); if ($pageObj_arr == NULL) { print "<p>The word has not founded.</p>\n"; } else { if ($total_num > 1) { print "<p>There are founded {$total_num} words.</p>\n"; if ($limit_request > 0 && $limit_request < $total_num) { print "Restriction on the search for a maximum of {$limit_request} records"; } //ограничение на поиск не более 100 записей } if (is_array($pageObj_arr)) { foreach ($pageObj_arr as $pageObj) { print "<h2 title=\"TPage->page_title\" style=\"color: #006a4e\">" . $pageObj->getPageTitle() . "</h2>\n" . "<p>Source page at " . TPage::getURLWithLinkText($pageObj->getPageTitle()) . "</p>"; $lang_pos_arr = $pageObj->getLangPOS();