Kaynağa Gözat

nissaya 加目录字段

visuddhinanda 5 yıl önce
ebeveyn
işleme
e5f58a9cef
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 2 1
      app/nissaya/get.php
  2. 1 1
      app/nissaya/nissaya.js

+ 2 - 1
app/nissaya/get.php

@@ -31,9 +31,10 @@ foreach ($Fetch as $key => $value){
 	$query = "SELECT * from book_match where book_vri=? and vol=?";
 	$query = "SELECT * from book_match where book_vri=? and vol=?";
 	$Fetch_nsy_book = PDO_FetchRow($query,array($value["book"],$value["page1"]));
 	$Fetch_nsy_book = PDO_FetchRow($query,array($value["book"],$value["page1"]));
 	if($Fetch_nsy_book){
 	if($Fetch_nsy_book){
-		$prefix = explode("_",$Fetch_nsy_book["bookid"])[0];
+		$prefix = $Fetch_nsy_book["table"];
 		$query = "SELECT * from {$prefix}_pagematch where bookid=? and bookpagenumber=?";
 		$query = "SELECT * from {$prefix}_pagematch where bookid=? and bookpagenumber=?";
 		$Fetch_nsy_index = PDO_FetchRow($query,array($Fetch_nsy_book["bookid"],$value["page2"]));
 		$Fetch_nsy_index = PDO_FetchRow($query,array($Fetch_nsy_book["bookid"],$value["page2"]));
+		$Fetch_nsy_index["dir"]=$prefix;
 		$result["data"][] = $Fetch_nsy_index;
 		$result["data"][] = $Fetch_nsy_index;
 	}
 	}
 	else{
 	else{

+ 1 - 1
app/nissaya/nissaya.js

@@ -47,7 +47,7 @@ function render_on_page(params) {
 	return html;
 	return html;
 }
 }
 function render_nissaya_init(data) {
 function render_nissaya_init(data) {
-	let dir = data.bookid.split("_")[0];
+	let dir = data.dir;
 	return render_on_page({
 	return render_on_page({
 		dir: dir,
 		dir: dir,
 		book: data.nsyid,
 		book: data.nsyid,