2
0
Эх сурвалжийг харах

Merge branch 'master' of https://github.com/visuddhinanda/mint

Bhikkhu-Kosalla 5 жил өмнө
parent
commit
9fa1818b34

+ 101 - 0
app/course/lesson.js

@@ -0,0 +1,101 @@
+var renderer = new marked.Renderer();
+renderer.code = function (code, language) {
+  if (language == "mermaid") return '<pre class="mermaid">' + code + "</pre>";
+  else return "<pre><code>" + code + "</code></pre>";
+};
+
+function lesson_show(id) {
+  $.get(
+    "../course/lesson_get.php",
+    {
+      id: id,
+    },
+    function (data, status) {
+      let arrLesson = JSON.parse(data);
+      let html = "";
+      for (const lesson of arrLesson) {
+        html +=
+          '<div class="card" style="display:flex;margin:1em;padding:10px;">';
+
+        html += '<div style="flex:7;">';
+        html += '<div class="pd-10">';
+        html +=
+          '<div class="title" style="padding-bottom:5px;font-size:200%;font-weight:600;">' +
+          lesson["title"] +
+          "</div>";
+        html += '<div style="">';
+        let summary = "";
+        try {
+          summary = marked(lesson["summary"], { renderer: renderer });
+        } catch {}
+        html +=
+          '<div class="summary"  style="padding-bottom:5px;">' +
+          summary +
+          "</div>";
+        let live = "";
+        try {
+          live = marked(lesson["live"], { renderer: renderer });
+        } catch {}
+        html +=
+          '<div class="summary"  style="padding-bottom:5px;">' +
+          live +
+          "</div>";
+        let replay = "";
+        try {
+          replay = marked(lesson["replay"], { renderer: renderer });
+        } catch {}
+        html +=
+          '<div class="summary"  style="padding-bottom:5px;">' +
+          replay +
+          "</div>";
+        let attachment = "";
+        try {
+          attachment = marked(lesson["attachment"], { renderer: renderer });
+        } catch {}
+        html +=
+          '<div class="summary"  style="padding-bottom:5px;">' +
+          attachment +
+          "</div>";
+        html += "</div>";
+        html += "</div>";
+        html += "</div>";
+
+        html += '<div style="flex:3;max-width:15em;">';
+        let d = new Date();
+        d.setTime(lesson["date"]);
+        let strData = d.toLocaleDateString();
+        let strTime = d.toLocaleTimeString();
+        html += "<div >开始日期:" + strData + "</div>";
+        html += "<div >开始时间:" + strTime + "</div>";
+        let dt = lesson["duration"] / 60;
+        let sdt = "";
+        if (dt > 59) {
+          sdt += Math.floor(dt / 60) + "小时";
+        }
+        let m = dt % 60;
+        if (m > 0) {
+          sdt += (dt % 60) + "分钟";
+        }
+        html += "<div >持续时间:" + sdt + "</div>";
+        let now = new Date();
+
+        let lesson_time = "";
+        if (now < lesson["date"]) {
+          lesson_time = "尚未开始";
+        } else if (now > lesson["date"] && now < lesson["date"] + dt * 1000) {
+          lesson_time = "正在进行";
+        } else {
+          lesson_time = "已经结束";
+        }
+        html +=
+          '<div ><span class="lesson_status">' + lesson_time + "</span></div>";
+
+        html += "</div>";
+
+        html += "</div>";
+      }
+      $("#lesson_list").html(html);
+      mermaid.initialize();
+    }
+  );
+}

+ 5 - 89
app/course/lesson.php

@@ -2,7 +2,10 @@
 include "../pcdl/html_head.php";
 include "../pcdl/html_head.php";
 ?>
 ?>
 <body>
 <body>
+<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/mermaid@8.6.0/dist/mermaid.min.js"></script>
 
 
+<script src="../course/lesson.js"></script>
 <?php
 <?php
     require_once("../pcdl/head_bar.php");
     require_once("../pcdl/head_bar.php");
 ?>
 ?>
