Просмотр исходного кода

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

Bhikkhu-Kosalla 5 лет назад
Родитель
Сommit
50f8a06f85

+ 12 - 7
app/course/course.php

@@ -18,7 +18,7 @@ include "../pcdl/html_head.php";
 
 require_once "../path.php";
 require_once "../public/_pdo.php";
-require_once '../media/function.php';
+require_once '../ucenter/function.php';
 require_once '../public/function.php';
 
 global $PDO;
@@ -35,7 +35,10 @@ $course_info = $Fetch[0];
 echo "<div id='course_head_bar' style='background-color:var(--tool-bg-color1);padding:1em 10px 10px 10px;'>";
 echo "<div class='index_inner '>";
 echo "<div style='font-size:140%'>";
-echo $course_info["teacher"]." > ";
+echo "<a href='../uhome/course.php?userid={$course_info["teacher"]}'>";
+echo ucenter_getA($course_info["teacher"]);
+echo "</a>";
+echo " > ";
 echo $course_info["title"];
 echo "</div>";
 echo '<div class="summary"  style="padding-bottom:5px;">'.$course_info["subtitle"].'</div>';
@@ -70,14 +73,16 @@ echo '</div>';
         echo '<div style="flex:7;">';
         echo '<div class="pd-10">';
         echo '<div class="title" style="padding-bottom:5px;font-size:100%;font-weight:600;">'.$row["title"].'</div>';
-        echo '<div class="summary"  style="padding-bottom:5px;">'.$row["subtitle"].'</div>';
         echo '<div class="summary"  style="padding-bottom:5px;">'.$row["summary"].'</div>';
+        echo '<div class="summary"  style="padding-bottom:5px;">'.$row["live"].'</div>';
+        echo '<div class="summary"  style="padding-bottom:5px;">'.$row["replay"].'</div>';
+        echo '<div class="summary"  style="padding-bottom:5px;">'.$row["attachment"].'</div>';
         echo '</div>'; 
         echo '</div>';
 
         echo '<div style="flex:3;max-width:15em;">';
         echo '<div >开始:'.date("Y/m/d h:ia",$row["date"]/1000) .'</div>';
-        $dt = $row["duration"];
+        $dt = $row["duration"]/60;
         $sdt = "";
         if($dt>59){
             $sdt .= floor($dt/60)."小时";
@@ -93,12 +98,12 @@ echo '</div>';
             $lesson_time = "尚未开始";
         }
         else if($now>$row["date"] && $now<($row["date"]+$dt*1000)){
-            $lesson_time = "已经结束";
+            $lesson_time = "正在进行";
         }
         else{
-            $lesson_time = "正在进行";
+            $lesson_time = "已经结束";
         }
-        echo '<div ><span class="lesson_status">已经结束</span></div>';
+        echo '<div ><span class="lesson_status">'.$lesson_time.'</span></div>';
         echo '</div>';
 
         echo '</div>';

+ 9 - 1
app/course/course_list.php

@@ -6,9 +6,17 @@ require_once "../public/_pdo.php";
 require_once '../public/load_lang.php';
 require_once '../media/function.php';
 
+if(isset($_GET["teacher"])){
+    $teacher = " teacher = '".$_GET["teacher"]."'";
+}
+else{
+    $teacher = " 1= 1";
+}
+
 global $PDO;
 PDO_Connect("sqlite:"._FILE_DB_COURSE_);
-$query = "select * from course where 1  order by create_time DESC limit 0,100";
+
+$query = "select * from course where $teacher  order by create_time DESC limit 0,100";
 $Fetch = PDO_FetchAll($query);
 echo json_encode($Fetch, JSON_UNESCAPED_UNICODE);
 

+ 6 - 10
app/course/list_new.php

@@ -4,21 +4,13 @@
 require_once "../path.php";
 require_once "../public/_pdo.php";
 require_once '../public/load_lang.php';
-require_once '../media/function.php';
+require_once '../ucenter/function.php';
 
 global $PDO;
 PDO_Connect("sqlite:"._FILE_DB_COURSE_);
 $query = "select * from course where 1  order by create_time DESC limit 0,4";
 $Fetch = PDO_FetchAll($query);
 
