叙述、别离 5 dni temu
rodzic
commit
069bc0caec
4 zmienionych plików z 21 dodań i 25 usunięć
  1. +2
    -1
      src/admin/freelist_main.php
  2. +5
    -4
      src/admin/search_keywords_main.php
  3. +6
    -8
      src/admin/templets/freelist_main.htm
  4. +8
    -12
      src/admin/templets/search_keywords_main.htm

+ 2
- 1
src/admin/freelist_main.php Wyświetl plik

@@ -92,4 +92,5 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid')
echo $line;
}
echo "</table></div>";
}
}
?>

+ 5
- 4
src/admin/search_keywords_main.php Wyświetl plik

@@ -61,8 +61,8 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid')
{
global $cfg_phpurl;
$start = ($pageno - 1) * $pagesize;
$printhead = "<form name='form3' action=\"search_keywords_main.php\" method=\"post\">
<input name=\"dopost\" type=\"hidden\" value=\"\">
$printhead = "<form name='form3' action='search_keywords_main.php' method='post'>
<input name='dopost' type='hidden' value=''>
<div class='table-responsive'>
<table class='table table-borderless table-hover'>
<thead>
@@ -85,7 +85,7 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid')
while ($row = $dsql->GetArray()) {
$line = "<tbody>
<tr>
<td><input name=\"aids[]\" type=\"checkbox\" value=\"{$row['aid']}\"></td>
<td><input name='aids[]' type='checkbox' value=\"{$row['aid']}\"></td>
<td>{$row['aid']}</td>
<td><input type='text' name='keyword' id='keyword{$row['aid']}' value='{$row['keyword']}' class='admin-input-sm'></td>
<td><input type='text' name='spwords' id='spwords{$row['aid']}' value='{$row['spwords']}' class='admin-input-md'></td>
@@ -108,4 +108,5 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid')
</tr>
</tbody>";
echo "</table></div></form>";
}
}
?>

+ 6
- 8
src/admin/templets/freelist_main.htm Wyświetl plik

@@ -22,7 +22,7 @@
orderby = ordertype;
var listArea = $Obj('rslist');
var errMsg = "<a href=\"javascript:ReloadPage('" + ordertype + "')\">重新加载列表</a>";
fetch("freelist_main.php?dopost=getlist&pageno=" + pageno + "&orderby=" + ordertype + addget).then(resp=>resp.text()).then((d) => {
fetch("freelist_main.php?dopost=getlist&pageno=" + pageno + "&orderby=" + ordertype + addget).then(resp => resp.text()).then((d) => {
listArea.innerHTML = d;
}).catch((error) => {
listArea.innerHTML = errMsg;
@@ -79,8 +79,7 @@
if (i == pageno) ahtml += "<li class='page-item disabled'><span class='page-link'>" + i + "</span></li>";
else ahtml += "<li class='page-item'><a class='page-link' href='javascript:;' onclick='LoadPage(" + i + ")'>" + i + "</a></li>";
}
}
else if (pagenum < listsize) {
} else if (pagenum < listsize) {
for (i = 1; i <= pagenum; i++) {
if (i == pageno) ahtml += "<li class='page-item disabled'><span class='page-link'>" + i + "</span></li>";
else ahtml += "<li class='page-item'><a class='page-link' href='javascript:;' onclick='LoadPage(" + i + ")'>" + i + "</a></li>";
@@ -119,11 +118,10 @@
</div>
<div class="card shadow-sm">
<div class="card-header">自由列表管理</div>
<div id="rslist" class="card-body">
<?php GetTagList($dsql,$pageno,$pagesize,$orderby);?>
<div id="pagelist">
<script>ReloadPageNum(1);</script>
</div>
<div class="card-body">
<div id="rslist"><?php GetTagList($dsql,$pageno,$pagesize,$orderby);?></div>
<div id="pagelist"></div>
<script>ReloadPageNum(1);</script>
</div>
</div>
</div>


+ 8
- 12
src/admin/templets/search_keywords_main.htm Wyświetl plik

@@ -21,7 +21,7 @@
orderby = ordertype;
var listArea = $Obj('rslist');
var errMsg = "<a href=\"javascript:ReloadPage('" + ordertype + "')\">重新加载列表</a>";
fetch("search_keywords_main.php?dopost=getlist&pageno=" + pageno + "&orderby=" + ordertype).then(resp=>{
fetch("search_keywords_main.php?dopost=getlist&pageno=" + pageno + "&orderby=" + ordertype).then(resp => {
if (resp.ok) {
return resp.text()
}
@@ -45,9 +45,7 @@
var kws = $Obj('spwords' + nid).value;
var ct = $Obj('count' + nid).value;
var errMsg = "<a href=\"javascript:LoadPage('" + pageno + "')\">重新加载列表</a>";
<?php
if (strtolower(substr($cfg_soft_lang, 0, 3)) == 'utf') {
?>
<?php if (strtolower(substr($cfg_soft_lang, 0, 3)) == 'utf') {?>
const formData = new FormData()
formData.append('dopost', 'update');
formData.append('aid', nid);
@@ -82,7 +80,7 @@
var pagenum = Math.ceil(totalrow / pagesize);
if (pagenum <= pageno) pageno = pagenum;
var errMsg = "<a href=\"javascript:LoadPage('" + pageno + "')\">重新加载列表</a>";
fetch("search_keywords_main.php?dopost=del&aid=" + nid + "&pageno=" + pageno + "&orderby=" + orderby).then(resp=>{
fetch("search_keywords_main.php?dopost=del&aid=" + nid + "&pageno=" + pageno + "&orderby=" + orderby).then(resp => {
if (resp.ok) {
return resp.text()
}
@@ -111,8 +109,7 @@
if (i == pageno) ahtml += "<li class='page-item'><span class='page-link'>" + i + "</span></li>";
else ahtml += "<li class='page-item'><a href='javascript:LoadPage(" + i + ");' class='page-link'>" + i + "</a></li>";
}
}
else if (pagenum < listsize) {
} else if (pagenum < listsize) {
for (i = 1; i <= pagenum; i++) {
if (i == pageno) ahtml += "<li class='page-item'><span class='page-link'>" + i + "</span></li>";
else ahtml += "<li class='page-item'><a href='javascript:LoadPage(" + i + ");' class='page-link'>" + i + "</a></li>";
@@ -141,11 +138,10 @@
</ol>
<div class="card shadow-sm">
<div class="card-header">搜索关键词管理</div>
<div id="rslist" class="card-body">
<?php GetKeywordList($dsql,$pageno,$pagesize,$orderby);?>
<div id="pagelist">
<script>ReloadPageNum(1);</script>
</div>
<div class="card-body">
<div id="rslist" ><?php GetKeywordList($dsql,$pageno,$pagesize,$orderby);?></div>
<div id="pagelist"></div>
<script>ReloadPageNum(1);</script>
</div>
</div>
</div>


Ładowanie…
Anuluj
Zapisz