Browse Source

完善小组功能

visuddhinanda 5 years ago
parent
commit
685de99071

+ 1 - 0
.gitignore

@@ -3,3 +3,4 @@
 .DS_Store
 .DS_Store
 /.debug
 /.debug
 .favorites.json
 .favorites.json
+/vendor

+ 32 - 3
app/channal/channal.js

@@ -1,4 +1,5 @@
 var _my_channal = null;
 var _my_channal = null;
+var gChannelId;
 var get_channel_list_callback = null;
 var get_channel_list_callback = null;
 channal_list();
 channal_list();
 
 
@@ -90,6 +91,7 @@ function my_channal_list() {
 编辑channel信息
 编辑channel信息
 */
 */
 function my_channal_edit(id) {
 function my_channal_edit(id) {
+	gChannelId = id;
 	$.get(
 	$.get(
 		"../channal/my_channal_get.php",
 		"../channal/my_channal_get.php",
 		{
 		{
@@ -174,12 +176,14 @@ function my_channal_edit(id) {
 					html += "</div>";
 					html += "</div>";
 					html += "</div>";
 					html += "</div>";
 
 
-					html += "<div id='coop_div' style='padding:5px;'>";
+					html += "<div id='coop_div' style='padding:5px;position: relative;'>";
 					html += "<h2>协作者</h2>";
 					html += "<h2>协作者</h2>";
-					html += "<div id='add_coop_user_dlg' class='float_dlg'></div>";
+
 					html += "<button onclick='add_coop_user()'>添加协作者</button>";
 					html += "<button onclick='add_coop_user()'>添加协作者</button>";
-					html += "<div id='add_coop_group_dlg' class='float_dlg'></div>";
+					html += "<div id='add_coop_user_dlg' class='float_dlg' style='left: 0;'></div>";
+
 					html += "<button onclick='add_coop_group()' >添加协作群</button>";
 					html += "<button onclick='add_coop_group()' >添加协作群</button>";
+					html += "<div id='add_coop_group_dlg' class='float_dlg' style='left: 0;'></div>";
 					html += "<div id='coop_inner' >";
 					html += "<div id='coop_inner' >";
 					if (typeof result.coop == "undefined" || result.coop.length == 0) {
 					if (typeof result.coop == "undefined" || result.coop.length == 0) {
 						html += "这里很安静";
 						html += "这里很安静";
@@ -205,6 +209,7 @@ function my_channal_edit(id) {
 					html += "</div>";
 					html += "</div>";
 
 
 					$("#channal_info").html(html);
 					$("#channal_info").html(html);
+					user_select_dlg_init("add_coop_user_dlg");
 					tran_lang_select_init("channal_lang_select");
 					tran_lang_select_init("channal_lang_select");
 					//$("#aritcle_status").html(render_status(result.status));
 					//$("#aritcle_status").html(render_status(result.status));
 					$("#channal_title").html(result.name);
 					$("#channal_title").html(result.name);
@@ -219,6 +224,30 @@ function my_channal_edit(id) {
 	);
 	);
 }
 }
 
 
+function add_coop_user() {
+	user_select_dlg_show();
+}
+
+function user_selected(id) {
+	$.post(
+		"../channal/coop_new_user.php",
+		{
+			userid: id,
+			channel_id: gChannelId,
+		},
+		function (data) {
+			let error = JSON.parse(data);
+			if (error.status == 0) {
+				user_select_cancel();
+				alert("ok");
+				location.reload();
+			} else {
+				alert(error.message);
+			}
+		}
+	);
+}
+
 function status_change(obj) {
 function status_change(obj) {
 	let arrStatus = [
 	let arrStatus = [
 		{ id: 0, string: gLocal.gui.disable, note: gLocal.gui.disable_note },
 		{ id: 0, string: gLocal.gui.disable, note: gLocal.gui.disable_note },

+ 21 - 0
app/channal/coop_new_user.php

@@ -0,0 +1,21 @@
+<?php
+require_once "../path.php";
+require_once "../public/_pdo.php";
+require_once '../public/function.php';
+
+$respond=array("status"=>0,"message"=>"");
+if(isset($_COOKIE["userid"]) && isset($_POST["channel_id"])){
+	PDO_Connect("sqlite:"._FILE_DB_CHANNAL_);
+	$query="INSERT INTO cooperation ( channal_id , user_id  ,type  , power  )  
+	VALUES  (  ? , ? , ? , ? ) ";
+	$sth = $PDO->prepare($query);
+	$sth->execute(array($_POST["channel_id"],$_POST["userid"] , 0 , 1 ));
+	$respond=array("status"=>0,"message"=>"");
+	if (!$sth || ($sth && $sth->errorCode() != 0)) {
+		$error = PDO_ErrorInfo();
+		$respond['status']=1;
+		$respond['message']=$error[2];
+	}	
+}
+echo json_encode($respond, JSON_UNESCAPED_UNICODE);
+?>

+ 2 - 0
app/channal/my_channal_edit.php

@@ -8,6 +8,7 @@ require_once '../studio/index_head.php';
 	<script src="../public/js/jquery-ui-1.12.1/jquery-ui.js"></script>
 	<script src="../public/js/jquery-ui-1.12.1/jquery-ui.js"></script>
 	<link type="text/css" rel="stylesheet" href="../public/js/jquery-ui-1.12.1/jquery-ui.css"/>
 	<link type="text/css" rel="stylesheet" href="../public/js/jquery-ui-1.12.1/jquery-ui.css"/>
 	<script language="javascript" src="../lang/tran_lang_select.js"></script>
 	<script language="javascript" src="../lang/tran_lang_select.js"></script>
+	<script language="javascript" src="../group/user_select_dlg.js"></script>
 
 
 	<script >
 	<script >
 	var gCurrPage="channal";
 	var gCurrPage="channal";
@@ -89,6 +90,7 @@ require_once '../studio/index_head.php';
 	</div>
 	</div>
 	
 	
 <script>
 <script>
+
 my_channal_edit("<?php echo $_GET["id"] ?>");
 my_channal_edit("<?php echo $_GET["id"] ?>");
 </script>
 </script>
 <?php
 <?php

+ 59 - 20
app/dict/comp_csv.php

@@ -1,36 +1,75 @@
 <?php
 <?php
-require_once "../dict/troub_split.php";
+require_once "../dict/turbo_split.php";
+require_once "../redis/function.php";
+
 global $result;
 global $result;
 $myfile = fopen("comp.csv", "a");
 $myfile = fopen("comp.csv", "a");
 $filefail = fopen("comp_fail.txt", "a");
 $filefail = fopen("comp_fail.txt", "a");
-
+$iMax = 10;
+/*
 $dns = "sqlite:" . _FILE_DB_WORD_INDEX_;
 $dns = "sqlite:" . _FILE_DB_WORD_INDEX_;
 $dbh_word = new PDO($dns, "", "", array(PDO::ATTR_PERSISTENT => true));
 $dbh_word = new PDO($dns, "", "", array(PDO::ATTR_PERSISTENT => true));
 $dbh_word->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
 $dbh_word->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
 
 
 $query = "SELECT * from wordindex where 1";
 $query = "SELECT * from wordindex where 1";
 $stmt = $dbh_word->query($query);
 $stmt = $dbh_word->query($query);
-$iMax = 5;
-while ($word = $stmt->fetch(PDO::FETCH_ASSOC)) {
-    $arrword = split_diphthong($word["word"]);
-    fputcsv($myfile, array($word["word"], implode("+", $arrword), 90));
-    foreach ($arrword as $oneword) {
-        $result = array(); //全局变量,递归程序的输出容器
-        mySplit2($oneword, 0, false);
-        echo "{$oneword}:" . count($result) . "\n";
-        if (count($result) > 0) {
-            arsort($result); //按信心指数排序
-            $iCount = 0;
-            foreach ($result as $row => $value) {
-                $iCount++;
-                fputcsv($myfile, array($oneword, $row, $value));
-                if ($iCount >= $iMax) {
-                    break;
+
+while ($word = $stmt->fetch(PDO::FETCH_ASSOC))
+ */
+$redis = redis_connect();
+if ($redis == false) {
+    echo "no redis connect\n";
+    exit;
+}
+$i = null;
+$counter = 0;
+while ($words = $redis->sscan("pali_word", $i)) {
+    # code...
+
+    foreach ($words as $key => $word) {
+        # code...
+        $arrword = split_diphthong($word);
+        if (count($arrword) > 1) {
+            fputcsv($myfile, array($word, implode("+", $arrword), 0.99));
+        }
+
+        foreach ($arrword as $oneword) {
+            $counter++;
+            $result = array(); //全局变量,递归程序的输出容器
+
+            mySplit2($oneword, 0, $_express, 0, 0.01, 0.01, true, true);
+            if (isset($_POST["debug"])) {
+                echo "正切:" . count($result) . "\n";
+            }
+            mySplit2($oneword, 0, $_express, 0, 0.01, 0.01, false, true);
+            if (isset($_POST["debug"])) {
+                echo "反切:" . count($result) . "\n";
+            }
+            /*
+            #正向切分
+            mySplit2($oneword, 0, false);
+            if (count($result) == 0) {
+            #如果没有 逆向切分
+            mySplit2($oneword, 0, false, 0, 0.8, 0.8, true);
+            }
+             */
+            echo "{$counter}-{$oneword}:" . count($result) . "\n";
+            if (count($result) > 0) {
+                arsort($result); //按信心指数排序
+                $iCount = 0;
+                foreach ($result as $row => $value) {
+                    $iCount++;
+                    fputcsv($myfile, array($oneword, $row, $value));
+                    if ($iCount >= $iMax) {
+                        break;
+                    }
                 }
                 }
+            } else {
+                fwrite($filefail, $oneword . "\n");
             }
             }
-        } else {
-            fwrite($filefail, $oneword . "\n");
+
         }
         }
 
 
     }
     }
 }
 }
+while ($i = $words[0] != 0);

+ 10 - 0
app/dict/dict.js

@@ -61,6 +61,9 @@ function dict_pre_search(word) {
 			dict_pre_search_curr_word = "";
 			dict_pre_search_curr_word = "";
 			$("#pre_search_word_content").html(data);
 			$("#pre_search_word_content").html(data);
 			$("#pre_search_result").css("display", "block");
 			$("#pre_search_result").css("display", "block");
+			$(document).one("click", function () {
+				$("#pre_search_result").hide();
+			});
 		}
 		}
 	);
 	);
 }
 }
@@ -71,6 +74,11 @@ function dict_pre_word_click(word) {
 	dict_search(word);
 	dict_search(word);
 }
 }
 
 
+function search_on_load(word) {
+	$("#dict_ref_search_input").val(word);
+	dict_search(word);
+}
+
 function dict_input_change(obj) {
 function dict_input_change(obj) {
 	dict_pre_search(obj.value);
 	dict_pre_search(obj.value);
 }
 }
@@ -180,6 +188,8 @@ function trubo_split() {
 						html += "</div>";
 						html += "</div>";
 						html += "</div>";
 						html += "</div>";
 					}
 					}
