Esempio n. 1
0
function get_list($write_row, $board, $skin_url, $subject_len = 40)
{
    global $g5, $config;
    global $qstr, $page;
    //$t = get_microtime();
    // 배열전체를 복사
    $list = $write_row;
    unset($write_row);
    $board_notice = array_map('trim', explode(',', $board['bo_notice']));
    $list['is_notice'] = in_array($list['wr_id'], $board_notice);
    if ($subject_len) {
        $list['subject'] = conv_subject($list['wr_subject'], $subject_len, '…');
    } else {
        $list['subject'] = conv_subject($list['wr_subject'], $board['bo_subject_len'], '…');
    }
    // 목록에서 내용 미리보기 사용한 게시판만 내용을 변환함 (속도 향상) : kkal3(커피)님께서 알려주셨습니다.
    if ($board['bo_use_list_content']) {
        $html = 0;
        if (strstr($list['wr_option'], 'html1')) {
            $html = 1;
        } else {
            if (strstr($list['wr_option'], 'html2')) {
                $html = 2;
            }
        }
        $list['content'] = conv_content($list['wr_content'], $html);
    }
    $list['comment_cnt'] = '';
    if ($list['wr_comment']) {
        $list['comment_cnt'] = "<span class=\"cnt_cmt\">" . $list['wr_comment'] . "</span>";
    }
    // 당일인 경우 시간으로 표시함
    $list['datetime'] = substr($list['wr_datetime'], 0, 10);
    $list['datetime2'] = $list['wr_datetime'];
    if ($list['datetime'] == G5_TIME_YMD) {
        $list['datetime2'] = substr($list['datetime2'], 11, 5);
    } else {
        $list['datetime2'] = substr($list['datetime2'], 5, 5);
    }
    // 4.1
    $list['last'] = substr($list['wr_last'], 0, 10);
    $list['last2'] = $list['wr_last'];
    if ($list['last'] == G5_TIME_YMD) {
        $list['last2'] = substr($list['last2'], 11, 5);
    } else {
        $list['last2'] = substr($list['last2'], 5, 5);
    }
    $list['wr_homepage'] = get_text(addslashes($list['wr_homepage']));
    $tmp_name = get_text(cut_str($list['wr_name'], $config['cf_cut_name']));
    // 설정된 자리수 만큼만 이름 출력
    if ($board['bo_use_sideview']) {
        $list['name'] = get_sideview($list['mb_id'], $tmp_name, $list['wr_email'], $list['wr_homepage']);
    } else {
        $list['name'] = '<span class="' . ($list['mb_id'] ? 'sv_member' : 'sv_guest') . '">' . $tmp_name . '</span>';
    }
    $reply = $list['wr_reply'];
    $list['reply'] = strlen($reply) * 10;
    $list['icon_reply'] = '';
    if ($list['reply']) {
        $list['icon_reply'] = '<img src="' . $skin_url . '/img/icon_reply.gif" style="margin-left:' . $list['reply'] . 'px;" alt="답변글">';
    }
    $list['icon_link'] = '';
    if ($list['wr_link1'] || $list['wr_link2']) {
        $list['icon_link'] = '<img src="' . $skin_url . '/img/icon_link.gif" alt="관련링크">';
    }
    // 분류명 링크
    $list['ca_name_href'] = G5_BBS_URL . '/board.php?bo_table=' . $board['bo_table'] . '&amp;sca=' . urlencode($list['ca_name']);
    $list['href'] = G5_BBS_URL . '/board.php?bo_table=' . $board['bo_table'] . '&amp;wr_id=' . $list['wr_id'] . $qstr;
    $list['comment_href'] = $list['href'];
    $list['icon_new'] = '';
    if ($board['bo_new'] && $list['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - $board['bo_new'] * 3600)) {
        $list['icon_new'] = '<img src="' . $skin_url . '/img/icon_new.gif" alt="새글">';
    }
    $list['icon_hot'] = '';
    if ($board['bo_hot'] && $list['wr_hit'] >= $board['bo_hot']) {
        $list['icon_hot'] = '<img src="' . $skin_url . '/img/icon_hot.gif" alt="인기글">';
    }
    $list['icon_secret'] = '';
    if (strstr($list['wr_option'], 'secret')) {
        $list['icon_secret'] = '<img src="' . $skin_url . '/img/icon_secret.gif" alt="비밀글">';
    }
    // 링크
    for ($i = 1; $i <= G5_LINK_COUNT; $i++) {
        $list['link'][$i] = set_http(get_text($list["wr_link{$i}"]));
        $list['link_href'][$i] = G5_BBS_URL . '/link.php?bo_table=' . $board['bo_table'] . '&amp;wr_id=' . $list['wr_id'] . '&amp;no=' . $i . $qstr;
        $list['link_hit'][$i] = (int) $list["wr_link{$i}_hit"];
    }
    // 가변 파일
    if ($board['bo_use_list_file'] || $list['wr_file'] && $subject_len == 255) {
        $list['file'] = get_file($board['bo_table'], $list['wr_id']);
    } else {
        $list['file']['count'] = $list['wr_file'];
    }
    if ($list['file']['count']) {
        $list['icon_file'] = '<img src="' . $skin_url . '/img/icon_file.gif" alt="첨부파일">';
    }
    return $list;
}
Esempio n. 2
0
 }
 $ca_color_style = '';
 if ($ca_color) {
     $ca_color_style = " style='color:#{$ca_color}' ";
 }
 // 댓글감춤
 if ($list[$i][wr_comment_hide]) {
     $list[$i][comment_cnt] = 0;
 }
 // 호칭
 $list[$i][name] = get_name_title($list[$i][name], $list[$i][wr_name]);
 $list[$i][name] = mw_sideview($list[$i][name]);
 $list[$i]['subject'] = $list[$i]['wr_subject'];
 $list[$i]['subject'] = mw_reg_str($list[$i]['subject']);
 $list[$i]['subject'] = bc_code($list[$i]['subject'], 0);
 $list[$i]['subject'] = conv_subject($list[$i]['subject'], $board['bo_subject_len'], "…");
 if (strstr($sfl, 'subject')) {
     $list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
 }
 // 멤버쉽 아이콘
 if (function_exists("mw_cash_membership_icon") && $list[$i][mb_id] != $config[cf_admin]) {
     if (!in_array($list[$i][mb_id], $mw_membership)) {
         $mw_membership[] = $list[$i][mb_id];
         $mw_membership_icon[$list[$i][mb_id]] = mw_cash_membership_icon($list[$i][mb_id]);
         $list[$i][name] = $mw_membership_icon[$list[$i][mb_id]] . $list[$i][name];
     } else {
         $list[$i][name] = $mw_membership_icon[$list[$i][mb_id]] . $list[$i][name];
     }
     $list_run_time = mw_time_log($list_run_time, "[list] mw_cash_membership_icon()");
 }
 // 익명
