ExecuteNoneQuery("UPDATE `#@__search_keywords` SET keyword='$keyword',spwords='$spwords',count='$count' WHERE aid='$aid';"); AjaxHead(); GetKeywordList($dsql, $pageno, $pagesize, $orderby); exit(); } //删除字段 else if ($dopost == 'del') { $aid = preg_replace("#[^0-9]#", "", $aid); $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); AjaxHead(); GetKeywordList($dsql, $pageno, $pagesize, $orderby); exit(); } //批量删除字段 else if ($dopost == 'delall') { foreach ($aids as $aid) { $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); } ShowMsg("删除成功", $ENV_GOBACK_URL); exit(); } //第一次进入这个页面 if ($dopost == '') { $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__search_keywords` "); $totalRow = $row['dd']; include(DEDEADMIN."/templets/search_keywords_main.htm"); } //获得特定的关键词列表 function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') { global $cfg_phpurl; $start = ($pageno - 1) * $pagesize; $printhead = "
"; echo $printhead; if ($orderby == 'result') $orderby = $orderby." ASC"; else $orderby = $orderby." DESC"; $dsql->SetQuery("SELECT * FROM `#@__search_keywords` ORDER BY $orderby LIMIT $start,$pagesize "); $dsql->Execute(); while ($row = $dsql->GetArray()) { $line = ""; echo $line; } echo ""; echo "
搜索关键词维护
选择 id 关键词 分词结果 频率 结果 最后搜索时间 管理
{$row['aid']} {$row['result']} ".MyDate("Y-m-d H:i:s", $row['lasttime'])." 更新 删除
反选 取消 删除
"; }