@@ -67,98 +70,11 @@ echo "</div>";
 
 
 ?>
 ?>
 </div>
 </div>
-<script src="../public/js/marked.js"></script>
 <script>
 <script>
-    $("#main_video_win").height($("#main_video_win").width()*9/16);
 
 
-    $.get("../course/lesson_get.php",
-  {
-    id:"<?php echo $_GET["id"]; ?>"
-  },
-  function(data,status){
-      let arrLesson = JSON.parse(data);
-      let html="";
-    for(const lesson of  arrLesson){
-        html+= '<div class="card" style="display:flex;margin:1em;padding:10px;">';
+$("#main_video_win").height($("#main_video_win").width()*9/16);
+lesson_show("<?php echo $_GET["id"]; ?>");
 
 
-        html+= '<div style="flex:7;">';
-        html+= '<div class="pd-10">';
-        html+= '<div class="title" style="padding-bottom:5px;font-size:200%;font-weight:600;">'+lesson["title"]+'</div>';
-        html += '<div style="">';
-        let summary = "";
-        try{
-            summary = marked(lesson["summary"]);
-        }
-        catch{
-
-        }
-        html+= '<div class="summary"  style="padding-bottom:5px;">'+summary+'</div>';
-        let live = "";
-        try{
-            live = marked(lesson["live"]);
-        }
-        catch{
-
-        }
-        html+= '<div class="summary"  style="padding-bottom:5px;">'+live+'</div>';
-        let replay = "";
-        try{
-            replay = marked(lesson["replay"]);
-        }
-        catch{
-
-        }
-        html+= '<div class="summary"  style="padding-bottom:5px;">'+replay+'</div>';
-        let attachment = "";
-        try{
-            attachment = marked(lesson["attachment"]);
-        }
-        catch{
-
-        }
-        html+= '<div class="summary"  style="padding-bottom:5px;">'+attachment+'</div>';
-        html+= '</div>'; 
-        html+= '</div>'; 
-        html+= '</div>';
-
-        html+= '<div style="flex:3;max-width:15em;">';
-        let d = new Date();
-        d.setTime(lesson["date"]);
-        let strData = d.toLocaleDateString();
-        let strTime = d.toLocaleTimeString();
-         html+= '<div >开始日期:'+strData +'</div>';
-         html+= '<div >开始时间:'+strTime +'</div>';
-        let dt = lesson["duration"]/60;
-        let sdt = "";
-        if(dt>59){
-            sdt += Math.floor(dt/60)+"小时";
-        }
-        let m = (dt % 60);
-        if(m>0){
-            sdt +=(dt % 60)+"分钟";
-        }
-        html+= "<div >持续时间:"+sdt+"</div>";        
-        let now = new Date(); 
-
-        let lesson_time="";
-        if(now<lesson["date"]){
-            lesson_time = "尚未开始";
-        }
-        else if(now>lesson["date"] && now<(lesson["date"]+dt*1000)){
-            lesson_time = "正在进行";
-        }
-        else{
-            lesson_time = "已经结束";
-        }
-        html+= '<div ><span class="lesson_status">'+lesson_time+'</span></div>';
-      
-        html+= '</div>';
-
-        html+= '</div>';
-
-    }
-    $("#lesson_list").html(html);
-  });
 </script>
 </script>
 <?php
 <?php
 include "../pcdl/html_foot.php";
 include "../pcdl/html_foot.php";

+ 8 - 0
app/head/list.json

@@ -0,0 +1,8 @@
+{
+  "category": ["lotus", "lamp", "others"],
+  "list": {
+    "0": { "category": "others", "file": "default.svg" },
+    "1": { "category": "lotus", "file": "1.svg" },
+    "2": { "category": "lotus", "file": "2.svg" }
+  }
+}

+ 1 - 1
app/pcdl/html_head.php