Esempio n. 3
0
<?php

include_once './_common.php';
$html_title = '링크 &gt; ' . conv_subject($write['wr_subject'], 255);
if (!($bo_table && $wr_id && $no)) {
    alert_close('값이 제대로 넘어오지 않았습니다.');
}
// SQL Injection 예방
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} ", FALSE);
if (!$row['cnt']) {
    alert_close('존재하는 게시판이 아닙니다.');
}
if (!$write['wr_link' . $no]) {
    alert_close('링크가 없습니다.');
}
$ss_name = 'ss_link_' . $bo_table . '_' . $wr_id . '_' . $no;
if (empty($_SESSION[$ss_name])) {
    $sql = " update {$g5['write_prefix']}{$bo_table} set wr_link{$no}_hit = wr_link{$no}_hit + 1 where wr_id = '{$wr_id}' ";
    sql_query($sql);
    set_session($ss_name, true);
}
goto_url(set_http($write['wr_link' . $no]));
Esempio n. 4
0
    $list[$i] = $row;
    $loop =& $list[$i]['data'];
    if (!$orderby) {
        $orderby = " bn_datetime desc ";
    }
    $sql2 = "select * from {$g5['eyoom_new']} where bo_table='{$row['bo_table']}' and wr_id = wr_parent order by {$orderby} limit 7";
    $res = sql_query($sql2, false);
    for ($k = 0; $row2 = sql_fetch_array($res); $k++) {
        $loop[$k] = $row2;
        // new 표시
        if ($row2['bn_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - 24 * 3600)) {
            $loop[$k]['new'] = true;
        }
        if (!$row2['wr_subject']) {
            $loop[$k]['wr_subject'] = conv_subject($row2['wr_content'], 30, '…');
            $loop[$k]['href'] = G5_BBS_URL . "/board.php?bo_table={$row2['bo_table']}&amp;wr_id={$row2['wr_id']}#c_{$row['wr_id']}";
        } else {
            $loop[$k]['wr_subject'] = conv_subject($row2['wr_subject'], 30, '…');
            $loop[$k]['wr_content'] = conv_subject($row2['wr_content'], 30, '…');
            $loop[$k]['href'] = G5_BBS_URL . "/board.php?bo_table={$row2['bo_table']}&amp;wr_id={$row2['wr_parent']}";
        }
        $loop[$k]['datetime'] = $row2['bn_datetime'];
    }
}
// Template define
$tpl->define_template('board', $eyoom['board_skin'], 'group.skin.html');
// Template assign
@(include EYOOM_INC_PATH . '/tpl.assign.php');
$tpl->print_($tpl_name);
// 이윰 테일 디자인 출력
@(include_once EYOOM_PATH . '/tail.php');
Esempio n. 5
0
    echo cut_str($row['bo_subject'], 20);
    ?>
</a></td>
            <td><a href="<?php 
    echo G5_BBS_URL;
    ?>
/board.php?bo_table=<?php 
    echo $row['bo_table'];
    ?>
&amp;wr_id=<?php 
    echo $row2['wr_id'];
    echo $comment_link;
    ?>
"><?php 
    echo $comment;
    echo conv_subject($row2['wr_subject'], 100);
    ?>
</a></td>
            <td class="td_mbname"><div><?php 
    echo $name;
    ?>
</div></td>
            <td class="td_datetime"><?php 
    echo $datetime;
    ?>
</td>
        </tr>

        <?php 
}
if ($i == 0) {
Esempio n. 6
0
if ($iq['iq_hp']) {
    ?>
    <tr>
        <th scope="row">휴대폰</th>
        <td><?php 
    echo hyphen_hp_number($iq['iq_hp']);
    ?>
</td>
    </tr>
    <?php 
}
?>
    <tr>
        <th scope="row"><label for="iq_subject">제목</label></th>
        <td><input type="text" name="iq_subject" value="<?php 
echo conv_subject($iq['iq_subject'], 120);
?>
" id="iq_subject" required class="frm_input required" size="95"></td>
    </tr>
    <tr>
        <th scope="row"><label for="iq_question">질문</label></th>
        <td><?php 
echo editor_html('iq_question', get_text($iq['iq_question'], 0));
?>
</td>
    </tr>
    <tr>
        <th scope="row"><label for="iq_answer">답변</label></th>
        <td><?php 
echo editor_html('iq_answer', get_text($iq['iq_answer'], 0));
?>
Esempio n. 7
0
    } else {
        if ($board[bo_download_level] > 1) {
            // 다운로드 포인트가 음수이고 회원의 포인트가 0 이거나 작다면
            if ($member[mb_point] + $board[bo_download_point] < 0) {
                alert("보유하신 포인트(" . number_format($member[mb_point]) . ")가 없거나 모자라서 다운로드(" . number_format($board[bo_download_point]) . ")가 불가합니다.\\n\\n포인트를 적립하신 후 다시 다운로드 해 주십시오.");
            }
            // 게시물당 한번만 차감하도록 수정
            insert_point($member[mb_id], $board[bo_download_point], "{$board['bo_subject']} {$wr_id} 파일 다운로드", $bo_table, $wr_id, "다운로드");
        }
    }
    // 다운로드 카운트 증가
    $sql = " update {$g4['board_file_table']} set bf_download = bf_download + 1 where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$no}' ";
    sql_query($sql);
    set_session($ss_name, TRUE);
}
$g4[title] = "{$group['gr_subject']} > {$board['bo_subject']} > " . conv_subject($write[wr_subject], 255) . " > 다운로드";
if (preg_match("/^utf/i", $g4[charset])) {
    $original = urlencode($file[bf_source]);
} else {
    $original = $file[bf_source];
}
@(include_once "{$board_skin_path}/download.tail.skin.php");
if (preg_match("/msie/i", $_SERVER[HTTP_USER_AGENT]) && preg_match("/5\\.5/", $_SERVER[HTTP_USER_AGENT])) {
    header("content-type: doesn/matter");
    header("content-length: " . filesize("{$filepath}"));
    header("content-disposition: attachment; filename=\"{$original}\"");
    header("content-transfer-encoding: binary");
} else {
    header("content-type: file/unknown");
    header("content-length: " . filesize("{$filepath}"));
    header("content-disposition: attachment; filename=\"{$original}\"");
Esempio n. 8
0
        <td><img src="<?php 
echo G5_URL;
?>
/shop/img/s_star<?php 
echo $is['is_score'];
?>
.png"> (<?php 
echo $is['is_score'];
?>
점)</td>
    </tr>
    <tr>
        <th scope="row"><label for="is_subject">제목</label></th>
        <td><input type="text" name="is_subject" required class="required frm_input" id="is_subject" size="100"
        value='<?php 
