Алфавітний каталог книг (XIX ст. - до 1970 р.)
settype($_GET['letter'], "integer");
settype($_GET['box'], "integer");
settype($_GET['image'], "integer");
if($_GET['letter']!=NULL){
$sql_letter = 'SELECT * FROM `pr_odessa_letter` WHERE `idLetter` = '.$_GET["letter"].' ';
$result_letter = mysql_query($sql_letter);
$thisPage_letter=mysql_fetch_array($result_letter);
$nowLetter=$thisPage_letter['letter'];
}
$sql = 'SELECT * FROM `pr_odessa_letter` ORDER BY `idLetter` ASC ';
$result_in = mysql_query($sql);
while($thisPage=mysql_fetch_array($result_in)){
$sql_modul_test = 'SELECT * FROM `pr_odessa_cards` WHERE (`title` LIKE CONVERT( \''.$thisPage["letter"].'%\' USING cp1251) COLLATE cp1251_general_ci or `title` LIKE CONVERT( \'% - '.$thisPage["letter"].'%\' USING cp1251) COLLATE cp1251_general_ci) AND `parent` = 0 ORDER BY `idBox` ASC';
$result_modul_test = mysql_query($sql_modul_test);
if(mysql_num_rows($result_modul_test)==0){
echo "$thisPage[letter] ";
}else{
if($thisPage['letter']=='A'){
echo '
'; } if($thisPage['idLetter']==$_GET['letter']){ echo "$thisPage[letter] | "; }else{ echo "$thisPage[letter] | "; } } } ?>
if($_GET['letter']!=NULL){ ?>
'; } if($thisPage['idLetter']==$_GET['letter']){ echo "$thisPage[letter] | "; }else{ echo "$thisPage[letter] | "; } } } ?>
$sql = 'SELECT * FROM `pr_odessa_cards` WHERE (`title` LIKE CONVERT( \''.$nowLetter.'%\' USING cp1251) COLLATE cp1251_general_ci or `title` LIKE CONVERT( \'% - '.$nowLetter.'%\' USING cp1251) COLLATE cp1251_general_ci) AND `parent` = 0 ORDER BY `idBox` ASC';
$result_in = mysql_query($sql);
while($thisPage=mysql_fetch_array($result_in)){
if($_GET['box']!=NULL && $_GET['box']==$thisPage['idTitle']){
echo "".$thisPage['title']." | ";
}else{
echo "".$thisPage['title']." | ";
}}?>
} ?> if($_GET['letter']!=NULL && $_GET['box']!=NULL){ ?> $sql = 'SELECT * FROM `pr_odessa_cards` WHERE `parent` = '.$_GET["box"].' ORDER BY `idBox` ASC';
$result_in = mysql_query($sql);
while($thisPage=mysql_fetch_array($result_in)){
if($_GET['image']!=NULL && $_GET['image']==$thisPage['idTitle']){
echo "$thisPage[title] | ";
}else{
echo "$thisPage[title] | ";
}
}
?>
} ?>
if($_GET['image']!=NULL){ ?>
$sql_test = 'SELECT * FROM `pr_odessa_cards` WHERE `idTitle` = '.$_GET["image"].' ';
$result_test = mysql_query($sql_test);
if(mysql_num_rows($result_test)!=0){
$thisPage=mysql_fetch_array($result_test);
$sql_test1 = 'SELECT * FROM `pr_odessa_cards` WHERE `idTitle` = '.$thisPage["parent"].' ';
$result_test1 = mysql_query($sql_test1);
$thisPage1=mysql_fetch_array($result_test1);
$naz_fail = explode($_SERVER['SCRIPT_NAME'], $_SERVER['SCRIPT_FILENAME']);
echo file_get_contents("https://lib.onu.edu.ua/image/t.php?p=big/$thisPage1[idBox]/$thisPage[idBox]");
}
?>
} ?>