@@ -39,7 +39,7 @@ else{
 	<link type="text/css" rel="stylesheet" href="../guide/guide.css"/>
 	<link type="text/css" rel="stylesheet" href="../guide/guide.css"/>
 
 
 	<script src="../public/js/marked.js"></script>
 	<script src="../public/js/marked.js"></script>
-
+	<script src="../public/js/mermaid.min.js"></script>
 	
 	
 	<script >
 	<script >
 	<?php require_once '../public/load_lang_js.php';?>
 	<?php require_once '../public/load_lang_js.php';?>

+ 10 - 4
app/pcdl/reader.php

@@ -43,6 +43,12 @@ $_channal = new Channal();
 	</script>
 	</script>
 
 
 <style>
 <style>
+.par_translate_div{
+	margin-left: 1em;
+    border-left: 1px solid gray;
+    padding-left: 0.5em;
+    margin-top: 0.5em;
+}
 	.edit_icon{
 	.edit_icon{
 		display:inline-block;
 		display:inline-block;
 		width:1.4em;
 		width:1.4em;
@@ -597,7 +603,7 @@ else{
 				$pali_sent=$value["html"];
 				$pali_sent=$value["html"];
 				echo "<sent  class='{$sentClass}' book='{$book}' para='{$iPar}' begin='{$value["begin"]}' end='{$value["end"]}' >".$pali_sent."</sent>";
 				echo "<sent  class='{$sentClass}' book='{$book}' para='{$iPar}' begin='{$value["begin"]}' end='{$value["end"]}' >".$pali_sent."</sent>";
 				echo "</div>";
 				echo "</div>";
-				echo "<div id='sent-wbwdiv-b$book-$iPar-{$value["begin"]}' class='par_translate_div'>";
+				echo "<div id='sent-wbwdiv-b$book-$iPar-{$value["begin"]}' class='par_wbw_div'>";
 				echo "</div>";
 				echo "</div>";
 				echo "<div id='sent-translate-b$book-$iPar-{$value["begin"]}' class='par_translate_div'>";
 				echo "<div id='sent-translate-b$book-$iPar-{$value["begin"]}' class='par_translate_div'>";
 				echo "</div>";
 				echo "</div>";
@@ -631,11 +637,11 @@ else{
 				echo "<sent class='{$sentClass}'  book='{$book}' para='{$iPar}' begin='{$value["begin"]}' end='{$value["end"]}' >{$pali_sent}</sent>";
 				echo "<sent class='{$sentClass}'  book='{$book}' para='{$iPar}' begin='{$value["begin"]}' end='{$value["end"]}' >{$pali_sent}</sent>";
 			}
 			}
 			echo "</div>";
 			echo "</div>";
-			echo "<div id='par-wbwdiv-b$book-$iPar' class='par_translate_div'>";
+			echo "<div id='par-wbwdiv-b$book-$iPar' class='par_wbw_div'>";
 			echo "</div>";
 			echo "</div>";
 			echo "<div id='par-translate-b$book-$iPar' class='par_translate_div'>";
 			echo "<div id='par-translate-b$book-$iPar' class='par_translate_div'>";
 			echo "</div>";
 			echo "</div>";
-			echo "<div id='par-note-b$book-$iPar' class='par_translate_div'>";
+			echo "<div id='par-note-b$book-$iPar' class='par_note_div'>";
 			echo "</div>";
 			echo "</div>";
 			echo "</div>";
 			echo "</div>";
 		}
 		}
@@ -704,6 +710,7 @@ else{
 		foreach ($FetchPaliSent as $key => $value) {
 		foreach ($FetchPaliSent as $key => $value) {
 			$begin = $value["begin"];
 			$begin = $value["begin"];
 			$end = $value["end"];
 			$end = $value["end"];
+			$query_channal = "";
 			if(isset($_GET["channal"])){
 			if(isset($_GET["channal"])){
 				$query_channal = " AND channal=".$PDO->quote($_GET["channal"]);
 				$query_channal = " AND channal=".$PDO->quote($_GET["channal"]);
 			}
 			}
@@ -717,7 +724,6 @@ else{
 				else{
 				else{
 					$query="SELECT * FROM \"sentence\" WHERE (book = ".$PDO->quote($book)." AND  \"paragraph\" = ".$PDO->quote($iPar)." AND begin = '$begin' AND end = '$end'  AND strlen <> 0 AND parent = ''  ) {$query_channal}  order by modify_time  DESC";
 					$query="SELECT * FROM \"sentence\" WHERE (book = ".$PDO->quote($book)." AND  \"paragraph\" = ".$PDO->quote($iPar)." AND begin = '$begin' AND end = '$end'  AND strlen <> 0 AND parent = ''  ) {$query_channal}  order by modify_time  DESC";
 				}
 				}
-				
 			}
 			}
 			else{
 			else{
 				$query = "SELECT * FROM \"sentence\" WHERE book = ".$PDO->quote($book)." AND  \"paragraph\" = ".$PDO->quote($iPar)." AND begin = '$begin' AND end = '$end' AND strlen <> 0  {$query_channal} order by modify_time DESC  limit 0, 1";
 				$query = "SELECT * FROM \"sentence\" WHERE book = ".$PDO->quote($book)." AND  \"paragraph\" = ".$PDO->quote($iPar)." AND begin = '$begin' AND end = '$end' AND strlen <> 0  {$query_channal} order by modify_time DESC  limit 0, 1";

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
app/public/js/mermaid.min.js


+ 61 - 34
app/studio/js/render.js

@@ -429,7 +429,7 @@ function updataHeadingBlockInHtml(book, par) {
   }
   }
 }
 }
 
 
-function renderBlock() { }
+function renderBlock() {}
 /*
 /*
 重绘翻译数据块
 重绘翻译数据块
 */
 */
@@ -634,7 +634,7 @@ function renderTranslateParBlockInner(elementBlock) {
   return output;
   return output;
 }
 }
 
 
-function renderTranslateParBlockInnerPreview(strText) { }
+function renderTranslateParBlockInnerPreview(strText) {}
 function updateTranslationPreview_a(blockId, text) {
 function updateTranslationPreview_a(blockId, text) {
   var out = "";
   var out = "";
   var newText = text;
   var newText = text;
@@ -1559,7 +1559,8 @@ function renderWordParBlockInner(elementBlock) {
         output += "</div>";
         output += "</div>";
         output += "</div>";
         output += "</div>";
         output += "<div id='sent_" + wID + "' class='translate_sent_content'>";
         output += "<div id='sent_" + wID + "' class='translate_sent_content'>";
-        output += "</div>"; //逐句翻译块内容结束
+        output += "</div>";
+        //逐句翻译块内容结束
         output += "<div class='translate_sent_foot'>";
         output += "<div class='translate_sent_foot'>";
         output += "</div>";
         output += "</div>";
         output += "</div>";
         output += "</div>";
@@ -1645,6 +1646,28 @@ function renderWordParBlockInner(elementBlock) {
   output += "</div>";
   output += "</div>";
   output += "<div class='translate_sent_head_content'>";
   output += "<div class='translate_sent_head_content'>";
 
 
+  //逐句译文开始
+  output += render_tran_sent_block(
+    book,
+    paragraph,
+    sent_begin,
+    word_id,
+    0,
+    true
+  );
+  if (_my_channal != null) {
+    for (const iterator of _my_channal) {
+      output += render_tran_sent_block(
+        book,
+        paragraph,
+        sent_begin,
+        word_id,
+        iterator.id,
+        false
+      );
+    }
+  }
+  /*
   output +=
   output +=
     "<div class='trans_text_block' pcds='sent-net-div' book='" +
     "<div class='trans_text_block' pcds='sent-net-div' book='" +
     book +
     book +
@@ -1690,9 +1713,12 @@ function renderWordParBlockInner(elementBlock) {
   output += "</div>";
   output += "</div>";
 
 
   output += "</div>";
   output += "</div>";
+*/
   output += "</div>";
   output += "</div>";
   output += "<div id='sent_" + wID + "' class='translate_sent_content'>";
   output += "<div id='sent_" + wID + "' class='translate_sent_content'>";
-  output += "</div>"; //逐句翻译块内容结束
+  output += "</div>";
+  //逐句翻译块内容结束
+
   output += "<div class='translate_sent_foot'>";
   output += "<div class='translate_sent_foot'>";
   output += "</div>";
   output += "</div>";
   output += "</div>";
   output += "</div>";
@@ -1707,6 +1733,7 @@ function renderWordParBlockInner(elementBlock) {
   return output;
   return output;
 }
 }
 
 
+//句子编辑块
 function render_tran_sent_block(
 function render_tran_sent_block(
   book,
   book,
   para,
   para,
@@ -2702,12 +2729,12 @@ function renderWordDetailByElement(xmlElement) {
             ) {
             ) {
               arrMeaning.push(
               arrMeaning.push(
                 g_DictWordList[iDict].dictID +
                 g_DictWordList[iDict].dictID +
-                "$" +
-                arrMeaning.length +
-                "$$" +
-                arrMean[i] +
-                "$" +
-                g_DictWordList[iDict].Language
+                  "$" +
+                  arrMeaning.length +
+                  "$$" +
+                  arrMean[i] +
+                  "$" +
+                  g_DictWordList[iDict].Language
               );
               );
             }
             }
           }
           }
@@ -2757,12 +2784,12 @@ function renderWordDetailByElement(xmlElement) {
               ) {
               ) {
                 arrMeaning.push(
                 arrMeaning.push(
                   g_DictWordList[iDict].dictID +
                   g_DictWordList[iDict].dictID +
-                  "$" +
-                  arrMeaning.length +
-                  "$*$" +
-                  getLocalParentFormulaStr(wordGramma0, arrMean[i]) +
-                  "$" +
-                  g_DictWordList[iDict].Language
+                    "$" +
+                    arrMeaning.length +
+                    "$*$" +
+                    getLocalParentFormulaStr(wordGramma0, arrMean[i]) +
+                    "$" +
+                    g_DictWordList[iDict].Language
                 );
                 );
               }
               }
             }
             }