echo conv_subject($is['is_subject'], 120);
?>
'></td>
    </tr>
    <tr>
        <th scope="row">내용</th>
        <td><?php 
echo editor_html('is_content', get_text($is['is_content'], 0));
?>
</td>
    </tr>
    <tr>
        <th scope="row">확인</th>
        <td>
            <input type="radio" name="is_confirm" value="1" id="is_confirm_yes" <?php 
echo $is_confirm_yes;
Esempio n. 9
0
function mw_latest_mobile($skin_dir = "", $bo_tables, $rows = 10, $subject_len = 50, $is_img = 0, $minute = 0)
{
    global $g4, $mw, $mw_mobile;
    if (preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
        if (G5_IS_MOBILE) {
            $latest_skin_path = G5_THEME_MOBILE_PATH . '/' . G5_SKIN_DIR . '/latest/' . $match[1];
            if (!is_dir($latest_skin_path)) {
                $latest_skin_path = G5_THEME_PATH . '/' . G5_SKIN_DIR . '/latest/' . $match[1];
            }
            $latest_skin_url = str_replace(G5_PATH, G5_URL, $latest_skin_path);
        } else {
            $latest_skin_path = G5_THEME_PATH . '/' . G5_SKIN_DIR . '/latest/' . $match[1];
            $latest_skin_url = str_replace(G5_PATH, G5_URL, $latest_skin_path);
        }
        $skin_dir = $match[1];
    } else {
        if (G5_IS_MOBILE) {
            $latest_skin_path = G5_MOBILE_PATH . '/' . G5_SKIN_DIR . '/latest/' . $skin_dir;
            $latest_skin_url = G5_MOBILE_URL . '/' . G5_SKIN_DIR . '/latest/' . $skin_dir;
        } else {
            $latest_skin_path = G5_SKIN_PATH . '/latest/' . $skin_dir;
            $latest_skin_url = G5_SKIN_URL . '/latest/' . $skin_dir;
        }
    }
    $tmp_tables = explode(",", $bo_tables);
    $bo_tables = array();
    for ($i = 0, $j = 0; $i < count($tmp_tables); $i++) {
        $tmp_tables[$i] = trim($tmp_tables[$i]);
        if (!$tmp_tables[$i]) {
            continue;
        }
        $bo_tables[$j++] = $tmp_tables[$i];
    }
    $sql_tables = implode("','", $bo_tables);
    $file_tables = implode("-", $bo_tables);
    $file_tables = str_replace(":rand", "", $file_tables);
    $tab = null;
    $cache_file_tab = $g4['path'] . "/data/mw.cache/latest-mobile-{$file_tables}-list-{$rows}-{$is_img}-{$subject_len}";
    if (function_exists("mw_cache_read")) {
        //$tab = mw_cache_read($cache_file_tab, $minute);
    }
    $table_list = $bo_tables;
    $tmp_list = array();
    for ($i = 0; $i < count($bo_tables); $i++) {
        $tmp = explode(":", $bo_tables[$i]);
        $bo_table = $tmp[0];
        $tmp_list[] = $bo_table;
    }
    $bo_tables = $tmp_list;
    if (!$tab) {
        $tab = array();
        for ($i = 0; $i < count($table_list); $i++) {
            $list = array();
            $file = array();
            $is_rand = false;
            $tmp = explode(":", $table_list[$i]);
            $bo_table = $tmp[0];
            if ($tmp[1] == "rand") {
                $is_rand = true;
            }
            $tmp_write_table = $g4['write_prefix'] . $bo_table;
            $board = sql_fetch("select * from {$g4['board_table']} where bo_table = '{$bo_table}'");
            if ($is_img) {
                $file = mw_mobile_get_thumb($bo_table, $is_img, $is_rand);
                for ($k = 0, $m = count($file); $k < $m; ++$k) {
                    $sql = "select * ";
                    $sql .= "  from {$g4['write_prefix']}{$file[$k]['bo_table']} ";
                    $sql .= " where wr_id = '{$file[$k]['wr_id']}'";
                    $row = sql_fetch($sql);
                    $row['wr_subject'] = mw_counting_str($row['wr_subject']);
                    if (function_exists("mw_get_list")) {
                        $row = mw_get_list($row, $board, $latest_skin_path, $subject_len);
                    } else {
                        $row = get_list($row, $board, $latest_skin_path, $subject_len);
                    }
                    if ($row['wr_view_block']) {
                        $row['wr_subject'] = "보기가 차단된 게시물입니다.";
                    }
                    if ($row['wr_view_block']) {
                        $file[$k]['path'] = $latest_skin_url . "/img/lock.png";
                    }
                    if ($row['icon_secret']) {
                        $file[$k]['path'] = $latest_skin_url . "/img/lock.png";
                    }
                    if ($row['wr_key_password']) {
                        $file[$k]['path'] = $latest_skin_url . "/img/lock.png";
                    }
                    if ($row['wr_singo_lock']) {
                        $file[$k]['path'] = $latest_skin_url . "/img/lock.png";
                    }
                    $file[$k]['subject'] = conv_subject($row['wr_subject'], $subject_len, "…");
                    $file[$k]['wr_comment'] = $row['wr_comment'];
                    $file[$k]['wr_link1'] = $row['wr_link1'];
                }
                if (count($file) < $is_img) {
                    for ($j = count($file); $j < $is_img; $j++) {
                        $file[$j]['path'] = $latest_skin_url . "/img/noimage.gif";
                        $file[$j]['subject'] = "...";
                        $file[$j]['href'] = "#";
                    }
                }
            }
            $noids = array();
            for ($k = 0; $k < count($file); $k++) {
                $noids[] = $file[$k]['wr_id'];
            }
            $noids = implode("','", $noids);
            $sql = " select * from {$tmp_write_table} ";
            $sql .= "  where wr_is_comment = 0 ";
            $sql .= "    and wr_id not in ('{$noids}') ";
            if ($is_rand) {
                $sql .= "  order by rand() ";
            } else {
                $sql .= "  order by wr_num asc ";
            }
            $sql .= "  limit " . $rows;
            $qry = sql_query($sql);
            for ($j = 0; $row = sql_fetch_array($qry); $j++) {
                $row['wr_subject'] = mw_counting_str($row['wr_subject']);
                if (function_exists("mw_get_list")) {
                    $list[$j] = mw_get_list($row, $board, $latest_skin_path, $subject_len);
                } else {
                    if ($row['wr_view_block']) {
                        $row['wr_subject'] = "보기가 차단된 게시물입니다.";
                    }
                    $list[$j] = get_list($row, $board, $latest_skin_path, $subject_len);
                }
                $list[$j]['content'] = $list[$i]['wr_content'] = "";
                $list[$j]['href'] = G5_BBS_URL . "/board.php?bo_table={$bo_table}&wr_id={$list[$j]['wr_id']}";
            }
            if (!$j) {
                for ($j = 0; $j < $rows; $j++) {
                    if (!$board) {
                        $board = array();
                        $board['bo_subject'] = "none";
                    }
                    $list[$j]['bo_subject'] = $board['bo_subject'];
                    $list[$j]['subject'] = cut_str("게시물이 없어요.", $subject_len);
                    $list[$j]['href'] = "#";
                }
            }
            $tab[$bo_table] = $list;
            $tab[$bo_table]['board'] = $board;
            $tab[$bo_table]['file'] = $file;
        }
        if (function_exists("mw_cache_write")) {
            mw_cache_write($cache_file_tab, $tab);
        }
    }
    ob_start();
    include $latest_skin_path . "/latest.skin.php";
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
Esempio n. 10
0
	<input type="hidden" name="ca_id" value="<?php 
echo $ca_id;
?>
">
	<input type="hidden" name="qrows" value="<?php 
echo $qrows;
?>
">
	<input type="hidden" name="page" value="<?php 
echo $page;
?>
">

	<div class="panel panel-default">
		<div class="panel-heading"><h4><i class="fa fa-question-circle fa-lg"></i> <?php 
echo conv_subject($qa['iq_subject'], 120);
?>
</h4></div>
		<div class="panel-body">
			<p class="text-muted">
				<i class="fa fa-user"></i> <?php 
echo $qa['name'];
?>
				<?php 
if ($qa['iq_email']) {
    ?>
					&nbsp; &nbsp;
					<i class="fa fa-envelope"></i> <?php 
    echo get_text($qa['iq_email']);
    ?>
				<?php 
Esempio n. 11
0
        }
    }
    $switcher = $_switcher[$theme];
}
// SNS용 이미지/제목/내용 추가 메타태그
if ($bo_table && $wr_id || $it_id) {
    if ($bo_table && $wr_id) {
        $head_title = strip_tags(conv_subject($write['wr_subject'], 255)) . ' > ' . $board['bo_subject'] . ' | ' . $config['cf_title'];
        $first_image = get_list_thumbnail($bo_table, $wr_id, 600, 0);
        $sns_image = $first_image['src'];
        $target_url = G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id;
        $contents = cut_str(trim(str_replace(array("\r\n", "\r", "\n"), '', strip_tags(preg_replace("/\\?/", "", $write['wr_content'])))), 200, '…');
    }
    if ($it_id) {
        $sitem = sql_fetch("select * from {$g5['g5_shop_item_table']} where it_id = '" . $it_id . "'");
        $head_title = strip_tags(conv_subject($sitem['it_name'], 255)) . ' | ' . $config['cf_title'];
        $sns_image = G5_DATA_URL . '/item/' . $sitem['it_img1'];
        $target_url = G5_SHOP_URL . '/item.php?it_id=' . $it_id;
        $contents = cut_str(trim(str_replace(array("\r\n", "\r", "\n"), '', strip_tags(preg_replace("/\\?/", "", $sitem['it_explan'])))), 200, '…');
    }
    $config['cf_add_meta'] .= '
			<meta property="og:id" content="' . G5_URL . '" />
			<meta property="og:url" content="' . $target_url . '" />
			<meta property="og:type" content="article" />
			<meta property="og:title" content="' . preg_replace('/"/', '', $head_title) . '" />
			<meta property="og:site_name" content="' . $config['cf_title'] . '" />
			<meta property="og:description" content="' . $contents . '"/>
			<meta property="og:image" content="' . $sns_image . '" />
		';
}
// Eyoom Core Path
Esempio n. 12
0
        } else {
            if ($is_guest && $board['bo_read_level'] == 1 && $write['wr_ip'] == $_SERVER['REMOTE_ADDR']) {
                // 비회원이면서 읽기레벨이 1이고 등록된 아이피가 같다면 자신의 글이므로 통과
            } else {
                // 글읽기 포인트가 설정되어 있다면
                if ($config['cf_use_point'] && $board['bo_read_point'] && $member['mb_point'] + $board['bo_read_point'] < 0) {
                    alert('보유하신 포인트(' . number_format($member['mb_point']) . ')가 없거나 모자라서 글읽기(' . number_format($board['bo_read_point']) . ')가 불가합니다.\\n\\n포인트를 모으신 후 다시 글읽기 해 주십시오.');
                }
                insert_point($member['mb_id'], $board['bo_read_point'], (G5_IS_MOBILE && $board['bo_mobile_subject'] ? $board['bo_mobile_subject'] : $board['bo_subject']) . ' ' . $wr_id . ' 글읽기', $bo_table, $wr_id, '읽기');
            }
        }
        set_session($ss_name, TRUE);
    }
    $is_seometa = 'view';
    //SEO
    $g5['title'] = strip_tags(conv_subject($write['wr_subject'], 255)) . " > " . (G5_IS_MOBILE && $board['bo_mobile_subject'] ? $board['bo_mobile_subject'] : $board['bo_subject']);
} else {
    if ($member['mb_level'] < $board['bo_list_level']) {
        if ($member['mb_id']) {
            alert('목록을 볼 권한이 없습니다.', G5_URL);
        } else {
            alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?' . $qstr . '&url=' . urlencode(G5_BBS_URL . '/board.php?bo_table=' . $bo_table . ($qstr ? '&amp;' : '')));
        }
    }
    // 본인확인을 사용한다면
    if ($config['cf_cert_use'] && !$is_admin) {
        // 인증된 회원만 가능
        if ($board['bo_use_cert'] != '' && $is_guest) {
            alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id=' . $wr_id . $qstr . '&amp;url=' . urlencode(G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id . $qstr));
        }
        if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
Esempio n. 13
0
if ($page == "") {
    $page = 1;
}
// 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows;
// 시작 열을 구함
$sql = "select *\n        {$sql_common}\n        {$sql_search}\n        {$sql_order}\n        limit {$from_record}, {$rows} ";
$qry = sql_query($sql);
$list = array();
for ($i = 0; $row = sql_fetch_array($qry); ++$i) {
    $list[$i] = mw_moa_row($row);
    $row2 = sql_fetch("select wr_subject from {$g4['write_prefix']}{$row['bo_table']} where wr_id = '{$row['wr_parent']}'", false);
    if (!$row2) {
        $list[$i]['msg'] = "삭제되었습니다.";
    }
    $list[$i]['subject'] = conv_subject($row2['wr_subject'], 30, "…");
    if (function_exists("mw_builder_reg_str")) {
        $list[$i]['subject'] = mw_builder_reg_str($list[$i]['subject']);
    } else {
        if ($member['mb_id']) {
            $list[$i]['subject'] = str_replace("{닉네임}", $member['mb_nick'], $list[$i]['subject']);
            $list[$i]['subject'] = str_replace("{별명}", $member['mb_nick'], $list[$i]['subject']);
        } else {
            $list[$i]['subject'] = str_replace("{닉네임}", "회원", $list[$i]['subject']);
            $list[$i]['subject'] = str_replace("{별명}", "회원", $list[$i]['subject']);
        }
    }
    $board = sql_fetch("select bo_subject from {$g4['board_table']} where bo_table = '{$row['bo_table']}' ");
    $list[$i]['msg'] = preg_replace("/^/", "<span class='board'>{$board['bo_subject']}</span> 게시판에 ", $list[$i]['msg']);
    $list[$i]['msg'] = preg_replace("/게시물에/", "게시물 '<span class='subject'>{$list[$i]['subject']}</span>' 에", $list[$i]['msg']);
}
Esempio n. 14
0
if (!$page_rows) {
    $page_rows = $config['cf_page_rows'];
}
$total_page = ceil($total_count / $page_rows);
// 전체 페이지 계산
$from_record = ($page - 1) * $page_rows;
// 시작 열을 구함
$sql = "select * {$sql_common} {$sql_order} limit {$from_record}, {$page_rows}";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $list[$i] = $row;
    if (preg_match('/secret/', $row['wr_option']) && ($is_member && !$is_admin && $member['mb_id'] != $row['mb_id'] || !$is_member)) {
        $list[$i]['wr_subject'] = '비밀글입니다.';
        $list[$i]['wr_content'] = '비밀글입니다.';
    } else {
        $list[$i]['wr_subject'] = conv_subject($row['wr_subject'], 100, '…');
        $list[$i]['wr_content'] = cut_str(stripcslashes($row['wr_content']), 300, '…');
        // 옵션으로 이미지 가져오기
        $latest->img_width = 500;
        $latest->img_height = 0;
        $list[$i]['image'] = $latest->latest_image($row, 'n');
    }
    $list[$i]['href'] = G5_BBS_URL . "/board.php?bo_table={$row['bo_table']}&amp;wr_id={$row['wr_id']}";
    $list[$i]['wr_hit'] = $row['wr_hit'];
    $list[$i]['datetime'] = $row['tw_datetime'];
    $wr_1 = $row['wr_1'];
    // new 표시
    if ($list[$i]['datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - 2 * 3600)) {
        $list[$i]['new'] = true;
    }
    // 레벨정보
Esempio n. 15
0
        $comment = "[코] ";
        $comment_link = "#c_{$row[wr_id]}";
        $row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
        $row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
        $name = get_sideview($row3['mb_id'], cut_str($row3['wr_name'], $config['cf_cut_name']), $row3['wr_email'], $row3['wr_homepage']);
        // 당일인 경우 시간으로 표시함
        $datetime = substr($row3['wr_datetime'], 0, 10);
        $datetime2 = $row3['wr_datetime'];
        if ($datetime == $g4['time_ymd']) {
            $datetime2 = substr($datetime2, 11, 5);
        } else {
            $datetime2 = substr($datetime2, 5, 5);
        }
    }
    $list = $i % 2;
    echo "\n    <tr class='list{$list} col1 ht center'>\n        <td class='small'><a href='{$g4['bbs_path']}/new.php?gr_id={$row['gr_id']}'>" . cut_str($row['gr_subject'], 10) . "</a></td>\n        <td class='small'><a href='{$g4['bbs_path']}/board.php?bo_table={$row['bo_table']}'>" . cut_str($row['bo_subject'], 20) . "</a></td>\n        <td align='left' style='word-break:break-all;'>&nbsp;<a href='{$g4['bbs_path']}/board.php?bo_table={$row['bo_table']}&amp;wr_id={$row2['wr_id']}{$comment_link}'>{$comment}" . conv_subject($row2['wr_subject'], 100) . "</a></td>\n        <td>{$name}</td>\n        <td>{$datetime}</td>\n    </tr> ";
}
if ($i == 0) {
    echo "<tr><td colspan='{$colspan}' class='nodata'>자료가 없습니다.</td></tr>";
}
echo "</tbody>";
echo "</table>";
?>



<?php 
$sql_common = " from {$g4['point_table']} ";
$sql_search = " where (1) ";
$sql_order = " order by po_id desc ";
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
Esempio n. 16
0
function get_list($write_row, $board, $skin_path, $subject_len = 40)
{
    global $g4, $config;
    global $qstr, $page;
    // 배열전체를 복사
    $list = $write_row;
    unset($write_row);
    $list['is_notice'] = preg_match("/[^0-9]{0,1}" . $list['wr_id'] . "[\r]{0,1}/", $board['bo_notice']);
    if ($subject_len) {
        $list['subject'] = conv_subject($list['wr_subject'], $subject_len, "…");
    } else {
        $list['subject'] = conv_subject($list['wr_subject'], $board['bo_subject_len'], "…");
    }
    // 목록에서 내용 미리보기 사용한 게시판만 내용을 변환함 (속도 향상) : kkal3(커피)님께서 알려주셨습니다.
    if ($board['bo_use_list_content']) {
        $html = 0;
        if (strstr($list['wr_option'], "html1")) {
            $html = 1;
        } else {
            if (strstr($list['wr_option'], "html2")) {
                $html = 2;
            }
        }
        $list['content'] = conv_content($list['wr_content'], $html);
    }
    $list['comment_cnt'] = "";
    if ($list['wr_comment']) {
        $list['comment_cnt'] = "({$list['wr_comment']})";
    }
    // 당일인 경우 시간으로 표시함
    $list['datetime'] = substr($list['wr_datetime'], 0, 10);
    $list['datetime2'] = $list['wr_datetime'];
    if ($list['datetime'] == $g4['time_ymd']) {
        $list['datetime2'] = substr($list['datetime2'], 11, 5);
    } else {
        $list['datetime2'] = substr($list['datetime2'], 5, 5);
    }
    // 4.1
    $list['last'] = substr($list['wr_last'], 0, 10);
    $list['last2'] = $list['wr_last'];
    if ($list['last'] == $g4['time_ymd']) {
        $list['last2'] = substr($list['last2'], 11, 5);
    } else {
        $list['last2'] = substr($list['last2'], 5, 5);
    }
    $list['wr_homepage'] = get_text(addslashes($list['wr_homepage']));
    if ($board['bo_use_sideview']) {
        $list['name'] = get_sideview($list['mb_id'], $list['wr_name'], $list['wr_email'], $list['wr_homepage']);
    } else {
        $list['name'] = "<span class='" . ($list['mb_id'] ? 'member' : 'guest') . "'>{$list['wr_name']}</span>";
    }
    $reply = $list['wr_reply'];
    $list['reply'] = "";
    if (strlen($reply) > 0) {
        for ($k = 0; $k < strlen($reply); $k++) {
            $list['reply'] .= "<span class='reply'></span>";
        }
    }
    $list['icon_reply'] = "";
    if ($list['reply']) {
        $list['icon_reply'] = "<img src='{$skin_path}/img/icon_reply.gif' alt='' class='icon_reply' />";
    }
    $list['icon_link'] = "";
    if ($list['wr_link1'] || $list['wr_link2']) {
        $list['icon_link'] = "<img src='{$skin_path}/img/icon_link.gif' alt='' />";
    }
    // 분류명 링크
    $list['ca_name_href'] = "{$g4['bbs_path']}/board.php?bo_table={$board['bo_table']}&amp;sca=" . urlencode($list['ca_name']);
    $list['href'] = "{$g4['bbs_path']}/board.php?bo_table={$board['bo_table']}&amp;wr_id={$list['wr_id']}" . $qstr;
    $list['comment_href'] = $list['href'];
    $list['icon_new'] = "";
    if ($list['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - $board['bo_new'] * 3600)) {
        $list['icon_new'] = "<img src='{$skin_path}/img/icon_new.gif' alt='' />";
    }
    $list['icon_hot'] = "";
    if ($list['wr_hit'] >= $board['bo_hot']) {
        $list['icon_hot'] = "<img src='{$skin_path}/img/icon_hot.gif' alt='' />";
    }
    $list['icon_secret'] = "";
    if (strstr($list['wr_option'], "secret")) {
        $list['icon_secret'] = "<img src='{$skin_path}/img/icon_secret.gif' alt='' />";
    }
    // 링크
    for ($i = 1; $i <= $g4['link_count']; $i++) {
        $list['link'][$i] = set_http(get_text($list["wr_link{$i}"]));
        $list['link_href'][$i] = "{$g4['bbs_path']}/link.php?bo_table={$board['bo_table']}&amp;wr_id={$list['wr_id']}&amp;no={$i}" . $qstr;
        $list['link_hit'][$i] = (int) $list["wr_link{$i}_hit"];
    }
    // 가변 파일
    if ($list['wr_file']) {
        $list['file'] = get_file($board['bo_table'], $list['wr_id'], $board);
    }
    if ($list['file']['count']) {
        $list['icon_file'] = "<img src='{$skin_path}/img/icon_file.gif' alt='' />";
    }
    return $list;
}
Esempio n. 17
0
<input type="hidden" name="page" value="<?php 
echo $page;
?>
">
<label for="ev_id" class="sound_only">이벤트</label>
<select name="ev_id" id="ev_id" action="<?php 
echo $_SERVER['SCRIPT_NAME'];
?>
">
    <?php 
// 이벤트 옵션처리
$event_option = "<option value=''>이벤트를 선택하세요</option>";
$sql1 = " select ev_id, ev_subject from {$g5['g5_shop_event_table']} order by ev_id desc ";
$result1 = sql_query($sql1);
while ($row1 = mysql_fetch_array($result1)) {
    $event_option .= '<option value="' . $row1['ev_id'] . '" ' . get_selected($ev_id, $row1['ev_id']) . ' >' . conv_subject($row1['ev_subject'], 20, "…") . '</option>';
}
echo $event_option;
?>
</select>
<input type="submit" value="이동" class="btn_submit">

</form>

<form name="flist" class="local_sch01 local_sch" autocomplete="off">
<input type="hidden" name="page" value="<?php 
echo $page;
?>
">
<input type="hidden" name="ev_id" value="<?php 
echo $ev_id;
Esempio n. 18
0
        // 자신의 글이면 통과
        if ($write['mb_id'] && $write['mb_id'] == $member['mb_id']) {
        } else {
            if ($is_guest && $board['bo_read_level'] == 1 && $write['wr_ip'] == $_SERVER['REMOTE_ADDR']) {
                // 비회원이면서 읽기레벨이 1이고 등록된 아이피가 같다면 자신의 글이므로 통과
            } else {
                // 글읽기 포인트가 설정되어 있다면
                if ($config['cf_use_point'] && $board['bo_read_point'] && $member['mb_point'] + $board['bo_read_point'] < 0) {
                    alert('보유하신 포인트(' . number_format($member['mb_point']) . ')가 없거나 모자라서 글읽기(' . number_format($board['bo_read_point']) . ')가 불가합니다.\\n\\n포인트를 모으신 후 다시 글읽기 해 주십시오.');
                }
                insert_point($member['mb_id'], $board['bo_read_point'], "{$board['bo_subject']} {$wr_id} 글읽기", $bo_table, $wr_id, '읽기');
            }
        }
        set_session($ss_name, TRUE);
    }
    $g5['title'] = strip_tags(conv_subject($write['wr_subject'], 255)) . " > " . $board['bo_subject'];
} else {
    if ($member['mb_level'] < $board['bo_list_level']) {
        if ($member['mb_id']) {
            alert('목록을 볼 권한이 없습니다.', G5_URL);
        } else {
            alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?' . $qstr . '&url=' . urlencode(G5_BBS_URL . '/board.php?bo_table=' . $bo_table . ($qstr ? '&amp;' : '')));
        }
    }
    // 본인확인을 사용한다면
    if ($config['cf_cert_use'] && !$is_admin) {
        // 인증된 회원만 가능
        if ($board['bo_use_cert'] != '' && $is_guest) {
            alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id=' . $wr_id . $qstr . '&amp;url=' . urlencode(G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id . $qstr));
        }
        if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
Esempio n. 19
0
 private function latest_memo_assign($where, $max = 5, $cut_subject = 20, $orderby = '')
 {
     global $g5, $member, $eb;
     if (!$orderby) {
         $orderby = " a.me_id desc ";
     }
     $sql = "select a.*, b.mb_id, b.mb_nick from {$g5['memo_table']} as a left join {$g5['member_table']} as b on (a.me_send_mb_id = b.mb_id) where {$where} order by {$orderby} limit {$max}";
     $result = sql_query($sql, false);
     for ($i = 0; $row = sql_fetch_array($result); $i++) {
         $list[$i] = $row;
         $list[$i]['mb_name'] = $row['mb_nick'];
         $list[$i]['datetime'] = $row['me_send_datetime'];
         $list[$i]['href'] = G5_BBS_URL . '/memo_view.php?me_id=' . $row['me_id'] . '&amp;kind=recv';
         $list[$i]['memo'] = conv_subject($row['me_memo'], $cut_subject, '…');
         $list[$i]['mb_photo'] = $eb->mb_photo($row['mb_id']);
         $list[$i]['is_read'] = $row['me_read_datetime'] == '0000-00-00 00:00:00' ? false : true;
     }
     return $list;
 }
Esempio n. 20
0
        <div class="ul_01 ul_wrap">
            <ul>
            <?php 
$sql = " select * from {$g5['g5_shop_item_use_table']}\n                      where is_confirm = 0\n                      order by is_id desc\n                      limit {$max_limit} ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $sql1 = " select * from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
    $row1 = sql_fetch($sql1);
    $name = get_sideview($row['mb_id'], get_text($row['is_name']), $row1['mb_email'], $row1['mb_homepage']);
    ?>
                <li>
                    <a href="./itemuseform.php?w=u&amp;is_id=<?php 
    echo $row['is_id'];
    ?>
" class="ps_link"><?php 
    echo conv_subject($row['is_subject'], 40);
    ?>
</a>
                    <?php 
    echo $name;
    ?>
                </li>
            <?php 
}
if ($i == 0) {
    echo '<li class="empty_list">자료가 없습니다.</li>';
}
?>
            </ul>
        </div>
Esempio n. 21
0
<!-- 상품문의 목록 시작 { -->
<section id="sit_qa_list">
    <div id="sit_qa_table">
        <ul>
            <li class="sit_qa_num">순번</li>
            <li class="sit_qa_title">질문제목</li>
            <li class="sit_qa_ask">답변</li>
        </ul>
    </div>
    <?php 
$thumbnail_width = 500;
$iq_num = $total_count - ($page - 1) * $rows;
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $iq_name = get_text($row['iq_name']);
    $iq_subject = conv_subject($row['iq_subject'], 50, "…");
    $is_secret = false;
    if ($row['iq_secret']) {
        $iq_subject .= ' <img src="' . G5_SHOP_SKIN_URL . '/img/icon_secret.gif" alt="비밀글">';
        if ($is_admin || $member['mb_id'] == $row['mb_id']) {
            $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width);
        } else {
            $iq_question = '비밀글로 보호된 문의입니다.';
            $is_secret = true;
        }
    } else {
        $iq_question = get_view_thumbnail(conv_content($row['iq_question'], 1), $thumbnail_width);
    }
    $iq_time = substr($row['iq_time'], 2, 8);
    $hash = md5($row['iq_id'] . $row['iq_time'] . $row['iq_ip']);
    $iq_stats = '';
Esempio n. 22
0
<?php

include_once "./_common.php";
$html_title = "{$group['gr_subject']} > {$board['bo_subject']} > " . conv_subject($write[wr_subject], 255) . " > 링크";
if (!($bo_table && $wr_id && $no)) {
    alert_close("값이 제대로 넘어오지 않았습니다.");
}
// SQL Injection 예방
$row = sql_fetch(" select count(*) as cnt from {$g4[write_prefix]}{$bo_table} ", FALSE);
if (!$row[cnt]) {
    alert_close("존재하는 게시판이 아닙니다.");
}
if (!$write["wr_link{$no}"]) {
    alert_close("링크가 없습니다.");
}
$ss_name = "ss_link_{$bo_table}_{$wr_id}_{$no}";
if (empty($_SESSION[$ss_name])) {
    $sql = " update {$g4[write_prefix]}{$bo_table} set wr_link{$no}_hit = wr_link{$no}_hit + 1 where wr_id = '{$wr_id}' ";
    sql_query($sql);
    set_session($ss_name, true);
}
goto_url(set_http($write["wr_link{$no}"]));
Esempio n. 23
0
 // 전체 페이지 계산
 if (!$page) {
     $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) {
Esempio n. 24
0
                }
                // 게시물당 한번만 차감하도록 수정
                insert_point($member['mb_id'], $board['bo_download_point'], "{$board['bo_subject']} {$wr_id} 파일 다운로드", $bo_table, $wr_id, "다운로드");
            }
        }
    }
    if ($is_download) {
        // 다운로드 카운트 증가
        $sql = " update {$g5['board_file_table']} set bf_download = bf_download + 1 where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and bf_no = '{$no}' ";
        sql_query($sql);
        sql_query(" update {$write_table} set as_download = as_download + 1 where wr_id = '{$wr_id}' ", false);
        sql_query(" update {$g5['board_new_table']} set as_download = as_download + 1 where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' ", false);
    }
    set_session($ss_name, TRUE);
}
$g5['title'] = '다운로드 &gt; ' . conv_subject($write['wr_subject'], 255);
//$original = urlencode($file['bf_source']);
$original = iconv('utf-8', 'euc-kr', $file['bf_source']);
// SIR 잉끼님 제안코드
@(include_once $board_skin_path . '/download.tail.skin.php');
if (preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\\.5/", $_SERVER['HTTP_USER_AGENT'])) {
    header("content-type: doesn/matter");
    header("content-length: " . filesize("{$filepath}"));
    header("content-disposition: attachment; filename=\"{$original}\"");
    header("content-transfer-encoding: binary");
} else {
    header("content-type: file/unknown");
    header("content-length: " . filesize("{$filepath}"));
    header("content-disposition: attachment; filename=\"{$original}\"");
    header("content-description: php generated data");
}
Esempio n. 25
0
    if (!get_session($ss_name)) {
        sql_query(" update {$write_table} set wr_hit = wr_hit + 1 where wr_id = '{$wr_id}' ");
        // 자신의 글이면 통과
        if ($write[mb_id] && $write[mb_id] == $member[mb_id]) {
        } else {
            // 회원이상 글읽기가 가능하다면
            if ($board[bo_read_level] > 1) {
                if ($member[mb_point] + $board[bo_read_point] < 0) {
                    alert_close("보유하신 포인트(" . number_format($member[mb_point]) . ")가 없거나 모자라서 글읽기(" . number_format($board[bo_read_point]) . ")가 불가합니다.\\n\\n포인트를 모으신 후 다시 글읽기 해 주십시오.");
                }
                insert_point($member[mb_id], $board[bo_read_point], "{$board['bo_subject']} {$wr_id} 글읽기", $bo_table, $wr_id, '읽기');
            }
        }
        set_session($ss_name, TRUE);
    }
    $g4[title] = "{$group['gr_subject']} > {$board['bo_subject']} > " . strip_tags(conv_subject($write[wr_subject], 255));
}
include_once "{$g4['path']}/head.sub.php";
$width = $board[bo_table_width];
if ($width <= 100) {
    $width .= '%';
}
// IP보이기 사용 여부
$ip = "";
$is_ip_view = $board[bo_use_ip_view];
if ($is_admin) {
    $is_ip_view = true;
    $ip = $write[wr_ip];
} else {
    // 관리자가 아니라면 IP 주소를 감춘후 보여줍니다.
    $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $write[wr_ip]);