+				} else {
+					html += "无法拆分";
 				}
 				}
 				html += "</div>";
 				html += "</div>";
 				$("#input_parts").html(html);
 				$("#input_parts").html(html);

+ 7 - 0
app/es/test.php

@@ -0,0 +1,7 @@
+<?php
+use Elasticsearch\ClientBuilder;
+require '../../vendor/autoload.php';
+$client = Elasticsearch\ClientBuilder::create()->build();
+
+
+?>

+ 5 - 0
app/es/uuid.php

@@ -0,0 +1,5 @@
+<?php
+require_once '../public/function.php';
+$uuid = str_replace("-", "", UUID::v4());
+$str = gmp_strval(gmp_init($uuid, 16), 62);
+echo $str;

+ 0 - 0
app/group/doc_del.php


+ 131 - 157
app/group/group.js

@@ -8,7 +8,6 @@ function group_list_init() {
 		group_add_dlg_init("group_add_div");
 		group_add_dlg_init("group_add_div");
 		$("#button_new_group").show();
 		$("#button_new_group").show();
 	} else {
 	} else {
-		$("#button_new_sub_group").show();
 		group_list(gGroupId, gList);
 		group_list(gGroupId, gList);
 		team_add_dlg_init("sub_group_add_div");
 		team_add_dlg_init("sub_group_add_div");
 		$("#member_list_shell").css("visibility", "visible");
 		$("#member_list_shell").css("visibility", "visible");
@@ -52,14 +51,38 @@ function my_group_list() {
 						html += "<div style='flex:1;'>" + key++ + "</div>";
 						html += "<div style='flex:1;'>" + key++ + "</div>";
 						html += "<div style='flex:2;'>" + iterator.group_name + "</div>";
 						html += "<div style='flex:2;'>" + iterator.group_name + "</div>";
 						html += "<div style='flex:2;'>";
 						html += "<div style='flex:2;'>";
-						if (iterator.power == 1) {
-							html += "拥有者";
+						switch (parseInt(iterator.power)) {
+							case 0:
+								html += gLocal.gui.owner;
+								break;
+							case 1:
+								html += gLocal.gui.manager;
+								break;
+							case 2:
+								html += gLocal.gui.member;
+								break;
+							default:
+								break;
 						}
 						}
 						html += "</div>";
 						html += "</div>";
 						html +=
 						html +=
 							"<div style='flex:1;'><a href='../group/index.php?id=" +
 							"<div style='flex:1;'><a href='../group/index.php?id=" +
 							iterator.group_id +
 							iterator.group_id +
-							"'>进入</a></div>";
+							"'>" +
+							gLocal.gui.enter +
+							"</a></div>";
+						html += "<div style='flex:1;'><div class='hover_button'>";
+						if (parseInt(iterator.power) == 0) {
+							//管理员可以删除group
+							html +=
+								"<button onclick=\"group_del('" +
+								iterator.group_id +
+								"')\">" +
+								gLocal.gui.delete +
+								"</button>";
+						}
+
+						html += "</div></div>";
 						html += "</div>";
 						html += "</div>";
 					}
 					}
 				} else {
 				} else {
@@ -92,8 +115,10 @@ function group_list(id, list) {
 					html += "<h2>" + gLocal.gui.introduction + "</h2>";
 					html += "<h2>" + gLocal.gui.introduction + "</h2>";
 					html += result.info.description;
 					html += result.info.description;
 					html += "</div>";
 					html += "</div>";
-					$("#curr_group").html("/ <a>" + result.info.name + "</a>");
+					$("#curr_group").html("/" + result.info.name);
+
 					if (result.parent) {
 					if (result.parent) {
+						//如果是project 显示 group名词
 						$("#parent_group").html(
 						$("#parent_group").html(
 							" / <a href='../group/index.php?id=" +
 							" / <a href='../group/index.php?id=" +
 								result.parent.id +
 								result.parent.id +
@@ -102,6 +127,9 @@ function group_list(id, list) {
 								"</a> "
 								"</a> "
 						);
 						);
 					} else {
 					} else {
+						if (result.info.creator == getCookie("userid")) {
+							$("#button_new_sub_group").show();
+						}
 						//子小组列表
 						//子小组列表
 						html += "<div class='info_block'>";
 						html += "<div class='info_block'>";
 						html += "<h2>" + gLocal.gui.sub_group + "</h2>";
 						html += "<h2>" + gLocal.gui.sub_group + "</h2>";
@@ -111,14 +139,26 @@ function group_list(id, list) {
 								html += "<div style='flex:1;'>" + key++ + "</div>";
 								html += "<div style='flex:1;'>" + key++ + "</div>";
 								html += "<div style='flex:2;'>" + iterator.name + "</div>";
 								html += "<div style='flex:2;'>" + iterator.name + "</div>";
 								html += "<div style='flex:2;'>";
 								html += "<div style='flex:2;'>";
-								if (iterator.power == 1) {
-									html += "拥有者";
+								if (iterator.creator == getCookie("userid")) {
+									html += gLocal.gui.owner;
 								}
 								}
 								html += "</div>";
 								html += "</div>";
 								html +=
 								html +=
 									"<div style='flex:1;'><a href='../group/index.php?id=" +
 									"<div style='flex:1;'><a href='../group/index.php?id=" +
 									iterator.id +
 									iterator.id +
-									"&list=file'>进入</a></div>";
+									"&list=file'>" +
+									gLocal.gui.enter +
+									"</a></div>";
+								html += "<div style='flex:1;'><div class='hover_button'>";
+								if (iterator.creator == getCookie("userid")) {
+									html +=
+										"<button onclick=\"group_del('" +
+										iterator.id +
+										"')\">" +
+										gLocal.gui.delete +
+										"</button>";
+								}
+								html += "</div></div>";
 								html += "</div>";
 								html += "</div>";
 							}
 							}
 						} else {
 						} else {
@@ -185,7 +225,7 @@ function member_list(id) {
 					let html = "";
 					let html = "";
 					let result = JSON.parse(data);
 					let result = JSON.parse(data);
 					$("#member_number").html("(" + result.length + ")");
 					$("#member_number").html("(" + result.length + ")");
-					//子小组列表
+					//人员
 					html += "<div class='info_block'>";
 					html += "<div class='info_block'>";
 					if (result && result.length > 0) {
 					if (result && result.length > 0) {
 						for (const iterator of result) {
 						for (const iterator of result) {
@@ -196,8 +236,19 @@ function member_list(id) {
 								html += "拥有者";
 								html += "拥有者";
 							}
 							}
 							html += "</div>";
 							html += "</div>";
-							html += "<div style='flex:1;'>";
-							html += "</div>";
+							html += "<div style='flex:1;'><div class='hover_button'>";
+							//if (iterator.creator == getCookie("userid"))
+							{
+								html +=
+									"<button onclick=\"member_del('" +
+									id +
+									"','" +
+									iterator.user_id +
+									"')\">" +
+									gLocal.gui.delete +
+									"</button>";
+							}
+							html += "</div></div>";
 							html += "</div>";
 							html += "</div>";
 						}
 						}
 					} else {
 					} else {
@@ -216,165 +267,88 @@ function member_list(id) {
 	);
 	);
 }
 }
 
 
-/*
-编辑channel信息
-*/
-function my_channal_edit(id) {
-	$.get(
-		"../channal/my_channal_get.php",
+function user_selected(id) {
+	$.post(
+		"../group/member_put.php",
 		{
 		{
-			id: id,
-			setting: "",
+			userid: id,
+			groupid: gGroupId,
 		},
 		},
-		function (data, status) {
-			if (status == "success") {
-				try {
-					let html = "";
-					let result = JSON.parse(data);
-					$("#article_collect").attr("a_id", result.id);
-					html += '<div class="" style="padding:5px;">';
-					html += '<div style="max-width:2em;flex:1;"></div>';
-					html += "</div>";
-
-					html += "<div style='width: 60%;padding: 1em;min-width: 25em;'>";
-					html += '<div style="display:flex;line-height:32px;">';
-					html += "<input type='hidden' name='id' value='" + result.id + "'/>";
-					html += "</div>";
-
-					html += '<div style="display:flex;line-height:32px;">';
-					html += "<div style='flex:2;'>" + gLocal.gui.title + "</div>";
-					html += "<div style='flex:8;'>";
-					html +=
-						"<input type='input' name='name' value='" +
-						result.name +
-						"' maxlength='32' placeholder='channel title'/>";
-					html += "</div>";
-					html += "</div>";
-
-					html += "<div style='display:flex;'>";
-					html += "<div style='flex:2;'>" + gLocal.gui.introduction + "</div>";
-					html += "<div style='flex:8;'>";
-					html += "<textarea name='summary'>" + result.summary + "</textarea>";
-					html += "</div>";
-					html += "</div>";
-
-					html += '<div style="display:flex;line-height:32px;">';
-					html += '<div style="flex:2;">' + gLocal.gui.language_select + "</div>";
-					html += '<div style="flex:8;">';
-					html +=
-						'<input id="channal_lang_select" type="input"  onchange="channal_lang_change()"' +
-						' placeholder = "try type chinese or en " ' +
-						'  title="type language name/code" code="' +
-						result.lang +
-						'" value="' +
-						result.lang +
-						'" > <input id="channal_lang" type="hidden" name="lang" value="' +
-						result.lang +
-						'">';
-					html += "</div>";
-					html += "</div>";
-
-					html += '<div style="display:flex;line-height:32px;">';
-					html += '<div style="flex:2;">' + gLocal.gui.privacy + "</div>";
-					html += '<div style="flex:8;">';
-					let arrStatus = [
-						{ id: 0, string: gLocal.gui.disable, note: gLocal.gui.disable_note },
-						{ id: 10, string: gLocal.gui.private, note: gLocal.gui.private_note },
-						{ id: 30, string: gLocal.gui.public, note: gLocal.gui.public_note },
-					];
-					html += "<select id = 'status'  name = 'status' onchange='status_change(this)'>";
-					let status_note = "";
-					for (const iterator of arrStatus) {
-						html += "<option ";
-						if (parseInt(result.status) == iterator.id) {
-							html += " selected ";
-							status_note = iterator.note;
-						}
-						html += " value='" + iterator.id + "'>" + iterator.string + "</option>";
-					}
-
-					html += "</select>";
-					html +=
-						"<span id = 'status_help' style='margin: 0 1em;'>" +
-						status_note +
-						"</span><a href='#' target='_blank'>[" +
-						gLocal.gui.infomation +
-						"]</li>";
-					html += "</div>";
-					html += "</div>";
-					html += "</div>";
-
-					html += "<div id='preview_div'>";
-					html += "<div id='preview_inner' ></div>";
-					html += "</div>";
-
-					$("#channal_info").html(html);
-					tran_lang_select_init("channal_lang_select");
-					//$("#aritcle_status").html(render_status(result.status));
-					$("#channal_title").html(result.name);
-					$("#preview_inner").html();
-				} catch (e) {
-					console.error(e);
-				}
+		function (data) {
+			let error = JSON.parse(data);
+			if (error.status == 0) {
+				user_select_cancel();
+				alert("ok");
+				location.reload();
 			} else {
 			} else {
-				console.error("ajex error");
+				user_select_cancel();
+				alert(error.message);
 			}
 			}
 		}
 		}
 	);
 	);
 }
 }
 
 
-function status_change(obj) {
-	let arrStatus = [
-		{ id: 0, string: gLocal.gui.disable, note: gLocal.gui.disable_note },
-		{ id: 10, string: gLocal.gui.private, note: gLocal.gui.private_note },
-		{ id: 30, string: gLocal.gui.public, note: gLocal.gui.public_note },
-	];
-	let newStatus = $(obj).val();
-	for (const iterator of arrStatus) {
-		if (parseInt(newStatus) == iterator.id) {
-			$("#status_help").html(iterator.note);
+function user_select_new() {
+	$.post(
+		"../group/my_group_put.php",
+		{
+			name: $("#user_select_title").val(),
+			parent: parentid,
+		},
+		function (data) {
+			let error = JSON.parse(data);
+			if (error.status == 0) {
+				alert("ok");
+				user_select_cancel();
+				location.reload();
+			} else {
+				alert(error.message);
+			}
 		}
 		}
-	}
+	);
 }
 }
 
 
-function channal_lang_change() {
-	let lang = $("#channal_lang_select").val();
-	if (lang.split("_").length == 3) {
-		$("#channal_lang").val(lang.split("_")[2]);
-	} else {
-		$("#channal_lang").val(lang);
+function group_del(group_id) {
+	if (
+		confirm(
+			"此操作将删除组/项目。\n以及切断分享到此组/项目文件的链接。\n但是不会删除该文件。\n此操作不能恢复。仍然要删除吗!"
+		)
+	) {
+		$.post(
+			"../group/group_del.php",
+			{
+				groupid: group_id,
+			},
+			function (data) {
+				let error = JSON.parse(data);
+				if (error.status == 0) {
+					alert("ok");
+					location.reload();
+				} else {
+					alert(error.message);
+				}
+			}
+		);
 	}
 	}
 }
 }
 
 
-function my_channal_save() {
-	$.ajax({
-		type: "POST", //方法类型
-		dataType: "json", //预期服务器返回的数据类型
-		url: "../channal/my_channal_post.php", //url
-		data: $("#channal_edit").serialize(),
-		success: function (result) {
-			console.log(result); //打印服务端返回的数据(调试用)
-
-			if (result.status == 0) {
-				alert("保存成功");
-			} else {
-				alert("error:" + result.message);
-			}
-		},
-		error: function (data, status) {
-			alert("异常!" + status + data.responseText);
-			switch (status) {
-				case "timeout":
-					break;
-				case "error":
-					break;
-				case "notmodified":
-					break;
-				case "parsererror":
-					break;
-				default:
-					break;
+function member_del(group_id, user_id) {
+	if (confirm("此操作将移除成员。\n此操作不能恢复。仍然要移除吗!")) {
+		$.post(
+			"../group/member_del.php",
+			{
+				groupid: group_id,
+				userid: user_id,
+			},
+			function (data) {
+				let error = JSON.parse(data);
+				if (error.status == 0) {
+					alert("ok");
+					location.reload();
+				} else {
+					alert(error.message);
+				}
 			}
 			}
-		},
-	});
+		);
+	}
 }
 }

+ 49 - 0
app/group/group_del.php

@@ -0,0 +1,49 @@
+<?php
+require_once "../path.php";
+require_once "../public/_pdo.php";
+require_once '../public/function.php';
+
+$respond=array("status"=>0,"message"=>"");
+if(isset($_COOKIE["userid"]) && isset($_POST["groupid"])){
+	PDO_Connect("sqlite:"._FILE_DB_GROUP_);
+	#TODO 先查是否有删除权限
+	$query="SELECT parent from group_info where id=? and creator=? ";
+	$gInfo = PDO_FetchRow($query,array($_POST["groupid"],$_COOKIE["userid"]));
+	if($gInfo){
+		#删除group info
+		$query="DELETE from group_info where id=? and creator=? ";
+		PDO_Execute($query,array($_POST["groupid"],$_COOKIE["userid"]));
+		#删除 组员
+		$query="DELETE from group_member where group_id=? ";
+		PDO_Execute($query,array($_POST["groupid"]));
+		#删除到此组的分享
+
+		#查询是否有子项目
+		$query="SELECT id from group_info where parent=? ";
+		$project = PDO_FetchAll($query,array($_POST["groupid"]));
+		if(count($project)){
+			$arrProject = array();
+			foreach ($project as $key => $value) {
+				# code...
+				$arrProject[] = $value["id"];
+			}
+			$place_holders = implode(',', array_fill(0, count($arrProject), '?'));
+			#删除 parent info
+			$query="DELETE from group_info where id IN ($place_holders) ";
+			PDO_Execute($query,$arrProject);
+			#删除 parent 组员
+			$query="DELETE from group_member where group_id IN ($place_holders) ";
+			PDO_Execute($query,$arrProject);
+			#删除到此组的分享
+		}
+	}
+	else{
+		$respond['status']=1;
+		$respond['message']="no power to delete ";
+		echo json_encode($respond, JSON_UNESCAPED_UNICODE);
+		exit;
+	}
+}
+
+echo json_encode($respond, JSON_UNESCAPED_UNICODE);
+?>

+ 94 - 0
app/group/member_del.php

@@ -0,0 +1,94 @@
+<?php
+require_once "../path.php";
+require_once "../public/_pdo.php";
+require_once '../public/function.php';
+
+$respond = array("status" => 0, "message" => "");
+if (!isset($_COOKIE["userid"])) {
+    $respond['status'] = 1;
+    $respond['message'] = "尚未登录";
+    echo json_encode($respond, JSON_UNESCAPED_UNICODE);
+    exit;
+}
+if (isset($_POST["groupid"])) {
+    PDO_Connect("sqlite:" . _FILE_DB_GROUP_);
+    $mypower = 100;
+    # 先查是否有删人权限
+    $query = "SELECT * from group_info where id=?";
+    $fc = PDO_FetchRow($query, array($_POST["groupid"]));
+    if ($fc) {
+        if ($fc["parent"] == 0) {
+            if ($fc["creator"] == $_COOKIE["userid"]) {
+                $mypower = 0;
+            }
+        } else {
+            $query = "SELECT creator  from group_info where id=?";
+            $g_parent = PDO_FetchRow($query, array($fc["parent"]));
+            if ($g_parent && $g_parent["creator"] == $_COOKIE["userid"]) {
+                $mypower = 0;
+            }
+        }
+    }
+    if ($mypower != 0) {
+        #非拥有者,看看是不是管理员
+        $query = "SELECT power from group_member where user_id=? and group_id=? ";
+        $power = PDO_FetchRow($query, array($_COOKIE["userid"], $_POST["groupid"]));
+        if ($power) {
+            $mypower = (int) $power["power"];
+        }
+        if ($mypower > 1) {
+            $respond['status'] = 1;
+            $respond['message'] = "no power to remove memeber";
+            echo json_encode($respond, JSON_UNESCAPED_UNICODE);
+            exit;
+        }
+    }
+
+    # 查询被删除人的权限
+    $query = "SELECT power from group_member where user_id=? and group_id=? ";
+    $power = PDO_FetchRow($query, array($_POST["userid"], $_POST["groupid"]));
+    $userpower = 0;
+    if ($power) {
+        $userpower = (int) $power["power"];
+    }
+    #操作人的权限不足
+    if ($mypower >= $userpower) {
+        $respond['status'] = 1;
+        $respond['message'] = "can not removed";
+        echo json_encode($respond, JSON_UNESCAPED_UNICODE);
+        exit;
+    }
+
+    $query = "SELECT * from group_info where id=?";
+    $fc = PDO_FetchRow($query, array($_POST["groupid"]));
+    if ($fc) {
+        $idList = array();
+        $idList[] = $_POST["userid"];
+        $idList[] = $_POST["groupid"];
+        if ($fc["parent"] == 0) {
+            //group
+            $level = 0;
+            #查询project
+            $query = "SELECT id from group_info where parent=?";
+            $g_project = PDO_FetchAll($query, array($_POST["groupid"]));
+            foreach ($g_project as $key => $parentid) {
+                # code...
+                $idList[] = $parentid["id"];
+            }
+        }
+    }
+    #删除
+    $place_holders = implode(',', array_fill(0, count($idList), '?'));
+    $query = "DELETE from group_member where user_id=? and group_id IN ($place_holders)";
+    PDO_Execute($query, $idList);
+
+    if (!$sth || ($sth && $sth->errorCode() != 0)) {
+        $error = PDO_ErrorInfo();
+        $respond['status'] = 1;
+        $respond['message'] = $error[2];
+    }
+} else {
+    $respond['status'] = 1;
+    $respond['message'] = "参数不足";
+}
+echo json_encode($respond, JSON_UNESCAPED_UNICODE);

+ 16 - 6
app/group/member_put.php

@@ -6,7 +6,18 @@ require_once '../public/function.php';
 $respond=array("status"=>0,"message"=>"");
 $respond=array("status"=>0,"message"=>"");
 if(isset($_COOKIE["userid"]) && isset($_POST["groupid"])){
 if(isset($_COOKIE["userid"]) && isset($_POST["groupid"])){
 	PDO_Connect("sqlite:"._FILE_DB_GROUP_);
 	PDO_Connect("sqlite:"._FILE_DB_GROUP_);
-	#先查是否有加人权限
+	#TODO 先查是否有加人权限
+	$query="SELECT power from group_member where user_id=? and group_id=? ";
+	$power = PDO_FetchRow($query,array($_COOKIE["userid"],$_POST["groupid"]));
+	if($power){
+		if($power["power"]>1){
+			$respond['status']=1;
+			$respond['message']="no power to add memeber";
+			echo json_encode($respond, JSON_UNESCAPED_UNICODE);
+			exit;
+		}
+	}
+	
 	$query="SELECT * from group_info where id=?";
 	$query="SELECT * from group_info where id=?";
 	$fc = PDO_FetchRow($query,array($_POST["groupid"]));
 	$fc = PDO_FetchRow($query,array($_POST["groupid"]));
 	if($fc){
 	if($fc){
@@ -18,16 +29,15 @@ if(isset($_COOKIE["userid"]) && isset($_POST["groupid"])){
 			#子小组要插入两条记录 第一条插入父层级
 			#子小组要插入两条记录 第一条插入父层级
 			$query="SELECT * from group_info where id=?";
 			$query="SELECT * from group_info where id=?";
 			$g_parent = PDO_FetchRow($query,array($fc["id"]));
 			$g_parent = PDO_FetchRow($query,array($fc["id"]));
-			$query="INSERT INTO group_member (  user_id  , group_id  , power , group_name , level ,  status )  
-			VALUES  (  ? , ? , ? , ? , ?  ,? ) ";
+			$query="INSERT INTO group_member (  user_id  , group_id  , power , group_name , level ,  status )  VALUES  (  ? , ? , ? , ? , ?  ,? ) ";
 			$sth = $PDO->prepare($query);
 			$sth = $PDO->prepare($query);
-			$sth->execute(array($_POST["userid"] ,$fc["parent"], 1 , $$g_parent["name"], 0 ,1 ));
+			$sth->execute(array($_POST["userid"] ,$fc["parent"], 2 , $$g_parent["name"], 0 ,1 ));
 			$respond=array("status"=>0,"message"=>"");
 			$respond=array("status"=>0,"message"=>"");
 			if (!$sth || ($sth && $sth->errorCode() != 0)) {
 			if (!$sth || ($sth && $sth->errorCode() != 0)) {
 				$error = PDO_ErrorInfo();
 				$error = PDO_ErrorInfo();
 				$respond['status']=1;
 				$respond['status']=1;
 				$respond['message']=$error[2];
 				$respond['message']=$error[2];
-			}	
+			}
 		}
 		}
 	}
 	}
 	#查询这个
 	#查询这个
@@ -37,7 +47,7 @@ if(isset($_COOKIE["userid"]) && isset($_POST["groupid"])){
 	$query="INSERT INTO group_member (  user_id  , group_id  , power , group_name , level ,  status )  
 	$query="INSERT INTO group_member (  user_id  , group_id  , power , group_name , level ,  status )  
 		VALUES  (  ? , ? , ? , ? , ?  ,? ) ";
 		VALUES  (  ? , ? , ? , ? , ?  ,? ) ";
 	$sth = $PDO->prepare($query);
 	$sth = $PDO->prepare($query);
-	$sth->execute(array($_POST["userid"] ,$_POST["groupid"], 1 , $g_curr["name"], $level ,1 ));
+	$sth->execute(array($_POST["userid"] ,$_POST["groupid"], 2 , $g_curr["name"], $level ,1 ));
 	$respond=array("status"=>0,"message"=>"");
 	$respond=array("status"=>0,"message"=>"");
 	if (!$sth || ($sth && $sth->errorCode() != 0)) {
 	if (!$sth || ($sth && $sth->errorCode() != 0)) {
 		$error = PDO_ErrorInfo();
 		$error = PDO_ErrorInfo();

+ 5 - 2
app/group/my_group_put.php

@@ -1,4 +1,5 @@
 <?php
 <?php
+#新增群组或项目
 require_once "../path.php";
 require_once "../path.php";
 require_once "../public/_pdo.php";
 require_once "../public/_pdo.php";
 require_once '../public/function.php';
 require_once '../public/function.php';
@@ -6,7 +7,7 @@ require_once '../public/function.php';
 $respond=array("status"=>0,"message"=>"");
 $respond=array("status"=>0,"message"=>"");
 if(isset($_COOKIE["userid"])){
 if(isset($_COOKIE["userid"])){
 	PDO_Connect("sqlite:"._FILE_DB_GROUP_);
 	PDO_Connect("sqlite:"._FILE_DB_GROUP_);
-	$query="INSERT INTO group_info ( id,  parent  , name  , description ,  status , owner ,create_time )  
+	$query="INSERT INTO group_info ( id,  parent  , name  , description ,  status , creator ,create_time )  
 	                       VALUES  ( ?, ? , ? , ? , ? , ?  ,? ) ";
 	                       VALUES  ( ?, ? , ? , ? , ? , ?  ,? ) ";
 	$sth = $PDO->prepare($query);
 	$sth = $PDO->prepare($query);
 	$newid = UUID::v4();
 	$newid = UUID::v4();
@@ -23,11 +24,13 @@ if(isset($_COOKIE["userid"])){
 	$sth = $PDO->prepare($query);
 	$sth = $PDO->prepare($query);
 	if($_POST["parent"]==0){
 	if($_POST["parent"]==0){
 		$level = 0;
 		$level = 0;
+		$power = 0;
 	}
 	}
 	else{
 	else{
 		$level = 1;
 		$level = 1;
+		$power = 1;
 	}
 	}
-	$sth->execute(array($_COOKIE["userid"] ,$newid, 1 , $_POST["name"], $level ,1 ));
+	$sth->execute(array($_COOKIE["userid"] ,$newid, $power , $_POST["name"], $level ,1 ));
 	$respond=array("status"=>0,"message"=>"");
 	$respond=array("status"=>0,"message"=>"");
 	if (!$sth || ($sth && $sth->errorCode() != 0)) {
 	if (!$sth || ($sth && $sth->errorCode() != 0)) {
 	$error = PDO_ErrorInfo();
 	$error = PDO_ErrorInfo();

+ 0 - 40
app/group/user_select_dlg.js

@@ -115,43 +115,3 @@ function username_search(keyword, type) {
 		);
 		);
 	}
 	}
 }
 }
-
-function user_selected(id) {
-	$.post(
-		"../group/member_put.php",
-		{
-			userid: id,
-			groupid: gGroupId,
-		},
-		function (data) {
-			let error = JSON.parse(data);
-			if (error.status == 0) {
-				alert("ok");
-				user_select_cancel();
-				location.reload();
-			} else {
-				alert(error.message);
-			}
-		}
-	);
-}
-
-function user_select_new() {
-	$.post(
-		"../group/my_group_put.php",
-		{
-			name: $("#user_select_title").val(),
-			parent: parentid,
-		},
-		function (data) {
-			let error = JSON.parse(data);
-			if (error.status == 0) {
-				alert("ok");
-				user_select_cancel();
-				location.reload();
-			} else {
-				alert(error.message);
-			}
-		}
-	);
-}

+ 219 - 0
app/install/filelist.php

@@ -0,0 +1,219 @@
+<?php
+$_filelist = array();
+$_filelist[1]="e0601n.nrf";
+$_filelist[2]="e0602n.nrf";
+$_filelist[3]="e0603n.nrf";
+$_filelist[4]="e0604n.nrf";
+$_filelist[5]="e0605n.nrf";
+$_filelist[6]="e0606n.nrf";
+$_filelist[7]="e0607n.nrf";
+$_filelist[8]="e0608n.nrf";
+$_filelist[9]="e0810n.nrf";
+$_filelist[10]="e0811n.nrf";
+$_filelist[11]="e0812n.nrf";
+$_filelist[12]="e0813n.nrf";
+$_filelist[13]="e0801n.nrf";
+$_filelist[14]="e0802n.nrf";
+$_filelist[15]="e0803n.nrf";
+$_filelist[16]="e0804n.nrf";
+$_filelist[17]="e0805n.nrf";
+$_filelist[18]="e0806n.nrf";
+$_filelist[19]="e0807n.nrf";
+$_filelist[20]="e0808n.nrf";
+$_filelist[21]="e0809n.nrf";
+$_filelist[22]="e0201n.nrf";
+$_filelist[23]="e0301n.nrf";
+$_filelist[24]="e0401n.nrf";
+$_filelist[25]="e0501n.nrf";
+$_filelist[26]="e1010n.nrf";
+$_filelist[27]="e1001n.nrf";
+$_filelist[28]="e1002n.nrf";
+$_filelist[29]="e1003n.nrf";
+$_filelist[30]="e1004n.nrf";
+$_filelist[31]="e1005n.nrf";
+$_filelist[32]="e1006n.nrf";
+$_filelist[33]="e1007n.nrf";
+$_filelist[34]="e1008n.nrf";
+$_filelist[35]="e1009n.nrf";
+$_filelist[36]="e1101n.nrf";
+$_filelist[37]="e1102n.nrf";
+$_filelist[38]="e1103n.nrf";
+$_filelist[39]="e0901n.nrf";
+$_filelist[40]="e0902n.nrf";
+$_filelist[41]="e0903n.nrf";
+$_filelist[42]="e0904n.nrf";
+$_filelist[43]="e0905n.nrf";
+$_filelist[44]="e0906n.nrf";
+$_filelist[45]="e0907n.nrf";
+$_filelist[46]="e1210n.nrf";
+$_filelist[47]="e1211n.nrf";
+$_filelist[48]="e1212n.nrf";
+$_filelist[49]="e1213n.nrf";
+$_filelist[50]="e1214n.nrf";
+$_filelist[51]="e1215n.nrf";
+$_filelist[52]="e1201n.nrf";
+$_filelist[53]="e1202n.nrf";
+$_filelist[54]="e1203n.nrf";
+$_filelist[55]="e1204n.nrf";
+$_filelist[56]="e1205n.nrf";
+$_filelist[57]="e1206n.nrf";
+$_filelist[58]="e1207n.nrf";
+$_filelist[59]="e1208n.nrf";
+$_filelist[60]="e1209n.nrf";
+$_filelist[61]="e0701n.nrf";
+$_filelist[62]="e0702n.nrf";
+$_filelist[63]="e0703n.nrf";
+$_filelist[64]="e0101n.mul";
+$_filelist[65]="e0102n.mul";
+$_filelist[66]="e0103n.att";
+$_filelist[67]="e0104n.att";
+$_filelist[68]="e0105n.nrf";
+$_filelist[69]="abh03m8.mul";
+$_filelist[70]="abh03m9.mul";
+$_filelist[71]="abh03m10.mul";
+$_filelist[72]="abh03m11.mul";
+$_filelist[73]="abh01m.mul";
+$_filelist[74]="abh02m.mul";
+$_filelist[75]="abh03m1.mul";
+$_filelist[76]="abh03m2.mul";
+$_filelist[77]="abh03m3.mul";
+$_filelist[78]="abh03m4.mul";
+$_filelist[79]="abh03m5.mul";
+$_filelist[80]="abh03m6.mul";
+$_filelist[81]="abh03m7.mul";
+$_filelist[82]="s0404m3.mul";
+$_filelist[83]="s0404m4.mul";
+$_filelist[84]="s0401m.mul";
+$_filelist[85]="s0402m1.mul";
+$_filelist[86]="s0402m2.mul";
+$_filelist[87]="s0402m3.mul";
+$_filelist[88]="s0403m1.mul";
+$_filelist[89]="s0403m2.mul";
+$_filelist[90]="s0403m3.mul";
+$_filelist[91]="s0404m1.mul";
+$_filelist[92]="s0404m2.mul";
+$_filelist[93]="s0101m.mul";
+$_filelist[94]="s0102m.mul";
+$_filelist[95]="s0103m.mul";
+$_filelist[96]="abh01a.att";
+$_filelist[97]="abh02a.att";
+$_filelist[98]="abh03a.att";
+$_filelist[99]="s0401a.att";
+$_filelist[100]="s0402a.att";
+$_filelist[101]="s0403a.att";
+$_filelist[102]="s0404a.att";
+$_filelist[103]="s0101a.att";
+$_filelist[104]="s0102a.att";
+$_filelist[105]="s0103a.att";
+$_filelist[106]="s0509a.att";
+$_filelist[107]="s0510a.att";
+$_filelist[108]="s0511a.att";
+$_filelist[109]="s0512a.att";
+$_filelist[110]="s0513a1.att";
+$_filelist[111]="s0513a2.att";
+$_filelist[112]="s0513a3.att";
+$_filelist[113]="s0513a4.att";
+$_filelist[114]="s0514a1.att";
+$_filelist[115]="s0514a2.att";
+$_filelist[116]="s0501a.att";
+$_filelist[117]="s0514a3.att";
+$_filelist[118]="s0515a.att";
+$_filelist[119]="s0516a.att";
+$_filelist[120]="s0517a.att";
+$_filelist[121]="s0519a.att";
+$_filelist[122]="s0502a.att";
+$_filelist[123]="s0503a.att";
+$_filelist[124]="s0504a.att";
+$_filelist[125]="s0505a.att";
+$_filelist[126]="s0506a.att";
+$_filelist[127]="s0507a.att";
+$_filelist[128]="s0508a1.att";
+$_filelist[129]="s0508a2.att";
+$_filelist[130]="s0201a.att";
+$_filelist[131]="s0202a.att";
+$_filelist[132]="s0203a.att";
+$_filelist[133]="s0301a.att";
+$_filelist[134]="s0302a.att";
+$_filelist[135]="s0303a.att";
+$_filelist[136]="s0304a.att";
+$_filelist[137]="s0305a.att";
+$_filelist[138]="vin01a.att";
+$_filelist[139]="vin02a1.att";
+$_filelist[140]="vin02a2.att";
+$_filelist[141]="vin02a3.att";
+$_filelist[142]="vin02a4.att";
+$_filelist[143]="s0510m1.mul";
+$_filelist[144]="s0510m2.mul";
+$_filelist[145]="s0511m.mul";
+$_filelist[146]="s0512m.mul";
+$_filelist[147]="s0514m.mul";
+$_filelist[148]="s0513m.mul";
+$_filelist[149]="s0515m.mul";
+$_filelist[150]="s0516m.mul";
+$_filelist[151]="s0517m.mul";
+$_filelist[152]="s0518m.nrf";
+$_filelist[153]="s0519m.mul";
+$_filelist[154]="s0501m.mul";
+$_filelist[155]="s0520m.nrf";
+$_filelist[156]="s0502m.mul";
+$_filelist[157]="s0503m.mul";
+$_filelist[158]="s0504m.mul";
+$_filelist[159]="s0505m.mul";
+$_filelist[160]="s0506m.mul";
+$_filelist[161]="s0507m.mul";
+$_filelist[162]="s0508m.mul";
+$_filelist[163]="s0509m.mul";
+$_filelist[164]="s0201m.mul";
+$_filelist[165]="s0202m.mul";
+$_filelist[166]="s0203m.mul";
+$_filelist[167]="s0301m.mul";
+$_filelist[168]="s0302m.mul";
+$_filelist[169]="s0303m.mul";
+$_filelist[170]="s0304m.mul";
+$_filelist[171]="s0305m.mul";
+$_filelist[172]="abh01t.tik";
+$_filelist[173]="abh02t.tik";
+$_filelist[174]="abh03t.tik";
+$_filelist[175]="abh04t.nrf";
+$_filelist[176]="abh05t.nrf";
+$_filelist[177]="abh06t.nrf";
+$_filelist[178]="abh07t.nrf";
+$_filelist[179]="abh08t.nrf";
+$_filelist[180]="abh09t.nrf";
+$_filelist[181]="s0401t.tik";
+$_filelist[182]="s0402t.tik";
+$_filelist[183]="s0403t.tik";
+$_filelist[184]="s0404t.tik";
+$_filelist[185]="s0101t.tik";
+$_filelist[186]="s0102t.tik";
+$_filelist[187]="s0103t.tik";
+$_filelist[188]="s0104t.nrf";
+$_filelist[189]="s0105t.nrf";
+$_filelist[190]="s0519t.tik";
+$_filelist[191]="s0501t.nrf";
+$_filelist[192]="s0201t.tik";
+$_filelist[193]="s0202t.tik";
+$_filelist[194]="s0203t.tik";
+$_filelist[195]="s0301t.tik";
+$_filelist[196]="s0302t.tik";
+$_filelist[197]="s0303t.tik";
+$_filelist[198]="s0304t.tik";
+$_filelist[199]="s0305t.tik";
+$_filelist[200]="vin10t.nrf";
+$_filelist[201]="vin11t.nrf";
+$_filelist[202]="vin12t.nrf";
+$_filelist[203]="vin13t.nrf";
+$_filelist[204]="vin01t1.tik";
+$_filelist[205]="vin01t2.tik";
+$_filelist[206]="vin02t.tik";
+$_filelist[207]="vin04t.nrf";
+$_filelist[208]="vin05t.nrf";
+$_filelist[209]="vin06t.nrf";
+$_filelist[210]="vin07t.nrf";
+$_filelist[211]="vin08t.nrf";
+$_filelist[212]="vin09t.nrf";
+$_filelist[213]="vin01m.mul";
+$_filelist[214]="vin02m1.mul";
+$_filelist[215]="vin02m2.mul";
+$_filelist[216]="vin02m3.mul";
+$_filelist[217]="vin02m4.mul";

+ 18 - 151
app/palicanon/index.php

@@ -7,157 +7,24 @@ require_once "../pcdl/html_head.php";
     <script src="../term/term.js"></script>
     <script src="../term/term.js"></script>
 
 
     <?php
     <?php
-    require_once("../pcdl/head_bar.php");
-    ?>
-
-    <style>
-
-
-        #main_tag {
-            font-size: 150%;
-            text-align: center;
-            margin: 5em 0;
-            transition: all 600ms ease;
-            text-transform: capitalize;
-        }
-
-        #main_tag span {
-            margin: 2px;
-            padding: 2px 12px;
-            font-weight: 500;
-            transition-duration: 0.2s;
-            cursor: pointer;
-            font-size: 120%;
-            border: unset;
-            border-radius: 0;
-            border-bottom: 2px solid var(--nocolor);
-            display: inline-block;
-        }
-
-        #main_tag span:hover {
-            background-color: unset;
-            color: unset;
-            border-color: var(--link-hover-color);
-        }
-
-        #main_tag .select {
-            border-bottom: 2px solid var(--link-color);
-        }
-
-        #tag_selected {
-            margin: 1em 0;
-        }
-
-        tag {
-            background-color: var(--btn-color);
-            margin: 2px;
-            padding: 2px 12px;
-            border-radius: 5px;
-            border: 1px solid #fe897c;
-        }
-
-        .tag-delete {
-            margin-left: 6px;
-            color: #f93e3e;
-            cursor: pointer;
-        }
-
-        .tag-delete:hover {
-            color: red;
-            font-weight: 700;
-        }
-
-        .tag_others {
-            margin: 10px 0;
-        }
-
-        .canon-tag {
-            background-color: #46a6d2;
-            border: 0;
-            border-radius: 6px;
-            color: white;
-            font-weight: 400;
-        }
-
-        .canon-tag:hover {
-            background-color: var(--link-hover-color);
-        }
-
-        .sutta_row {
-            display: grid;
-            align-items: center;
-            grid-template-columns: 100px 200px 100px auto;
-            width: 100%;
-            border-bottom: 1px solid var(--border-line-color);
-        }
-
-        .sutta_row div {
-            padding: 10px;
-            /*display: flex;*/
-            justify-items: center;
-        }
-
-        .sutta_row:hover {
-            background-color: var(--drop-bg-color);
-        }
-
-		.c_level_1 {
-			padding-top: 15px;
-			padding-bottom: 15px;
-			background-color: var(--main-color1);
-		}
-		.c_level_1 .chapter_title{
-			font-size:120%;
-			font-weight:700;
-		}
-		#book_list{
-			display: flex;
-			flex-wrap: wrap;
-		}
-		.chapter_list{
-			display:none;
-		}
-		.chapter_book{
-			display:block;
-		}
-		.chapter_progress{
-			display:block;
-		}
-		.parent_chapter{
-			width:350px;
-		}
-		.parent_chapter .chapter_book,.parent_chapter .chapter_progress{
-			display:none;
-		}
-
-		#select_bar {
-			display: flex;
-			justify-content: space-between;
-		}
-
-        @media screen and (max-width:800px) {
-            .sutta_row {
-                grid-template-columns: 100px 1fr 1fr;
-            }
-
-            .sutta_tag {
-                grid-column: 1 / 4;
-            }
-        }
-	</style>
+require_once "../pcdl/head_bar.php";
+?>
+
 	<link type="text/css" rel="stylesheet" href="../palicanon/style.css" />
 	<link type="text/css" rel="stylesheet" href="../palicanon/style.css" />
