2
0

load_bool_index.php 637 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. require_once '../public/config.php';
  3. /*
  4. load language file
  5. 范例
  6. echo _local->gui->welcome;
  7. */
  8. function _load_book_index(){
  9. global $_book_index,$_dir_lang,$currLanguage;
  10. if(file_exists($_dir_lang.$currLanguage.".json")){
  11. $_book_index=json_decode(file_get_contents($_dir_book_index."a/".$currLanguage.".json"));
  12. }
  13. else{
  14. $_book_index=json_decode(file_get_contents($_dir_book_index."a/default.json"));
  15. }
  16. }
  17. function _get_book_info($index){
  18. global $_book_index;
  19. foreach($_book_index as $book){
  20. if($book->row==$index){
  21. return($book);
  22. }
  23. }
  24. return(null);
  25. }
  26. function _get_book_path($index){
  27. global $_book_index;
  28. }
  29. ?>