Алфавітний каталог українською мовою
settype($_GET['idLetter'], "integer"); $idLetter=$_GET['idLetter']; settype($_GET['image'], "integer"); $idElement=$_GET['idElement'];?>
settype($_GET[letter], "integer");
settype($_GET[box], "integer");
settype($_GET[image], "integer");
if($_GET[letter]!=NULL){
$sql_letter = 'SELECT * FROM `cards_letter_o_ukrainian` WHERE `idLetter` = '.$_GET[letter].' ';
$result_letter = mysql_query($sql_letter);
$thisPage_letter=mysql_fetch_array($result_letter);
$nowLetter=$thisPage_letter[letter];
}
$sql = 'SELECT * FROM `cards_letter_o_ukrainian` ORDER BY `idLetter` ASC ';
$result_in = mysql_query($sql);
while($thisPage=mysql_fetch_array($result_in)){
$sql_modul_test = 'SELECT * FROM `cards_title_o_ukrainian` WHERE (`title` LIKE CONVERT( \''.$thisPage[letter].'%\' USING cp1251) COLLATE cp1251_general_ci or `title` LIKE CONVERT( \'% - '.$thisPage[letter].'%\' USING cp1251) COLLATE cp1251_general_ci) ORDER BY `idBox` ASC';
$result_modul_test = mysql_query($sql_modul_test);
if(mysql_num_rows($result_modul_test)==NULL){
echo "$thisPage[letter] ";
}else{
if($thisPage[idLetter]==$_GET[letter]){
echo "$thisPage[letter] | ";
}else{
echo "$thisPage[letter] | ";
}
}
}
?>
if($_GET[image]!=NULL){ $result_test = mysql_query('SELECT * FROM `cards_title_o_ukrainian` WHERE `idTitle` = '.$_GET['image']);
if(mysql_num_rows($result_test)!=NULL){
$thisPage4=mysql_fetch_array($result_test); ?>
$pathTemp=$thisPage4['parent'].'/'.$thisPage4[idBox];
echo file_get_contents("https://lib.onu.edu.ua/image/t.php?p=ukrainian/$pathTemp");
}
?>