-	
+	<link type="text/css" rel="stylesheet" href="../palicanon/style_mobile.css" media="screen and (max-width:800px)">
+
+
     <script>
     <script>
         var tag_level = <?php echo file_get_contents("../public/book_tag/tag_list.json"); ?>;
         var tag_level = <?php echo file_get_contents("../public/book_tag/tag_list.json"); ?>;
     </script>
     </script>
     <?php
     <?php
-    //
+//
 
 
-    require_once "../path.php";
-    require_once "../public/_pdo.php";
-    require_once '../media/function.php';
-    require_once '../public/function.php';
-   ?>
+require_once "../path.php";
+require_once "../public/_pdo.php";
+require_once '../media/function.php';
+require_once '../public/function.php';
+?>
     <div id='course_head_bar' style='background-color:var(--tool-bg-color1);padding:1em 10px 10px 10px;'>
     <div id='course_head_bar' style='background-color:var(--tool-bg-color1);padding:1em 10px 10px 10px;'>
     <div class='index_inner '>
     <div class='index_inner '>
     <div style='font-size:140%'>
     <div style='font-size:140%'>
@@ -171,13 +38,13 @@ require_once "../pcdl/html_head.php";
     <span tag="ṭīkā" title="ṭīkā"></span>
     <span tag="ṭīkā" title="ṭīkā"></span>
     <span tag="añña" title="añña"></span>
     <span tag="añña" title="añña"></span>
 	</div>
 	</div>
