| @@ -20,7 +20,7 @@ if (empty($dopost)) $dopost = ''; | |||
| if ($dopost == 'saveall') { | |||
| $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "article_keywords_main.php" : $_COOKIE['ENV_GOBACK_URL']; | |||
| if (!isset($aids)) { | |||
| ShowMsg("您没有选择要更改的内容", $ENV_GOBACK_URL); | |||
| ShowMsg("您没有选择要更改的内容!", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| foreach ($aids as $aid) { | |||
| @@ -49,7 +49,7 @@ if ($dopost == 'saveall') { | |||
| $dsql->ExecuteNoneQuery($query1); | |||
| } | |||
| } | |||
| ShowMsg("完成指定的更改", $ENV_GOBACK_URL); | |||
| ShowMsg("完成指定的更改!", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| //增加关键字 | |||
| @@ -58,17 +58,17 @@ else if ($dopost == 'add') { | |||
| $keyword = trim($keyword); | |||
| $rank = preg_replace("#[^0-9]#", '', $rank); | |||
| if ($keyword == '') { | |||
| ShowMsg("关键字不能为空", -1); | |||
| ShowMsg("关键字不能为空!", -1); | |||
| exit(); | |||
| } | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__keywords` WHERE keyword LIKE '$keyword'"); | |||
| if (is_array($row)) { | |||
| ShowMsg("关键字已存在库中", "-1"); | |||
| ShowMsg("关键字已存在库中!", "-1"); | |||
| exit(); | |||
| } | |||
| $inquery = "INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES ('$keyword','$rank','1','$rpurl');"; | |||
| $inquery = "INSERT INTO `#@__keywords`(`keyword`,`rank`,`sta`,`rpurl`) VALUES ('$keyword','$rank','1','$rpurl');"; | |||
| $dsql->ExecuteNoneQuery($inquery); | |||
| ShowMsg("成功增加一个关键字", $ENV_GOBACK_URL); | |||
| ShowMsg("成功增加一个关键字!", $ENV_GOBACK_URL); | |||
| exit(); | |||
| } | |||
| if (empty($keyword)) { | |||
| @@ -78,7 +78,7 @@ if (empty($keyword)) { | |||
| $addquery = " WHERE keyword LIKE '%$keyword%' "; | |||
| } | |||
| $sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY rank DESC"; | |||
| $sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY `rank` DESC"; | |||
| $dlist = new DataListCP(); | |||
| $dlist->pageSize = 20; | |||
| $dlist->SetParameter("keyword", $keyword); | |||
| @@ -26,7 +26,7 @@ if ($dopost == 'analyse') { | |||
| if ($row->sta == 1) $ws[$row->keyword] = 1; | |||
| else $wserr[$row->keyword] = 1; | |||
| } | |||
| echo "完成关键字数据库的载入<br/>\r\n"; | |||
| echo "完成关键字数据库的载入!<br/>\r\n"; | |||
| flush(); | |||
| echo "读取档案数据库,并对禁用的关键字和生字进行处理...<br/>\r\n"; | |||
| flush(); | |||
| @@ -56,7 +56,7 @@ if ($dopost == 'analyse') { | |||
| } | |||
| } | |||
| } | |||
| echo "完成档案数据库的处理<br/>\r\n"; | |||
| echo "完成档案数据库的处理!<br/>\r\n"; | |||
| flush(); | |||
| if (is_array($wsnew)) { | |||
| echo "对关键字进行排序...<br/>\r\n"; | |||
| @@ -68,18 +68,18 @@ if ($dopost == 'analyse') { | |||
| if (strlen($k) > 20) { | |||
| continue; | |||
| } | |||
| $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); | |||
| $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,`rank`,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); | |||
| $dsql->Execute(); | |||
| } | |||
| echo "完成关键字的导入<br/>\r\n"; | |||
| echo "完成关键字的导入!<br/>\r\n"; | |||
| flush(); | |||
| sleep(1); | |||
| } else { | |||
| echo "没发现任何新的关键字<br/>\r\n"; | |||
| echo "没发现任何新的关键字!<br/>\r\n"; | |||
| flush(); | |||
| sleep(1); | |||
| } | |||
| ShowMsg('完成所有操作,现在转到关键字列表页', 'article_keywords_main.php'); | |||
| ShowMsg('完成所有操作,现在转到关键字列表页!', 'article_keywords_main.php'); | |||
| exit(); | |||
| } | |||
| //自动获取关键字(适用于默认的文章模型) | |||
| @@ -197,7 +197,7 @@ else if ($dopost == 'fetch') { | |||
| $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; | |||
| ShowMsg($tjsta, $nurl, 0, 500); | |||
| } else { | |||
| ShowMsg("完成所有任务", "javascript:;"); | |||
| ShowMsg("完成所有任务!", "javascript:;"); | |||
| } | |||
| exit(); | |||
| } | |||
| @@ -26,10 +26,10 @@ if ($dopost == "save") { | |||
| $exptime = ${'exptime_'.$startID}; | |||
| if (isset(${'check_'.$startID})) { | |||
| if ($pname != '') { | |||
| $query = "UPDATE #@__member_type SET pname='$pname',money='$money',rank='$rank',exptime='$exptime' WHERE aid='$aid'"; | |||
| $query = "UPDATE `#@__member_type` SET `pname`='$pname',`money`='$money',`rank`='$rank',`exptime`='$exptime' WHERE `aid`='$aid'"; | |||
| } | |||
| } else { | |||
| $query = "DELETE FROM #@__member_type WHERE aid='$aid' "; | |||
| $query = "DELETE FROM `#@__member_type` WHERE `aid`='$aid' "; | |||
| } | |||
| if ($query != '') { | |||
| $dsql->ExecuteNoneQuery($query); | |||
| @@ -38,14 +38,14 @@ if ($dopost == "save") { | |||
| //增加新记录 | |||
| if (isset($check_new) && $pname_new != '') { | |||
| $query = "INSERT INTO #@__member_type(rank,pname,money,exptime) VALUES('{$rank_new}','{$pname_new}','{$money_new}','{$exptime_new}');"; | |||
| $query = "INSERT INTO `#@__member_type`(`rank`,`pname`,`money`,`exptime`) VALUES('{$rank_new}','{$pname_new}','{$money_new}','{$exptime_new}');"; | |||
| $dsql->ExecuteNoneQuery($query); | |||
| } | |||
| header("Content-Type: text/html; charset={$cfg_soft_lang}"); | |||
| echo "<script> alert('成功更新会员产品分类表'); </script>"; | |||
| echo "<script> alert('成功更新会员产品分类表!'); </script>"; | |||
| } | |||
| $arcranks = array(); | |||
| $dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank>10 "); | |||
| $dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>10 "); | |||
| $dsql->Execute(); | |||
| while ($row = $dsql->GetArray()) { | |||
| $arcranks[$row['rank']] = $row['membername']; | |||
| @@ -181,7 +181,7 @@ if ($dopost == 'install') { | |||
| //配置支付接口 | |||
| else if ($dopost == 'config') { | |||
| if ($pay_name == "" || $pay_desc == "" || $pay_fee == "") { | |||
| ShowMsg("您有未填写的项目", "-1"); | |||
| ShowMsg("您有未填写的项目!", "-1"); | |||
| exit(); | |||
| } | |||
| $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'"); | |||
| @@ -200,7 +200,7 @@ else if ($dopost == 'config') { | |||
| $configstr = "<"."?php\r\n".$payment."\r\n?".">\r\n"; | |||
| if (!empty($payment)) { | |||
| $m_file = DEDEDATA."/payment/".$row['code'].".php"; | |||
| $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限"); | |||
| $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限!"); | |||
| fwrite($fp, $configstr); | |||
| fclose($fp); | |||
| } | |||
| @@ -215,7 +215,7 @@ else if ($dopost == 'config') { | |||
| $query = "UPDATE `#@__payment` SET name = '$pay_name',fee='$pay_fee',description='$pay_desc',config='$config',enabled='1' WHERE id='$pid'"; | |||
| $dsql->ExecuteNoneQuery($query); | |||
| if ($pm == 'edit') $msg = "保存修改成功"; | |||
| else $msg = "安装成功"; | |||
| else $msg = "安装成功!"; | |||
| ShowMsg($msg, "sys_payment.php"); | |||
| exit(); | |||
| } | |||
| @@ -241,10 +241,10 @@ else if ($dopost == 'uninstall') { | |||
| //同时需要删除对应的缓存 | |||
| $m_file = DEDEDATA."/payment/".$row['code'].".php"; | |||
| @unlink($m_file); | |||
| ShowMsg("删除成功", "sys_payment.php"); | |||
| ShowMsg("删除成功!", "sys_payment.php"); | |||
| exit(); | |||
| } | |||
| $sql = "SELECT * FROM `#@__payment` ORDER BY rank ASC"; | |||
| $sql = "SELECT * FROM `#@__payment` ORDER BY `rank` ASC"; | |||
| $dlist = new DataListCP(); | |||
| $dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm"); | |||
| $dlist->SetSource($sql); | |||