visuddhinanda 5 лет назад
Родитель
Сommit
d213cbe500

+ 549 - 0
app/public/js/term-.js

@@ -0,0 +1,549 @@
+var arrTerm = new Array();
+var arrTerm2 = new Array();
+var arrMyTerm = new Array();
+var arrAllMean = new Array();
+var arrTermAllPali = new Array();
+var arrWordIdTermId = new Array();
+
+var strTermTanslationTmp = "[%mean%](%pali% %mean2% %mymean%)";
+var strTermTanslationTmp2 = "[%mean%]";
+var termCounter = new Array();
+var noteCounter = 0; //正文内注释计数器
+
+function note(noteId, strDef = "unkow") {
+  document.write("haha");
+}
+
+function note_replace(strIn) {
+  /*
+	
+	*/
+  var output = strIn.replace("/*", "<script>");
+  output = output.replace("*/", "</script>");
+  return output;
+}
+
+//将存储状态的字符串转换为预显示字符串
+//设置状态为 0:未处理的原始状态
+function term_std_str_to_tran(strIn) {
+  return strIn
+    .replace(/\[\[/g, "<term status='0'>")
+    .replace(/\]\]/g, "</term>");
+}
+
+function term_std_str_to_edit(strIn) {
+  var arrText = strIn.split("/");
+  for (var i in arrText) {
+    //头尾是*
+    if (
+      arrText[i].substring(0, 1) == "*" &&
+      arrText[i].substring(arrText[i].length - 1) == "*"
+    ) {
+      var arrOneTermWord = arrText[i].split("@");
+      if (arrOneTermWord.length == 2) {
+        arrText[i] = "*" + arrOneTermWord[1];
+      }
+    }
+  }
+
+  return arrText.join("/");
+}
+
+function term_tran_edit_replace(strIn) {
+  var strEdit = strIn;
+  for (var x = 0; x < arrTerm2.length; x++) {
+    var strReplace =
+      "strEdit=strEdit.replace(/" +
+      arrTerm2[x].meaning +
+      '/g,"/*' +
+      arrTerm2[x].meaning +
+      '*/")';
+    eval(strReplace);
+  }
+  //strEdit=strEdit.replace(/\/*\/*/g,"\/*");
+  //strEdit=strEdit.replace(/\*\/\*\//g,"*\/");
+  return strEdit;
+}
+
+function term_edit_to_std_str(strIn) {
+  var arrText = strIn.split("/");
+  for (var i in arrText) {
+    //头尾是*
+    if (
+      arrText[i].substring(0, 1) == "*" &&
+      arrText[i].substring(arrText[i].length - 1) == "*"
+    ) {
+      var wordMeaning = arrText[i].substring(1, arrText[i].length - 1);
+      arrText[i] = "*" + term_get_std_str(wordMeaning) + "*";
+    }
+  }
+  return arrText.join("/");
+}
+function term_get_std_str(strMean) {
+  for (var x = 0; x < arrTerm2.length; x++) {
+    if (arrTerm2[x].meaning == strMean) {
+      return arrTerm2[x].guid + "@" + strMean;
+    }
+  }
+  return "unkow@" + strMean;
+}
+function term_get_my_std_str(strMean) {
+  for (var x in arrMyTerm) {
+    if (arrMyTerm[x].meaning == strMean) {
+      return arrMyTerm[x].guid + "@" + strMean;
+    }
+  }
+  return "unkow@" + strMean;
+}
+
+function note_lookup(word, showto) {
+  $("#" + showto).load("term.php?op=search&word=" + word, function (
+    responseTxt,
+    statusTxt,
+    xhr
+  ) {
+    if (statusTxt == "success") {
+      $(".term_note").each(function (index, element) {
+        $(this).html(note_init($(this).html()));
+        $(this).attr("status", 1);
+        note_refresh_new();
+      });
+    } else if (statusTxt == "error") {
+      console.error("Error: " + xhr.status + ": " + xhr.statusText);
+    }
+  });
+}
+
+function term_apply(guid) {
+  if (g_eCurrWord) {
+    setNodeText(g_eCurrWord, "note", "=term(" + guid + ")");
+    term_array_updata();
+  }
+}
+
+function term_data_copy_to_me(guid) {
+  $("#term_dict").load("term.php?op=copy&wordid=" + guid);
+}
+
+//我的术语字典进入编辑模式
+function term_edit(guid) {
+  $("#term_edit_btn1_" + guid).hide();
+  $("#term_edit_btn2_" + guid).show();
+  document.getElementById("term_dict_my_" + guid).style.display = "none";
+  document.getElementById("term_dict_my_edit_" + guid).style.display = "block";
+}
+
+//我的术语字典退出编辑模式
+function term_data_esc_edit(guid) {
+  $("#term_edit_btn1_" + guid).show();
+  $("#term_edit_btn2_" + guid).hide();
+  document.getElementById("term_dict_my_" + guid).style.display = "block";
+  document.getElementById("term_dict_my_edit_" + guid).style.display = "none";
+}
+//我的术语字典 编辑模式 保存
+
+function term_data_save(guid) {
+  if (guid == "") {
+    var strWord = $("#term_new_word").val();
+    var strMean = $("#term_new_mean").val();
+    var strMean2 = $("#term_new_mean2").val();
+    var strTag = $("#term_new_tag").val();
+    var strChannal = $("#term_new_channal").val();
+    var strLanguage = $("#term_new_language").val();
+    var strNote = $("#term_new_note").val();
+    let newTerm = new Object();
+    newTerm.guid = com_guid();
+    newTerm.word = strWord;
+    newTerm.meaning = strMean;
+    newTerm.other_meaning = strMean2;
+    newTerm.tag = strTag;
+    newTerm.channal = strChannal;
+    newTerm.language = strLanguage;
+
+    arrMyTerm.push(newTerm);
+  } else {
+    var strWord = $("#term_edit_word_" + guid).val();
+    var strMean = $("#term_edit_mean_" + guid).val();
+    var strMean2 = $("#term_edit_mean2_" + guid).val();
+    var strTag = $("#term_edit_tag_" + guid).val();
+    var strChannal = $("#term_edit_channal_" + guid).val();
+    var strLanguage = $("#term_edit_language_" + guid).val();
+    var strNote = $("#term_edit_note_" + guid).val();
+  }
+  $.get(
+    "term.php",
+    {
+      op: "save",
+      guid: guid,
+      word: strWord,
+      mean: strMean,
+      mean2: strMean2,
+      tag: strTag,
+      channal: strChannal,
+      language: strLanguage,
+      note: strNote,
+    },
+    function (data, status) {
+      try {
+        let result = JSON.parse(data);
+        if (result.status == 0) {
+          note_lookup(result.message, "term_dict");
+        } else {
+          ntf_show("term error" + result.message);
+        }
+      } catch (e) {
+        console.error("term_get_all_pali:" + e + " data:" + data);
+        ntf_show("term error");
+      }
+    }
+  );
+}
+function term_get_all_pali() {
+  $.get(
+    "term.php",
+    {
+      op: "allpali",
+    },
+    function (data, status) {
+      if (data.length > 0) {
+        try {
+          arrTermAllPali = JSON.parse(data);
+        } catch (e) {
+          console.error("term_get_all_pali:" + e + " data:" + data);
+        }
+      }
+    }
+  );
+}
+function term_lookup_all(pali) {
+  for (var x in arrTermAllPali) {
+    if (arrTermAllPali[x].word == pali) {
+      return arrTermAllPali[x];
+    }
+  }
+  return null;
+}
+
+function term_get_my() {
+  $.get(
+    "term.php",
+    {
+      op: "my",
+    },
+    function (data, status) {
+      if (data.length > 0) {
+        try {
+          arrMyTerm = JSON.parse(data);
+        } catch (e) {
+          console.error(e.error + " data:" + data);
+        }
+      }
+    }
+  );
+}
+
+//在我的术语字典里查询
+function term_lookup_my(pali) {
+  for (var x in arrMyTerm) {
+    if (arrMyTerm[x].meaning == pali) {
+      return arrMyTerm[x];
+    }
+    if (arrMyTerm[x].word == pali) {
+      return arrMyTerm[x];
+    }
+  }
+  return null;
+}
+function term_lookup_my_id(id) {
+  for (var x in arrMyTerm) {
+    if (arrMyTerm[x].guid == id) {
+      return arrMyTerm[x];
+    }
+  }
+  return null;
+}
+
+function term_get_all_meaning(word) {
+  $.get(
+    "term.php",
+    {
+      op: "allmean",
+      word: word,
+    },
+    function (data, status) {
+      $("#term_win_other_mean").html(data);
+    }
+  );
+}
+
+//刷新文档正在使用的术语数据
+function term_array_updata() {
+  arrTerm2 = new Array();
+  var arrTermDownLoadList = new Array();
+  var arrWordIdTermId = new Array();
+  var xAllWord = gXmlBookDataBody.getElementsByTagName("word");
+  for (var x = 0; x < xAllWord.length; x++) {
+    var sNote = getNodeText(xAllWord[x], "note");
+    var wid = getNodeText(xAllWord[x], "id");
+    if (sNote.substring(0, 6) == "=term(") {
+      var termId = sNote.slice(6, -1);
+      if (!arrTerm[termId]) {
+        arrTermDownLoadList.push(termId);
+      }
+      //person={wid:wid,tid:termId};
+      arrWordIdTermId.push({ wid: wid, tid: termId });
+    }
+  }
+  if (arrTermDownLoadList.length > 0) {
+    var idlist = arrTermDownLoadList.join();
+    idlist = idlist.replace(/,/g, "','");
+    idlist = "'" + idlist + "'";
+    $.get(
+      "term.php",
+      {
+        op: "extract",
+        list: idlist,
+      },
+      function (data, status) {
+        var obj = JSON.parse(data);
+        for (var x in obj) {
+          arrTerm[obj[x].guid] = obj[x];
+          arrTerm2.push(obj[x]);
+        }
+        if (g_eCurrWord) {
+          updataWordHeadById(getNodeText(g_eCurrWord, "id"));
+          refreshWordNote(g_eCurrWord.parentNode.parentNode);
+        }
+        for (var i = 0; i < arrWordIdTermId.length; i++) {
+          var wid = arrWordIdTermId[i].wid;
+          var sMean = arrTerm[arrWordIdTermId[i].tid].meaning;
+          doc_setWordDataById(wid, "mean", sMean);
+          updateWordBodyById(wid);
+        }
+      }
+    );
+  }
+}
+
+function term_updata_translation() {
+  termCounter = new Array();
+  noteCounter = 1;
+  $("term").each(function () {
+    let status = $(this).attr("status");
+    let termText = $(this).text();
+
+    if (termText.slice(0, 1) == "#") {
+      if (status == 0) {
+        $(this).attr("status", "1");
+        $(this).attr("type", "1");
+        $(this).attr("text", termText.slice(1));
+      }
+      let noteText = $(this).attr("text");
+      $(this).html(
+        "<a onclick=\"alert('" + noteText + "')\">[" + noteCounter + "]</a>"
+      );
+      noteCounter++;
+    } else {
+      if (status == 0) {
+        let myterm = term_lookup_my(termText); //我的术语字典
+        if (myterm) {
+          $(this).attr("status", "1");
+          $(this).attr("type", "0");
+          $(this).attr("guid", myterm.guid);
+          $(this).attr("pali", myterm.word);
+          $(this).attr("mean", myterm.meaning);
+          $(this).attr("mean2", myterm.other_meaning);
+          $(this).attr("replace", myterm.meaning);
+        } else {
+          $(this).attr("status", "2");
+        }
+      }
+      let guid = $(this).attr("guid");
+      let pali = $(this).attr("pali");
+      let mean = $(this).attr("mean");
+      let mean2 = $(this).attr("mean2");
+      var renderTo = $(this).attr("pos");
+      var noteText = "";
+
+      if (termCounter[guid]) {
+        termCounter[guid] = 2;
+      } else {
+        termCounter[guid] = 1;
+      }
+      var myterm = term_lookup_my(pali); //我的术语字典
+      let linkclass = "";
+      if (myterm) {
+        linkclass = "term_link";
+      } else {
+        linkclass = "term_link_new";
+      }
+      if (guid) {
+        if (renderTo == "wbw") {
+          noteText = "%note%";
+        } else {
+          if (termCounter[guid] == 1) {
+            noteText = strTermTanslationTmp;
+          } else {
+            noteText = strTermTanslationTmp2;
+          }
+        }
+
+        noteText = noteText.replace(
+          "[",
+          "<span class='" +
+            linkclass +
+            "' onclick=\"term_show_win('" +
+            guid +
+            "')\">"
+        );
+        noteText = noteText.replace("]", "</span>");
+        noteText = noteText.replace(
+          "%mean%",
+          "<span class='term_mean'>" + mean + "</span>"
+        );
+        noteText = noteText.replace(
+          "%pali%",
+          "<span class='term_pali'>" + pali + "</span>"
+        );
+        noteText = noteText.replace(
+          "%mean2%",
+          "<span class='term_mean2'>" + mean2 + "</span>"
+        );
+        noteText = noteText.replace(
+          "%note%",
+          "<span class='term_note'>" + "" + "</span>"
+        );
+        if (myterm) {
+          if (myterm.meaning != mean) {
+            noteText = noteText.replace(
+              "%mymean%",
+              "<span class='term_mean_my'>" + myterm.meaning + "</span>"
+            );
+          } else {
+            noteText = noteText.replace("%mymean%", "");
+          }
+        } else {
+          noteText = noteText.replace("%mymean%", "");
+        }
+      } else {
+        noteText =
+          "<span class='" +
+          linkclass +
+          "'  onclick=\"term_show_win('','" +
+          termText +
+          "')\">" +
+          termText +
+          "</span>";
+      }
+      $(this).html(noteText);
+    }
+  });
+}
+
+function term_show_win(guid, keyWord = "") {
+  if (guid == "") {
+    $(term_body).html(
+      "当前词条未创建。<br /><a onclick=\"term_add_new('" +
+        keyWord +
+        "')\">现在创建</a>"
+    );
+  } else {
+    let currWord = term_lookup_my_id(guid);
+    if (currWord) {
+      let termString = "";
+      let pali = currWord.word;
+      let pali_1 = pali.substring(0, 1).toUpperCase();
+      pali = pali_1 + pali.substring(1);
+      let mean = currWord.meaning;
+      let myterm = term_lookup_my(currWord.word); //我的术语字典
+      termString += "<div class='term_win_mean'>" + pali + "</div>";
+      termString +=
+        "<div class='term_win_pali'>意思:" + currWord.meaning + "</div>";
+      termString +=
+        "<div class='term_win_mean2'>其他意思:" +
+        currWord.other_meaning +
+        "</div>";
+      termString += "<div class='term_win_mymean'>我的词库:";
+      if (myterm) {
+        termString += "<b>" + myterm.meaning + "</b> ";
+      } else {
+        termString += "<input type='input'  placeholder='我的释义'>";
+      }
+      termString += "<span>其他:</span><span id='term_win_other_mean'></span>";
+      termString += "</div>";
+
+      if (currWord.note) {
+        termString += "<div class='term_win_note'>" + currWord.note + "</div>";
+      } else {
+        termString += "<div class='term_win_note'>Loading</div>";
+      }
+      $(term_body).html(termString);
+      term_get_all_meaning(currWord.word);
+
+      if (!currWord.note) {
+        $.get(
+          "term.php",
+          {
+            op: "load_id",
+            id: currWord.guid,
+          },
+          function (data, status, xhr) {
+            switch (status) {
+              case "success":
+                try {
+                  let loadWord = JSON.parse(data);
+                  $("#term_win_note").html(loadWord[0].note);
+                  //修改内存数据
+                  for (let x in arrMyTerm) {
+                    if (arrMyTerm[x].guid == loadWord[0].guid) {
+                      arrMyTerm[x].note = loadWord[0].note;
+                      return;
+                    }
+                  }
+                } catch (e) {
+                  console.error(e + " data:" + data);
+                }
+                break;
+              case "error":
+                console.error("Error: " + xhr.status + ": " + xhr.statusText);
+                break;
+            }
+          }
+        );
+      }
+    } else {
+      $(term_body).html("undefined guid");
+    }
+  }
+  document.getElementById("term_win").style.display = "flex";
+}
+
+function term_tmp(type, tmp) {
+  if (tmp == "new") {
+    switch (type) {
+      case "a":
+        strTermTanslationTmp = $("#term_my_tmp").val();
+        break;
+      case "a2":
+        strTermTanslationTmp2 = $("#term_my_tmp").val();
+        break;
+    }
+  } else {
+    switch (type) {
+      case "a":
+        strTermTanslationTmp = tmp;
+        break;
+      case "a2":
+        strTermTanslationTmp2 = tmp;
+        break;
+    }
+  }
+  term_updata_translation();
+}
+
+function term_add_new(keyword) {
+  document.getElementById("term_win").style.display = "none";
+  editor_show_right_tool_bar(true);
+  tab_click_b("term_dict", "tab_rb_dict");
+  note_lookup(keyword, "term_dict");
+}