@@ -2812,12 +2839,12 @@ function renderWordDetailByElement(xmlElement) {
               ) {
               ) {
                 arrMeaning.push(
                 arrMeaning.push(
                   g_DictWordList[iDict].dictID +
                   g_DictWordList[iDict].dictID +
-                  "$" +
-                  arrMeaning.length +
-                  "$**$" +
-                  getLocalParentFormulaStr(wordGramma1, arrMean[i]) +
-                  "$" +
-                  g_DictWordList[iDict].Language
+                    "$" +
+                    arrMeaning.length +
+                    "$**$" +
+                    getLocalParentFormulaStr(wordGramma1, arrMean[i]) +
+                    "$" +
+                    g_DictWordList[iDict].Language
                 );
                 );
               }
               }
             }
             }
@@ -3292,7 +3319,7 @@ function renderWordDetailByElement(xmlElement) {
   return _txtOutDetail;
   return _txtOutDetail;
 }
 }
 
 
-function renderWordNoteDivByParaNo(book, paragraph) { }
+function renderWordNoteDivByParaNo(book, paragraph) {}
 /*
 /*
 paragraph word note
 paragraph word note
 */
 */
@@ -3491,7 +3518,7 @@ function updateWordNote(element) {
   }
   }
 }
 }
 
 
