runQuery($query); $totalCount = mysql_result($result,0,0); } $start = ($page == 1)?0:($page-1)*$info->getMaxLine(); // ½ÃÀÛ Row $pageSkip = new pageSkip("./boardList.html?boardID=$boardID&findType=$findType&findWord=$findWord&page=", $totalCount, $info->getMaxLine(), 10); } // °ü¸®ÀÚ °øÁö ÃßÃâ function adminNotice() { global $conn, $boardID; $query = "select no, sortNo, writer, email, subject, writeDate, readCount, readLock, attachType from $boardID where notice='Y'"; $result = $conn->runQuery($query); if (mysql_num_rows($result) > 0) { $no = mysql_result($result, 0, 0); $sortNo = mysql_result($result, 0, 1); $writer = mysql_result($result, 0, 2); $email = mysql_result($result, 0, 3); $subject = mysql_result($result, 0, 4); $writeDate = mysql_result($result, 0, 5); $readCount = mysql_result($result, 0, 6); $readLock = mysql_result($result, 0, 7); $attachType = mysql_result($result, 0, 8); printList($no, $sortNo, $writer, $email, $subject, $writeDate, $readCount, $readLock, $attachType); } } // ¸®½ºÆ® ÃßÃâ function getList($page) { global $conn, $boardID, $start, $maxLine, $findType, $findWord, $totalCount, $info, $limitWord; if ($findType != "" && $findWord != "") { $query = "select b.no, sortNo, writer, email, subject, writeDate, readCount, replyNo, readLock, attachType, count(c.cNo) as count from $boardID b LEFT OUTER JOIN bComment c ON b.no=c.no and c.boardId='$boardID' where $findType like '%$findWord%' group by b.no order by sortNo desc limit $start, ".$info->getMaxLine().""; } else { $query = "select b.no, sortNo, writer, email, subject, writeDate, readCount, replyNo, readLock, attachType, count(c.cNo) as count from $boardID b LEFT OUTER JOIN bComment c ON b.no=c.no and c.boardId='$boardID' group by b.no order by sortNo desc limit $start, ".$info->getMaxLine().""; } $result = $conn->runQuery($query); if (mysql_num_rows($result) > 0) { $space = ""; while($rows = mysql_fetch_array($result)) { for($i=0 ; $i<$rows[replyNo] ; $i++) { $space .= "  "; if(($i+1) == $rows[replyNo]) $space .= " "; } $rows[subject] = strSplit($rows[subject], $limitWord, "..."); $rows[subject] .= ($rows[count] > 0 && $info->getLimitComment() == "Y")?" [".$rows[count]."]":""; printList($rows[no], $rows[sortNo], $rows[writer], $rows[email], $space.$rows[subject], $rows[writeDate], $rows[readCount], $rows[readLock], $rows[attachType]); $space = ""; } } else { printList("", "", "", "", "ÀÛ¼ºµÈ °Ô½Ã¹°ÀÌ ¾ø½À´Ï´Ù.", "", "", "","",""); } } // °ªÀ» È­¸é¿¡ Ãâ·Â function printList($no, $sortNo, $writer, $email, $subject, $writeDate, $readCount, $readLock, $attachType) { global $boardID, $page, $info, $findWord, $findType; if(dateCheck($writeDate, 1)) $subject = " ".$subject; if($readLock == "Y") $subject = "".$subject; // º»¹® Ãâ·Â echo ""; // ÆÄÀÏ÷ºÎ üũ if($info->getLimitAttach() == "Y") echo ""; echo ""; // ³ª¸ÓÁö ³»¿ë ´Ù Ãâ·Â echo "
$sortNo".attachCheck($attachType)." $subject$writer ".substr($writeDate,0,10)." $readCount
"; } // Å×À̺í Ãâ·Â function printTable() { global $info, $width, $align, $pageSkip, $page, $boardID, $totalCount, $maxLine, $pageSkip; // Àüü °Ô½Ã¹° °è»ê getPageNum(); echo "
¡Ý ".$info->getBoardName()."
¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ±Û¾´³¯ ÀÐÀº¼ö
"; // °ü¸®ÀÚ °øÁö üũ adminNotice(); // ¸®½ºÆ® Ãâ·Â getList($page); echo "
"; // ÆäÀÌÁö ³»ºñ°ÔÀÌ¼Ç $pageSkip->printPage($page); echo "
"; // ÇÏ´Ü ¸µÅ© printLink(); } function printLink() { global $width, $boardID, $align, $page; echo "
"; } printTable(); include ("../inc/footer.html"); // ǪÅÍ ?>