Browse Source

Merge pull request #91 from visuddhinanda/master

修复及优化lesson编辑页面
Bhikkhu-Kosalla 5 years ago
parent
commit
40aa6758f1

+ 4 - 4
app/course/my_lesson_new.php

@@ -2,7 +2,7 @@
 <?php
 require_once "../path.php";
 require_once "../public/_pdo.php";
-require_once '../media/function.php';
+require_once '../ucenter/function.php';
 
 global $PDO;
 PDO_Connect("sqlite:"._FILE_DB_COURSE_);
@@ -50,14 +50,14 @@ echo '</div>';
 
     <div style="display:flex;">
     <div style="flex:2;">简介</div>
-    <div style="flex:8;"><textarea style="height:6em;"></textarea></div>
+    <div style="flex:8;"><textarea name="summary" style="height:6em;"></textarea></div>
     </div>
 
     <div style="display:flex;">
     <div style="flex:2;">老师</div>
     <div   style="flex:8;">
-        <div id="teacher_id"></div>
-        <input id="form_teacher" type="hidden" name="teacher" value="" />
+        <div id="teacher_id"><?php echo ucenter_getA($course_info["teacher"]); ?></div>
+        <input id="form_teacher" type="hidden" name="teacher" value="<?php echo $course_info["teacher"] ?>" />
     </div>
     </div> 
 

+ 56 - 0
app/uwbw/wbw_analyse.php

@@ -0,0 +1,56 @@
+<?php
+    require_once "../path.php";
+    require_once "../public/_pdo.php";
+    require_once '../public/load_lang.php';
+    require_once '../public/function.php';
+
+    global $PDO;
+    PDO_Connect("sqlite:"._FILE_DB_USER_WBW_);
+
+
+    $query = "SELECT * from wbw where  1";
+						
+    $sth = $PDO->prepare($query);
+    $sth->execute();
+    // owner, word,book,para,wid,type,text
+    $i=0;
+    while($result = $sth->fetch(PDO::FETCH_ASSOC))
+    {
+        try {
+            $xmlString =  "<root>".$result["data"]."</root>";
+            echo  $xmlString."<br>";
+            $xmlWord = simplexml_load_string($xmlString);
+            $wordsList = $xmlWord->xpath('//word');
+            foreach ($wordsList as $word) {
+                $pali = $word->real->__toString();
+                foreach ($word as $key => $value) {
+                    $strValue = $value->__toString();
+                    if($strValue !== "?" && $strValue !== "" && $strValue !== ".ctl."){
+                        switch ($key) {
+                            case 'type':
+                            case 'gramma':
+                            case 'mean':
+                            case 'org':
+                            case 'om':
+                                var_dump( array($result["owner"],$pali,$result["book"],$result["paragraph"],$result["wid"],$key,$strValue));
+                                break;    
+                            
+                        }
+                    }
+                }
+            }
+
+        } catch ( Throwable $e) {
+            echo "Captured Throwable: " . $e->getMessage();
+        }
+
+        
+        if($i>100){
+        break;
+        }
+        else{
+            $i++;
+        }
+    }
+
+?>

+ 8 - 4
documents/course/sadda_pan_goun.md

@@ -340,17 +340,21 @@ Accordingly, A is termed a Unit of General Content with reference to B.
 因此,A被称为关于B的一般内容单元。
 
 ## 13. [**Unit of Particular Content** *followed by* **Unit of General Content**](# "visesavākya - sāmaññavākya")
-E.g. 
+## 13. [**特指**-**一般**关系](# "Visesavākya- sāmañavākya")
+E.g. 例如:
 - A. The word *safe* means here " trustworthy".
-- B. It (**T.M**) may mean, as an adjective, " unharmed, free from danger, secure, sound, free from risk, certain, sure, reliable, trustworthy, cautious, good, fine (*slang*)" and
-as a noun, "a metal box (often set in a wall, secure against fire, thieves, etc), a ventilated box or cupboard for meat, etc".
+- “safe”一词在这里的意思是“值得信赖”
+- B. It (**T.M**) may mean, as an adjective, " unharmed, free from danger, secure, sound, free from risk, certain, sure, reliable, trustworthy, cautious, good, fine (*slang*)" and as a noun, "a metal box (often set in a wall, secure against fire, thieves, etc), a ventilated box or cupboard for meat, etc".
+- 作为形容词,它(**T. M**)的意思可以是“没有伤害,没有危险,安全,健全,没有风险,确定,确定,可靠,值得信赖,谨慎,良好,优良(*俚语*)”而作为名词(保险柜),“金属盒子(通常放在墙上,防火、防盗等),放肉的通风盒子或橱柜等。
 
     (**T.M**) = "generally, in general"
+    (**T. M**)=“一般,一般”
 
 The following unit B is a Unit of General Content with reference to A, for it gives the **generally possible senses** of the word **given in A**, i.e., those of the word safe.
+下面的单元B是关于A的一般内容单元,因为它给出了**A中给出**的单词的**一般可能的含义**,即单词*Safe*的含义。
 
 Accordingly, A is termed a Unit of Particular Content with reference to B.
-
+因此,将A称为关于B的特指内容单元.
 ## 14. [**Unit of Affirmative Content** *followed by* **Unit of Negative Content**](# "anvayavākya - byatirekavākya")
 E.g. 
 

+ 6 - 7
documents/course/sadda_pan_goun_qq.md

@@ -200,14 +200,13 @@ A、这个主题不是枯燥乏味的.
 下面的单元B是关于A的特定内容的单元,因为它根据**上下文**的实际需要给出了**A中**的可能的含义中的的**特定意义**,即“酒店”的名称.
 因此,A被称为关于B的一般内容单元.
 
-## 13. [**特殊内容单元*后跟*一般内容单元**](# "Visesavākya- sāmañavākya").
+.
 例如.
-A. “安全”一词在这里的意思是“值得信赖”.
-- B. 作为形容词,它(**T. M**)的意思可能是“没有伤害,没有危险,安全,健全,没有风险,确定,确定,可靠,值得信赖,谨慎,良好,优良(*俚语*)”和.
-作为名词,“金属盒子(通常放在墙上,防止火灾、小偷等),放肉的通风盒子或橱柜等.”
-(**T. M**)=“一般,一般”
-下面的单元B是关于A的一般内容单元,因为它给出了A**中给出的单词**的**一般可能的含义**,即单词Safe的含义.
-因此,关于B,将A称为特定内容单元.
+A. .
+- B. .
+.”
+
+.
 ## 14. [**正面内容单元*后跟*负面内容单元**](# "anvayavākya- byatirekavākya").
 例如.
 1. .