+ 0 - 500
app/public/js/term.js

@@ -1,500 +0,0 @@
-var arrTerm = new Array();
-var arrTerm2 = new Array();
-var arrMyTerm = new Array();
-var arrAllMean = new Array();
-var arrTermAllPali = new Array();
-var arrWordIdTermId = new Array();
-
-var strTermTanslationTmp="[%mean%](%pali% %mean2% %mymean%)";
-var strTermTanslationTmp2="[%mean%]";
-var termCounter=new Array();
-var noteCounter=0; //正文内注释计数器
-
-function note(noteId,strDef="unkow"){
-	document.write("haha");
-}
-
-function note_replace(strIn){
-	/*
-	
-	*/
-	var output = strIn.replace("/*","<script>");
-	output = output.replace("*/","</script>");
-	return(output);
-}
-
-//将存储状态的字符串转换为预显示字符串
-//设置状态为 0:未处理的原始状态
-function term_std_str_to_tran(strIn){
-	return(strIn.replace(/\[\[/g,"<term status='0'>").replace(/\]\]/g,"</term>"));	
-}
-
-function term_std_str_to_edit(strIn){
-	var arrText = strIn.split("/");
-	for(var i in arrText){
-		//头尾是*
-		if(arrText[i].substring(0,1)=="*" && arrText[i].substring(arrText[i].length-1)=="*"){
-			var arrOneTermWord=arrText[i].split("@");
-			if(arrOneTermWord.length==2){
-				arrText[i]="*"+arrOneTermWord[1];
-			}
-		}
-	}
-
-	return(arrText.join("/"));
-}
-
-function term_tran_edit_replace(strIn){
-	var strEdit=strIn;
-	for(var x=0;x<arrTerm2.length;x++){
-		var strReplace="strEdit=strEdit.replace(/"+arrTerm2[x].meaning+"/g,\"/*"+arrTerm2[x].meaning+"*/\")";
-		eval(strReplace);
-	}
-	//strEdit=strEdit.replace(/\/*\/*/g,"\/*");
-	//strEdit=strEdit.replace(/\*\/\*\//g,"*\/");
-	return(strEdit);
-}
-
-function term_edit_to_std_str(strIn){
-	var arrText = strIn.split("/");
-	for(var i in arrText){
-		//头尾是*
-		if(arrText[i].substring(0,1)=="*" && arrText[i].substring(arrText[i].length-1)=="*"){
-			var wordMeaning=arrText[i].substring(1,arrText[i].length-1);
-			arrText[i]="*"+term_get_std_str(wordMeaning)+"*";
-		}
-	}
-	return(arrText.join("/"));
-}
-function term_get_std_str(strMean){
-	for(var x=0;x<arrTerm2.length;x++){
-		if(arrTerm2[x].meaning==strMean){
-			return(arrTerm2[x].guid+"@"+strMean);
-		}
-	}
-	return("unkow@"+strMean);
-}
-function term_get_my_std_str(strMean){
-		for(var x in arrMyTerm){
-		if(arrMyTerm[x].meaning==strMean){
-			return(arrMyTerm[x].guid+"@"+strMean);
-		}
-	}
-	return("unkow@"+strMean);
-}
-
-function note_lookup(word,showto){
-	$("#"+showto).load("term.php?op=search&word="+word,function(responseTxt,statusTxt,xhr){
-    if(statusTxt=="success"){
-		$(".term_note").each(function(index,element){
-			$(this).html(note_init($(this).html()));
-			$(this).attr("status",1);
-			note_refresh_new();
-		});			
-	}
-	else if(statusTxt=="error"){
-      console.error("Error: "+xhr.status+": "+xhr.statusText);
-	}
-  });
-}
-
-function term_apply(guid){
-	if(g_eCurrWord){
-		setNodeText(g_eCurrWord,"note","=term("+guid+")");
-		term_array_updata();
-	}
-}
-
-function term_data_copy_to_me(guid){
-	$("#term_dict").load("term.php?op=copy&wordid="+guid);
-}
-
-//我的术语字典进入编辑模式
-function term_edit(guid){
-	$("#term_edit_btn1_"+guid).hide();
-	$("#term_edit_btn2_"+guid).show();
-	document.getElementById("term_dict_my_"+guid).style.display="none";
-	document.getElementById("term_dict_my_edit_"+guid).style.display="block";
-}
-
-//我的术语字典退出编辑模式
-function term_data_esc_edit(guid){
-	$("#term_edit_btn1_"+guid).show();
-	$("#term_edit_btn2_"+guid).hide();
-	document.getElementById("term_dict_my_"+guid).style.display="block";
-	document.getElementById("term_dict_my_edit_"+guid).style.display="none";
-	
-}
-//我的术语字典 编辑模式 保存
-
-function term_data_save(guid){
-	if(guid==""){
-		var strWord=$("#term_new_word").val();
-		var strMean=$("#term_new_mean").val();
-		var strMean2=$("#term_new_mean2").val();
-		var strNote=$("#term_new_note").val();
-		var strTag=$("#term_new_tag").val();
-		let newTerm = new Object();
-		newTerm.guid=com_guid();
-		newTerm.word=strWord;
-		newTerm.meaning = strMean;
-		newTerm.other_meaning = strMean2;
-		arrMyTerm.push(newTerm);
-	}
-	else{
-		var strWord=$("#term_edit_word_"+guid).val();
-		var strMean=$("#term_edit_mean_"+guid).val();
-		var strMean2=$("#term_edit_mean2_"+guid).val();
-		var strNote=$("#term_edit_note_"+guid).val();
-	}
-	$.get("term.php",
-	{
-		op:"save",
-		guid:guid,
-		word:strWord,
-		mean:strMean,
-		mean2:strMean2,
-		tag:strTag,
-		note:strNote
-	},
-	function(data,status){
-		try{
-			let result= JSON.parse(data);
-			if(result.status==0){
-				note_lookup(result.message,"term_dict");
-			}
-			else{
-				ntf_show("term error"+result.message);
-			}
-		}
-		catch(e){
-			console.error("term_get_all_pali:"+e+" data:"+data);
-			ntf_show("term error");
-		}
-		
-		
-	});
-}
-function term_get_all_pali(){
- 	$.get("term.php",
-	{
-		op:"allpali"
-	},
-	function(data,status){
-		if(data.length>0){
-			try{
-			arrTermAllPali = JSON.parse(data);
-			}
-			catch(e){
-				console.error("term_get_all_pali:"+e+" data:"+data);
-			}
-		}
-	});
-}
-function term_lookup_all(pali){
-	for(var x in arrTermAllPali){
-		if(arrTermAllPali[x].word==pali){
-			return(arrTermAllPali[x]);
-		}
-	}
-	return(null);
-}
-
-function term_get_my(){
- 	$.get("term.php",
-	{
-		op:"my"
-	},
-	function(data,status){
-		if(data.length>0){
-			try{
-				arrMyTerm = JSON.parse(data);
-			}
-			catch(e){
-				console.error(e.error+" data:"+data);
-			}
-		}
-	});
-}
-
-//在我的术语字典里查询
-function term_lookup_my(pali){
-	for(var x in arrMyTerm){
-		if(arrMyTerm[x].meaning==pali){
-			return(arrMyTerm[x]);
-		}		
-		if(arrMyTerm[x].word==pali){
-			return(arrMyTerm[x]);
-		}
-	}
-	return(null);
-}
-function term_lookup_my_id(id){
-	for(var x in arrMyTerm){
-		if(arrMyTerm[x].guid==id){
-			return(arrMyTerm[x]);
-		}		
-	}
-	return(null);
-}
-
-function term_get_all_meaning(word){
- 	$.get("term.php",
-	{
-		op:"allmean",
-		word:word
-	},
-	function(data,status){
-		$("#term_win_other_mean").html(data);
-	});
-}
-
-//刷新文档正在使用的术语数据
-function term_array_updata(){
-	arrTerm2=new Array();
-	var arrTermDownLoadList=new Array();
-	var arrWordIdTermId=new Array();
-	var xAllWord = gXmlBookDataBody.getElementsByTagName("word");
-	for(var x=0;x<xAllWord.length;x++){
-		var sNote = getNodeText(xAllWord[x],"note");
-		var wid=getNodeText(xAllWord[x],"id");
-		if(sNote.substring(0,6)=="=term("){
-			var termId=sNote.slice(6,-1);
-			if(!arrTerm[termId]){
-				arrTermDownLoadList.push(termId);
-			}
-			//person={wid:wid,tid:termId};
-			arrWordIdTermId.push({wid:wid,tid:termId});
-		}
-	}
-	if(arrTermDownLoadList.length>0){
-		var idlist=arrTermDownLoadList.join();
-		idlist = idlist.replace(/,/g,"','");
-		idlist = "'"+ idlist + "'";
- 		$.get("term.php",
-		{
-		op:"extract",
-		list:idlist
-		},
-		function(data,status){
-			var obj = JSON.parse(data);
-			for(var x in obj){
-				arrTerm[obj[x].guid]=obj[x];
-				arrTerm2.push(obj[x]);
-			}
-			if(g_eCurrWord){
-				updataWordHeadById(getNodeText(g_eCurrWord,"id"));
-				refreshWordNote(g_eCurrWord.parentNode.parentNode);
-			}
-			for(var i=0;i<arrWordIdTermId.length;i++){
-				var wid=arrWordIdTermId[i].wid;
-				var sMean=arrTerm[arrWordIdTermId[i].tid].meaning;
-				doc_setWordDataById(wid,"mean",sMean);
-				updateWordBodyById(wid);
-			}
-				
-		});
-		
-	}
-}
-
-function term_updata_translation(){
-	termCounter=new Array();
-	noteCounter=1;
-	$("term").each(function(){
-		let status=$(this).attr("status");
-		let termText = $(this).text();
-		
-		if(termText.slice(0,1)=="#"){
-			if(status==0){
-				$(this).attr("status","1");
-				$(this).attr("type","1");
-				$(this).attr("text",termText.slice(1));
-			}
-			let noteText=$(this).attr("text");
-			$(this).html("<a onclick=\"alert('"+noteText+"')\">["+noteCounter+"]</a>");
-			noteCounter++;
-		}
-		else{
-			if(status==0){
-				let myterm=term_lookup_my(termText);//我的术语字典
-				if(myterm){
-					$(this).attr("status","1");
-					$(this).attr("type","0");
-					$(this).attr("guid",myterm.guid);
-					$(this).attr("pali",myterm.word);
-					$(this).attr("mean",myterm.meaning);
-					$(this).attr("mean2",myterm.other_meaning);
-					$(this).attr("replace",myterm.meaning);
-				}
-				else{
-					$(this).attr("status","2");
-				}
-			}
-			let guid=$(this).attr("guid");
-			let pali=$(this).attr("pali");
-			let mean=$(this).attr("mean");
-			let mean2=$(this).attr("mean2");
-			var renderTo=$(this).attr("pos");
-			var noteText="";
-			
-			if(termCounter[guid]){
-				termCounter[guid]=2;
-			}
-			else{
-				termCounter[guid]=1;
-			}
-			var myterm=term_lookup_my(pali);//我的术语字典
-			let linkclass="";
-			if(myterm){
-				linkclass="term_link";
-			}
-			else{
-				linkclass="term_link_new";
-			}			
-			if(guid){
-				
-				if(renderTo=="wbw"){
-					noteText="%note%";
-				}
-				else{
-					if(termCounter[guid]==1){
-						noteText=strTermTanslationTmp;
-					}
-					else{
-						noteText=strTermTanslationTmp2;
-					}
-				}
-
-				noteText=noteText.replace("[","<span class='"+linkclass+"' onclick=\"term_show_win('"+guid+"')\">");
-				noteText=noteText.replace("]","</span>");
-				noteText=noteText.replace("%mean%","<span class='term_mean'>"+mean+"</span>");
-				noteText=noteText.replace("%pali%","<span class='term_pali'>"+pali+"</span>");
-				noteText=noteText.replace("%mean2%","<span class='term_mean2'>"+mean2+"</span>");
-				noteText=noteText.replace("%note%","<span class='term_note'>"+""+"</span>");
-				if(myterm){
-					if(myterm.meaning!=mean){
-						noteText=noteText.replace("%mymean%","<span class='term_mean_my'>"+myterm.meaning+"</span>");
-					}
-					else{
-						noteText=noteText.replace("%mymean%","");
-					}
-				}
-				else{
-					noteText=noteText.replace("%mymean%","");
-				}
-			}
-			else{
-				noteText="<span class='"+linkclass+"'  onclick=\"term_show_win('','"+termText+"')\">"+termText+"</span>";
-			}
-			$(this).html(noteText);
-		}
-	});
-}
-
-function term_show_win(guid,keyWord=""){
-	if(guid==""){
-		$(term_body).html("当前词条未创建。<br /><a onclick=\"term_add_new('"+keyWord+"')\">现在创建</a>");
-	}
-	else{
-		let currWord = term_lookup_my_id(guid);
-		if(currWord){
-			let termString="";
-			let pali=currWord.word;
-			let pali_1= pali.substring(0,1).toUpperCase();
-			pali=pali_1+pali.substring(1);
-			let mean=currWord.meaning;
-			let myterm=term_lookup_my(currWord.word);//我的术语字典
-			termString+="<div class='term_win_mean'>"+pali+"</div>";
-			termString+="<div class='term_win_pali'>意思:"+currWord.meaning+"</div>";
-			termString+="<div class='term_win_mean2'>其他意思:"+currWord.other_meaning+"</div>";
-			termString+="<div class='term_win_mymean'>我的词库:";
-			if(myterm){
-				termString+="<b>"+myterm.meaning+"</b> ";
-			}
-			else{
-				termString+="<input type='input'  placeholder='我的释义'>";
-			}
-			termString+="<span>其他:</span><span id='term_win_other_mean'></span>";
-			termString+="</div>";
-			
-			if(currWord.note){
-				termString+="<div class='term_win_note'>"+currWord.note+"</div>";
-			}
-			else{
-				termString+="<div class='term_win_note'>Loading</div>";
-			}
-			$(term_body).html(termString);
-			term_get_all_meaning(currWord.word);
-			
-			if(!currWord.note){
-				$.get("term.php",
-				{
-					op:"load_id",
-					id:currWord.guid
-				},
-				function(data,status,xhr){
-					switch(status){
-						case "success":
-							try{
-								let loadWord = JSON.parse(data);
-								$("#term_win_note").html(loadWord[0].note);
-								//修改内存数据
-								for(let x in arrMyTerm){
-									if(arrMyTerm[x].guid==loadWord[0].guid){
-										arrMyTerm[x].note=loadWord[0].note;
-										return;
-									}
-								}
-							}
-							catch(e){
-								console.error(e+" data:"+data);
-							}						
-						break;
-						case "error":
-							console.error("Error: "+xhr.status+": "+xhr.statusText);
-						break;
-					}
-				});
-
-			}
-		}
-		else{
-			$(term_body).html("undefined guid");
-		}
-	}
-	document.getElementById("term_win").style.display="flex";
-	
-}
-
-function term_tmp(type,tmp){
-	if(tmp=="new"){
-		switch(type){
-			case "a":
-				strTermTanslationTmp=$("#term_my_tmp").val();
-				break;
-			case "a2":
-				strTermTanslationTmp2=$("#term_my_tmp").val();
-			break;
-		}		
-		
-	}
-	else{
-		switch(type){
-			case "a":
-				strTermTanslationTmp=tmp;
-				break;
-			case "a2":
-				strTermTanslationTmp2=tmp;
-			break;
-		}
-	}
-	term_updata_translation();
-}
-
-function term_add_new(keyword){
-	document.getElementById("term_win").style.display="none";
-	editor_show_right_tool_bar(true);
-	tab_click_b('term_dict','tab_rb_dict');
-	note_lookup(keyword,"term_dict");
-}

