답변 2개 / 댓글 2개
채택된 답변
+20 포인트
https://github.com/gnuboard/gnuboard5/blob/master/bbs/newwin.inc.php#L21
기존
Copy
<?php
for ($i=0; $nw=sql_fetch_array($result); $i++)
{
// 이미 체크 되었다면 Continue
if (isset($_COOKIE["hd_pops_{$nw['nw_id']}"]) && $_COOKIE["hd_pops_{$nw['nw_id']}"])
continue;
?>
변경
Copy
<?php
$popups = [];
if (empty($_GET['popup']) === false) {
$popups = explode(',', $_GET['popup']);
$popups = array_unique($popups);
}
for ($i=0; $nw=sql_fetch_array($result); $i++)
{
if (in_array($i + 1, $popups) == false) {
continue;
}
// 이미 체크 되었다면 Continue
if (isset($_COOKIE["hd_pops_{$nw['nw_id']}"]) && $_COOKIE["hd_pops_{$nw['nw_id']}"])
continue;
?>
답변을 작성하려면 로그인이 필요합니다.