|
|
@@ -26,17 +26,17 @@ class Kfnotice extends Base
|
|
|
|
|
|
$where = [];
|
|
|
$bibao = false;
|
|
|
- if (!empty($param['searchText'])) {
|
|
|
+ if (strlen($param['searchText'])) {
|
|
|
$arr = explode("|", $param['searchText']);
|
|
|
if (count($arr) == 5) {
|
|
|
list($timerang, $sendtype, $groupid, $txttype, $txttext) = $arr;
|
|
|
- if (!empty($timerang)) {
|
|
|
+ if (strlen($timerang)) {
|
|
|
list($tbegin, $tend) = explode(",", $timerang);
|
|
|
$bibao = true;
|
|
|
$biaaodata = [$tbegin, $tend.' 23:59:59'];
|
|
|
}
|
|
|
|
|
|
- if ($sendtype) {
|
|
|
+ if (strlen($sendtype)) {
|
|
|
$where['sendtype'] = intval($sendtype);
|
|
|
}
|
|
|
|
|
|
@@ -52,7 +52,7 @@ class Kfnotice extends Base
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (!empty($txttext)) {
|
|
|
+ if (strlen($txttext)) {
|
|
|
if ($txttype == 1) {
|
|
|
$where['title'] = ['like', '%' . $txttext . '%'];
|
|
|
} else {
|
|
|
@@ -108,12 +108,12 @@ class Kfnotice extends Base
|
|
|
$group = intval(input('post.groupid', 0));
|
|
|
|
|
|
|
|
|
- if (empty($atext) || empty($title)) {
|
|
|
+ if (strlen($atext) || strlen($title)) {
|
|
|
return json(['code' => -1, 'data' => '', 'msg' => '标题和内容不能为空']);
|
|
|
}
|
|
|
|
|
|
$sendtime = input('post.sendtime');
|
|
|
- if (empty($sendtime)) {
|
|
|
+ if (!strlen($sendtime)) {
|
|
|
$sendtime = date("Y-m-d H:i:s", time() + 10);
|
|
|
}
|
|
|
$sendtype = (strtotime($sendtime) >= (time() + 60)) ? 2 : 1;
|
|
|
@@ -195,4 +195,4 @@ class Kfnotice extends Base
|
|
|
|
|
|
return $operate;
|
|
|
}
|
|
|
-}
|
|
|
+}
|