本文整理汇总了PHP中search_font函数的典型用法代码示例。如果您正苦于以下问题:PHP search_font函数的具体用法?PHP search_font怎么用?PHP search_font使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了search_font函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_text
if (strstr($row['wr_option'] . $row2['wr_option'], 'secret')) {
$row['wr_content'] = '[비밀글 입니다.]';
}
$subject = get_text($row['wr_subject']);
if (strstr($sfl, 'wr_subject')) {
$subject = search_font($stx, $subject);
}
if ($read_level[$idx] <= $member['mb_level']) {
//$content = cut_str(get_text(strip_tags($row['wr_content'])), 300, "…");
$content = strip_tags($row['wr_content']);
$content = get_text($content, 1);
$content = strip_tags($content);
$content = str_replace(' ', '', $content);
$content = cut_str($content, 300, "…");
if (strstr($sfl, 'wr_content')) {
$content = search_font($stx, $content);
}
} else {
$content = '';
}
$list[$idx][$i]['subject'] = $subject;
$list[$idx][$i]['content'] = $content;
$list[$idx][$i]['name'] = get_sideview($row['mb_id'], get_text(cut_str($row['wr_name'], $config['cf_cut_name'])), $row['wr_email'], $row['wr_homepage']);
$k++;
if ($k >= $rows) {
break;
}
}
sql_free_result($result);
if ($k >= $rows) {
break;
示例2: get_view
if ($board['bo_use_nogood']) {
$nogood_href = './good.php?bo_table=' . $bo_table . '&wr_id=' . $wr_id . '&good=nogood';
}
}
$view = get_view($write, $board, $board_skin_path);
if (strstr($sfl, 'subject')) {
$view['subject'] = search_font($stx, $view['subject']);
}
$html = 0;
if (strstr($view['wr_option'], 'html1')) {
$html = 1;
} else {
if (strstr($view['wr_option'], 'html2')) {
$html = 2;
}
}
$view['content'] = conv_content($view['wr_content'], $html);
if (strstr($sfl, 'content')) {
$view['content'] = search_font($stx, $view['content']);
}
$view['rich_content'] = preg_replace("/{이미지\\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view['content']);
$is_signature = false;
$signature = '';
if ($board['bo_use_signature'] && $view['mb_id']) {
$is_signature = true;
$mb = get_member($view['mb_id']);
$signature = $mb['mb_signature'];
$signature = conv_content($signature, 1);
}
include_once $board_skin_path . '/view.skin.php';
@(include_once $board_skin_path . '/view.tail.skin.php');
示例3: get_view
}
$view = get_view($write, $board, $board_skin_path, 255);
if (strstr($sfl, "subject")) {
$view[subject] = search_font($stx, $view[subject]);
}
$html = 0;
if (strstr($view[wr_option], "html1")) {
$html = 1;
} else {
if (strstr($view[wr_option], "html2")) {
$html = 2;
}
}
$view[content] = conv_content($view[wr_content], $html);
if (strstr($sfl, "content")) {
$view[content] = search_font($stx, $view[content]);
}
$view[content] = preg_replace("/(\\<img )([^\\>]*)(\\>)/i", "\\1 name='target_resize_image[]' onclick='image_window(this)' style='cursor:pointer;' \\2 \\3", $view[content]);
//$view[rich_content] = preg_replace("/{img\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view[content]);
$view[rich_content] = preg_replace("/{이미지\\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view[content]);
$is_signature = false;
$signature = "";
if ($board[bo_use_signature] && $view[mb_id]) {
$is_signature = true;
$mb = get_member($view[mb_id]);
$signature = $mb[mb_signature];
//$signature = bad_tag_convert($signature);
// 081022 : CSRF 보안 결함으로 인한 코드 수정
$signature = conv_content($signature, 1);
}
include_once "{$board_skin_path}/mw.lib/mw.skin.basic.lib.php";
示例4: sql_fetch
} else {
$ss_name = 'ss_secret_comment_' . $bo_table . '_' . $list[$i]['wr_id'];
// APMS : 대댓글의 비밀글을 원댓글쓴이에게도 보이기
$is_pre_commenter = false;
if ($row['wr_comment_reply'] && $member['mb_id']) {
$pre_comment = sql_fetch(" select mb_id from {$write_table} where wr_parent = '{$wr_id}' and wr_is_comment = 1 and wr_comment = '{$row['wr_comment']}' and wr_comment_reply = '" . substr($row['wr_comment_reply'], 0, -1) . "' ");
if ($pre_comment['mb_id'] && $pre_comment['mb_id'] == $member['mb_id']) {
$is_pre_commenter = true;
}
}
if (get_session($ss_name) || $is_pre_commenter) {
if ($is_cmt_shingo) {
$list[$i]['content'] = '';
} else {
$list[$i]['content'] = conv_content($row['wr_content'], 0, 'wr_content');
$list[$i]['content'] = search_font($stx, $list[$i]['content']);
$is_content = true;
}
} else {
$list[$i]['content'] = '<a href="./password.php?w=sc&bo_table=' . $bo_table . '&wr_id=' . $list[$i]['wr_id'] . $qstr . '" class="s_cmt">댓글내용 확인</a>';
$is_secret = true;
}
}
if ($is_content) {
$list[$i]['content'] = preg_replace("/\\[<a\\s*href\\=\"(http|https|ftp)\\:\\/\\/([^[:space:]]+)\\.(gif|png|jpg|jpeg|bmp).*<\\/a>(\\s\\]|\\]|)/i", "<a href=\"" . G5_BBS_URL . "/view_img.php?img=\$1://\$2.\$3\" target=\"_blank\" class=\"item_image\"><img src=\"\$1://\$2.\$3\" alt=\"\" style=\"max-width:100%;border:0;\"></a>", $list[$i]['content']);
$list[$i]['content'] = apms_content($list[$i]['content']);
//럭키포인트
if ($row['as_lucky']) {
$list[$i]['content'] = $list[$i]['content'] . '' . str_replace("[point]", number_format($row['as_lucky']), APMS_LUCKY_TEXT);
}
}
示例5: sql_query
$page = 1;
}
// 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $page_rows;
// 시작 열을 구함
$sql = " select *\n {$sql_common}\n {$sql_search}\n {$sql_order}\n limit {$from_record}, {$page_rows} ";
$result = sql_query($sql);
$list = array();
$num = $total_count - ($page - 1) * $page_rows;
$subject_len = G5_IS_MOBILE ? $qaconfig['qa_mobile_subject_len'] : $qaconfig['qa_subject_len'];
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
$list[$i]['category'] = get_text($row['qa_category']);
$list[$i]['subject'] = conv_subject($row['qa_subject'], $subject_len, '…');
if ($stx) {
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
}
$list[$i]['view_href'] = G5_BBS_URL . '/qaview.php?qa_id=' . $row['qa_id'] . $qstr;
$list[$i]['icon_file'] = '';
if (trim($row['qa_file1']) || trim($row['qa_file2'])) {
$list[$i]['icon_file'] = '<img src="' . $qa_skin_url . '/img/icon_file.gif">';
}
$list[$i]['name'] = get_text($row['qa_name']);
$list[$i]['date'] = substr($row['qa_datetime'], 2, 8);
$list[$i]['num'] = $num - $i;
}
$is_checkbox = false;
$admin_href = '';
if ($is_admin) {
$is_checkbox = true;
$admin_href = G5_ADMIN_URL . '/qa_config.php';
示例6: trim
$stx = trim($stx);
$sql_search = '';
if ($stx) {
$sql_search = " and ( INSTR(fa_subject, '{$stx}') > 0 or INSTR(fa_content, '{$stx}') > 0 ) ";
}
if ($page < 1) {
$page = 1;
}
// 페이지가 없으면 첫 페이지 (1 페이지)
$page_rows = G5_IS_MOBILE ? $config['cf_mobile_page_rows'] : $config['cf_page_rows'];
$sql = " select count(*) as cnt\r\n from {$g5['faq_table']}\r\n where fm_id = '{$fm_id}'\r\n {$sql_search} ";
$total = sql_fetch($sql);
$total_count = $total['cnt'];
$total_page = ceil($total_count / $page_rows);
// 전체 페이지 계산
$from_record = ($page - 1) * $page_rows;
// 시작 열을 구함
$sql = " select *\r\n from {$g5['faq_table']}\r\n where fm_id = '{$fm_id}'\r\n {$sql_search}\r\n order by fa_order , fa_id\r\n limit {$from_record}, {$page_rows} ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$faq_list[] = $row;
if ($stx) {
$faq_list[$i]['fa_subject'] = search_font($stx, conv_content($faq_list[$i]['fa_subject'], 1));
$faq_list[$i]['fa_content'] = search_font($stx, conv_content($faq_list[$i]['fa_content'], 1));
}
}
include_once $skin_file;
} else {
echo '<p>' . str_replace(G5_PATH . '/', '', $skin_file) . '이 존재하지 않습니다.</p>';
}
include_once './_tail.php';
示例7: conv_content
//if ($html > 0) {
//$row[wr_content] = mw_tag_debug($row[wr_content]);
$row[content] = $row[content1] = SECRET_COMMENT;
if (!strstr($row[wr_option], "secret") || $is_admin || $write[mb_id] == $member[mb_id] && $member[mb_id] || $row[mb_id] == $member[mb_id] && $member[mb_id]) {
$row[content1] = $row[wr_content];
$row[content] = conv_content($row[wr_content], $html, 'wr_content');
$row[content] = search_font($stx, $row[content]);
}
//}
// 코멘트 비밀 리플 보이기
if ($row[content] == SECRET_COMMENT) {
for ($j = $i - 1; $j >= 0; $j--) {
if ($list[$j][wr_comment] == $row[wr_comment] && $list[$j][wr_comment_reply] == substr($row[wr_comment_reply], 0, strlen($row[wr_comment_reply]) - 1)) {
if (trim($list[$j][mb_id]) && $list[$j][mb_id] == $member[mb_id]) {
$row[content] = conv_content($row[wr_content], $html, 'wr_content');
$row[content] = search_font($stx, $row[content]);
}
break;
}
}
}
// 코멘트 첨부파일
$file = get_comment_file($bo_table, $row[wr_id]);
if (preg_match("/\\.({$config['cf_movie_extension']})\$/i", $file[0][file])) {
$tmp = '';
ob_start();
echo mw_jwplayer("{$g4[path]}/data/file/{$board[bo_table]}/{$file[0][file]}");
if (trim($file[0][content])) {
echo $file[0][content];
}
$jwcontent = ob_get_contents();
示例8: qry
function qry()
{
$this->load->library('querystring');
$param =& $this->querystring;
$stx = $param->get('stx');
$type = $this->uri->segment(5, 'write');
$page = $this->uri->segment(4, 1);
if (!$stx) {
goto_url('/');
}
$ori_stx = $stx;
$member = unserialize(MEMBER);
// 검색 가능 게시판
$result = $this->Search_model->search_board($member['mb_level'], $stx);
$boards = array();
foreach ($result as $row) {
$boards[] = $row['bo_table'];
$levels[$row['bo_table']] = $row['bo_read_level'];
}
$config['suffix'] = '/' . $type . $param->output();
$config['base_url'] = RT_PATH . '/search/qry/page/';
$config['per_page'] = 20;
$config['uri_segment'] = 4;
$offset = ($page - 1) * $config['per_page'];
$result = $this->Search_model->list_result($type, $stx, $config['per_page'], $offset, $boards);
$config['total_rows'] = $result['total_count'];
$this->pagination->initialize($config);
$list = array();
if ($type == 'write') {
// 게시글
foreach ($result['qry'] as $i => $row) {
$bo_table = $row['bo_table'];
$href = RT_PATH . '/board/' . $bo_table . '/view/wr_id/' . $row['wr_id'] . '?sfl=wr_subject.wr_content&stx=' . $ori_stx;
$row['wr_content'] = preg_replace("/\\s+ +/", '', get_text(strip_tags(htmlspecialchars_decode($row['wr_content']))));
$list[$i] = new stdClass();
$list[$i]->href = $href;
$list[$i]->subject = search_font(get_text($row['wr_subject']), $stx);
$list[$i]->content = $levels[$bo_table] <= $member['mb_level'] ? search_font(cut_str($row['wr_content'], 300), $stx) : '';
// $list[$i]->name = $row['wr_name'];
$list[$i]->datetime = substr($row['wr_datetime'], 0, 10);
$list[$i]->is_comment = FALSE;
$i++;
}
} else {
// 댓글
foreach ($result['qry'] as $i => $row) {
$bo_table = $row['bo_table'];
$href = RT_PATH . '/board/' . $bo_table . '/view/wr_id/' . $row['wr_id'] . '?sfl=wr_subject.wr_content&stx=' . $ori_stx . '#c_' . $row['co_id'];
$row['co_content'] = get_text($row['co_content']);
$list[$i] = new stdClass();
$list[$i]->href = $href;
$list[$i]->content = $levels[$bo_table] <= $member['mb_level'] ? search_font(cut_str($row['co_content'], 300), $stx) : '';
// $list[$i]->name = $row['co_name'];
$list[$i]->datetime = substr($row['co_datetime'], 0, 10);
$list[$i]->is_comment = TRUE;
}
}
$head = array('title' => '검색어: ' . get_text(stripslashes($stx)));
$data = array('stx' => $ori_stx, 'type' => $type, 'list' => $list, 'total_count' => number_format($config['total_rows']), 'paging' => $this->pagination->create_links());
widget::run('head', $head);
$this->load->view('main/search', $data);
widget::run('tail');
}
示例9: get_text
$list[$i] = $row;
//$list[$i][name] = get_sideview($row[mb_id], cut_str($row[wr_name], 20, ''), $row[wr_email], $row[wr_homepage]);
$tmp_name = get_text(cut_str($row[wr_name], $config[cf_cut_name]));
// 설정된 자리수 만큼만 이름 출력
if ($board[bo_use_sideview]) {
$list[$i][name] = get_sideview($row[mb_id], $tmp_name, $row[wr_email], $row[wr_homepage]);
} else {
$list[$i][name] = "<span class='" . ($row[mb_id] ? 'member' : 'guest') . "'>{$tmp_name}</span>";
}
// 공백없이 연속 입력한 문자 자르기 (way 보드 참고. way.co.kr)
//$list[$i][content] = eregi_replace("[^ \n<>]{130}", "\\0\n", $row[wr_content]);
$list[$i][content] = $list[$i][content1] = "비밀글 입니다.";
if (!strstr($row[wr_option], "secret") || $is_admin || $write[mb_id] == $member[mb_id] && $member[mb_id] || $row[mb_id] == $member[mb_id] && $member[mb_id]) {
$list[$i][content1] = $row[wr_content];
$list[$i][content] = conv_content($row[wr_content], 0, 'wr_content');
$list[$i][content] = search_font($stx, $list[$i][content]);
}
$list[$i][trackback] = url_auto_link($row[wr_trackback]);
$list[$i][datetime] = substr($row[wr_datetime], 2, 14);
// 관리자가 아니라면 중간 IP 주소를 감춘후 보여줍니다.
$list[$i][ip] = $row[wr_ip];
if (!$is_admin) {
$list[$i][ip] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row[wr_ip]);
}
$list[$i][is_reply] = false;
$list[$i][is_edit] = false;
$list[$i][is_del] = false;
if ($is_comment_write || $is_admin) {
if ($member[mb_id]) {
if ($row[mb_id] == $member[mb_id] || $is_admin) {
$list[$i][del_link] = "./delete_comment.php?bo_table={$bo_table}&comment_id={$row['wr_id']}&token={$token}&page={$page}" . $qstr;
示例10: get_list
continue;
}
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
$list[$i][is_notice] = true;
$i++;
}
}
$k = 0;
while ($row = sql_fetch_array($result)) {
// 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다
if ($sca || $stx) {
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' ");
}
$list[$i] = get_list($row, $board, $board_skin_path, $board[bo_subject_len]);
if (strstr($sfl, "subject")) {
$list[$i][subject] = search_font($stx, $list[$i][subject]);
}
$list[$i][is_notice] = false;
//$list[$i][num] = number_format($total_count - ($page - 1) * $board[bo_page_rows] - $k);
$list[$i][num] = $total_count - ($page - 1) * $board[bo_page_rows] - $k;
$i++;
$k++;
}
$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "./board.php?bo_table={$bo_table}" . $qstr . "&page=");
$list_href = '';
$prev_part_href = '';
$next_part_href = '';
if ($sca || $stx) {
$list_href = "./board.php?bo_table={$bo_table}";
//if ($prev_spt >= $min_spt)
$prev_spt = $spt - $config[cf_search_part];
示例11: index
function index($view = FALSE)
{
$board =& $this->board;
$member =& $this->member;
$wr_field =& $this->wr_field;
$seg =& $this->seg;
$param =& $this->param;
$wr_id = $seg->get('wr_id');
// 게시물아이디
$page = $seg->get('page', 1);
// 페이지
$qstr = $seg->replace('wr_id') . $param->output();
$sst = $param->get('sst');
// 정렬필드
$sod = $param->get('sod');
// 정렬순서
$sfl = $param->get('sfl');
// 검색필드
$stx = $param->get('stx');
// 검색어
$sca = $param->get('sca');
// 분류
$spt = $param->get('spt');
// 검색 파트
$js = array('board');
// JavaScript Files
if ($member['mb_level'] < $board['bo_list_level']) {
if (IS_MEMBER) {
alert('목록을 볼 권한이 없습니다.');
} else {
alert("목록을 볼 권한이 없습니다.\\n\\n회원이라면 로그인 후 이용하세요.", 'member/login/qry/' . url_encode('board/' . BO_TABLE . '/lists' . $qstr));
}
}
// 분류 사용 여부
$sca_str = $sca ? '?sca=' . $sca : '';
$category = FALSE;
if ($board['bo_use_category']) {
$this->load->helper('category');
$category = make_category(array('type' => 'bo_' . BO_TABLE, 'id' => 'ca_code', 'code' => $sca, 'lst' => TRUE));
}
// 검색 파트 row
$search_part = $this->config->item('cf_search_part');
$btn_prev_part = $btn_next_part = '';
// 분류 선택, 검색어, 검색 파트 적용
if ($sca || $sfl && $stx || $board['bo_count_write'] > $search_part) {
if ($stx) {
$stx = get_text($stx);
}
$min_spt = $board['bo_min_wr_num'];
if (!$spt) {
$spt = $min_spt;
}
$total_count = $this->Board_model->list_count(BO_TABLE, $spt, $sca, $sfl, $stx);
$prev_spt = $spt - $search_part;
if ($min_spt && $prev_spt >= $min_spt) {
$btn_prev_part = '<li><a href="' . RT_PATH . '/board/' . BO_TABLE . '/lists' . $param->replace('spt', $prev_spt, $qstr) . '">이전검색</a></li>';
}
$next_spt = $spt + $search_part;
if ($next_spt < 0) {
$btn_next_part = '<li><a href="' . RT_PATH . '/board/' . BO_TABLE . '/lists' . $param->replace('spt', $next_spt, $qstr) . '">다음검색</a></li>';
}
} else {
$total_count = $board['bo_count_write'];
}
$config['suffix'] = $qstr;
$config['base_url'] = RT_PATH . '/board/' . BO_TABLE . '/lists/page/';
$config['per_page'] = $board['bo_page_rows'];
$config['total_rows'] = $total_count;
$config['uri_segment'] = $seg->pos('page');
// 검색 파트 ADD
$config['full_tag_open'] = '<ul class="pagination">' . $btn_prev_part;
$config['full_tag_close'] = $btn_next_part . '</ul>';
$CI =& get_instance();
$CI->load->library('pagination', $config);
// 정렬
if (!$sst) {
if ($board['bo_sort_field']) {
$sst = $board['bo_sort_field'];
} else {
$sst = 'wr_num, wr_reply';
$sod = 'asc';
}
} else {
$sst = preg_match("/^(wr_datetime|wr_hit)\$/i", $sst) ? $sst : FALSE;
}
$offset = ($page - 1) * $config['per_page'];
$result = $this->Board_model->list_result(BO_TABLE, $spt, $sca, $sst, $sod, $sfl, $stx, $config['per_page'], $offset, $wr_field);
// 사이드 뷰
if ($board['bo_use_sideview']) {
$this->load->helper('sideview');
}
// 일반 리스트
$list = $wr_ids = array();
foreach ($result as $i => $row) {
$row = get_convert($row, $board, $board['bo_subject_len'], $qstr, TRUE);
$list[$i] = new stdClass();
$list[$i]->num = $total_count - ($page - 1) * $config['per_page'] - $i;
$list[$i]->href = $row['href'];
$list[$i]->wr_id = $row['wr_id'];
$list[$i]->subject = strpos($sfl, 'subject') ? search_font($row['subject'], $stx) : $row['subject'];
//.........这里部分代码省略.........
示例12: index
//.........这里部分代码省略.........
if (!$write['mb_id']) {
// 회원이 쓴 글이 아니라면
$btn_update = "<a href='" . RT_PATH . "/board/" . BO_TABLE . "/password/w/u" . $qstr . "' class='btn btn-info'>수정</a>";
$btn_delete = "<a href='" . RT_PATH . "/board/" . BO_TABLE . "/password/w/d" . $qstr . "' class='btn btn-danger'>삭제</a>";
}
}
$btn_prev = $btn_next = '';
if (!$board['bo_use_list_view']) {
$pn = $this->Board_model->prev_next_link(BO_TABLE, $write['wr_num'], $write['wr_reply'], $sca, $sfl, $stx);
// 이전글 링크
$prev = $pn['prev'];
if ($prev['wr_id']) {
$prev_wr_subject = cut_str(get_text($prev['wr_subject']), 255);
$btn_prev = "<a href='" . RT_PATH . "/board/" . BO_TABLE . "/view" . $seg->replace('wr_id', $prev['wr_id']) . "' title='" . $prev_wr_subject . "'>← 이전글</a>";
}
// 다음글 링크
$next = $pn['next'];
if ($next['wr_id']) {
$next_wr_subject = cut_str(get_text($next['wr_subject']), 255);
$btn_next = "<a href='" . RT_PATH . "/board/" . BO_TABLE . "/view" . $seg->replace('wr_id', $next['wr_id']) . "' title='" . $next_wr_subject . "'>다음글 →</a>";
}
}
// 버튼s
$link_btns = $btn_admin . '<span class="btn-group">' . $btn_list . $btn_update . $btn_delete . $btn_reply . $btn_write . '</span>';
// 전체목록보이기
$list_view = FALSE;
if ($member['mb_level'] >= $board['bo_list_level'] && $board['bo_use_list_view']) {
$list_view = TRUE;
}
// 사이드 뷰
if ($board['bo_use_sideview']) {
$this->load->helper('sideview');
}
// 가공
$view = get_convert($write, $board, 255, $qstr);
if (strpos($sfl, 'subject')) {
$view['subject'] = search_font($view['subject'], $stx);
}
// 이미지 리사이즈
if ($write['wr_count_image'] > 0) {
define('RESIZE_WIDTH', $board['bo_image_width']);
$this->load->helper('resize');
$view['wr_content'] = resize_content($view['wr_content']);
}
$is_editor = strpos($view['wr_option'], 'editor') !== FALSE ? TRUE : FALSE;
$view['content'] = conv_content($view['wr_content'], $is_editor);
if (strpos($sfl, 'content')) {
$view['content'] = search_font($view['content'], $stx);
}
// SyntaxHighlighter
$is_syntax = FALSE;
if ($board['bo_use_syntax'] && $is_editor) {
$this->load->config('cf_syntax');
$brush_js = $this->config->item('brush_js');
preg_match_all("/brush: (" . implode('|', array_keys($brush_js)) . ")/i", $view['content'], $match);
$match = array_unique($match[1]);
if ($match) {
$is_syntax = TRUE;
// 있을 때
$view['content'] = preg_replace_callback('/(<pre class="brush:[^>]+>)([\\s\\S]+?)(<\\/pre>)/i', create_function('$content', 'return $content[1]
.str_ireplace("<br>", "\\n",strip_tags(str_ireplace("</p>", "<br>", $content[2]), "<br>"))
.$content[3];'), $view['content']);
$js[] = 'syntax/shCore';
foreach ($match as $brush) {
$js[] = 'syntax/' . $brush_js[$brush];
}
}
}
// 댓글 출력 여부
$is_comment = FALSE;
if ($board['bo_use_comment'] && strpos($write['wr_option'], 'nocomt') === FALSE) {
$is_comment = TRUE;
}
$head = array('title' => $board['gr_subject'] . ' > ' . $board['bo_subject'] . ' > ' . strip_tags($view['subject']), 'sca' => $sca);
$data = array('subject' => $view['subject'], 'content' => $view['content'], 'name' => $view['name'], 'ip' => $is_ip_view ? '(' . $ip . ')' : '', 'datetime' => date('y-m-d H:i', strtotime($view['wr_datetime'])), 'hit' => number_format($view['wr_hit']), 'btn_prev' => $btn_prev, 'btn_next' => $btn_next, 'link_btns' => $link_btns, 'btn_sns' => $board['bo_use_sns'] ? sns_post(BO_TABLE, $wr_id, $view['subject'], $view['content']) : '', 'is_comment' => $is_comment, 'is_syntax' => $is_syntax, 'wr_id' => $wr_id, 'qstr' => $qstr);
// JavaScript Load
if ($board['bo_use_sideview']) {
$js[] = 'sideview';
}
if (!IS_MEMBER && $is_comment) {
$js[] = 'md5';
$js[] = 'kcaptcha';
}
// Extra
if ($board['bo_use_extra']) {
$data = array_merge($data, $this->Board_model->get_extra(BO_TABLE, $wr_id));
}
widget::run('head', $head);
$this->load->view('board/' . $board['bo_skin'] . '/view', $data);
if ($list_view) {
if (IS_ADMIN) {
$js[] = 'board_check';
}
if ($board['bo_use_category']) {
$js[] = 'category';
}
widget::run('_board/lists', TRUE);
}
widget::run('tail', array('js' => $js));
}