$mysql_link = mysqli_connect("localhost", "c11_default", "[S4(wbBm](X[LAqD"); mysqli_select_db("c11_default", $mysql_link); mysql_set_charset('utf8',$mysql_link); ?>
Алфавітний каталог книг (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($_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']);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "httpss://in.elau.org/projects/t_new.php?p=big/$thisPage1[idBox]/$thisPage[idBox]");
// Set so curl_exec returns the result instead of outputting it.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// Get the response and close the channel.
$response = curl_exec($ch);
curl_close($ch);
echo $response.'ssssssssssss';
}
?>
} ?>
|
|
|