2";
echo "";
}
}
echo "";
}
//目录结束
}
}
else{
//查专辑中的一个段
$query = "select * from 'index' where album='$album' and paragraph=$paragraph";
$Fetch = PDO_FetchAll($query);
$iFetch=count($Fetch);
if($iFetch>0){
//标题
$res_title=$Fetch[0]["title"];
echo "
$res_title
";
echo "
";
echo "
";
echo "
";
//出自专辑 标题
$query = "select album.id,album.title,album.type,album.file,album.guid, author.name from album LEFT JOIN author ON album.author = author.id where album.id='$album' ";
$FetchAlbum = PDO_FetchAll($query);
if(count($FetchAlbum)>0){
$album_type=$FetchAlbum[0]["type"];
$album_file_name=$FetchAlbum[0]["file"];
$album_guid=$FetchAlbum[0]["guid"];
//专辑标题
$info_link="index_render_res_list($book,$album,-1)";
echo "
".$FetchAlbum[0]["title"]."
";
}
echo "
".$FetchAlbum[0]["name"]."
";
echo "
".$media_type[$FetchAlbum[0]["type"]]."
";
echo "
";
echo "
";
//在线阅读
$read_link="reader.php?book=$book&album=$album¶graph=$paragraph";
echo "
";
echo "- 阅读
";
echo "- 在线阅读
";
echo "
";
//相关段落
//$query = "select album.id,album.title,album.file,album.guid,album.type, author.name from album LEFT JOIN author ON album.author = author.id where album.book='$book' and album.id != $album ";
$query = "select idx.id , idx.title , idx.album , idx.type , author.name FROM 'index' as idx LEFT JOIN author ON idx.author = author.id WHERE idx.book='$book' and idx.paragraph=$paragraph and idx.album!=$album and idx.type!=7";
$Fetch_ather = PDO_FetchAll($query);
$iFetchAther=count($Fetch_ather);
if($iFetchAther>0){
echo "
";
echo "- 相关资源
";
foreach($Fetch_ather as $one_album){
$read_link="reader.php?book=$book&album=".$one_album["album"]."¶graph=$paragraph";
echo "- ";
echo "{$media_type[$one_album["type"]]}";
echo "{$one_album["title"]}{$one_album["name"]}
";
}
echo "
";
}
//目录
switch($album_type){
case 1:
case 2:
case 6:
$db_file =_FILE_DB_PALITEXT_;
PDO_Connect("sqlite:$db_file");
$query = "select * from 'pali_text' where book = '{$book}' and level>'0' and level<8 and paragraph>=$paragraph ";
break;
case 3:
$db_file = "../{$album_file_name}";
PDO_Connect("sqlite:$db_file");
$query = "select * from 'album' where guid='$album_guid'";
$Fetch_album = PDO_FetchAll($query);
$this_album_id=$Fetch_album[0]["id"];
$query = "select * from 'data' where level>'0' and level<8 and paragraph>=$paragraph and album=$this_album_id ";
break;
}
$Fetch_Toc = PDO_FetchAll($query);
$iFetchToc=count($Fetch_Toc);
if($iFetchToc>1){
if($Fetch_Toc[1]["level"]>$Fetch_Toc[0]["level"]){
echo "