pc_get_pali_text.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. 加载巴利原文
  4. */
  5. include "../public/config.php";
  6. include "../public/_pdo.php";
  7. $get_book=$_GET["book"];
  8. if(substr($get_book,0,1)=="p"){
  9. $get_book = substr($get_book,1);
  10. }
  11. echo "book:$get_book<br />";
  12. $outHtml="";
  13. //open database
  14. PDO_Connect("sqlite:{$_file_db_pali_text}");
  15. $query="SELECT paragraph,html FROM pali_text WHERE book = ".$PDO->quote($get_book);
  16. $Fetch = PDO_FetchAll($query);
  17. $iFetch=count($Fetch);
  18. if($iFetch>0){
  19. for($i=0;$i<$iFetch;$i++){
  20. $parNumber = $Fetch[$i]["paragraph"];
  21. echo "<div id=\"wizard_pali_par_$parNumber\" class=\"wizard_par_div\">";
  22. echo "<div class=\"wizard_par_tools\">";
  23. echo "<div class=\"wizard_par_tools_title\">";
  24. echo "<input id='par_enable_$parNumber' onclick='par_enable_change($parNumber,this)' type=\"checkbox\" checked/>";
  25. echo "<a href='#toc_root' name='pali_text_par_$parNumber'>$parNumber</a><span id='par_level_$parNumber' class='par_level'></span>";
  26. echo "</div>";
  27. echo "</div>";
  28. echo "<div id=\"wizard_pali_par_text_$parNumber\">".$Fetch[$i]["html"]."</div>";
  29. echo "</div>";
  30. }
  31. }
  32. /*结束*/
  33. ?>