-	
+
 	<div id="select_bar" >
 	<div id="select_bar" >
 		<div id="tag_selected"></div>
 		<div id="tag_selected"></div>
 		<div><button onclick="tag_list_slide_toggle()">展开</button></div>
 		<div><button onclick="tag_list_slide_toggle()">展开</button></div>
 	</div>
 	</div>
 	<div>
 	<div>
-		
+
 		<div id="tag_list">
 		<div id="tag_list">
 			<div level="0" class="tag_others"></div>
 			<div level="0" class="tag_others"></div>
 			<div level="1" class="tag_others"></div>
 			<div level="1" class="tag_others"></div>
@@ -191,7 +58,7 @@ require_once "../pcdl/html_head.php";
 	</div>
 	</div>
     </div>
     </div>
     </div>
     </div>
- 
+
 	<div class='index_inner'>
 	<div class='index_inner'>
 
 
 	<div id="chapter_shell" class="chapter_list" >
 	<div id="chapter_shell" class="chapter_list" >
@@ -234,7 +101,7 @@ require_once "../pcdl/html_head.php";
 		<ul id="list-8" class="hidden" level="8" >
 		<ul id="list-8" class="hidden" level="8" >
 		</ul>
 		</ul>
 	</div>
 	</div>
-	
+
     </div>
     </div>
     </div>
     </div>
 
 