Esempio n. 26
0
    alert('잘못된 접근입니다.');
}
$sql = " select qa_subject, qa_file{$no}, qa_source{$no} from {$g5['qa_content_table']} where qa_id = '{$qa_id}' ";
$file = sql_fetch($sql);
if (!$file['qa_file' . $no]) {
    alert_close('파일 정보가 존재하지 않습니다.');
}
if ($is_guest) {
    alert('다운로드 권한이 없습니다.\\n회원이시라면 로그인 후 이용해 보십시오.', G5_BBS_URL . '/login.php?url=' . urlencode(G5_BBS_URL . '/qaview.php?qa_id=' . $qa_id));
}
$filepath = G5_DATA_PATH . '/qa/' . $file['qa_file' . $no];
$filepath = addslashes($filepath);
if (!is_file($filepath) || !file_exists($filepath)) {
    alert('파일이 존재하지 않습니다.');
}
$g5['title'] = '다운로드 &gt; ' . conv_subject($file['qa_subject'], 255);
$original = urlencode($file['qa_source' . $no]);
if (preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\\.5/", $_SERVER['HTTP_USER_AGENT'])) {
    header("content-type: doesn/matter");
    header("content-length: " . filesize("{$filepath}"));
    header("content-disposition: attachment; filename=\"{$original}\"");
    header("content-transfer-encoding: binary");
} else {
    header("content-type: file/unknown");
    header("content-length: " . filesize("{$filepath}"));
    header("content-disposition: attachment; filename=\"{$original}\"");
    header("content-description: php generated data");
}
header("pragma: no-cache");
header("expires: 0");
flush();