+ 2 - 4
app/studio/editor.php

@@ -51,8 +51,6 @@ else{$currDevice="computer";}
 	<script language="javascript" src="js/dict.js"></script>
 	<script language="javascript" src="js/relation.js"></script>
 
-
-
 	<script language="javascript" src="js/relation_list.json"></script>
 	
 	<script language="javascript" src="sent/sent.js"></script>
@@ -63,7 +61,7 @@ else{$currDevice="computer";}
 	<script src="../public/js/mermaid.min.js"></script>
 	
 	<script language="javascript" src="module/editor/language/default.js"></script>	
-	<script src="js/jquery-3.3.1.min.js"></script>
+	<script src="./js/jquery-3.3.1.min.js"></script>
 	<script src="../public/js/jquery-ui-1.12.1/jquery-ui.js"></script>
 
 	<script src="../term/term.js"></script>
@@ -72,7 +70,7 @@ else{$currDevice="computer";}
 	<script src="../uwbw/update.js"></script>
 	<script src="../usent/usent.js"></script>
 	<script src="../fileindex/file_info.js"></script>
-	<script language="javascript" src="../channal/channal.js"></script>
+	<script  src="../channal/channal.js"></script>
 	
 
 	<script language="javascript">

+ 116 - 73
app/studio/js/render.js