@@ -244,5 +111,5 @@ require_once "../pcdl/html_head.php";
         });
         });
     </script>
     </script>
     <?php
     <?php
-    include "../pcdl/html_foot.php";
-    ?>
+include "../pcdl/html_foot.php";
+?>

+ 3 - 0
app/public/lang/default.json

@@ -600,6 +600,9 @@
 		"member": "Member",
 		"member": "Member",
 		"new_group": "Create Group",
 		"new_group": "Create Group",
 		"new_sub_group": "Create Project",
 		"new_sub_group": "Create Project",
+		"owner": "Owner",
+		"manager": "Manager",
+		"enter": "Enter",
 		"": ""
 		"": ""
 	},
 	},
 	"grammastr": [
 	"grammastr": [

+ 3 - 1
app/public/lang/en.json

@@ -358,7 +358,6 @@
 		"year_1": "- ",
 		"year_1": "- ",
 		"years": "&nbsp;year(s) ",
 		"years": "&nbsp;year(s) ",
 		"yes_string": "can ",
 		"yes_string": "can ",
-		"": "",
 		"continue": "continue",
 		"continue": "continue",
 		"account": "Username",
 		"account": "Username",
 		"new_to_wikipali": "New to Wikipāḷi",
 		"new_to_wikipali": "New to Wikipāḷi",
@@ -600,6 +599,9 @@
 		"member": "Member",
 		"member": "Member",
 		"new_group": "Create Group",
 		"new_group": "Create Group",
 		"new_sub_group": "Create Project",
 		"new_sub_group": "Create Project",
+		"owner": "Owner",
+		"manager": "Manager",
+		"enter": "Enter",
 		"": ""
 		"": ""
 	},
 	},
 	"grammastr": [
 	"grammastr": [

+ 3 - 1
app/public/lang/my.json

@@ -358,7 +358,6 @@
 		"year_1": "- ",
 		"year_1": "- ",
 		"years": "&nbsp;year(s) ",
 		"years": "&nbsp;year(s) ",
 		"yes_string": "can ",
 		"yes_string": "can ",
-		"": "",
 		"continue": "continue",
 		"continue": "continue",
 		"account": "Username",
 		"account": "Username",
 		"new_to_wikipali": "New to Wikipāḷi",
 		"new_to_wikipali": "New to Wikipāḷi",
@@ -600,6 +599,9 @@
 		"member": "Member",
 		"member": "Member",
 		"new_group": "Create Group",
 		"new_group": "Create Group",
 		"new_sub_group": "Create Project",
 		"new_sub_group": "Create Project",
+		"owner": "Owner",
+		"manager": "Manager",
+		"enter": "Enter",
 		"": ""
 		"": ""
 	},
 	},
 	"grammastr": [
 	"grammastr": [

+ 3 - 1
app/public/lang/si.json

@@ -363,7 +363,6 @@
 		"year_1": "- ",
 		"year_1": "- ",
 		"years": "&nbsp;සංවච්ඡ‍රා(නි) ",
 		"years": "&nbsp;සංවච්ඡ‍රා(නි) ",
 		"yes_string": "can ",
 		"yes_string": "can ",
-		"": "",
 		"continue": "continue",
 		"continue": "continue",
 		"account": "Username",
 		"account": "Username",
 		"new_to_wikipali": "New to Wikipāḷi",
 		"new_to_wikipali": "New to Wikipāḷi",
@@ -605,6 +604,9 @@
 		"member": "Member",
 		"member": "Member",
 		"new_group": "Create Group",
 		"new_group": "Create Group",
 		"new_sub_group": "Create Project",
 		"new_sub_group": "Create Project",
+		"owner": "Owner",
+		"manager": "Manager",
+		"enter": "Enter",
 		"": ""
 		"": ""
 	},
 	},
 	"grammastr": [
 	"grammastr": [

+ 5 - 3
app/public/lang/zh-cn.json

@@ -359,7 +359,6 @@
 		"year_1": "年 ",
 		"year_1": "年 ",
 		"years": "年 ",
 		"years": "年 ",
 		"yes_string": "可以",
 		"yes_string": "可以",
-		"": "",
 		"continue": "继续",
 		"continue": "继续",
 		"account": "账户",
 		"account": "账户",
 		"new_to_wikipali": "wikipāḷi的新用户",
 		"new_to_wikipali": "wikipāḷi的新用户",
@@ -417,7 +416,7 @@
 		"folk": "复刻",
 		"folk": "复刻",
 		"and": "并",
 		"and": "并",
 		"digest": "书摘",
 		"digest": "书摘",
-		"composition": "作",
+		"composition": "作",
 		"corpus_statistics": "语料统计",
 		"corpus_statistics": "语料统计",
 		"studio": "译经楼",
 		"studio": "译经楼",
 		"library": "藏经阁",
 		"library": "藏经阁",
@@ -567,7 +566,7 @@
 		"local": "本地",
 		"local": "本地",
 		"form_sent": "连词成句到剪切板",
 		"form_sent": "连词成句到剪切板",
 		"hot_topic": "热门主题",
 		"hot_topic": "热门主题",
-		"composition_intro": "依巴利而<b></b><br>为明法而<b>作</b>",
+		"composition_intro": "依巴利而<b></b><br>为明法而<b>作</b>",
 		"jump_to_this_sent": "跳转到此句",
 		"jump_to_this_sent": "跳转到此句",
 		"show_nissaya": "显示nissaya",
 		"show_nissaya": "显示nissaya",
 		"related_para": "相应段落",
 		"related_para": "相应段落",
@@ -603,6 +602,9 @@
 		"member": "成员",
 		"member": "成员",
 		"new_group": "创建群组",
 		"new_group": "创建群组",
 		"new_sub_group": "创建项目",
 		"new_sub_group": "创建项目",
+		"owner": "拥有者",
+		"manager": "管理员",
+		"enter": "进入",
 		"": ""
 		"": ""
 	},
 	},
 	"grammastr": [
 	"grammastr": [

+ 4 - 2
app/public/lang/zh-tw.json

@@ -359,7 +359,6 @@
 		"year_1": "年",
 		"year_1": "年",
 		"years": "年",
 		"years": "年",
 		"yes_string": "可以",
 		"yes_string": "可以",
-		"": "",
 		"continue": "繼續",
 		"continue": "繼續",
 		"account": "賬戶",
 		"account": "賬戶",
 		"new_to_wikipali": "wikipāḷi的新用戶",
 		"new_to_wikipali": "wikipāḷi的新用戶",
@@ -598,10 +597,13 @@
 		"your": "你的",
 		"your": "你的",
 		"status": "狀態",
 		"status": "狀態",
 		"in_recycle_bin": "在回收站中",
 		"in_recycle_bin": "在回收站中",
-		"cover": "封",
+		"cover": "封",
 		"member": "成員",
 		"member": "成員",
 		"new_group": "創建群組",
 		"new_group": "創建群組",
 		"new_sub_group": "創建項目",
 		"new_sub_group": "創建項目",
+		"owner": "擁有者",
+		"manager": "管理員",
+		"enter": "進入",
 		"": ""
 		"": ""
 	},
 	},
 	"grammastr": [
 	"grammastr": [

+ 1 - 0
app/reader/index.php

@@ -81,6 +81,7 @@ require_once "../pcdl/html_head.php";
 		left: 0;
 		left: 0;
 		width: 100%;
 		width: 100%;
 		z-index: 100;
 		z-index: 100;
+		
 	}
 	}
 
 
 	.main_view{
 	.main_view{

BIN
app/studio/module/editor_palicannon/index.xlsx


+ 5 - 0
composer.json

@@ -0,0 +1,5 @@
+{
+	"require": {
+		"elasticsearch/elasticsearch": "~7.0"
+	}
+}

+ 3 - 5
dicttext/system/part.csv

@@ -3,7 +3,7 @@
 [o],9
 [o],9
 [ā],24
 [ā],24
 ka,100
 ka,100
-ṇa,100
+ṇa,5
 ta,100
 ta,100
 tta,100
 tta,100
 tā,100
 tā,100
@@ -64,7 +64,7 @@ eka,100
 esa,100
 esa,100
 esī,1
 esī,1
 eso,1
 eso,1
-eta,1
+eta,1000
 eva,100
 eva,100
 ika,100
 ika,100
 ikā,100
 ikā,100
@@ -279,7 +279,6 @@ eso,2
 esu,6
 esu,6
 esā,1
 esā,1
 esī,5
 esī,5
-eta,6
 ete,1
 ete,1
 eḷa,7
 eḷa,7
 eḷā,5
 eḷā,5
@@ -344,7 +343,6 @@ isi,13
 iso,1
 iso,1
 isu,4
 isu,4
 ita,3
 ita,3
-iti,170
 ito,12
 ito,12
 iva,11
 iva,11
 iñj,1
 iñj,1
@@ -217010,4 +217008,4 @@ cakkavattibhāvasaṃvattaniyadānasīlādipuññasambhārasamudāgamasampanna,2
 udayana,11
 udayana,11
 āsīvislaya,1
 āsīvislaya,1
 ādīnaṃ,10
 ādīnaṃ,10
-oti,10
+sa,100