Bladeren bron

修改 文件引用 定义 使用path.php 里的定义

visuddhinanda 5 jaren geleden
bovenliggende
commit
fe3def3bba

+ 3 - 3
app/admin/setting.php

@@ -1,6 +1,6 @@
 <?php
 
-require_once '../public/config.php';
+require_once '../path.php';
 require_once "../public/_pdo.php";
 
 if(isset($_GET["language"])){$currLanguage=$_GET["language"];}
@@ -85,7 +85,7 @@ $album_power["2"]="编辑";
 <?php
 	switch($currSettingItem){
 		case "account":
-			PDO_Connect("sqlite:$_file_db_userinfo");
+			PDO_Connect("sqlite:"._FILE_DB_USERINFO_);
 			$query = "select * from 'user' where 1 limit 0,1000";
 			$user_info = PDO_FetchAll($query);
 			echo "<table>";
@@ -127,7 +127,7 @@ $album_power["2"]="编辑";
 			echo "</table>";
 			break;		
 		case "share":
-			PDO_Connect("sqlite:$_file_db_fileindex");
+			PDO_Connect("sqlite:"._FILE_DB_FILEINDEX_);
 			$query = "select count(*) from 'fileindex' where share=1";
 			$file_count = PDO_FetchOne($query);
 			echo "共计:{$file_count} 个共享文件";

+ 1 - 1
app/course/course.php

@@ -66,7 +66,7 @@ echo '<div style="flex:7;">';
     }
     else{
         if(substr($coverlink,0,6)=="media:"){
-            echo '<img src="'._DIR_USER_IMG_ .substr($coverlink,6).'" width="100%" height="auto">';
+            echo '<img src="'._DIR_USER_IMG_LINK_.'/' .substr($coverlink,6).'" width="100%" height="auto">';
         }
         else{
             echo '<img src="'.$coverlink.'" width="100%" height="auto">';

+ 1 - 1
app/dict/dict_lookup.php

@@ -217,7 +217,7 @@ switch($op){
 		}
 		//社区字典结束
 
-		PDO_Connect("sqlite:$_file_db_ref");
+		PDO_Connect("sqlite:"._FILE_DB_REF_);
 		//直接查询
 		$query = "select dict.dict_id,dict.mean,info.shortname from dict LEFT JOIN info ON dict.dict_id = info.id where \"word\" = ".$PDO->quote($word)." limit 0,100";
 		

+ 4 - 4
app/dict_builder/dict_find3.php

@@ -1,8 +1,8 @@
 <?php
 //查询参考字典
-require 'casesuf.inc';
-include "./config.php";
-include "./_pdo.php";
+require_once 'casesuf.inc';
+require_once "../path.php";
+require_once "./_pdo.php";
 
 
 $op=$_GET["op"];
@@ -13,7 +13,7 @@ $count_return=0;
 $dict_list=array();
 
 global $PDO;
-$dictFileName=$dir_dict_system."ref.db";
+$dictFileName=_FILE_DB_REF_;
 PDO_Connect("sqlite:$dictFileName");
 
 function isExsit($word){

+ 1 - 1
app/dict_builder/get_one_word.php

@@ -10,7 +10,7 @@ include "../public/_pdo.php";
 			exit;
 		}
 						
-		$dictFileName=$dir_dict_system."ref.db";
+		$dictFileName=_FILE_DB_REF_;
 		PDO_Connect("sqlite:$dictFileName");
 		$query = "select * from dict where id='$word_id'";
 		$Fetch = PDO_FetchAll($query);

+ 2 - 2
app/dict_builder/index.php

@@ -1,5 +1,5 @@
 <?php
-include "../public/config.php";
+include "../path.php";
 include "../public/_pdo.php";
 global $PDO;
 
@@ -149,7 +149,7 @@ else{
 						<?php
 						
 
-		$dictFileName=$dir_dict_system."ref.db";
+		$dictFileName=_FILE_DB_REF_;
 		PDO_Connect("sqlite:$dictFileName");
 		$query = "select * from info where 1  limit 0,100";
 		$Fetch = PDO_FetchAll($query);

+ 2 - 2
app/dict_builder/save.php

@@ -1,5 +1,5 @@
 <?php
-include "../public/config.php";
+include "../path.php";
 include "../public/_pdo.php";
 
 if(isset($_POST['dict_id'])){
@@ -27,7 +27,7 @@ else{
 	$status="1";
 }
 
-		$dictFileName=$dir_dict_system."ref.db";
+		$dictFileName=_FILE_DB_REF_;
 		PDO_Connect("sqlite:$dictFileName");
 		$query = "update dict set status='$status' where id='$word_id'";
 		$stmt = @PDO_Execute($query);

+ 4 - 4
app/search/bold_search.php

@@ -19,7 +19,7 @@ global $PDO;
 
 switch($op){
 	case "pre"://预查询
-		$dictFileName=$dir_dict_system."ref1.db";
+		$dictFileName=_FILE_DB_REF_INDEX_;
 		PDO_Connect("sqlite:$dictFileName");
 		echo "<div>";
 		$query = "select word,count from dict where \"eword\" like ".$PDO->quote($word.'%')." OR \"word\" like ".$PDO->quote($word.'%')."  limit 0,100";
@@ -153,7 +153,7 @@ switch($op){
 			$Fetch = PDO_FetchAll($query);
 			$iFetch=count($Fetch);
 			if($iFetch>0){
-				$dictFileName=$_file_db_pali_text;
+				$dictFileName=_FILE_DB_PALITEXT_;
 				PDO_Connect("sqlite:$dictFileName");
 				for($i=0;$i<$iFetch;$i++){
 					$paliword=$Fetch[$i]["word"];
@@ -173,7 +173,7 @@ switch($op){
 						echo  "<div class='mean'>$pali</div>";
 					}
 					else{
-						$dictFileName=$_file_db_pali_text;
+						$dictFileName=_FILE_DB_PALITEXT_;
 						PDO_Connect("sqlite:$dictFileName");
 						$query = "select * from pali_text where \"book\" = '{$book}' and \"paragraph\" = '{$paragraph}' limit 0,20";
 						$FetchPaliText = PDO_FetchAll($query);
@@ -331,7 +331,7 @@ switch($op){
 							echo  "<div class='mean'>$pali</div>";
 						}
 						else{
-							$dictFileName=$_file_db_pali_text;
+							$dictFileName=_FILE_DB_PALITEXT_;
 						PDO_Connect("sqlite:$dictFileName");
 						$query = "select * from pali_text where \"book\" = '{$book}' and \"paragraph\" = '{$paragraph}' limit 0,20";
 						$FetchPaliText = PDO_FetchAll($query);

+ 1 - 1
app/search/paliword_search.php

@@ -279,7 +279,7 @@ switch($op){
 				echo "<div >搜索时间:$queryTime </div>";
 				$iFetch=count($Fetch);
 				if($iFetch>0){
-					$dictFileName=$_file_db_pali_text;
+					$dictFileName=_FILE_DB_PALITEXT_;
 					PDO_Connect("sqlite:$dictFileName");
 					for($i=0;$i<$iFetch;$i++){
 						$paliword=$Fetch[$i]["wordindex"];

+ 3 - 2
app/search/search.php

@@ -6,6 +6,7 @@ require_once "../public/config.php";
 require_once "../public/_pdo.php";
 require_once "../public/load_lang.php";//语言文件
 require_once "../public/function.php";
+require_once "../path.php";
 
 _load_book_index();
 
@@ -301,7 +302,7 @@ switch($op){
 		$queryTime=(microtime_float()-$time_start)*1000;
 		$iFetch=count($Fetch);
 		if($iFetch>0){
-			$dictFileName=$_file_db_pali_text;
+			$dictFileName=_FILE_DB_PALITEXT_;
 			PDO_Connect("sqlite:$dictFileName");			
 			for($i=0;$i<$iFetch;$i++){
 				$paliwordid=$Fetch[$i]["wordindex"];
@@ -403,7 +404,7 @@ switch($op){
 				echo "<div >搜索时间:$queryTime </div>";
 				$iFetch=count($Fetch);
 				if($iFetch>0){
-					$dictFileName=$_file_db_pali_text;
+					$dictFileName=_FILE_DB_PALITEXT_;
 					PDO_Connect("sqlite:$dictFileName");
 					for($i=0;$i<$iFetch;$i++){
 						$paliword=$Fetch[$i]["wordindex"];

+ 1 - 1
app/search/title_search.php

@@ -290,7 +290,7 @@ switch($op){
 				echo "<div >搜索时间:$queryTime </div>";
 				$iFetch=count($Fetch);
 				if($iFetch>0){
-					$dictFileName=$_file_db_pali_text;
+					$dictFileName=_FILE_DB_PALITEXT_;
 					PDO_Connect("sqlite:$dictFileName");
 					for($i=0;$i<$iFetch;$i++){
 						$paliword=$Fetch[$i]["wordindex"];

+ 3 - 3
app/studio/dict_find3.php

@@ -3,7 +3,7 @@
 require_once '../public/casesuf.inc';
 require_once 'dict_find_un.inc';
 require_once 'sandhi.php';
-require_once "../public/config.php";
+require_once "../path.php";
 require_once "../public/_pdo.php";
 
 require_once '../public/load_lang.php';
@@ -174,7 +174,7 @@ function mySplit2($strWord){
 
 switch($op){
 	case "pre"://预查询
-		$dictFileName=$dir_dict_system."ref1.db";
+		$dictFileName=_FILE_DB_REF_INDEX_;
 		PDO_Connect("sqlite:$dictFileName");
 		echo "<wordlist>";
 		$query = "select word,count from dict where \"eword\" like ".$PDO->quote($word.'%')." OR \"word\" like ".$PDO->quote($word.'%')."  limit 0,100";
@@ -193,7 +193,7 @@ switch($op){
 		echo "</wordlist>";
 		break;
 	case "search":
-		$dictFileName=$dir_dict_system."ref.db";
+		$dictFileName=_FILE_DB_REF_;
 		PDO_Connect("sqlite:$dictFileName");
 
 		//直接查询

+ 1 - 5
app/studio/dict_find4.php

@@ -3,7 +3,7 @@
 require_once '../public/casesuf.inc';
 require_once 'dict_find_un.inc';
 require_once 'sandhi.php';
-require_once "../public/config.php";
+require_once "../path.php";
 require_once "../public/_pdo.php";
 
 require_once '../public/load_lang.php';
@@ -50,13 +50,9 @@ $path[]=array("",0);
 $path[]=array("",0);
 $path[]=array("",0);
 
-
 $search  = array('aa', 'ae', 'ai', 'ao', 'au', 'aā', 'aī', 'aū', 'ea', 'ee', 'ei', 'eo', 'eu', 'eā', 'eī', 'eū', 'ia', 'ie', 'ii', 'io', 'iu', 'iā', 'iī', 'iū', 'oa', 'oe', 'oi', 'oo', 'ou', 'oā', 'oī', 'oū', 'ua', 'ue', 'ui', 'uo', 'uu', 'uā', 'uī', 'uū', 'āa', 'āe', 'āi', 'āo', 'āu', 'āā', 'āī', 'āū', 'īa', 'īe', 'īi', 'īo', 'īu', 'īā', 'īī', 'īū', 'ūa', 'ūe', 'ūi', 'ūo', 'ūu', 'ūā', 'ūī', 'ūū');
 $replace = array('a-a', 'a-e', 'a-i', 'a-o', 'a-u', 'a-ā', 'a-ī', 'a-ū', 'e-a', 'e-e', 'e-i', 'e-o', 'e-u', 'e-ā', 'e-ī', 'e-ū', 'i-a', 'i-e', 'i-i', 'i-o', 'i-u', 'i-ā', 'i-ī', 'i-ū', 'o-a', 'o-e', 'o-i', 'o-o', 'o-u', 'o-ā', 'o-ī', 'o-ū', 'u-a', 'u-e', 'u-i', 'u-o', 'u-u', 'u-ā', 'u-ī', 'u-ū', 'ā-a', 'ā-e', 'ā-i', 'ā-o', 'ā-u', 'ā-ā', 'ā-ī', 'ā-ū', 'ī-a', 'ī-e', 'ī-i', 'ī-o', 'ī-u', 'ī-ā', 'ī-ī', 'ī-ū', 'ū-a', 'ū-e', 'ū-i', 'ū-o', 'ū-u', 'ū-ā', 'ū-ī', 'ū-ū');
 
-$dictFileName=$dir_dict_system."compindex.db3";
-PDO_Connect("sqlite:{$dictFileName}");
-
 foreach($arrWords as $oneword){
 	//预处理
 	$word = str_replace($search, $replace, $oneword);

+ 14 - 19
app/studio/dict_find_auto.php

@@ -1,6 +1,5 @@
 <?php
-require 'checklogin.inc';
-include "../public/config.php";
+include "../path.php";
 include "../public/_pdo.php";
 include "../public/function.php";
 
@@ -36,17 +35,13 @@ function microtime_float()
 
 $time_start = microtime_float();
 
-$dict_file_user=$dir_user_base.$userid.$dir_dict_user.'/';
-$dict_file_sys=$dir_dict_system;
-$dict_file_third=$dir_dict_3rd;
-
 //open database
 
 global $PDO;
 
 
 	//查询单词表
-	$db_file = "{$dir_palicanon}templet/p".$in_book."_tpl.db3";
+	$db_file = _DIR_PALICANON_TEMPLET_."/p".$in_book."_tpl.db3";
 	
 	PDO_Connect("sqlite:$db_file");
 	$query="SELECT paragraph,vri,real FROM \"main\" WHERE (\"paragraph\" in ".$strQueryPara." ) and \"real\"<>\"\" and \"type\"<>'.ctl.' ";
@@ -81,18 +76,18 @@ $dict_word_spell=array();
 $output=array();
 $db_file_list=array();
 //用户词典
-array_push($db_file_list , array($_file_db_wbw," ORDER BY rowid DESC"));
-
-array_push($db_file_list , array($dict_file_sys."sys_regular.db"," ORDER BY confidence DESC"));
-array_push($db_file_list , array($dict_file_sys."sys_irregular.db",""));
-array_push($db_file_list , array($dict_file_sys."union.db",""));
-array_push($db_file_list , array($dict_file_sys."comp.db",""));
-
-array_push($db_file_list , array($dict_file_third."pm.db",""));
-array_push($db_file_list , array($dict_file_third."bhmf.db",""));
-array_push($db_file_list , array($dict_file_third."shuihan.db",""));
-array_push($db_file_list , array($dict_file_third."concise.db",""));
-array_push($db_file_list , array($dict_file_third."uhan_en.db",""));
+array_push($db_file_list , array(_FILE_DB_WBW_," ORDER BY rowid DESC"));
+
+array_push($db_file_list , array(_DIR_DICT_SYSTEM_."/sys_regular.db"," ORDER BY confidence DESC"));
+array_push($db_file_list , array(_DIR_DICT_SYSTEM_."/sys_irregular.db",""));
+array_push($db_file_list , array(_DIR_DICT_SYSTEM_."/union.db",""));
+array_push($db_file_list , array(_DIR_DICT_SYSTEM_."/comp.db",""));
+
+array_push($db_file_list , array(_DIR_DICT_3RD_."/pm.db",""));
+array_push($db_file_list , array(_DIR_DICT_3RD_."/bhmf.db",""));
+array_push($db_file_list , array(_DIR_DICT_3RD_."/shuihan.db",""));
+array_push($db_file_list , array(_DIR_DICT_3RD_."/concise.db",""));
+array_push($db_file_list , array(_DIR_DICT_3RD_."/uhan_en.db",""));
 
 
 for($i=0;$i<$lookup_loop;$i++)

+ 11 - 19
app/studio/dict_find_one.php

@@ -1,6 +1,5 @@
 <?php
-require 'checklogin.inc';
-include "../public/config.php";
+include "../path.php";
 include "../public/_pdo.php";
 include "../public/function.php";
 
@@ -49,8 +48,6 @@ if(mb_strlen($in_word)==0){
 	exit;
 }
 
-
-
 function microtime_float()
 {
     list($usec, $sec) = explode(" ", microtime());
@@ -59,34 +56,29 @@ function microtime_float()
 
 $time_start = microtime_float();
 
-$dict_file_user=$dir_user_base.$userid.$dir_dict_user.'/';
-$dict_file_sys=$dir_dict_system;
-$dict_file_third=$dir_dict_3rd;
 
 //open database
 
 global $PDO;
 $word_list=str_getcsv($in_word);
 
-
-
 $dict_word_spell=array();
 $output=array();
 $db_file_list=array();
 //用户词典
 if($dict_name==""){
-array_push($db_file_list , $_file_db_wbw);
+array_push($db_file_list , _FILE_DB_WBW_);
 
-array_push($db_file_list , $dict_file_sys."sys_regular.db");
-array_push($db_file_list , $dict_file_sys."sys_irregular.db");
-array_push($db_file_list , $dict_file_sys."union.db");
-array_push($db_file_list , $dict_file_sys."comp.db");
+array_push($db_file_list , _DIR_DICT_SYSTEM_."/sys_regular.db");
+array_push($db_file_list , _DIR_DICT_SYSTEM_."/sys_irregular.db");
+array_push($db_file_list , _DIR_DICT_SYSTEM_."/union.db");
+array_push($db_file_list , _DIR_DICT_SYSTEM_."/comp.db");
 
-array_push($db_file_list , $dict_file_third."pm.db");
-array_push($db_file_list , $dict_file_third."bhmf.db");
-array_push($db_file_list , $dict_file_third."shuihan.db");
-array_push($db_file_list , $dict_file_third."concise.db");
-array_push($db_file_list , $dict_file_third."uhan_en.db");
+array_push($db_file_list , _DIR_DICT_3RD_."/pm.db");
+array_push($db_file_list , _DIR_DICT_3RD_."/bhmf.db");
+array_push($db_file_list , _DIR_DICT_3RD_."/shuihan.db");
+array_push($db_file_list , _DIR_DICT_3RD_."/concise.db");
+array_push($db_file_list , _DIR_DICT_3RD_."/uhan_en.db");
 }
 else{
 	$dict_list=str_getcsv($dict_name,',');

+ 2 - 2
app/studio/dict_updata_wbw.php

@@ -1,7 +1,7 @@
 <?php
 require 'checklogin.inc';
 include "../public/_pdo.php";
-include "../public/config.php";
+include "../path.php";
 
 $input = file_get_contents("php://input");
 
@@ -10,7 +10,7 @@ $serverMsg="";
 
 $xml = simplexml_load_string($input);
 
-$db_file = $_file_db_wbw;
+$db_file = _FILE_DB_WBW_;
 PDO_Connect("sqlite:$db_file");
 
 $wordsList = $xml->xpath('//word');

+ 2 - 2
app/studio/get_res_json.php

@@ -7,7 +7,7 @@
 输出:资源列表的json数据
 */
 require_once "../studio/checklogin.inc";
-require_once "../public/config.php";
+require_once "../path.php";
 require_once "../public/_pdo.php";
 require_once "../studio/public.inc";
 
@@ -114,7 +114,7 @@ function format_file_size($size){
 			}
 		}
 		//查共享文档
-		$db_file = $_file_db_fileindex;
+		$db_file = _FILE_DB_FILEINDEX_;
 		PDO_Connect("sqlite:$db_file");
 		$query = "select * from fileindex where book='$book' and paragraph=$paragraph  and status>0 and share>0 order by create_time";
 		$Fetch = PDO_FetchAll($query);

+ 160 - 172
app/studio/js/search.js

@@ -1,45 +1,39 @@
 /*全文搜索引擎*/
-var g_pali_word_item_hide_id=new Array();
-var search_text_pre_searching=false;
-var search_text_pre_search_curr_word="";
-var search_text_search_xml_http=null;
-function search_text_search(word){
-	if(window.XMLHttpRequest)
-	{// code for IE7, Firefox, Opera, etc.
-		search_text_search_xml_http=new XMLHttpRequest();
+var g_pali_word_item_hide_id = new Array();
+var search_text_pre_searching = false;
+var search_text_pre_search_curr_word = "";
+var search_text_search_xml_http = null;
+function search_text_search(word) {
+	if (window.XMLHttpRequest) {// code for IE7, Firefox, Opera, etc.
+		search_text_search_xml_http = new XMLHttpRequest();
 	}
-	else if(window.ActiveXObject)
-	{// code for IE6, IE5
-		search_text_search_xml_http=new ActiveXObject("Microsoft.XMLHTTP");
+	else if (window.ActiveXObject) {// code for IE6, IE5
+		search_text_search_xml_http = new ActiveXObject("Microsoft.XMLHTTP");
 	}
-	  
-	if (search_text_search_xml_http!=null)
-	{
-		search_text_search_xml_http.onreadystatechange=search_text_search_serverResponse;
-		search_text_search_xml_http.open("GET", "search_text.php?op=search&word="+word, true);
+
+	if (search_text_search_xml_http != null) {
+		search_text_search_xml_http.onreadystatechange = search_text_search_serverResponse;
+		search_text_search_xml_http.open("GET", "search_text.php?op=search&word=" + word, true);
 		search_text_search_xml_http.send();
 	}
-	else
-	{
+	else {
 		alert("Your browser does not support XMLHTTP.");
-	}	
+	}
 
 }
-function search_text_search_serverResponse(){
-	if (search_text_search_xml_http.readyState==4)// 4 = "loaded"
+function search_text_search_serverResponse() {
+	if (search_text_search_xml_http.readyState == 4)// 4 = "loaded"
 	{
 		//debugOutput("server response.",0);
-		if (search_text_search_xml_http.status==200)
-		{// 200 = "OK"
+		if (search_text_search_xml_http.status == 200) {// 200 = "OK"
 			var serverText = search_text_search_xml_http.responseText;
-			search_text_result=document.getElementById("search_text_result");
-				if(search_text_result){
-					search_text_result.innerHTML=serverText;
-				}
+			search_text_result = document.getElementById("search_text_result");
+			if (search_text_result) {
+				search_text_result.innerHTML = serverText;
+			}
 
 		}
-		else
-		{
+		else {
 			//debugOutput(search_text_pre_search_xml_http.statusText,0);
 		}
 	}
@@ -48,152 +42,146 @@ function search_text_search_serverResponse(){
 }
 
 
-var search_text_pre_search_xml_http=null;
-function search_text_pre_search(word){
-	if(search_text_pre_searching==true){return;}
-	search_text_pre_searching=true;
-	search_text_pre_search_curr_word=word;
-	if(window.XMLHttpRequest)
-	{// code for IE7, Firefox, Opera, etc.
-		search_text_pre_search_xml_http=new XMLHttpRequest();
+var search_text_pre_search_xml_http = null;
+function search_text_pre_search(word) {
+	if (search_text_pre_searching == true) { return; }
+	search_text_pre_searching = true;
+	search_text_pre_search_curr_word = word;
+	if (window.XMLHttpRequest) {// code for IE7, Firefox, Opera, etc.
+		search_text_pre_search_xml_http = new XMLHttpRequest();
 	}
-	else if(window.ActiveXObject)
-	{// code for IE6, IE5
-		search_text_pre_search_xml_http=new ActiveXObject("Microsoft.XMLHTTP");
+	else if (window.ActiveXObject) {// code for IE6, IE5
+		search_text_pre_search_xml_http = new ActiveXObject("Microsoft.XMLHTTP");
 	}
-	  
-	if (search_text_pre_search_xml_http!=null)
-	{
-		search_text_pre_search_xml_http.onreadystatechange=search_text_pre_search_serverResponse;
-		search_text_pre_search_xml_http.open("GET", "search_text.php?op=pre&word="+word, true);
+
+	if (search_text_pre_search_xml_http != null) {
+		search_text_pre_search_xml_http.onreadystatechange = search_text_pre_search_serverResponse;
+		search_text_pre_search_xml_http.open("GET", "search_text.php?op=pre&word=" + word, true);
 		search_text_pre_search_xml_http.send();
 	}
-	else
-	{
+	else {
 		alert("Your browser does not support XMLHTTP.");
 	}
-	
+
 }
 
-function search_text_pre_search_serverResponse(){
-	if (search_text_pre_search_xml_http.readyState==4)// 4 = "loaded"
+function search_text_pre_search_serverResponse() {
+	if (search_text_pre_search_xml_http.readyState == 4)// 4 = "loaded"
 	{
 		//debugOutput("server response.",0);
-		if (search_text_pre_search_xml_http.status==200)
-		{// 200 = "OK"
+		if (search_text_pre_search_xml_http.status == 200) {// 200 = "OK"
 			var serverText = search_text_pre_search_xml_http.responseText;
-			if (window.DOMParser){
-				  var parser=new DOMParser();
-				  var wordData=parser.parseFromString(serverText,"text/xml");
+			if (window.DOMParser) {
+				var parser = new DOMParser();
+				var wordData = parser.parseFromString(serverText, "text/xml");
 			}
-			else{ // Internet Explorer
-			
-				  var wordData=new ActiveXObject("Microsoft.XMLDOM");
-				  wordData.async="false";
-				  wordData.loadXML(serverText);
+			else { // Internet Explorer
+
+				var wordData = new ActiveXObject("Microsoft.XMLDOM");
+				wordData.async = "false";
+				wordData.loadXML(serverText);
 			}
-			if(wordData){
+			if (wordData) {
 				var wordlist = wordData.getElementsByTagName("word")
 				//var obj = JSON.parse(serverText);
-				var search_text_word="";
-				for(var iword=0; iword<wordlist.length;iword++){
-					search_text_word += "<li class=\"pali_book_item\" onclick='search_text_add_key_word(\""+getNodeText(wordlist[iword],"pali")+"\","+getNodeText(wordlist[iword],"count")+",this)'>"+getNodeText(wordlist[iword],"pali")+"-"+getNodeText(wordlist[iword],"count")+"</li>"
+				var search_text_word = "";
+				for (var iword = 0; iword < wordlist.length; iword++) {
+					search_text_word += "<li class=\"pali_book_item\" onclick='search_text_add_key_word(\"" + getNodeText(wordlist[iword], "pali") + "\"," + getNodeText(wordlist[iword], "count") + ",this)'>" + getNodeText(wordlist[iword], "pali") + "-" + getNodeText(wordlist[iword], "count") + "</li>"
 				}
-				search_text_result=document.getElementById("search_word_prev");
-				if(search_text_result){
-					search_text_result.innerHTML=search_text_word;
+				search_text_result = document.getElementById("search_word_prev");
+				if (search_text_result) {
+					search_text_result.innerHTML = search_text_word;
 				}
 			}
 
 		}
-		else
-		{
+		else {
 			//debugOutput(search_text_pre_search_xml_http.statusText,0);
 		}
-		search_text_pre_searching=false;
+		search_text_pre_searching = false;
 		var newword = document.getElementById("search_text_input").value;
-		if(newword!=search_text_pre_search_curr_word){
+		if (newword != search_text_pre_search_curr_word) {
 			search_text_pre_search(newword);
 		}
 	}
 
 }
-function search_text_pre_word_click(word){
+function search_text_pre_word_click(word) {
 	//document.getElementById("dict_ref_search_input").value=word;
 	search_text_search(word);
 }
 
-function search_text_input_change(obj){
+function search_text_input_change(obj) {
 	search_text_pre_search(obj.value);
 }
 
-function search_text_input_keypress(e,obj){
+function search_text_input_keypress(e, obj) {
 	var keynum
 	var keychar
 	var numcheck
 
-	if(window.event) // IE
-	  {
-	  keynum = e.keyCode
-	  }
-	else if(e.which) // Netscape/Firefox/Opera
-	  {
-	  keynum = e.which
-	  }
+	if (window.event) // IE
+	{
+		keynum = e.keyCode
+	}
+	else if (e.which) // Netscape/Firefox/Opera
+	{
+		keynum = e.which
+	}
 	var keychar = String.fromCharCode(keynum)
-	if(keynum==13){
-		
+	if (keynum == 13) {
+
 	}
 }
 
-function search_text_input_keyup(e,obj){
+function search_text_input_keyup(e, obj) {
 	var keynum
 	var keychar
 	var numcheck
 
-	if(window.event) // IE
-	  {
-	  keynum = e.keyCode
-	  }
-	else if(e.which) // Netscape/Firefox/Opera
-	  {
-	  keynum = e.which
-	  }
+	if (window.event) // IE
+	{
+		keynum = e.keyCode
+	}
+	else if (e.which) // Netscape/Firefox/Opera
+	{
+		keynum = e.which
+	}
 	var keychar = String.fromCharCode(keynum)
-	if(keynum==13){
+	if (keynum == 13) {
 		search_text_search(obj.value);
 	}
-	else{
+	else {
 		search_text_pre_search(obj.value);
 	}
 }
 
-function search_text_input_split(word){
-	if(word.indexOf("+")>=0){
-		var wordParts=word.split("+");
-		var strParts="";
-		for(var i in wordParts){
-			strParts+="<a onclick='dict_search(\""+wordParts[i]+"\")'>"+wordParts[i]+"</a>";
+function search_text_input_split(word) {
+	if (word.indexOf("+") >= 0) {
+		var wordParts = word.split("+");
+		var strParts = "";
+		for (var i in wordParts) {
+			strParts += "<a onclick='dict_search(\"" + wordParts[i] + "\")'>" + wordParts[i] + "</a>";
 		}
-		document.getElementById("input_parts").innerHTML=strParts;
+		document.getElementById("input_parts").innerHTML = strParts;
 	}
-	else{
-	document.getElementById("input_parts").innerHTML="";
+	else {
+		document.getElementById("input_parts").innerHTML = "";
 	}
-		
+
 }
 
-var search_text_key_word=new Array();
-var index_count=0;
-function search_text_add_key_word(str,count,obj){
-	var objWord=new Object();
-	objWord.pali=str;
-	objWord.count=count;
-	objWord.index=index_count;
+var search_text_key_word = new Array();
+var index_count = 0;
+function search_text_add_key_word(str, count, obj) {
+	var objWord = new Object();
+	objWord.pali = str;
+	objWord.count = count;
+	objWord.index = index_count;
 	index_count++;
-	obj.style="max-height: 0px; padding: 0px; opacity: 0;";
-	obj.id="pali_book_item_hide_"+com_guid();
-	objWord.idstr=obj.id;
+	obj.style = "max-height: 0px; padding: 0px; opacity: 0;";
+	obj.id = "pali_book_item_hide_" + com_guid();
+	objWord.idstr = obj.id;
 	g_pali_word_item_hide_id.push(obj.id);
 	//obj.style.display="none";
 	search_text_key_word.push(objWord);
@@ -201,15 +189,15 @@ function search_text_add_key_word(str,count,obj){
 
 }
 
-function search_text_remove_key_word(word_index,obj){
-		obj.style="max-width: 0px; padding: 0px; opacity: 0;";
-	for(var iword=0; iword<search_text_key_word.length;iword++){
-		if(search_text_key_word[iword].index==word_index){
-			if(document.getElementById(search_text_key_word[iword].idstr)!=null){
-				document.getElementById(search_text_key_word[iword].idstr).style="";
+function search_text_remove_key_word(word_index, obj) {
+	obj.style = "max-width: 0px; padding: 0px; opacity: 0;";
+	for (var iword = 0; iword < search_text_key_word.length; iword++) {
+		if (search_text_key_word[iword].index == word_index) {
+			if (document.getElementById(search_text_key_word[iword].idstr) != null) {
+				document.getElementById(search_text_key_word[iword].idstr).style = "";
 			}
-		search_text_key_word.splice(iword,1);
-		break;
+			search_text_key_word.splice(iword, 1);
+			break;
 		}
 
 	}
@@ -217,20 +205,20 @@ function search_text_remove_key_word(word_index,obj){
 
 }
 
-function search_text_remove_all_key_word(){
-	var search_text_array=document.getElementById("search_word_key_word").getElementsByClassName("pali_book_item");
-	for(var i_search=0;i_search<search_text_array.length;i_search++){
-		search_text_array[i_search].style="max-width: 0px; padding: 0px; opacity: 0;"
+function search_text_remove_all_key_word() {
+	var search_text_array = document.getElementById("search_word_key_word").getElementsByClassName("pali_book_item");
+	for (var i_search = 0; i_search < search_text_array.length; i_search++) {
+		search_text_array[i_search].style = "max-width: 0px; padding: 0px; opacity: 0;"
 	}
-	for(var iword=0; iword<search_text_key_word.length;iword++){
-		if(document.getElementById(search_text_key_word[iword]!=null)){
-			document.getElementById(search_text_key_word[iword].idstr).style="";
+	for (var iword = 0; iword < search_text_key_word.length; iword++) {
+		if (document.getElementById(search_text_key_word[iword] != null)) {
+			document.getElementById(search_text_key_word[iword].idstr).style = "";
 
 		}
 
 	}
 
-	search_text_key_word=new Array();
+	search_text_key_word = new Array();
 	search_text_refresh_key_word();
 	//var pali_book_item_hide_array=document.getElementsByClassName("pali_book_item_hide");
 	//for(i_pali_book_item_hide in pali_book_item_hide_array){
@@ -238,58 +226,58 @@ function search_text_remove_all_key_word(){
 	//}
 }
 
-function search_text_refresh_key_word(){
-	var html_key_list="";
-	for(var iword=0; iword<search_text_key_word.length;iword++){
-		html_key_list += "<li class=\"pali_book_item\" onclick='search_text_remove_key_word(\""+search_text_key_word[iword].index+"\",this)'>"+(search_text_key_word[iword].pali)+"-"+(search_text_key_word[iword].count)+"</li>"
+function search_text_refresh_key_word() {
+	var html_key_list = "";
+	for (var iword = 0; iword < search_text_key_word.length; iword++) {
+		html_key_list += "<li class=\"pali_book_item\" onclick='search_text_remove_key_word(\"" + search_text_key_word[iword].index + "\",this)'>" + (search_text_key_word[iword].pali) + "-" + (search_text_key_word[iword].count) + "</li>"
+	}
+	var search_text_ctl_key_word = document.getElementById("search_word_key_word");
+	if (search_text_ctl_key_word) {
+		search_text_ctl_key_word.innerHTML = html_key_list;
 	}
-				var search_text_ctl_key_word=document.getElementById("search_word_key_word");
-				if(search_text_ctl_key_word){
-					search_text_ctl_key_word.innerHTML=html_key_list;
-				}	
 }
 
-function search_text_advance_search(){
-	var key_word="";
-	for(var iword=0; iword<search_text_key_word.length;iword++){
-		key_word += search_text_key_word[iword].pali+",";
+function search_text_advance_search() {
+	var key_word = "";
+	for (var iword = 0; iword < search_text_key_word.length; iword++) {
+		key_word += search_text_key_word[iword].pali + ",";
 	}
 	search_text_search(key_word);
 }
-function path_name_upgrade(){
-	var path_array=document.getElementsByClassName('book_path');
-	for(var i_path=0;i_path<path_array.length;i_path++){
-		var path_str=path_array[i_path].innerHTML.split('#');
-		for(j_path in local_palicannon_index){
-			if(local_palicannon_index[j_path].id==path_str[0]){
-				path_str[0]=local_palicannon_index[j_path].c1+">";
-				path_str[0]+=local_palicannon_index[j_path].c2+">";
-				if(local_palicannon_index[j_path].c3!=""){
-					path_str[0]+=local_palicannon_index[j_path].c3+">";
-					if(local_palicannon_index[j_path].c4!=""){
-						path_str[0]+=local_palicannon_index[j_path].c4+">";
+function path_name_upgrade() {
+	var path_array = document.getElementsByClassName('book_path');
+	for (var i_path = 0; i_path < path_array.length; i_path++) {
+		var path_str = path_array[i_path].innerHTML.split('#');
+		for (j_path in local_palicannon_index) {
+			if (local_palicannon_index[j_path].id == path_str[0]) {
+				path_str[0] = local_palicannon_index[j_path].c1 + ">";
+				path_str[0] += local_palicannon_index[j_path].c2 + ">";
+				if (local_palicannon_index[j_path].c3 != "") {
+					path_str[0] += local_palicannon_index[j_path].c3 + ">";
+					if (local_palicannon_index[j_path].c4 != "") {
+						path_str[0] += local_palicannon_index[j_path].c4 + ">";
 					}
 				}
-				path_str[0]+="《"+local_palicannon_index[j_path].title+"》";
-			}			
+				path_str[0] += "《" + local_palicannon_index[j_path].title + "》";
+			}
 		}
-		path_array[i_path].innerHTML=path_str[0]+path_str[1];
+		path_array[i_path].innerHTML = path_str[0] + path_str[1];
 	}
 }
 
-function search_edit(bookid,par){
-	var newRes=new Object()
-	newRes.res="wbw";
-	newRes.book=bookid;
-	newRes.parNum=par;
-	newRes.parEnd=par;
-	newRes.language="pali";
-	newRes.author="templet";
-	newRes.editor="pcds";
-	newRes.revision=1;
-	newRes.edition=1;
-	newRes.subver=1;
-	var arrRes=new Array();
+function search_edit(bookid, par) {
+	var newRes = new Object()
+	newRes.res = "wbw";
+	newRes.book = bookid;
+	newRes.parNum = par;
+	newRes.parEnd = par;
+	newRes.language = "pali";
+	newRes.author = "templet";
+	newRes.editor = "pcds";
+	newRes.revision = 1;
+	newRes.edition = 1;
+	newRes.subver = 1;
+	var arrRes = new Array();
 	arrRes.push(newRes);
-	window.open("project.php?op=create&data="+JSON.stringify(arrRes));
+	window.open("project.php?op=create&data=" + JSON.stringify(arrRes));
 }

+ 0 - 373
app/studio/login.php

@@ -1,373 +0,0 @@
-<?php
-require_once '../public/config.php';
-require_once "../public/_pdo.php";
-require_once "./public.inc";
-
-if(isset($_GET["language"])){
-	$currLanguage=$_GET["language"];
-}
-else{
-	if(isset($_COOKIE["language"])){
-		$currLanguage=$_COOKIE["language"];
-	}
-	else{
-		$currLanguage="en";
-	}
-}
-
-//load language file
-include $dir_language."default.php";
-if(file_exists($dir_language.$currLanguage.".php")){
-	require $dir_language.$currLanguage.".php";
-}
-
-
-if(isset($_GET["device"])){
-	$currDevice=$_GET["device"];
-}
-else{
-	if(isset($_COOKIE["device"])){
-		$currDevice=$_COOKIE["device"];
-	}
-	else{
-		$currDevice="computer";
-	}
-}
-
-?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-	<meta name="viewport" content="width=device-width, initial-scale=1.0">
-	<link type="text/css" rel="stylesheet" href="css/style.css"/>
-	<link type="text/css" rel="stylesheet" href="css/color_day.css" id="colorchange" />
-	<title><?php echo $module_gui_str['editor']['1051'];?>PCD Studio</title>
-	<script language="javascript" src="js/common.js"></script>
-	<script src="js/jquery-3.3.1.min.js"></script>
-	<script src="js/fixedsticky.js"></script>
-	<script type="text/javascript">
-	
-		var g_device = "computer";
-		var strSertch = location.search;
-		if(strSertch.length>0){
-			strSertch = strSertch.substr(1);
-			var sertchList=strSertch.split('&');
-			for ( i in sertchList){
-				var item = sertchList[i].split('=');
-				if(item[0]=="device"){
-					g_device=item[1];
-				}
-			}
-		}
-		if(g_device=="mobile"){
-			g_is_mobile=true;
-		}
-		else{
-			g_is_mobile=false;
-		}
-
-
-			var g_langrage="en";
-			function menuLangrage(obj){
-				g_langrage=obj.value;
-				setCookie('language',g_langrage,365);
-				window.location.assign("login.php?language="+g_langrage);
-			}
-
-	</script>
-
-</head>
-<body class="indexbody" onLoad="">
-		<!-- tool bar begin-->
-		<div class='index_toolbar'>
-			<div id="index_nav">
-			</div>
-			<div>
-			
-			</div>
-			<div class="toolgroup1">
-				<span><?php echo $module_gui_str['editor']['1050'];?></span>
-				<select id="id_language" name="menu" onchange="menuLangrage(this)">
-					<option value="en" >English</option>
-					<option value="sinhala" >සිංහල</option>
-					<option value="zh" >简体中文</option>
-					<option value="tw" >繁體中文</option>
-				</select>
-			
-			</div>
-		</div>	
-		<!--tool bar end -->
-		<script>
-			document.getElementById("id_language").value="<?php echo($currLanguage); ?>";
-		</script>
-	<div class="index_inner" style="width: 100%;">
-		<div id="id_app_name"><?php echo $module_gui_str['editor']['1051'];?>
-			<span style="font-size: 70%;">1.6</span><br />
-			<?php if($currLanguage=="en"){ ?>
-				<span style="font-size: 70%;">Pali Cannon Database Studio</span>
-			<?php 
-			}
-			else{
-			?>
-				<span style="font-size: 70%;">PCD Studio</span>
-			<?php
-			}
-			?>
-		</div>
-				
-		<div class="fun_block">
-			<h2>
-				<?php
-					if(isset($_GET["op"])){
-						if($_GET["op"]=="new"){
-				?>
-				<span style="width: 15em;">
-					<a href="login.php">
-					<?php echo $module_gui_str['editor']['1090'];?>
-					</a>
-				</span>
-				<span style="width: 15em;">
-					<?php echo $module_gui_str['editor']['1091'];?>			
-				</span>
-			<?php }
-		}
-		else{
-			?>
-				<span style="width: 15em;">
-					<?php echo $module_gui_str['editor']['1090'];?>
-				</span>
-				<span style="width: 15em;">
-					<a href="login.php?op=new">
-					<?php echo $module_gui_str['editor']['1091'];?>
-					</a>				
-				</span>
-			<?php
-		}
-		?>
-			</h2>
-
-			<?php
-			if(isset($_GET["op"])){
-				if($_GET["op"]=="new"){
-			?>
-
-			<div>
-				<form action="login.php" method="post">
-					<div class="project_res_add_author" style="width: 80%;">
-								<span style="width: 15em;"><?php echo $module_gui_str['editor']['1092'];?>: </span>
-								<input type="text" name="username" />
-								<span style="width: 17em;"><?php echo $module_gui_str['editor']['1096'];?> 64 <?php echo $module_gui_str['editor']['1097'];?></span>
-					</div>
-					<div class="project_res_add_author" style="width: 80%;">
-								<span style="width: 15em;"><?php echo $module_gui_str['editor']['1093'];?>: </span>
-								<input type="password" name="password" />
-								<span style="width: 17em;"></span>
-					</div>
-					<div class="project_res_add_author" style="width: 80%;">
-								<span style="width: 15em;"><?php echo $module_gui_str['editor']['1098'];?>: </span>
-								<input type="password" name="password_again" />
-								<span style="width: 17em;"></span>
-					</div>
-					<div class="project_res_add_author" style="width: 80%;">
-								<span style="width: 15em;"><?php echo $module_gui_str['editor']['1094'];?>: </span>
-								<input type="text" name="nickname" />
-								<span style="width: 17em;"><?php echo $module_gui_str['editor']['1096'];?> 64 <?php echo $module_gui_str['editor']['1097'];?></span>
-					</div>
-					<div class="project_res_add_author" style="width: 80%;">
-								<span style="width: 15em;"><?php echo $module_gui_str['editor']['1095'];?>: </span>
-								<input type="text" name="email" />
-								<span style="width: 17em;"><?php echo $module_gui_str['editor']['1096'];?> 128 <?php echo $module_gui_str['editor']['1097'];?></span>
-					</div>
-					<input type="hidden" name="op" value="new"/>
-					<input type="submit" value=<?php echo $module_gui_str['editor']['1090'];?>>
-					</form>					
-			<?php
-				}
-				if($_GET["op"]=="logout"){
-			?>
-					<script type="text/javascript">
-						setCookie('uid','',365);
-						setCookie('username','',365);
-						setCookie('userid','',365);
-						setCookie('nickname','',365);
-						setCookie('email','',365);
-					</script>
-			<?php
-					echo "Logout<br>";
-					echo "<a href=\"login.php\">Login</a>";
-			?>
-				<script>
-					window.location.assign("login.php");
-				</script>
-			<?php
-				}
-				
-			}
-			else{
-				if(isset($_POST["op"])){
-					switch($_POST["op"]){
-						case "login":
-							$username=$_POST["username"];
-							$password=$_POST["password"];
-							if(empty($username)){
-								echo "Error:User Name Is Empty!<br>";
-							}
-							if(empty($password)){
-								echo "Error:Password Is Empty!<br>";
-							}
-							if(!empty($username) && !empty($password)){
-								$md5_password=md5($password);
-								$db_file = $_file_db_userinfo;
-								PDO_Connect("sqlite:$db_file");
-								$query = "select * from user where \"username\"=".$PDO->quote($username)." and \"password\"=".$PDO->quote($md5_password);
-								$Fetch = PDO_FetchAll($query);
-								$iFetch=count($Fetch);
-								if($iFetch>0){//username is exite
-									$uid=$Fetch[0]["id"];
-									$username=$Fetch[0]["username"];
-									$userid=$Fetch[0]["userid"];
-									$nickname=$Fetch[0]["nickname"];
-									$email=$Fetch[0]["email"];
-									?>
-									<script type="text/javascript">
-									setCookie('uid','<?php echo $uid ?>',365);
-									setCookie('username','<?php echo $username ?>',365);
-									setCookie('userid','<?php echo $userid ?>',365);
-									setCookie('nickname','<?php echo $nickname ?>',365);
-									setCookie('email','<?php echo $email ?>',365);
-									</script>
-									<?php
-									$newUserPath=$dir_user_base.$userid.'/';
-									if(!file_exists($newUserPath)){
-										echo "error:cannot find user dir:$newUserPath<br/>";
-									}
-									
-									echo "Ok<br>";
-									echo "<a href=\"index.php\">Enter</a>";
-									?>
-									<script>
-									window.location.assign("index.php");
-									</script>
-									<?php
-								}
-								else{
-									echo "username or password error<br/>";
-									echo "<a href=\"login.php\">Try Again</a>";
-								}
-							}
-							else{
-								echo "<a href=\"login.php?\">Try Again</a>";
-							}						
-						
-						break;
-						case "new":
-							$username=$_POST["username"];
-							$password=$_POST["password"];
-							$nickname=$_POST["nickname"];
-							$email=$_POST["email"];
-							if(empty($username)){
-								echo "Error:User Name Is Empty!<br>";
-							}
-							if(empty($password)){
-								echo "Error:Password Is Empty!<br>";
-							}
-							if(empty($nickname)){
-								echo "Error:Nickname Is Empty!<br>";
-							}
-							if(!empty($username) && !empty($password) && !empty($nickname)){
-								$md5_password=md5($password);
-								$userid=GUIDv4();
-								$db_file = $dir_db_userinfo.$file_db_userinfo;
-								PDO_Connect("sqlite:$db_file");
-								$query = "select * from user where \"username\"=".$PDO->quote($username);
-								$Fetch = PDO_FetchAll($query);
-								$iFetch=count($Fetch);
-								if($iFetch>0){//username is exite
-									echo "user name is exite<br>";
-									echo "<a href=\"login.php?op=new\">Try Again</a>";
-								}
-								else{
-									$query="INSERT INTO user ('id','userid','username','password','nickname','email') VALUES (NULL,".$PDO->quote($userid).",".$PDO->quote($username).",".$PDO->quote($md5_password).",".$PDO->quote($nickname).",".$PDO->quote($email).")";
-									$stmt = @PDO_Execute($query);
-									if (!$stmt || ($stmt && $stmt->errorCode() != 0)) {
-										$error = PDO_ErrorInfo();
-										print_r($error[2]);
-										echo "<a href=\"login.php?op=new\">Try Again</a>";
-										break;
-									}
-									
-									$newUserPath=$dir_user_base.$userid;
-									$userDirApp=$newUserPath.$dir_myApp;
-									$userDirDict=$newUserPath.$dir_dict_user;
-									$userDirMyDocument=$newUserPath.$dir_mydocument;
-									$userDirMyPaliCanon=$newUserPath.$dir_myPaliCannon;
-									if(!file_exists($newUserPath)){
-										if(mkdir($newUserPath)){
-											mkdir($userDirApp);
-											mkdir($userDirDict);
-											mkdir($userDirMyDocument);
-											//copy($dir_user_templet.$dir_myApp."/config.js",$userDirApp."/config.js");
-											//copy($dir_user_templet.$dir_myApp."/dictlist.json",$userDirApp."/dictlist.json");
-											//copy($dir_user_templet.$dir_myApp."/style.css",$userDirApp."/style.css");
-											//copy($dir_user_templet.$dir_myApp."/userinfo.js",$userDirApp."/userinfo.js");
-											//copy($dir_user_templet.$dir_myApp."/userinfo.php",$userDirApp."/userinfo.php");
-
-											//copy($dir_user_templet.$dir_dict_user."/wbw.db",$userDirDict."/wbw.db");
-											//copy($dir_user_templet.$dir_dict_user."/default.db",$userDirDict."/default.db");
-
-										}
-										else{
-											echo "create dir fail<br>";
-										}
-									}
-									echo "Create Succecful<br/>";
-									echo "User Name:$username<br/>";
-									echo "Nickname:$nickname<br/>";
-									echo "Email:$email<br/>";
-									echo "<a href=\"login.php\">Login</a>";
-								}
-							}
-							else{
-								echo "<a href=\"login.php?op=new\">Try Again</a>";
-							}
-						break;
-					}
-				}
-				else{
-				?>
-
-				
-				<div>
-					<form action="login.php" method="post">
-					<div class="project_res_add_author" style="width: 70%;">
-								<span style="width: 12em;"><?php echo $module_gui_str['editor']['1092'];?>: </span>
-								<input type="text" name="username" size="20" style="width:initial;" value="guest" />
-								<span style="width: 20em;"><?php echo $module_gui_str['editor']['1096'];?> 64 <?php echo $module_gui_str['editor']['1097'];?></span>
-					</div>
-					<div class="project_res_add_author" style="width: 70%;">
-								<span style="width: 12em;"><?php echo $module_gui_str['editor']['1093'];?>: </span>
-								<input type="password" name="password" size="20" style="width:initial;" value="guest"/>
-								<span style="width: 20em;"></span>
-					</div>
-					<input type="hidden" name="op" value="login"/>
-					<input type="submit" value=<?php echo $module_gui_str['editor']['1090'];?>>
-				</form>
-					
-				</div>
-				<?php
-				}
-			}
-			?>
-
-			</div>
-		</div>
-		
-	</div>
-<div class="foot_div">
-<?php echo $module_gui_str['editor']['1066'];?>
-</div>
-</body>
-</html>
-

+ 1 - 1
app/studio/pc_get_book_index.php

@@ -13,7 +13,7 @@ include "../public/_pdo.php";
 	echo "<index>";
 
 	//open database
-	PDO_Connect("sqlite:$_file_db_pali_text");
+	PDO_Connect("sqlite:"._FILE_DB_PALITEXT_);
 	$query = "select * FROM pali_text where \"book\"=".$PDO->quote($currBook);
 
 	$Fetch = PDO_FetchAll($query);

+ 2 - 4
app/studio/pc_get_pali_text.php

@@ -2,7 +2,7 @@
 /*
 加载巴利原文
 */
-include "../public/config.php";
+include "../path.php";
 include "../public/_pdo.php";
 
 	$get_book=$_GET["book"];
@@ -12,10 +12,8 @@ include "../public/_pdo.php";
 
 	echo "book:$get_book<br />";
 
-	$outHtml="";
-
 	//open database
-	PDO_Connect("sqlite:{$_file_db_pali_text}");
+	PDO_Connect("sqlite:"._FILE_DB_PALITEXT_);
 	
 	$query="SELECT paragraph,html FROM pali_text WHERE book = ".$PDO->quote($get_book);
 	$Fetch = PDO_FetchAll($query);

+ 2 - 2
app/studio/term.php

@@ -1,6 +1,6 @@
 <?php
 //查询term字典
-include "../public/config.php";
+include "../path.php";
 include "../public/_pdo.php";
 include "./public.inc";
 
@@ -47,7 +47,7 @@ $count_return=0;
 $dict_list=array();
 
 global $PDO;
-PDO_Connect("sqlite:$_file_db_term");
+PDO_Connect("sqlite:"._FILE_DB_TERM_);
 switch($op){
 	case "pre"://预查询