|
|
@@ -18,8 +18,6 @@ $redis = redis_connect();
|
|
|
global $count_return;
|
|
|
$count_return = 0;
|
|
|
|
|
|
-_load_book_index();
|
|
|
-
|
|
|
$word = mb_strtolower($_GET["word"], 'UTF-8');
|
|
|
$org_word = $word;
|
|
|
|
|
|
@@ -49,6 +47,7 @@ $right_word_list = "";
|
|
|
|
|
|
$Fetch = PDO_FetchAll($query, array($word));
|
|
|
$iFetch = count($Fetch);
|
|
|
+ echo "直接查询{$iFetch}<br>";
|
|
|
$count_return += $iFetch;
|
|
|
if ($iFetch > 0) {
|
|
|
for ($i = 0; $i < $iFetch; $i++) {
|
|
|
@@ -141,7 +140,7 @@ $right_word_list = "";
|
|
|
if (count($newWord) > 0) {
|
|
|
foreach ($newWord as $base => $grammar){
|
|
|
for ($row = 0; $row < count($p_ending); $row++) {
|
|
|
- $len = mb_strlen($case[$row][1], "UTF-8");
|
|
|
+ $len = mb_strlen($p_ending[$row][1], "UTF-8");
|
|
|
$end = mb_substr($base, 0 - $len, null, "UTF-8");
|
|
|
if ($end == $p_ending[$row][1]) {
|
|
|
$newbase = mb_substr($base, 0, mb_strlen($base, "UTF-8") - $len, "UTF-8") . $p_ending[$row][0];
|
|
|
@@ -171,13 +170,13 @@ $right_word_list = "";
|
|
|
|
|
|
$query = "SELECT dict.dict_id,dict.mean,info.shortname from " . _TABLE_DICT_REF_ . " LEFT JOIN info ON dict.dict_id = info.id where word = ? limit 0,30";
|
|
|
$Fetch = PDO_FetchAll($query, array($x));
|
|
|
- $iFetch = count($Fetch);
|
|
|
+ $iFetch = count($Fetch);
|
|
|
$count_return += $iFetch;
|
|
|
if ($iFetch > 0) {
|
|
|
$base_list[] = $x;
|
|
|
$dict_list_a[] = array("word_$x", $x);
|
|
|
echo "<div class='pali_spell'><a name='word_$x'></a>" . $x . "</div>";
|
|
|
- echo "<div style='color:gray;'>{$x}->{$x_value["parent"]}->{$word}</div>";
|
|
|
+ echo "<div style='color:gray;'>{$x}➡{$x_value["parent"]}➡{$word}</div>";
|
|
|
//替换为本地语法信息
|
|
|
foreach ($_local->grammastr as $gr) {
|
|
|
$x_value['grammar'] = str_replace($gr->id, $gr->value, $x_value['grammar']);
|
|
|
@@ -210,6 +209,7 @@ $right_word_list = "";
|
|
|
echo "<a>{$value}</a> ";
|
|
|
}
|
|
|
}
|
|
|
+ echo "<a>查询内文</a>";
|
|
|
echo "</div>";
|
|
|
echo "<input type='hidden' id='word_count' value='{$count_return}' />";
|
|
|
|
|
|
@@ -237,7 +237,7 @@ $right_word_list = "";
|
|
|
|
|
|
|
|
|
//查内容
|
|
|
- if ($count_return < 2) {
|
|
|
+ if ($count_return < 4) {
|
|
|
$word1 = $org_word;
|
|
|
$wordInMean = "%$org_word%";
|
|
|
echo "包含 $org_word 的:<br />";
|
|
|
@@ -398,8 +398,9 @@ function lookup_user($word){
|
|
|
}
|
|
|
|
|
|
$iFetch = count($Fetch);
|
|
|
- $count_return += 1;
|
|
|
+
|
|
|
if ($iFetch > 0) {
|
|
|
+ $count_return++;
|
|
|
$userlist = array();
|
|
|
foreach ($Fetch as $value) {
|
|
|
if (isset($userlist[$value["creator"]])) {
|