-$coverList = array();
-foreach($Fetch as $row){
-    $coverList[] = $row["cover"];
-}
-$covers = media_get($coverList);
-foreach ($covers as $value) {
-    $cover["{$value["id"]}"] = $value["link"];
-}
 foreach($Fetch as $row){
     echo '<div class="content_block">';
     echo '<div class="card">';
@@ -26,7 +18,11 @@ foreach($Fetch as $row){
     echo '<div class="pd-10">';
     echo '<div class="title" style="padding-bottom:5px;font-size:110%;font-weight:600;"><a href="../course/course.php?id='.$row["id"].'">'.$row["title"].'</a></div>';
     echo '<div class="summary"  style="padding-bottom:5px;">'.$row["subtitle"].'</div>';
-    echo '<div class="author"  style="padding-bottom:5px;margin-bottom:0.4em;">主讲:'.$row["teacher"].'</div>';    
+    echo '<div class="author"  style="padding-bottom:5px;margin-bottom:0.4em;">主讲:';
+    echo '<a href="../uhome/course.php?userid='.$row['teacher'].'">';
+    echo ucenter_getA($row["teacher"]);
+    echo '</a>';
+    echo '</div>';    
     echo '<div class="summary"  style="padding-bottom:5px;">'.$row["summary"].'</div>';
     echo '</div>';
     echo '<div class="pd-10" style="display:flex;justify-content: space-between;">';

+ 8 - 11
app/course/my_lesson_edit.php

@@ -68,11 +68,6 @@ echo '<form action="../course/my_course_index.php" onsubmit="return lesson_valid
 echo '<input type="hidden" name="lesson" value="'.$lesson_info["id"].'" />';
 echo '<input type="hidden" name="op" value="update" />';
 echo '<div id="userfilelist">';
-    echo '<div style="display:flex;">';
-    echo '<div style="flex:2;">'.'封面'.'</div>';
-    echo '<div id="img_cover" style="flex:8;">'.$cover_html.'</div>';
-    echo "<input id = 'cover_id' type='hidden' name = 'cover' value='{$lesson_info["cover"]}'>";
-    echo '</div>';
 
     echo '<div style="display:flex;">';
     echo '<div style="flex:2;">'.'标题'.'</div>';
@@ -88,17 +83,19 @@ echo '<div id="userfilelist">';
     echo '<div style="flex:8;"><input type="input" name = "subtitle" value="'.$lesson_info["subtitle"].'" /></div>';
     echo '</div>';
     $strDate = date("Y-m-d",$lesson_info["date"]/1000);
+    $strTime = date("H:i",$lesson_info["date"]/1000);
+    $strDuration = date("H:i",$lesson_info["duration"]);
     echo 'Date: <input type="date" name="lesson_date" value="'.$strDate.'"/>';
-    echo 'Time: <input type="time" name="lesson_time" />';
-    echo 'Duration: <input type="time" name="lesson_duration" />';
+    echo 'Time: <input type="time" name="lesson_time" value="'.$strTime.'"/>';
+    echo 'Duration: <input type="time" name="duration" value="'.$strDuration.'"/>';
 
     echo '<div style="display:flex;">';
-    echo '<div style="flex:2;">'.'直播链接'.'</div>';
-    echo '<div style="flex:8;"><textarea name="link" style="height:6em;">'.$lesson_info["link"].'</textarea></div>';
+    echo '<div style="flex:2;">'.'直播'.'</div>';
+    echo '<div style="flex:8;"><textarea name="live" style="height:6em;">'.$lesson_info["live"].'</textarea></div>';
     echo '</div>';
     echo '<div style="display:flex;">';
-    echo '<div style="flex:2;">'.'录播链接'.'</div>';
-    echo '<div style="flex:8;"><textarea name="link1" style="height:6em;">'.$lesson_info["link"].'</textarea></div>';
+    echo '<div style="flex:2;">'.'录播'.'</div>';
+    echo '<div style="flex:8;"><textarea name="replay" style="height:6em;">'.$lesson_info["replay"].'</textarea></div>';
     echo '</div>';
 
 

+ 11 - 3
app/course/my_lesson_update.php

@@ -6,10 +6,13 @@ require_once '../public/function.php';
 global $PDO;
 PDO_Connect("sqlite:"._FILE_DB_COURSE_);
 
-$query="UPDATE lesson SET title = ? , subtitle = ? , link = ? , summary = ? , teacher = ?  , receive_time= ?  , modify_time= ?   where  id = ?  ";
+$query="UPDATE lesson SET title = ? , subtitle = ? , date = ? , duration = ? , live = ? , replay = ? , summary = ? , teacher = ?  , receive_time= ?  , modify_time= ?   where  id = ?  ";
 $sth = $PDO->prepare($query);
-
-$sth->execute(array($_POST["title"] , $_POST["subtitle"] , $_POST["link"] , $_POST["summary"] ,  $_POST["teacher"] ,  mTime() , mTime() , $_POST["lesson"]));
+$data = strtotime($_POST["lesson_date"]);
+$time = strtotime($_POST["lesson_time"]) - strtotime("today");
+$datatime = ($data+$time)*1000;
+$duration = strtotime($_POST["duration"]) - strtotime("today");
+$sth->execute(array($_POST["title"] , $_POST["subtitle"] ,$datatime, $duration , $_POST["live"] , $_POST["replay"] , $_POST["summary"] ,  $_POST["teacher"] ,  mTime() , mTime() , $_POST["lesson"]));
 $respond=array("status"=>0,"message"=>"");
 if (!$sth || ($sth && $sth->errorCode() != 0)) {
 	$error = PDO_ErrorInfo();
@@ -21,6 +24,11 @@ else{
 	$respond['status']=0;
 	$respond['message']="成功";
 	echo "<div style=''>Lesson 数据修改成功</div>";
+	echo $d=strtotime("today");
+
+	echo  strtotime($_POST["lesson_date"])."<br>";
+	echo  strtotime($_POST["lesson_time"])."<br>";
+	echo  (strtotime($_POST["duration"]) - $d)."<br>";
 }
 //echo json_encode($respond, JSON_UNESCAPED_UNICODE);
 ?>

+ 2 - 2
app/course/teacher_list.php

@@ -4,7 +4,7 @@
 require_once "../path.php";
 require_once "../public/_pdo.php";
 require_once '../public/load_lang.php';
-require_once '../media/function.php';
+require_once '../ucenter/function.php';
 
 global $PDO;
 PDO_Connect("sqlite:"._FILE_DB_COURSE_);
@@ -14,7 +14,7 @@ $Fetch = PDO_FetchAll($query);
 foreach($Fetch as $value){
     echo '<div class="content_block">';
     echo '<div class="card pd-10">';
-    echo '<div class="title" style="padding-bottom:5px;font-size:110%;font-weight:600;"><a href="../course/course.php?id='.$row["id"].'">'.$value['teacher'].'</a></div>';
+    echo '<div class="title" style="padding-bottom:5px;font-size:110%;font-weight:600;"><a href="../uhome/course.php?userid='.$value['teacher'].'">'.ucenter_getA($value['teacher']).'</a></div>';
     
     $query = "select id, title  from course where teacher = '{$value['teacher']}'  order by create_time DESC limit 0,5";
     $FetchTeacher = PDO_FetchAll($query);

+ 60 - 37
app/palicanon/index.php

@@ -14,14 +14,14 @@ include "../pcdl/html_head.php";
     }
     #main_tag span{
         margin: 2px;
-    padding: 2px 12px;
-    font-weight: 500;
-    transition-duration: 0.2s;
-    cursor: pointer;
-    display: inline-flex;
-    align-items: center;
-    flex-wrap: nowrap;
-    justify-content: center;
+        padding: 2px 12px;
+        font-weight: 500;
+        transition-duration: 0.2s;
+        cursor: pointer;
+        display: inline-flex;
+        align-items: center;
+        flex-wrap: nowrap;
+        justify-content: center;
         font-size:110%;
         border: unset;
         border-radius: 0;
@@ -47,7 +47,11 @@ include "../pcdl/html_head.php";
     tag .icon:hover{
         background-color: silver;
     }
+    var tag_level = <?php echo file_get_contents("../public/book_tag/tag_list.json"); ?>;
 </style>
+<script>
+    var tag_level = <?php echo file_get_contents("../public/book_tag/tag_list.json"); ?>;
+</script>
 <?php
 //
 
@@ -56,8 +60,6 @@ require_once "../public/_pdo.php";
 require_once '../media/function.php';
 require_once '../public/function.php';
 
-
-
 echo "<div id='course_head_bar' style='background-color:var(--tool-bg-color1);padding:1em 10px 10px 10px;'>";
 echo "<div class='index_inner '>";
 echo "<div style='font-size:140%'>";
@@ -71,8 +73,15 @@ echo '<span tag="aṭṭhakathā">Aṭṭhakathā</span>';
 echo '<span tag="ṭīkā">ṭīkā</span>';
 echo '<span tag="añña">añña</span>';
 echo '</div>';
-echo '<div id="tag_selected" class="summary"  style="padding-bottom:5px;margin:0.5em 0;"></div>';
-echo '<div id="tag_others" class="summary"  style="padding-bottom:5px;"></div>';
+echo '<div id="tag_selected" class=""  style="padding-bottom:5px;margin:0.5em 0;"></div>';
+echo '<div level="0" class="tag_others"  style="padding-bottom:5px;"></div>';
+echo '<div level="1" class="tag_others"  style="padding-bottom:5px;"></div>';
+echo '<div level="2" class="tag_others"  style="padding-bottom:5px;"></div>';
+echo '<div level="3" class="tag_others"  style="padding-bottom:5px;"></div>';
+echo '<div level="4" class="tag_others"  style="padding-bottom:5px;"></div>';
+echo '<div level="5" class="tag_others"  style="padding-bottom:5px;"></div>';
+echo '<div level="100" class="tag_others"  style="padding-bottom:5px;"></div>';
+echo '<div level="8" class="tag_others"  style="padding-bottom:5px;"></div>';
 echo "</div>";
 echo '</div>';
 ?>
@@ -83,7 +92,7 @@ echo '</div>';
 <script>
     var main_tag="";
     var list_tag=new Array();
-    
+    var currTagLevel0= new Array();
 
     $("span[tag]").click(function(){
         $(this).siblings().removeClass("select");
@@ -92,18 +101,6 @@ echo '</div>';
         list_tag=new Array();
         tag_changed();
         render_tag_list();
-        /*
-        const tagSelected = document.getElementsByClassName("select");
-        if(tagSelected){
-            let tagList = new Array();
-            for (const iterator of tagSelected) {
-                tagList.push(iterator.getAttributeNode("tag").value);
-            }
-            main_tag = tagList[0];
-
-            tag_changed();
-        }
-        */
   });
   var allTags = new Array();
   function tag_changed(){
@@ -124,13 +121,7 @@ echo '</div>';
                 let html="";
                 allTags = new Array();
                 for (const iterator of arrBookList) {
-                    html += "<div style='width:25%;padding:0.5em;'>";
-                    html += "<div class='card' style='padding:10px;'>";
-                    html += "<div style='font-weight:700'><a href='../pcdl/reader.php?view=chapter&book="+iterator[0].book+"&para="+iterator[0].para+"' target = '_blank'>"+iterator[0].title+"</a></div>";
-                    html += "<div style=''>book:"+iterator[0].book+" para:"+iterator[0].para+"</div>";
-                    html += "<div style='overflow-wrap: anywhere;'>tag="+ iterator[0].tag+"</div>";
-                    html += "</div>";
-                    html += "</div>";
+                    let tag0="";
                     let tags = iterator[0].tag.split("::");
                     let currTag = new Array();
                     currTag[main_tag] = 1;
@@ -144,7 +135,9 @@ echo '</div>';
                         if(tag.slice(-1)==":"){
                             tag = tag.slice(0,-1);
                         }
-
+                        if(currTagLevel0.hasOwnProperty(tag)){
+                            tag0 = tag;
+                        }
                         if(!currTag.hasOwnProperty(tag)){
                             if(allTags.hasOwnProperty(tag) ){
                                 allTags[tag] += 1;
@@ -154,7 +147,26 @@ echo '</div>';
                             } 
                         }
                     }
+
+                    html += "<div style='width:25%;padding:0.5em;'>";
+                    html += "<div class='card' style='padding:10px;'>";
+                    html += "<div class='' style='position: absolute;background-color: #862002;margin-top: -10px;margin-left: 12em;color: white;padding: 0 3px;display: inline-block;'>"+tag0+"</div>";
+                    html += "<div style='font-weight:700'><a href='../pcdl/reader.php?view=chapter&book="+iterator[0].book+"&para="+iterator[0].para+"' target = '_blank'>"+iterator[0].title+"</a></div>";
+                    html += "<div style=''>book:"+iterator[0].book+" para:"+iterator[0].para+"</div>";
+                    html += "<div style='overflow-wrap: anywhere;'>tag="+ iterator[0].tag+"</div>";
+                    html += "</div>";
+                    html += "</div>";
+
+                }
+
+                let newTags = new Array();
+                for (const oneTag in allTags) {
+                    if(allTags[oneTag]<arrBookList.length){
+                        newTags[oneTag] = allTags[oneTag];
+                    }
+                    
                 }
+                allTags = newTags;
                 allTags.sort(sortNumber);
                 tag_render_others();
                 $("#book_list").html(html);
@@ -165,24 +177,35 @@ echo '</div>';
 $("#tag_input").keypress(function(){
     tag_render_others();
 });
+
   function tag_render_others(){
     let strOthersTag = "";
+    currTagLevel0= new Array();
+    $(".tag_others").html("");
     for (const key in allTags) {
         if (allTags.hasOwnProperty(key)) {
             if($("#tag_input").val().length>0){
                 if(key.indexOf($("#tag_input").val())>=0){
-                    strOthersTag += "<button onclick =\"tag_click('"+key+"')\" >"+key+"</button>";
+                    strOthersTag = "<button onclick =\"tag_click('"+key+"')\" >"+key+"</button>";
                 }
             }
             else{
-                strOthersTag += "<button onclick =\"tag_click('"+key+"')\" >"+key+"</button>";
+                strOthersTag = "<button onclick =\"tag_click('"+key+"')\" >"+key+"</button>";
+            }
+            let thisLevel = 100;
+            if(tag_level.hasOwnProperty(key)){
+                thisLevel = tag_level[key].level;
+                if(tag_level[key].level==0){
+                    currTagLevel0[key] = 1;
+                }
             }
-            
+            $(".tag_others[level='"+thisLevel+"']").html($(".tag_others[level='"+thisLevel+"']").html()+strOthersTag);
         }
     }
-    $("#tag_others").html(strOthersTag);
+   
 
   }
+
   function tag_click(tag){
     list_tag.push(tag);
     render_tag_list();

+ 4 - 4
app/pcdl/reader.php

@@ -166,7 +166,8 @@ para:hover{
 }
 .sent_toc{
 	font-weight:700;
-	font-size:120%;
+	font-family: Noto serif;
+    font-size: 150%;
 }
 </style>
 		<!-- tool bar begin-->
@@ -356,6 +357,7 @@ else{
 			$toc2Level = 0;
 			echo "<div><div>";
 			foreach ($chapter_toc as $key => $value) {
+				$tocList[$value["paragraph"]] = $value["level"];
 				$classCurrToc="";
 				$classCurrToc2 = "";
 				$classCurrTocTitle2="";
@@ -412,7 +414,7 @@ else{
 				//右侧目录
 				
 				if($value["paragraph"]>$currParaBegin && $value["paragraph"]<$currParaEnd){
-					$tocList[$value["paragraph"]] = $value["level"];
+					//$tocList[$value["paragraph"]] = $value["level"];
 					$htmlToc2 .= "<div><a href='#para_{$value["paragraph"]}'>{$value["toc"]}</a></div>";
 				}
 				
@@ -556,8 +558,6 @@ else{
 		break;
 	}
 	echo "</div>";
-
-
 	//生成一个段落空壳 等会儿查询数据,按照不同数据类型填充进去
 	PDO_Connect("sqlite:"._FILE_DB_PALI_SENTENCE_);
 

Разница между файлами не показана из-за своего большого размера
+ 139 - 139
app/public/book_tag/en.json


+ 20 - 0
app/public/book_tag/tag_list.json

@@ -0,0 +1,20 @@
+{
+  "sutta": { "level": 0 },
+  "vinaya": { "level": 0 },
+  "abhidhamma": { "level": 0 },
+  "mūla": { "level": 0 },
+  "aṭṭhakathā": { "level": 0 },
+  "ṭīkā": { "level": 0 },
+  "añña": { "level": 0 },
+  "dīgha": { "level": 1 },
+  "majjhima": { "level": 1 },
+  "saṃyutta": { "level": 1 },
+  "aṅguttara": { "level": 1 },
+  "khuddaka": { "level": 1 },
+  "mahāvibhaṅga": { "level": 1 },
+  "Bhikkhunīvibhaṅga": { "level": 1 },
+  "mahāvaggapāḷi": { "level": 1 },
+  "Cūḷavaggapāḷi": { "level": 1 },
+  "vibhaṅga": { "level": 1 },
+  "Theragāthā": { "level": 2 }
+}

+ 123 - 2
app/studio/index.php

@@ -187,7 +187,6 @@ else{
 
             .help_div{
                 margin-bottom: 2em;
-                width: 28em;
             }
             .htlp_title{
                 font-size:140%;
@@ -385,6 +384,11 @@ else{
 		</div>
 	</div>       
 
+	<script src="../public/js/highcharts/highcharts.js"></script>
+	<script src="../public/js/highcharts/modules/exporting.js"></script>
+	<script src="../public/js/highcharts/modules/data.js"></script>
+	<script src="../public/js/highcharts/modules/series-label.js"></script>
+	<script src="../public/js/highcharts/modules/oldie.js"></script>
 
 	<div class="help_div">
 		<div  class="htlp_title">
@@ -393,12 +397,17 @@ else{
 		<div>
 			<div class="help_fun_block">
 				<div class="title" ><?php echo $_local->gui->studio;?></div>
-				<ul class="help_fun_block_link_list">
+				<div style="display:flex;">
+				<ul class="help_fun_block_link_list" style="flex:3;">
 					<li style="display:block;">已发表的文集:2</li>
 					<li style="display:block;">已发表的文章:12</li>
 					<li style="display:block;"><?php echo $_local->gui->my_document;?>:234</li>
 					<li style="display:block;"><?php echo $_local->gui->encyclopedia;?>:245</li>
+					<li style="display:block;"><?php echo $_local->gui->userdict;?>:245</li>
 				</ul>
+				<div id="container" style="height:250px;flex:7;">
+				</div>
+				</div>
 			</div>
 			<div class="help_fun_block">
 				<div class="title" ><?php echo $_local->gui->library;?></div>
@@ -478,6 +487,118 @@ else{
 file_list();
 </script>
 		
+<script>
+/*
+		$.get('../uwbw/update_analytics.php', function (csvStr) {
+			csvStr = csvStr.replace(/\n\n/g, '\n');
+			Highcharts.chart('container', {
+
+			chart: {
+				scrollablePlotArea: {
+					minWidth: 400
+				}
+			},
+
+			data: {
+				//csvURL: 'https://cdn.jsdelivr.net/gh/highcharts/highcharts@v7.0.0/samples/data/analytics.csv',
+				csv: csvStr
+			},
+
+			title: {
+				text: '逐词解析'
+			},
+
+			subtitle: {
+				text: ''
+			},
+
+			xAxis: {
+				tickInterval: 7 * 24 * 3600 * 1000, // one week
+				tickWidth: 0,
+				gridLineWidth: 1,
+				labels: {
+					align: 'left',
+					x: 3,
+					y: -3
+				}
+			},
+
+			yAxis: [{ // left y axis
+				title: {
+					text: null
+				},
+				labels: {
+					align: 'left',
+					x: 3,
+					y: 16,
+					format: '{value:.,0f}'
+				},
+				showFirstLabel: false
+			}, { // right y axis
+				linkedTo: 0,
+				gridLineWidth: 0,
+				opposite: true,
+				title: {
+					text: null
+				},
+				labels: {
+					align: 'right',
+					x: -3,
+					y: 16,
+					format: '{value:.,0f}'
+				},
+				showFirstLabel: false
+			}],
+
+			legend: {
+				align: 'left',
+				verticalAlign: 'top',
+				borderWidth: 0
+			},
+
+			tooltip: {
+				shared: true,
+				crosshairs: true
+			},
+
+			plotOptions: {
+				series: {
+					cursor: 'pointer',
+					point: {
+						events: {
+							click: function (e) {
+								hs.htmlExpand(null, {
+									pageOrigin: {
+										x: e.pageX || e.clientX,
+										y: e.pageY || e.clientY
+									},
+									headingText: this.series.name,
+									maincontentText: Highcharts.dateFormat('%A, %b %e, %Y', this.x) + ':<br/> ' +
+										this.y + ' sessions',
+									width: 200
+								});
+							}
+						}
+					},
+					marker: {
+						lineWidth: 1
+					}
+				}
+			},
+
+			series: [{
+				name: 'All sessions',
+				lineWidth: 4,
+				marker: {
+					radius: 4
+				}
+			}, {
+				name: 'New users'
+			}]
+			});
+		});
+		*/
+        </script>
 	</div>
 	
 	<div class="foot_div">

+ 1 - 1
app/studio/js/message.js

@@ -889,7 +889,7 @@ function show_tran_net(book, para, begin, end) {
           "<div class='trans_text_info'>" +
           "<span><span class='author'>" +
           iterator.author +
-          "</span><span class='tag'>笔记</span></span>" +
+          "</span><span class='tag'>tag</span></span>" +
           "<span class='tools'>" +
           "<button>采纳</button>" +
           "</span>" +

+ 1 - 1
app/studio/project.php

@@ -183,7 +183,7 @@ switch($op){
 							$strXml.="<style>{$result["style"]}</style>";
 							$strXml.="<status>0</status>";
 							$strXml.="</word>";
-							$wbw_data[] = array(UUID::v4(),$block_id,$book,$iPar,$result["wid"],$result["real"],$strXml,time(),time(),1,$USER_NAME);
+							$wbw_data[] = array(UUID::v4(),$block_id,$book,$iPar,$result["wid"],$result["real"],$strXml,mTime(),mTime(),1,$USER_NAME);
 						}
 							
 						}

+ 3 - 3
app/ucenter/function.php

@@ -19,18 +19,18 @@ function ucenter_get($userid,$fields="username"){
 
 }
 
-function ucenter_getA($userid,$fields){
+function ucenter_getA($userid,$fields="nickname"){
     //打开数据库
     $dns = "sqlite:"._FILE_DB_USERINFO_;
     $dbh = new PDO($dns, "", "",array(PDO::ATTR_PERSISTENT=>true));
     $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);  
-    $query = "select username from user where userid= ? ";
+    $query = "select username,nickname from user where userid= ? ";
     $stmt = $dbh->prepare($query);
     $stmt->execute(array($userid));
     $fUser = $stmt->fetchAll(PDO::FETCH_ASSOC);
     $dbh=null;
     if(count($fUser)>0){
-        return($fUser[0]["username"]);
+        return($fUser[0][$fields]);
     }
     else{
         return("");

+ 6 - 0
app/ucenter/user.php

@@ -93,6 +93,12 @@
 					</svg>
 					<?php echo $_local->gui->logout;?>
 				</a>
+				<a href='../uhome/index.php?userid=<?php echo $_COOKIE["userid"];?>'>
+					<svg class="icon">
+						<use xlink:href="../studio/svg/icon.svg#ic_exit_to_app_24px"></use>
+					</svg>
+					<?php echo "我的空间";?>
+				</a>
 			</div>
 
 				<?php

+ 49 - 0
app/uhome/course.php

@@ -0,0 +1,49 @@
+<?PHP
+include "../pcdl/html_head.php";
+?>
+<body>
+
+<?php
+    require_once "../path.php";
+    require_once "../public/_pdo.php";
+    require_once '../public/function.php';
+    require_once '../ucenter/function.php';
+    require_once "../pcdl/head_bar.php";
+    $currChannal = "course";
+    require_once "../uhome/head.php";
+?>
+
+<div class='index_inner'>
+<div id="course_list">
+</div>
+</div>
+<script>
+	$.get("../course/course_list.php",
+    {
+    teacher:"<?php echo $_GET["userid"]; ?>"
+    },
+    function(data,status){
+        let arrData = JSON.parse(data);
+        let html="";
+        for (const iterator of arrData) {
+            html += '<div class="card" style="display:flex;margin:1em;padding:10px;">';
+
+            html += '<div style="flex:7;">';
+            html +=  '<div class="title" style="padding-bottom:5px;font-size:110%;font-weight:600;"><a href="../course/course.php?id='+iterator.id+'">'+iterator.title+'</a></div>';
+            html += '<div class="summary"  style="padding-bottom:5px;">'+iterator.subtitle+'</div>';
+            html += '<div class="summary"  style="padding-bottom:5px;">'+iterator.summary+'</div>';
+
+            html += '</div>';
+
+            html += '<div style="flex:3;max-width:15em;">';
+
+            html += '</div>';
+
+            html += '</div>';
+            $("#course_list").html(html);
+        }
+	});
+</script>
+<?php
+include "../pcdl/html_foot.php";
+?>

+ 54 - 0
app/uhome/head.php

@@ -0,0 +1,54 @@
+<style>
+    #main_video_win iframe{
+        width:100%;
+        height:100%;
+    }
+    #main_tag span{
+        margin: 2px;
+        color:black;
+        padding: 2px 12px 0 12px;
+        font-weight: 500;
+        transition-duration: 0.2s;
+        cursor: pointer;
+        display: inline-flex;
+        align-items: center;
+        flex-wrap: nowrap;
+        justify-content: center;
+        font-size:110%;
+        border: unset;
+        border-radius: 0;
+        border-bottom: 2px solid var(--nocolor);
+    }
+    #main_tag span:hover{
+        background-color:unset;
+        border-color: var(--link-hover-color);
+    }
+    #main_tag .select{
+        border-bottom: 2px solid var(--link-color);
+    }
+</style>
+
+<div id='course_head_bar' style='background-color:var(--tool-bg-color1);padding:1em 10px 0 10px;'>
+    <div class='index_inner '>
+        <div style='display:flex;'>
+            <div style='font-size:280%;flex:7;'>
+                <?php echo ucenter_getA($_GET["userid"]);?>
+            </div>
+            <div  style="display: inline-block;"><button>关注</button><button>分享</button></div>
+        </div>
+
+        <div id="main_tag"  style="">
+            <a href="trans.php?userid=<?php echo $_GET["userid"];?>"><span tag="译文">译文</span></a>
+            <?php 
+                if(isset($currChannal) && $currChannal=="course"){
+                    echo '<span class="select" tag="课程">课程</span>';
+                }
+                else{
+                    echo '<a href="course.php?userid='.$_GET["userid"].'"><span tag="课程">课程</span></a>';
+                }
+            ?>
+            <span tag="经验">经验</span>
+            <span tag="统计">统计</span>
+        </div>
+    </div>
+</div>

+ 19 - 0
app/uhome/index.php

@@ -1,3 +1,22 @@
+<?PHP
+include "../pcdl/html_head.php";
+?>
+<body>
+
 <?php
+    require_once "../path.php";
+    require_once "../public/_pdo.php";
+    require_once '../public/function.php';
+    require_once '../ucenter/function.php';
+    require_once "../pcdl/head_bar.php";
+    require_once "../uhome/head.php";
+?>
+
+<div class='index_inner'>
+</div>
+<script>
 
+</script>
+<?php
+include "../pcdl/html_foot.php";
 ?>

+ 24 - 0
app/uwbw/update_analytics.php

@@ -0,0 +1,24 @@
+<?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_);
+
+echo "Day Index,创建,更新\n";
+$end = strtotime("now")*1000;
+$begin = strtotime("-1 day")*1000;
+for($i=0;$i<30;$i++){
+    //$query = "select count(*) from wbw where \"create_time\" > ".$PDO->quote($begin)." AND \"create_time\" < ".$PDO->quote($end). " AND owner = ".$PDO->quote($_COOKIE["userid"]);
+    $create = 0;//PDO_FetchOne($query);
+    $query = "select count(*) from wbw where  \"modify_time\" > ".$PDO->quote($begin)." AND \"modify_time\" < ".$PDO->quote($end). " AND owner = ".$PDO->quote($_COOKIE["username"]);
+    $modify = PDO_FetchOne($query);
+    echo date("m/d/Y",$begin/1000).','.$create.",".$modify."\n"; 
+    $end = $begin;
+    $begin = strtotime("-1 day",$end/1000)*1000;
+}
+
+
+?>

+ 23 - 22
documents/development/functions.md

@@ -11,7 +11,7 @@
 
 # PCD Suite 设计原则
 
-- **可重用的数据** 从逐词解析到整篇译文。所有的数据应该是可重用的。可重用意味着在技术层面应该存储计算机可辨识格式的数据。
+- **可重用的数据** 从逐词解析到整篇译文。所有的数据应该是可重用的。可重用意味着在技术层面应该存储计算机可辨识格式的数据。
 
 ```
 应该存储
@@ -22,12 +22,12 @@
 }
 
 不应存储
-citta:nt. 心;缤纷;
+citta:中性 心;缤纷;
 ```
 
 - **智能重用** 程序应根据经文类型(经藏或律藏)或其他特征,提供提供不同的数据给用户。或将数据列表按信心指数排序。以减少不必要的人工劳动。
 - **公共版权** 有版权的信息与前两条原则违背。所以,一切在本平台公开的数据都应使用公共版权。
-- **平等的发言权** 每个平台的使用者都有权发表自己的观点。平台不应以人工的方式评价观点的正确性或给予排名靠前或靠后的操作。但是平台应该记录和向所有人提供信息发布者的使用经验数值(如:使用平台时间,发表信息量,被点赞量等)供阅读者自己判断信息的可用性。没有实质内容的信息(如:“很好”;“太差了”),管理员应根据过滤规则,将信息隐藏。在读者选择“查看隐藏的内容”时展示。
+- **平等的发言权** 每个平台的使用者都有权发表自己的观点。平台不应以官方的角度用人工的方式评价观点的正确性或给予排名靠前或靠后的操作。但是平台应该记录和向所有人提供统计数据,如:信息发布者的使用经验数值(使用平台时间,发表信息量,被点赞量等),阅读者的阅读数据(阅读量,收藏量)供阅读者自己判断信息的可用性。没有实质内容的信息(如:“很好”;“太差了”等)将对读者造成困扰,增加读者搜寻有用信息的时间。管理员应根据判定规则,将信息隐藏。在读者选择“查看隐藏的内容”时展示。
 
 # 程序架构设计
 
@@ -90,16 +90,13 @@ www.wikipali.org
 
 ### 尚未实现的功能(目前的需求)
 
-#### 最新课程列表
-
-- 报名数字显示和报名功能
-
-#### 最新三藏译文列表
+- **最新课程列表**-报名数字显示和报名功能
 
-#### 手机版 css
+- 最新三藏译文列表
 
-- 写不同的 css 在手机端和 pc 看到不同的页面。
-- 不一定用 css 切换,可以使用不同的技术实现方式。
+- 手机版 css
+  - 写不同的 css 在手机端和 pc 看到不同的页面。
+  - 不一定用 css 切换,可以使用不同的技术实现方式。
 
 ### 未来可能的发展
 
@@ -165,27 +162,31 @@ www.wikipali.org/palicanon
 
 ## 经典阅读器
 
-## 译经楼-欢迎页
+# 译经楼 Studio
+
+## 欢迎页
+
+## 经文选择
 
-## 译经楼-经文选择
+## 最近打开
 
-## 译经楼-最近打开
+## 协作
 
-## 译经楼-协作
+## 课程管理
 
-## 译经楼-课程管理
+## 用户字典管理
 
-## 译经楼-用户字典管理
+## 百科字典管理
 
-## 译经楼-百科字典管理
+## 工作组管理
 
-## 译经楼-工作组管理
+# 用户中心
 
-## 用户中心-登录
+## 登录
 
-## 用户中心-注册
+## 注册
 
-## 用户中心-用户设置
+## 用户设置
 
 # 网站后台管理
 

Некоторые файлы не были показаны из-за большого количества измененных файлов