@@ -450,7 +450,7 @@ function updataHeadingBlockInHtml(book, par) {
   }
 }
 
-function renderBlock() { }
+function renderBlock() {}
 /*
 重绘翻译数据块
 */
@@ -655,7 +655,7 @@ function renderTranslateParBlockInner(elementBlock) {
   return output;
 }
 
-function renderTranslateParBlockInnerPreview(strText) { }
+function renderTranslateParBlockInnerPreview(strText) {}
 function updateTranslationPreview_a(blockId, text) {
   var out = "";
   var newText = text;
@@ -1324,12 +1324,17 @@ function render_sent_tool_bar(elementBlock, begin) {
       iEnd;
   }
   output +=
-    "<span style='flex: 7;display: flex;'><div style='background-color: silver;'><span style='font-size: large; font-weight: bolder;' title=" + gLocal.gui.text_num + ">" +
+    "<span style='flex: 7;display: flex;'><div style='background-color: silver;'><span style='font-size: large; font-weight: bolder;' title=" +
+    gLocal.gui.text_num +
+    ">" +
     sentIdString +
     "</span><button class='icon_btn' onclick=\"copy_to_clipboard('" +
     sentIdStringLink +
-    "')\" title=" + gLocal.gui.copy_to_clipboard + ">";
-  output += '<svg style="fill: var(--link-color);" t="1601480724259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4644"><path d="M791.272727 93.090909H139.636364v837.818182a93.090909 93.090909 0 0 1-93.090909-93.090909V93.090909a93.090909 93.090909 0 0 1 93.090909-93.090909h558.545454a93.090909 93.090909 0 0 1 93.090909 93.090909zM232.727273 186.181818h744.727272v837.818182H232.727273V186.181818z" p-id="4645"></path></svg>';
+    "')\" title=" +
+    gLocal.gui.copy_to_clipboard +
+    ">";
+  output +=
+    '<svg style="fill: var(--link-color);" t="1601480724259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4644"><path d="M791.272727 93.090909H139.636364v837.818182a93.090909 93.090909 0 0 1-93.090909-93.090909V93.090909a93.090909 93.090909 0 0 1 93.090909-93.090909h558.545454a93.090909 93.090909 0 0 1 93.090909 93.090909zM232.727273 186.181818h744.727272v837.818182H232.727273V186.181818z" p-id="4645"></path></svg>';
   output += "</button>";
   //	output += "<span>"+abook+"-"+aparagraph+"-"+iBegin+"-"+iEnd+"</span>";
   if (_display_sbs == 0) {
@@ -1339,7 +1344,9 @@ function render_sent_tool_bar(elementBlock, begin) {
       abook +
       "&para=" +
       aparagraph +
-      "')\" target='_blank' title='" + gLocal.gui.scan_in_reader + "'>";
+      "')\" target='_blank' title='" +
+      gLocal.gui.scan_in_reader +
+      "'>";
   } else {
     //逐句模式
     output +=
@@ -1351,12 +1358,17 @@ function render_sent_tool_bar(elementBlock, begin) {
       iBegin +
       "&end=" +
       iEnd +
-      "')\" target='_blank' title='" + gLocal.gui.scan_in_reader + "'>";
+      "')\" target='_blank' title='" +
+      gLocal.gui.scan_in_reader +
+      "'>";
   }
-  output += '<svg style="fill: var(--link-color);" t="1601482753387" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22291"><path d="M703.730499 544.578527a191.730499 191.730499 0 0 1 156.260356 302.806368l122.004508 122.004507a31.955083 31.955083 0 0 1-45.248398 45.184488l-121.940597-121.940598A191.730499 191.730499 0 1 1 703.730499 544.642437z m-6.391017-511.28133c38.857381 0 70.301183 30.67688 70.301183 68.511698v386.912146a255.640665 255.640665 0 1 0-69.022979 503.16474l-563.687667 0.06391c-38.857381 0-70.301183-30.67688-70.301183-68.447788V101.808895C64.628836 63.910166 96.072638 33.233286 134.930019 33.233286h562.409463z m6.391017 575.191496a127.820333 127.820333 0 1 0 0 255.640665 127.820333 127.820333 0 0 0 0-255.640665z m-351.505915 0h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511281h127.820332a31.955083 31.955083 0 0 0 0-63.910166z m0-191.730499h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h127.820332a31.955083 31.955083 0 0 0 0-63.910167z m191.730499-191.730499h-319.550831a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h319.550831a31.955083 31.955083 0 0 0 0-63.910167z" p-id="22292"></path></svg>';
+  output +=
+    '<svg style="fill: var(--link-color);" t="1601482753387" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22291"><path d="M703.730499 544.578527a191.730499 191.730499 0 0 1 156.260356 302.806368l122.004508 122.004507a31.955083 31.955083 0 0 1-45.248398 45.184488l-121.940597-121.940598A191.730499 191.730499 0 1 1 703.730499 544.642437z m-6.391017-511.28133c38.857381 0 70.301183 30.67688 70.301183 68.511698v386.912146a255.640665 255.640665 0 1 0-69.022979 503.16474l-563.687667 0.06391c-38.857381 0-70.301183-30.67688-70.301183-68.447788V101.808895C64.628836 63.910166 96.072638 33.233286 134.930019 33.233286h562.409463z m6.391017 575.191496a127.820333 127.820333 0 1 0 0 255.640665 127.820333 127.820333 0 0 0 0-255.640665z m-351.505915 0h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511281h127.820332a31.955083 31.955083 0 0 0 0-63.910166z m0-191.730499h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h127.820332a31.955083 31.955083 0 0 0 0-63.910167z m191.730499-191.730499h-319.550831a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h319.550831a31.955083 31.955083 0 0 0 0-63.910167z" p-id="22292"></path></svg>';
   output += "</button>";
   output +=
-    "<button class='icon_btn' title='" + gLocal.gui.relational_map + "' class='rel_map' onclick=\"sent_show_rel_map('" +
+    "<button class='icon_btn' title='" +
+    gLocal.gui.relational_map +
+    "' class='rel_map' onclick=\"sent_show_rel_map('" +
     abook +
     "','" +
     aparagraph +
@@ -1364,7 +1376,9 @@ function render_sent_tool_bar(elementBlock, begin) {
     iBegin +
     "','" +
     iEnd +
-    "')\">" + '<svg style="transform: rotate(-90deg); fill: var(--link-color);" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' + "</button>";
+    "')\">" +
+    '<svg style="transform: rotate(-90deg); fill: var(--link-color);" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' +
+    "</button>";
   output += "</div>";
   output += "<guide gid='sent_func' style='margin:unset;'></guide>";
   output += "</span>";
@@ -1624,12 +1638,17 @@ function renderWordParBlockInner(elementBlock) {
           book + "-" + paragraph + "-" + nextBegin + "-" + nextEnd;
         let sentIdStringLink = "{{" + sentIdString + "}}";
         output +=
-          "<span style='flex: 7;display: flex;'><div style='background-color: silver;'><span style='font-size: large; font-weight: bolder;' title=" + gLocal.gui.text_num + ">" +
+          "<span style='flex: 7;display: flex;'><div style='background-color: silver;'><span style='font-size: large; font-weight: bolder;' title=" +
+          gLocal.gui.text_num +
+          ">" +
           sentIdString +
           "</span><button class='icon_btn' onclick=\"copy_to_clipboard('" +
           sentIdStringLink +
-          "')\" title=" + gLocal.gui.copy_to_clipboard + ">";
-        output += '<svg style="fill: var(--link-color);" t="1601480724259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4644"><path d="M791.272727 93.090909H139.636364v837.818182a93.090909 93.090909 0 0 1-93.090909-93.090909V93.090909a93.090909 93.090909 0 0 1 93.090909-93.090909h558.545454a93.090909 93.090909 0 0 1 93.090909 93.090909zM232.727273 186.181818h744.727272v837.818182H232.727273V186.181818z" p-id="4645"></path></svg>';
+          "')\" title=" +
+          gLocal.gui.copy_to_clipboard +
+          ">";
+        output +=
+          '<svg style="fill: var(--link-color);" t="1601480724259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4644"><path d="M791.272727 93.090909H139.636364v837.818182a93.090909 93.090909 0 0 1-93.090909-93.090909V93.090909a93.090909 93.090909 0 0 1 93.090909-93.090909h558.545454a93.090909 93.090909 0 0 1 93.090909 93.090909zM232.727273 186.181818h744.727272v837.818182H232.727273V186.181818z" p-id="4645"></path></svg>';
         output += "</button>";
         output +=
           "<button class='icon_btn'  onclick=\"window.open('../pcdl/reader.php?view=sent&book=" +
@@ -1640,12 +1659,17 @@ function renderWordParBlockInner(elementBlock) {
           nextBegin +
           "&end=" +
           nextEnd +
-          "')\" target='_blank' title='" + gLocal.gui.scan_in_reader + "'>";
+          "')\" target='_blank' title='" +
+          gLocal.gui.scan_in_reader +
+          "'>";
 
-        output += '<svg style="fill: var(--link-color);" t="1601482753387" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22291"><path d="M703.730499 544.578527a191.730499 191.730499 0 0 1 156.260356 302.806368l122.004508 122.004507a31.955083 31.955083 0 0 1-45.248398 45.184488l-121.940597-121.940598A191.730499 191.730499 0 1 1 703.730499 544.642437z m-6.391017-511.28133c38.857381 0 70.301183 30.67688 70.301183 68.511698v386.912146a255.640665 255.640665 0 1 0-69.022979 503.16474l-563.687667 0.06391c-38.857381 0-70.301183-30.67688-70.301183-68.447788V101.808895C64.628836 63.910166 96.072638 33.233286 134.930019 33.233286h562.409463z m6.391017 575.191496a127.820333 127.820333 0 1 0 0 255.640665 127.820333 127.820333 0 0 0 0-255.640665z m-351.505915 0h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511281h127.820332a31.955083 31.955083 0 0 0 0-63.910166z m0-191.730499h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h127.820332a31.955083 31.955083 0 0 0 0-63.910167z m191.730499-191.730499h-319.550831a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h319.550831a31.955083 31.955083 0 0 0 0-63.910167z" p-id="22292"></path></svg>';
+        output +=
+          '<svg style="fill: var(--link-color);" t="1601482753387" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22291"><path d="M703.730499 544.578527a191.730499 191.730499 0 0 1 156.260356 302.806368l122.004508 122.004507a31.955083 31.955083 0 0 1-45.248398 45.184488l-121.940597-121.940598A191.730499 191.730499 0 1 1 703.730499 544.642437z m-6.391017-511.28133c38.857381 0 70.301183 30.67688 70.301183 68.511698v386.912146a255.640665 255.640665 0 1 0-69.022979 503.16474l-563.687667 0.06391c-38.857381 0-70.301183-30.67688-70.301183-68.447788V101.808895C64.628836 63.910166 96.072638 33.233286 134.930019 33.233286h562.409463z m6.391017 575.191496a127.820333 127.820333 0 1 0 0 255.640665 127.820333 127.820333 0 0 0 0-255.640665z m-351.505915 0h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511281h127.820332a31.955083 31.955083 0 0 0 0-63.910166z m0-191.730499h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h127.820332a31.955083 31.955083 0 0 0 0-63.910167z m191.730499-191.730499h-319.550831a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h319.550831a31.955083 31.955083 0 0 0 0-63.910167z" p-id="22292"></path></svg>';
         output += "</button>";
         output +=
-          "<button class='icon_btn' title='" + gLocal.gui.relational_map + "' class='rel_map' onclick=\"sent_show_rel_map('" +
+          "<button class='icon_btn' title='" +
+          gLocal.gui.relational_map +
+          "' class='rel_map' onclick=\"sent_show_rel_map('" +
           book +
           "','" +
           paragraph +
@@ -1653,7 +1677,9 @@ function renderWordParBlockInner(elementBlock) {
           nextBegin +
           "','" +
           nextEnd +
-          "')\">" + '<svg style="transform: rotate(-90deg); fill: var(--link-color);" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' + "</button>";
+          "')\">" +
+          '<svg style="transform: rotate(-90deg); fill: var(--link-color);" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' +
+          "</button>";
         output += "</div>";
         output += "<guide gid='sent_func' style='margin:unset;'></guide>";
         output += "</span>";
@@ -1846,7 +1872,8 @@ function render_tran_sent_block(
       output += "未知的频道名";
     }
     output += "</span>";
-    output += "<span style='margin-left: auto;' class='send_status' id='send_" +
+    output +=
+      "<span style='margin-left: auto;' class='send_status' id='send_" +
       book +
       "_" +
       para +
@@ -1950,7 +1977,8 @@ function render_tran_sent_block(
       "' >";
     output += objSent.text;
     output += "</textarea>";
-    output += "<div class='trans_text_info' style='justify-content: flex-end;'>";
+    output +=
+      "<div class='trans_text_info' style='justify-content: flex-end;'>";
     output += "<span></span>";
     output +=
       "<button class='icon_btn' onclick=\"trans_text_save('" +
@@ -1963,7 +1991,10 @@ function render_tran_sent_block(
       end +
       "','" +
       channal +
-      "')\" title=" + gLocal.gui.draft + ">" + '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="svg/icon.svg#ic_save"></use></svg>'
+      "')\" title=" +
+      gLocal.gui.draft +
+      ">" +
+      '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="svg/icon.svg#ic_save"></use></svg>';
     output += "</button>";
     output +=
       "<button class='icon_btn' onclick=\"trans_text_send('" +
@@ -1976,7 +2007,10 @@ function render_tran_sent_block(
       end +
       "','" +
       channal +
-      "')\" title=" + gLocal.gui.send + " disabled>" + '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="svg/icon.svg#send_by_paper_plane"></use></svg>'
+      "')\" title=" +
+      gLocal.gui.send +
+      " disabled>" +
+      '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="svg/icon.svg#send_by_paper_plane"></use></svg>';
     output += "</button>";
 
     output += "</div>";
@@ -1989,7 +2023,12 @@ function render_tran_sent_block(
       "<span></span>" +
       "<span><span class='tools'>";
 
-    output += "<button class='icon_btn' title=" + gLocal.gui.accept_copy + ">" + "<svg class='icon' style='fill: var(--link-color); height: 2em; width: 2em; '><use xlink='http://www.w3.org/1999/xlink' href='svg/icon.svg#ic_move_to_inbox'></use></svg>" + "</button>";
+    output +=
+      "<button class='icon_btn' title=" +
+      gLocal.gui.accept_copy +
+      ">" +
+      "<svg class='icon' style='fill: var(--link-color); height: 2em; width: 2em; '><use xlink='http://www.w3.org/1999/xlink' href='svg/icon.svg#ic_move_to_inbox'></use></svg>" +
+      "</button>";
 
     if (channal == 0) {
       //百家言 显示更多按钮
@@ -2002,7 +2041,11 @@ function render_tran_sent_block(
         begin +
         "','" +
         end +
-        "')\" title=" + gLocal.gui.message + ">" + '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="plugin/system_message/icon.svg#icon_message"></use></svg>' + "</button>";
+        "')\" title=" +
+        gLocal.gui.message +
+        ">" +
+        '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="plugin/system_message/icon.svg#icon_message"></use></svg>' +
+        "</button>";
     }
 
     output += "</span><span>" + usent_count + "</span></span>";
@@ -2015,15 +2058,15 @@ function render_tran_sent_block(
 function trans_text_save(book, para, begin, end, channal) {
   let textarea = $(
     "#trans_sent_edit_" +
-    book +
-    "_" +
-    para +
-    "_" +
-    begin +
-    "_" +
-    end +
-    "_" +
-    channal
+      book +
+      "_" +
+      para +
+      "_" +
+      begin +
+      "_" +
+      end +
+      "_" +
+      channal
   );
   if (textarea) {
     let objsent = new Object();
@@ -2044,16 +2087,16 @@ function sent_edit_click(book, para, begin, end, channal) {
   $(".trans_sent_edit").parent().hide(200);
   $(
     ".trans_sent_edit[book='" +
-    book +
-    "'][para='" +
-    para +
-    "'][begin='" +
-    begin +
-    "'][end='" +
-    end +
-    "'][channal='" +
-    channal +
-    "']"
+      book +
+      "'][para='" +
+      para +
+      "'][begin='" +
+      begin +
+      "'][end='" +
+      end +
+      "'][channal='" +
+      channal +
+      "']"
   )
     .parent()
     .show();
@@ -2146,7 +2189,7 @@ function renderWordHeadInner(element) {
     wStyle += " term_word_head";
   } else {
     if (sParent.length > 0) {
-      if (term_lookup_my(sParent) != null) {
+      if (term_lookup_my(sParent) != false) {
         wStyle += " term_my";
       } else {
         if (term_lookup_all(sParent) != null) {
@@ -2802,12 +2845,12 @@ function renderWordDetailByElement(xmlElement) {
             ) {
               arrMeaning.push(
                 g_DictWordList[iDict].dictID +
-                "$" +
-                arrMeaning.length +
-                "$$" +
-                arrMean[i] +
-                "$" +
-                g_DictWordList[iDict].Language
+                  "$" +
+                  arrMeaning.length +
+                  "$$" +
+                  arrMean[i] +
+                  "$" +
+                  g_DictWordList[iDict].Language
               );
             }
           }
@@ -2857,12 +2900,12 @@ function renderWordDetailByElement(xmlElement) {
               ) {
                 arrMeaning.push(
                   g_DictWordList[iDict].dictID +
-                  "$" +
-                  arrMeaning.length +
-                  "$*$" +
-                  getLocalParentFormulaStr(wordGramma0, arrMean[i]) +
-                  "$" +
-                  g_DictWordList[iDict].Language
+                    "$" +
+                    arrMeaning.length +
+                    "$*$" +
+                    getLocalParentFormulaStr(wordGramma0, arrMean[i]) +
+                    "$" +
+                    g_DictWordList[iDict].Language
                 );
               }
             }
@@ -2912,12 +2955,12 @@ function renderWordDetailByElement(xmlElement) {
               ) {
                 arrMeaning.push(
                   g_DictWordList[iDict].dictID +
-                  "$" +
-                  arrMeaning.length +
-                  "$**$" +
-                  getLocalParentFormulaStr(wordGramma1, arrMean[i]) +
-                  "$" +
-                  g_DictWordList[iDict].Language
+                    "$" +
+                    arrMeaning.length +
+                    "$**$" +
+                    getLocalParentFormulaStr(wordGramma1, arrMean[i]) +
+                    "$" +
+                    g_DictWordList[iDict].Language
                 );
               }
             }
@@ -3392,7 +3435,7 @@ function renderWordDetailByElement(xmlElement) {
   return _txtOutDetail;
 }
 
-function renderWordNoteDivByParaNo(book, paragraph) { }
+function renderWordNoteDivByParaNo(book, paragraph) {}
 /*
 paragraph word note
 */
@@ -3591,7 +3634,7 @@ function updateWordNote(element) {
   }
 }
 
-function updateWordCommentary(element) { }
+function updateWordCommentary(element) {}
 
 //根据xmlDocument 对象中的单词序号修改单词块的显示(不含Pali)
 //返回 无
@@ -3714,13 +3757,13 @@ function prev_page() {
   gVisibleParEndOld = gVisibleParEnd;
   if (
     g_allparlen_array[gVisibleParEnd - 1] -
-    g_allparlen_array[gVisibleParBegin - 1] <=
+      g_allparlen_array[gVisibleParBegin - 1] <=
     gDisplayCapacity
   ) {
     gVisibleParBegin -= 1;
   } else if (
     g_allparlen_array[gVisibleParEnd + 1] -
-    g_allparlen_array[gVisibleParBegin - 1] >
+      g_allparlen_array[gVisibleParBegin - 1] >
     gDisplayCapacity
   ) {
     gVisibleParBegin -= 1;
@@ -3747,13 +3790,13 @@ function next_page() {
 
   if (
     g_allparlen_array[gVisibleParEnd + 1] -
-    g_allparlen_array[gVisibleParBegin + 1] <=
+      g_allparlen_array[gVisibleParBegin + 1] <=
     gDisplayCapacity
   ) {
     gVisibleParEnd += 1;
   } else if (
     g_allparlen_array[gVisibleParEnd + 1] -
-    g_allparlen_array[gVisibleParBegin + 1] >
+      g_allparlen_array[gVisibleParBegin + 1] >
     gDisplayCapacity
   ) {
     gVisibleParBegin += 1;
@@ -4194,12 +4237,12 @@ function refreshNoteNumber() {
     let id = $(this).attr("wid");
     $(this).html(
       "<a href='#word_note_root_" +
-      id +
-      "' name=\"word_note_" +
-      id +
-      '">[' +
-      (index + 1) +
-      "]</a>"
+        id +
+        "' name=\"word_note_" +
+        id +
+        '">[' +
+        (index + 1) +
+        "]</a>"
     );
   });
 

+ 0 - 0
app/studio/note/note.js → app/studio/note-/note.js


+ 0 - 0
app/studio/note/note.php → app/studio/note-/note.php


+ 0 - 0
app/studio/term.php → app/studio/term-.php


+ 17 - 8
app/term/term.js

@@ -370,7 +370,7 @@ function term_apply(guid) {
 }
 
 function term_data_copy_to_me(guid) {
-  $("#term_dict").load("term.php?op=copy&wordid=" + guid);
+  $("#term_dict").load("../term/term.php?op=copy&wordid=" + guid);
 }
 
 //我的术语字典进入编辑模式
@@ -395,19 +395,27 @@ function term_data_save(guid) {
     var strWord = $("#term_new_word").val();
     var strMean = $("#term_new_mean").val();
     var strMean2 = $("#term_new_mean2").val();
-    var strNote = $("#term_new_note").val();
     var strTag = $("#term_new_tag").val();
+    var strChannal = $("#term_new_channal").val();
+    var strLanguage = $("#term_new_language").val();
+    var strNote = $("#term_new_note").val();
     let newTerm = new Object();
     newTerm.guid = com_guid();
     newTerm.word = strWord;
     newTerm.meaning = strMean;
     newTerm.other_meaning = strMean2;
+    newTerm.tag = strTag;
+    newTerm.channal = strChannal;
+    newTerm.language = strLanguage;
+
     arrMyTerm.push(newTerm);
   } else {
     var strWord = $("#term_edit_word_" + guid).val();
     var strMean = $("#term_edit_mean_" + guid).val();
     var strMean2 = $("#term_edit_mean2_" + guid).val();
     var strTag = $("#term_edit_tag_" + guid).val();
+    var strChannal = $("#term_edit_channal_" + guid).val();
+    var strLanguage = $("#term_edit_language_" + guid).val();
     var strNote = $("#term_edit_note_" + guid).val();
   }
   $.get(
@@ -419,8 +427,9 @@ function term_data_save(guid) {
       mean: strMean,
       mean2: strMean2,
       tag: strTag,
+      channal: strChannal,
+      language: strLanguage,
       note: strNote,
-      username: getCookie("username"),
     },
     function (data, status) {
       try {
@@ -439,7 +448,7 @@ function term_data_save(guid) {
 }
 function term_get_all_pali() {
   $.get(
-    "term.php",
+    "../term/term.php",
     {
       op: "allpali",
     },
@@ -465,7 +474,7 @@ function term_lookup_all(pali) {
 
 function term_get_my() {
   $.get(
-    "term.php",
+    "../term/term.php",
     {
       op: "my",
     },
@@ -511,7 +520,7 @@ function term_lookup_my_id(id) {
 
 function term_get_all_meaning(word) {
   $.get(
-    "term.php",
+    "../term/term.php",
     {
       op: "allmean",
       word: word,
@@ -545,7 +554,7 @@ function term_array_updata() {
     idlist = idlist.replace(/,/g, "','");
     idlist = "'" + idlist + "'";
     $.get(
-      "term.php",
+      "../term/term.php",
       {
         op: "extract",
         list: idlist,
@@ -750,7 +759,7 @@ function term_show_win(guid, keyWord = "") {
 
       if (!currWord.note) {
         $.get(
-          "term.php",
+          "../term/term.php",
           {
             op: "load_id",
             id: currWord.guid,

+ 56 - 42
app/term/term.php

@@ -148,10 +148,9 @@ switch($op){
 		echo"<div class='pali'>{$word}</div>";
 		//查本人数据
 		echo "<div></div>";//My Term
-		$query = "select * from term  where \"word\" = ".$PDO->quote($word)." AND \"owner\"= ".$PDO->quote($username)." limit 0,30";
-		$Fetch = PDO_FetchAll($query);
+		$query = "select * from term  where word = ? AND  owner = ? limit 0,30";
+		$Fetch = PDO_FetchAll($query,array($word,$_COOKIE["userid"]));
 		$iFetch=count($Fetch);
-		$count_return+=$iFetch;
 		if($iFetch>0){
 			for($i=0;$i<$iFetch;$i++){
 				$mean=$Fetch[$i]["meaning"];
@@ -164,6 +163,8 @@ switch($op){
 				echo "<div class='mean'><span>".$mean."</span>";
 				echo "<span class='other_mean' style='margin-right: auto;'>(".$Fetch[$i]["other_meaning"].")</span></div>";
 				echo "<div class='tag'>{$Fetch[$i]["tag"]}</div>";
+				echo "<div class='mean'>{$Fetch[$i]["channal"]}</div>";				
+				echo "<div class='mean'>{$Fetch[$i]["language"]}</div>";
 				echo "<div class='term_note' status=0>".$Fetch[$i]["note"]."</div>";
 				echo "</div>";
 				//编辑词条表单
@@ -172,20 +173,22 @@ switch($op){
 				echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->first_choice_word}:</span>";
 				echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->required}' id='term_edit_mean_{$guid}' value='$mean' /></div>";//'意思'
 		
-				//echo "<div class='mean'><input type='input' id='term_edit_mean_{$guid}'  placeholder='{$_local->gui->meaning}' value='$mean' /></div>";//'意思'
 				echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->other_meaning}:</span>";
 				echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->optional}' id='term_edit_mean2_{$guid}' value='".$Fetch[$i]["other_meaning"]."'/></div>";//'备选意思(可选项)'
 
-				//echo "<div class='other_mean'><input type='input' id='term_edit_mean2_{$guid}'  placeholder='{$_local->gui->other_meaning}' value='".$Fetch[$i]["other_meaning"]."' /></div>";//'备选意思(可选项)'
 				echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->tag}:</span>";
 				echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->optional}' id='term_edit_tag_{$guid}' value='".$Fetch[$i]["tag"]."'/></div>";//'标签'
 
-				//echo "<div class='tag'><input type='input' id='term_edit_tag_{$guid}'  placeholder='{$_local->gui->other_tag}' value='".$Fetch[$i]["tag"]."' /></div>";//'标签'
+				echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->channel}:</span>";
+				echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->optional}' id='term_edit_channal_{$guid}' value='".$Fetch[$i]["channal"]."'/></div>";//'版风'
+				
+				echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->language}:</span>";
+				echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->optional}' id='term_edit_language_{$guid}' value='".$Fetch[$i]["language"]."'/></div>";//'语言'
+
 				echo "<div class='note'><span style='display:flex;'><span>{$_local->gui->encyclopedia} & {$_local->gui->note}:</span>";
 				echo "<guide gid='term_pedia_sys' style='margin-left: auto;'></guide></span>";
 				echo "<textarea width='100%' height='3em'  placeholder='{$_local->gui->optional}' id='term_edit_note_$guid'>".$Fetch[$i]["note"]."</textarea></div>";//'注解'
 
-				//echo "<div class='note'><textarea  id='term_edit_note_$guid'  placeholder='".$module_gui_str['editor']['1043']."'>".$Fetch[$i]["note"]."</textarea></div>";//'注解'
 				echo "</div>";
 				echo "<div id='term_edit_btn1_$guid'>";
 				//echo "<button onclick=\"term_apply('$guid')\">{$_local->gui->apply}</button>";//Apply
@@ -203,28 +206,39 @@ switch($op){
 		echo "<button id='new_term_button' onclick=\"term_show_new()\">{$_local->gui->new}</button>";
 		echo "<div id='term_new_recorder' style='display:none;'>";
 		echo "<div class='dict'>".$_local->gui->new_technic_term."</div>";//New Techinc Term
+		
 		echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->pali_word}:</span>";
 		echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->required}' id='term_new_word' value='{$word}' /></div>";//'拼写'
+		
 		echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->first_choice_word}:</span>";
 		echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->required}' id='term_new_mean'/></div>";//'意思'
+		
 		echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->other_meaning}:</span>";
 		echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->optional}' id='term_new_mean2'/></div>";//'备选意思(可选项)'
+		
 		echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->tag}:</span>";
 		echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->optional}' id='term_new_tag'/></div>";//'标签'
+		
+		echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->channel}:</span>";
+		echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->optional}' id='term_new_channal'/></div>";//'标签'
+		
+		echo "<div class='mean' style='display:flex;'><span style='flex:1;'>{$_local->gui->language}:</span>";
+		echo "<input type='input' style='flex:3;' placeholder='{$_local->gui->optional}' id='term_new_language'/></div>";//'标签'
+		
 		echo "<div class='note'><span style='display:flex;'><span>{$_local->gui->encyclopedia} & {$_local->gui->note}:</span>";
 		echo "<guide gid='term_pedia_sys' style='margin-left: auto;'></guide></span>";
 		echo "<textarea width='100%' height='3em'  placeholder='{$_local->gui->optional}' id='term_new_note'></textarea></div>";//'注解'
+		
 		echo "<button onclick=\"term_data_save('')\">{$_local->gui->save}</button>";//保存
 		echo "</div>";
 		echo "</div>";
 
 		
 		//查他人数据
-		$query = "select * from term  where \"word\" = ".$PDO->quote($word)."AND \"owner\" <> ".$PDO->quote($username)." limit 0,30";
+		$query = "SELECT * FROM term  WHERE word = ? AND owner <> ? LIMIT 0,30";
 		
-		$Fetch = PDO_FetchAll($query);
+		$Fetch = PDO_FetchAll($query,array($word,$_COOKIE["userid"]));
 		$iFetch=count($Fetch);
-		$count_return+=$iFetch;
 		if($iFetch>0){
 			for($i=0;$i<$iFetch;$i++){
 				$mean=$Fetch[$i]["meaning"];
@@ -253,43 +267,43 @@ switch($op){
 			$mTime=$_GET["modify_time"];
 		}
 		else{
-			$mTime=time();
+			$mTime=mTime();
 		}
 		if($_GET["guid"]!=""){
-			$mean=$_GET["mean"];
-			$query="UPDATE term SET meaning='$mean' ,
-									other_meaning='".$_GET["mean2"]."' ,
-									tag='".$_GET["tag"]."' ,
-									receive_time='".time()."' ,
-									modify_time='$mTime' ,
-									note='".$_GET["note"]."' 
-							where guid='".$_GET["guid"]."'";
+			$query="UPDATE term SET meaning= ? ,other_meaning = ? , tag= ? ,channal = ? ,  language = ? , note = ? , receive_time= ?, modify_time= ?   where guid= ? ";
+			$stmt = @PDO_Execute($query,array($_GET["mean"],
+																		$_GET["mean2"],
+																		$_GET["tag"],
+																		$_GET["channal"],
+																		$_GET["language"],
+																		$_GET["note"],
+																		mTime(),
+																		$mTime,
+																		$_GET["guid"]
+																	));
 		}
 		else{
-			$newGuid=UUID::v4();
-			$word=$_GET["word"];
-			$worden=pali2english($word);
-			$mean=$_GET["mean"];
-			$mean2=$_GET["mean2"];
-			$note=$_GET["note"];
-			$tag=$_GET["tag"];
-			$time=time();
-			$query="INSERT INTO term VALUES (NULL, 
-											'$newGuid', 
-											'$word', 
-											'$worden', 
-											'$mean', 
-											'$mean2', 
-											'$note', 
-											'$tag', 
-											'$time', 
-											'$username', 
-											'1',
-											'zh',
-											'$time',
-											'$time')";		
+			$parm = array();
+			$parm[]=UUID::v4();
+			$parm[]=$_GET["word"];
+			$parm[]=pali2english($word);
+			$parm[]=$_GET["mean"];
+			$parm[]=$_GET["mean2"];
+			$parm[]=$_GET["tag"];			
+			$parm[]=$_GET["channal"];			
+			$parm[]=$_GET["language"];			
+			$parm[]=$_GET["note"];
+			$parm[]=$_COOKIE["userid"];
+			$parm[]=0;
+			$parm[]=mTime();
+			$parm[]=mTime();
+			$parm[]=mTime();
+			$query="INSERT INTO term (id, guid, word, worden, meaning, other_meaning, tag, channal, language,note,owner,hit,create_time,modify_time,receive_time ) 
+															VALUES (NULL, ? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) "; 
+
+			$stmt = @PDO_Execute($query,$parm);
 		}
-			$stmt = @PDO_Execute($query);
+			
 			$respond=array("status"=>0,"message"=>"");
 			if (!$stmt || ($stmt && $stmt->errorCode() != 0)) {
 				$error = PDO_ErrorInfo();