Bhikkhu-Kosalla 5 лет назад
Родитель
Сommit
d571841b88
3 измененных файлов с 10 добавлено и 2 удалено
  1. 2 2
      app/course/course.php
  2. 3 0
      app/course/my_lesson_insert.php
  3. 5 0
      app/course/my_lesson_update.php

+ 2 - 2
app/course/course.php

@@ -124,7 +124,7 @@ $.get("../course/lesson_list.php",
         html+= '<div class="summary"  style="padding-bottom:5px;">'+summary+'</div>';
         let live = "";
         try{
-            live = marked(lesson["live"]);
+            //live = marked(lesson["live"]);
         }
         catch{
 
@@ -132,7 +132,7 @@ $.get("../course/lesson_list.php",
         html+= '<div class="summary"  style="padding-bottom:5px;">'+live+'</div>';
         let replay = "";
         try{
-            replay = marked(lesson["replay"]);
+            //replay = marked(lesson["replay"]);
         }
         catch{
 

+ 3 - 0
app/course/my_lesson_insert.php

@@ -6,6 +6,9 @@ require_once '../public/function.php';
 global $PDO;
 PDO_Connect("sqlite:"._FILE_DB_COURSE_);
 
+$query="UPDATE course SET  receive_time= ?  , modify_time= ?   where  id = ?  ";
+PDO_Execute($query,array(mTime(),mTime(),$_POST["course_id"]));
+
 $query = "INSERT INTO lesson (id, course_id,  live, replay, title,  subtitle ,  date ,  duration  ,  creator,  tag,  summary,  status,  cover,  teacher, attachment , lang , speech_lang , create_time , modify_time , receive_time ) 
 				 VALUES (? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? )";
 

+ 5 - 0
app/course/my_lesson_update.php

@@ -5,6 +5,11 @@ require_once '../public/function.php';
 
 global $PDO;
 PDO_Connect("sqlite:"._FILE_DB_COURSE_);
+$query="SELECT course_id from lesson  where  id = ?  ";
+$course_id = PDO_FetchOne($query,array($_POST["lesson"]));
+
+$query="UPDATE course SET  receive_time= ?  , modify_time= ?   where  id = ?  ";
+PDO_Execute($query,array(mTime(),mTime(),$course_id));
 
 $query="UPDATE lesson SET title = ? , subtitle = ? , date = ? , duration = ? , live = ? , replay = ? , summary = ? , teacher = ?  , receive_time= ?  , modify_time= ?   where  id = ?  ";
 $sth = $PDO->prepare($query);