| 151 |
"articles" => array(), |
"articles" => array(), |
| 152 |
); |
); |
| 153 |
|
|
| 154 |
$aid_list = "-1"; |
$aid_list = array(-1); |
| 155 |
|
|
| 156 |
if ($solr_obj->response->docs !== false) |
if ($solr_obj->response->docs !== false) |
| 157 |
{ |
{ |
| 158 |
foreach ($solr_obj->response->docs as $doc) |
foreach ($solr_obj->response->docs as $doc) |
| 159 |
{ |
{ |
| 160 |
$aid_list .= (", " . $doc["ArticleId"]); |
array_push($aid_list, $doc["ArticleId"]); |
| 161 |
} |
} |
| 162 |
} |
} |
| 163 |
|
|
| 170 |
section_config.sname, section_config.title AS s_title FROM bbs |
section_config.sname, section_config.title AS s_title FROM bbs |
| 171 |
INNER JOIN section_config ON bbs.SID = section_config.SID |
INNER JOIN section_config ON bbs.SID = section_config.SID |
| 172 |
INNER JOIN section_class ON section_config.CID = section_class.CID" . |
INNER JOIN section_class ON section_config.CID = section_class.CID" . |
| 173 |
" WHERE bbs.AID in ($aid_list)" . |
" WHERE bbs.AID in (" . |
| 174 |
" ORDER BY sub_dt DESC"; |
implode(",", $aid_list) . |
| 175 |
|
") ORDER BY sub_dt DESC"; |
| 176 |
|
|
| 177 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 178 |
if ($rs == false) |
if ($rs == false) |
| 188 |
|
|
| 189 |
if ($_SESSION["BBS_uid"] > 0) |
if ($_SESSION["BBS_uid"] > 0) |
| 190 |
{ |
{ |
| 191 |
$aid_list = "-1"; |
$aid_list = array(-1); |
| 192 |
|
|
| 193 |
while ($row = mysqli_fetch_array($rs)) |
while ($row = mysqli_fetch_array($rs)) |
| 194 |
{ |
{ |
| 195 |
if ((new DateTimeImmutable("-" . $BBS_new_article_period . " day")) < (new DateTimeImmutable($row["sub_dt"]))) |
if ((new DateTimeImmutable("-" . $BBS_new_article_period . " day")) < (new DateTimeImmutable($row["sub_dt"]))) |
| 196 |
{ |
{ |
| 197 |
$aid_list .= (", " . $row["AID"]); |
array_push($aid_list, $row["AID"]); |
| 198 |
} |
} |
| 199 |
else |
else |
| 200 |
{ |
{ |
| 204 |
|
|
| 205 |
mysqli_data_seek($rs, 0); |
mysqli_data_seek($rs, 0); |
| 206 |
|
|
| 207 |
if ($aid_list != "-1") |
if (count($aid_list) > 1) |
| 208 |
{ |
{ |
| 209 |
$sql = "SELECT AID FROM view_article_log WHERE AID IN ($aid_list) AND UID = " . $_SESSION["BBS_uid"]; |
$sql = "SELECT AID FROM view_article_log WHERE AID IN (" . |
| 210 |
|
implode(",", $aid_list) . |
| 211 |
|
") AND UID = " . $_SESSION["BBS_uid"]; |
| 212 |
|
|
| 213 |
$rs_view = mysqli_query($db_conn, $sql); |
$rs_view = mysqli_query($db_conn, $sql); |
| 214 |
if ($rs_view == false) |
if ($rs_view == false) |
| 272 |
} |
} |
| 273 |
mysqli_free_result($rs); |
mysqli_free_result($rs); |
| 274 |
|
|
| 275 |
$uid_list = "-1"; |
$uid_list = array(-1); |
| 276 |
foreach ($author_list as $uid => $status) |
foreach ($author_list as $uid => $status) |
| 277 |
{ |
{ |
| 278 |
$uid_list .= (", " . $uid); |
array_push($uid_list, $uid); |
| 279 |
} |
} |
| 280 |
unset($author_list); |
unset($author_list); |
| 281 |
|
|
| 282 |
$author_list = array(); |
$author_list = array(); |
| 283 |
|
|
| 284 |
$sql = "SELECT UID FROM user_list WHERE UID IN ($uid_list) AND enable"; |
$sql = "SELECT UID FROM user_list WHERE UID IN (" . |
| 285 |
|
implode(",", $uid_list) . |
| 286 |
|
") AND enable"; |
| 287 |
|
|
| 288 |
$rs = mysqli_query($db_conn, $sql); |
$rs = mysqli_query($db_conn, $sql); |
| 289 |
if ($rs == false) |
if ($rs == false) |