There is a php script that reads the name of the files in the folder (the name translates in Latin) and translates them into Russian. How to make a search in the folder, taking into account what will be searched in Russian?
For clarity, the code:
<?php if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $files[] = $file; } } closedir($handle); } /* config */ $COUNT_FILES_ON_PAGE = 37; ### $COUNT_FIELES = count($files); $COUNT_PAGES = intval($COUNT_FIELES / $COUNT_FILES_ON_PAGE); if(empty($_GET['p']) || $_GET['p'] < 0 || $_GET['p'] > $COUNT_PAGES || !intval($_GET['p'])) $_GET['p'] = 0; echo '<h2>Файлов с табулатурами: '.$COUNT_FIELES.'</h2>'; echo 'Всего страниц с файлами: <b>'.($COUNT_PAGES +1).'</b><br>'; echo 'Файлов на страницу: <b>'.$COUNT_FILES_ON_PAGE.'</b><br>';; echo 'Текущая страница: <b>'.($_GET['p']+1).'</b><br>'; echo '<br><center><strong>Если закачка не началась вставте ссылку в свой менеджер закачек (Download Master)</strong></center><br>'; for ($i=0; $i<= $COUNT_PAGES;$i++) { echo '<a href="?p='.$i.'">['.($i+1).']</a> '; } echo '<hr>'; $START = $_GET['p'] * $COUNT_FILES_ON_PAGE; $END = $START + $COUNT_FILES_ON_PAGE; for ($i = $START; $i < $END; $i++) { if(key_exists($i,$files)) { if(is_file('.'.$files[$i])) $cat = "$files[$i]"; //строка, подлежащая частичной замене $r=array("yo","ye","ts","ch","sh","shch","yu","ya","a","b","v","g","d","e","j","z","i","y","k","l","m","n","o","p","r","s","t","u","f","e","_","h","w"); // Что менять "a" ?b"); $r2=array("ё","ё","ц","ч","ш","щ","ю","я","а","б","в","г","д","е","г","з","и","и","к","л","м","н","о","п","р","с","т","у","ф","э"," ","х","в"); // На что менять "0" ?1"); $trans = str_ireplace($r,$r2,$cat); echo '<img src="/images/PostCategoryIcon.png" WIDTH="50" HEIGHT="50" alt=""><a href="/gitara/tabs_ru/'.$cat.'" title="'.$trans.' скачать файл">Файл: '.$trans.'</a><br>'; if(is_dir('.'.$files[$i])) echo $files[$i].' - [DIR]<br>'; } } ?>