feat: 支持分类标签使用逗号分隔
This commit is contained in:
@@ -105,7 +105,7 @@ if(isset($_GET['keyword']) && $_GET['keyword']!=""){
|
|||||||
echo "<td>";//分类
|
echo "<td>";//分类
|
||||||
|
|
||||||
$category = array();
|
$category = array();
|
||||||
$cate = explode(" ",$row['source']);
|
$cate = preg_split('/[\s,]+/',$row['source']);
|
||||||
foreach($cate as $cat){
|
foreach($cate as $cat){
|
||||||
$cat=trim($cat);
|
$cat=trim($cat);
|
||||||
if(mb_ereg("^http",$cat)){
|
if(mb_ereg("^http",$cat)){
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
$result=mysql_query_cache($sql);//mysql_escape_string($sql));
|
$result=mysql_query_cache($sql);//mysql_escape_string($sql));
|
||||||
$category=array();
|
$category=array();
|
||||||
foreach ($result as $row){
|
foreach ($result as $row){
|
||||||
$cate=explode(" ",$row['source']);
|
$cate=preg_split('/[\s,]+/',$row['source']);
|
||||||
foreach($cate as $cat){
|
foreach($cate as $cat){
|
||||||
$cat=trim($cat);
|
$cat=trim($cat);
|
||||||
if(mb_ereg("^http",$cat)){
|
if(mb_ereg("^http",$cat)){
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ foreach ($result as $row) {
|
|||||||
$view_problemset[$i][0] = "<div class=none> </div>";
|
$view_problemset[$i][0] = "<div class=none> </div>";
|
||||||
}
|
}
|
||||||
$category = array();
|
$category = array();
|
||||||
$cate = explode(" ",$row['source']); //分类标签
|
$cate = preg_split('/[\s,]+/',$row['source']); //分类标签
|
||||||
foreach($cate as $cat){
|
foreach($cate as $cat){
|
||||||
$cat=trim($cat);
|
$cat=trim($cat);
|
||||||
if(mb_ereg("^http",$cat)){
|
if(mb_ereg("^http",$cat)){
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ foreach ($result as $row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$category = array();
|
$category = array();
|
||||||
$cate = explode(" ", $row['source']);
|
$cate = preg_split('/[\s,]+/', $row['source']);
|
||||||
foreach ($cate as $cat) {
|
foreach ($cate as $cat) {
|
||||||
$cat = trim($cat);
|
$cat = trim($cat);
|
||||||
if (mb_ereg("^http", $cat)) {
|
if (mb_ereg("^http", $cat)) {
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ if ($pr_flag) {
|
|||||||
$tcolor = 0;
|
$tcolor = 0;
|
||||||
?>
|
?>
|
||||||
<?php if ($row['source'] && !isset($_GET['cid'])) {
|
<?php if ($row['source'] && !isset($_GET['cid'])) {
|
||||||
$cats = explode(" ", $row['source']);
|
$cats = preg_split('/[\s,]+/', $row['source']);
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
|||||||
Reference in New Issue
Block a user