-function updateWordCommentary(element) { }
+function updateWordCommentary(element) {}
 
 
 //根据xmlDocument 对象中的单词序号修改单词块的显示(不含Pali)
 //根据xmlDocument 对象中的单词序号修改单词块的显示(不含Pali)
 //返回 无
 //返回 无
@@ -3614,13 +3641,13 @@ function prev_page() {
   gVisibleParEndOld = gVisibleParEnd;
   gVisibleParEndOld = gVisibleParEnd;
   if (
   if (
     g_allparlen_array[gVisibleParEnd - 1] -
     g_allparlen_array[gVisibleParEnd - 1] -
-    g_allparlen_array[gVisibleParBegin - 1] <=
+      g_allparlen_array[gVisibleParBegin - 1] <=
     gDisplayCapacity
     gDisplayCapacity
   ) {
   ) {
     gVisibleParBegin -= 1;
     gVisibleParBegin -= 1;
   } else if (
   } else if (
     g_allparlen_array[gVisibleParEnd + 1] -
     g_allparlen_array[gVisibleParEnd + 1] -
-    g_allparlen_array[gVisibleParBegin - 1] >
+      g_allparlen_array[gVisibleParBegin - 1] >
     gDisplayCapacity
     gDisplayCapacity
   ) {
   ) {
     gVisibleParBegin -= 1;
     gVisibleParBegin -= 1;
@@ -3647,13 +3674,13 @@ function next_page() {
 
 
   if (
   if (
     g_allparlen_array[gVisibleParEnd + 1] -
     g_allparlen_array[gVisibleParEnd + 1] -
-    g_allparlen_array[gVisibleParBegin + 1] <=
+      g_allparlen_array[gVisibleParBegin + 1] <=
     gDisplayCapacity
     gDisplayCapacity
   ) {
   ) {
     gVisibleParEnd += 1;
     gVisibleParEnd += 1;
   } else if (
   } else if (
     g_allparlen_array[gVisibleParEnd + 1] -
     g_allparlen_array[gVisibleParEnd + 1] -
-    g_allparlen_array[gVisibleParBegin + 1] >
+      g_allparlen_array[gVisibleParBegin + 1] >
     gDisplayCapacity
     gDisplayCapacity
   ) {
   ) {
     gVisibleParBegin += 1;
     gVisibleParBegin += 1;
@@ -4090,12 +4117,12 @@ function refreshNoteNumber() {
     let id = $(this).attr("wid");
     let id = $(this).attr("wid");
     $(this).html(
     $(this).html(
       "<a href='#word_note_root_" +
       "<a href='#word_note_root_" +
-      id +
-      "' name=\"word_note_" +
-      id +
-      '">[' +
-      (index + 1) +
-      "]</a>"
+        id +
+        "' name=\"word_note_" +
+        id +
+        '">[' +
+        (index + 1) +
+        "]</a>"
     );
     );
   });
   });
 
 

+ 3 - 0
app/time.php

@@ -0,0 +1,3 @@
+<?php
+echo time();
+?>

+ 1 - 0
app/ucenter/default.json

@@ -1,4 +1,5 @@
 {
 {
+  "account.head": 0,
   "_ui.lang": ["en", "zh-hans", "zh-hant"],
   "_ui.lang": ["en", "zh-hans", "zh-hant"],
   "ui.lang": ["en", "zh-hans", "zh-hant", "si", "my"],
   "ui.lang": ["en", "zh-hans", "zh-hant", "si", "my"],
   "_studio.translation.lang": ["en", "zh-hans", "zh-hant", "si", "my"],
   "_studio.translation.lang": ["en", "zh-hans", "zh-hant", "si", "my"],

+ 7 - 1
app/ucenter/setting.js

@@ -1,4 +1,10 @@
 var setting;
 var setting;
+function setting_head_render(file) {
+  let html = '<svg class="head_icon" style="height: 3em;width: 3em;">';
+  html += '<use xlink:href="../head/images/"' + file + "></use>";
+  html += "</svg>";
+  $("#head_img").html(html);
+}
 function setting_onload() {
 function setting_onload() {
   $.post("get_setting.php", {}, function (data, status) {
   $.post("get_setting.php", {}, function (data, status) {
     try {
     try {
@@ -78,7 +84,7 @@ function setting_onload() {
           setting_save();
           setting_save();
         },
         },
       });
       });
-    } catch (e) { }
+    } catch (e) {}
   });
   });
 }
 }
 function li_remove() {
 function li_remove() {

+ 3 - 1
app/ucenter/setting.php

@@ -241,7 +241,9 @@ para:hover{
 	<div id="main_text_view" style="padding-bottom: 10em;">
 	<div id="main_text_view" style="padding-bottom: 10em;">
         <?php 
         <?php 
             echo "<a name='account'></a>";
             echo "<a name='account'></a>";
-            echo "<h2>{$_local->gui->account}</h2>";
+			echo "<h2>{$_local->gui->account}</h2>";
+			echo "头像:<span id='head_img'></span>";
+
             echo "{$_local->gui->username}:{$_COOKIE["username"]} <button>修改</button><br />";
             echo "{$_local->gui->username}:{$_COOKIE["username"]} <button>修改</button><br />";
             echo "{$_local->gui->nick_name}:{$_COOKIE["nickname"]} <button>修改</button><br />";
             echo "{$_local->gui->nick_name}:{$_COOKIE["nickname"]} <button>修改</button><br />";
             echo "{$_local->gui->e_mail}:{$_COOKIE["email"]}<button>修改</button><br />";
             echo "{$_local->gui->e_mail}:{$_COOKIE["email"]}<button>修改</button><br />";

+ 6 - 4
app/usent/update.php

@@ -13,6 +13,7 @@ PDO_Connect("sqlite:"._FILE_DB_SENTENCE_);
 
 
 //查询没有id的哪些是数据库里已经存在的,防止多次提交同一条记录造成一个句子 多个channal
 //查询没有id的哪些是数据库里已经存在的,防止多次提交同一条记录造成一个句子 多个channal
 $newList = array();
 $newList = array();
+$new_id = array();
 $oldList = array();
 $oldList = array();
 $query = "SELECT id FROM sentence WHERE book = ? and paragraph = ? and  begin = ? and end = ? and channal = ? limit 0 , 1 ";
 $query = "SELECT id FROM sentence WHERE book = ? and paragraph = ? and  begin = ? and end = ? and channal = ? limit 0 , 1 ";
 foreach ($aData as $data) {
 foreach ($aData as $data) {
@@ -70,7 +71,8 @@ else{
 	$respond['status']=0;
 	$respond['status']=0;
 	$respond['message']="成功";
 	$respond['message']="成功";
 	foreach ($oldList as $key => $value) {
 	foreach ($oldList as $key => $value) {
-		$update_list[] =  array("id" => $value["id"],"text" => $value["text"]);
+		$update_list[] =  array("id" => $value["id"],"book"=>$value["book"],"paragraph"=>$value["paragraph"],"begin"=>$value["begin"],"end"=>$value["end"],"channal"=>$value["channal"],"text" => $value["text"]);
+
 	}
 	}
 }
 }
 
 
@@ -126,7 +128,7 @@ foreach ($newList as $data) {
 										  mTime(),
 										  mTime(),
 										  mTime()
 										  mTime()
 										));
 										));
-		$new_id[] = array($uuid,$data["book"],$data["paragraph"],$data["begin"],$data["end"],$data["channal"]);
+		$new_id[] = array($uuid,$data["book"],$data["paragraph"],$data["begin"],$data["end"],$data["channal"],$data["text"]);
 }
 }
 $PDO->commit();
 $PDO->commit();
 
 
@@ -140,8 +142,8 @@ if (!$sth || ($sth && $sth->errorCode() != 0)) {
 }
 }
 else{
 else{
 	$respond['insert_error']=0;
 	$respond['insert_error']=0;
-	foreach ($newList as $key => $value) {
-		$update_list[] =  array("id" => $value[0],"text" => $value["text"]);
+	foreach ($new_id as $key => $value) {
+		$update_list[] =  array("id" => $value[0],"book"=>$value[1],"paragraph"=>$value[2],"begin"=>$value[3],"end"=>$value[4],"channal"=>$value[5],"text" => $value[6]);
 	}
 	}
 }
 }
 $respond['update']=$update_list;
 $respond['update']=$update_list;

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно