Procházet zdrojové kódy

显示相似句子

visuddhinanda před 5 roky
rodič
revize
c069cbbbfc
1 změnil soubory, kde provedl 17 přidání a 0 odebrání
  1. 17 0
      app/pcdl/reader.php

+ 17 - 0
app/pcdl/reader.php

@@ -625,6 +625,21 @@ else{
 		}
 		}
 	}	
 	}	
 
 
+	$strSimSent = "";
+	if($_GET["view"]=="sent"){
+		$query = "select sim_sents from 'pali_sent' where book='$book' and paragraph='$paragraph' and begin='{$_GET["begin"]}' and end ='{$_GET["end"]}'";
+		$FetchSent = PDO_FetchOne($query);
+		if(!empty($FetchSent)){
+			$sim_sents = str_replace(",","','",$FetchSent);
+			$sim_sents = "'".$sim_sents."'";
+			$query = "SELECT book, paragraph,begin, end, text from 'pali_sent' where id IN ( {$sim_sents} ) ";
+			$FetchSim = PDO_FetchAll($query);
+			foreach ($FetchSim as $key => $value) {
+				$strSimSent .= "<div><a href=''>". $value["text"]."</div>";
+				$strSimSent .= "<div>"._get_para_path($value["book"],$value["paragraph"])."</div><br/>";
+			}
+		}
+	}
 
 
 	if(isset($_GET["sent_mode"])){
 	if(isset($_GET["sent_mode"])){
 
 
@@ -710,6 +725,8 @@ else{
 
 
 <div>
 <div>
 <a name="sim_doc"></a>
 <a name="sim_doc"></a>
+<div>相似句子</div>
+<?php echo $strSimSent; ?>
 <div>相关段落</div>
 <div>相关段落</div>
 <ul>
 <ul>
 <?php
 <?php