コード例 #1
0
ファイル: apms.new.update.php プロジェクト: peb317/gbamn
 @ini_set('memory_limit', '-1');
 // 새글 수정하기
 $pa = array();
 $fa = array();
 $ea = array();
 $result = sql_query(" select bn_id, bo_table, wr_id, wr_parent from {$g5['board_new_table']} where 1 order by bn_id desc ", false);
 for ($i = 0; $row = sql_fetch_array($result); $i++) {
     $tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
     if ($row['wr_parent'] == $row['wr_id']) {
         //글
         $pa = sql_fetch(" select wr_id, wr_reply, wr_content, wr_datetime, wr_option, wr_comment, wr_hit, wr_good, wr_nogood, wr_link1, wr_link2, (wr_link1_hit + wr_link2_hit) as as_link, as_poll, as_type, as_publish, as_extra, as_re_mb, as_update from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ", false);
         $fa = sql_fetch(" select sum(bf_download) as download from {$g5['board_file_table']} where bo_table = '{$row['bo_table']}' and wr_id = '{$row['wr_id']}' ", false);
         $ea = sql_fetch(" select count(*) as event from {$g5['apms_event']} where bo_table = '{$row['bo_table']}' and wr_id = '{$row['wr_id']}' ", false);
         $as_secret = strstr($pa['wr_option'], 'secret') ? 1 : 0;
         $pa['chk_img'] = true;
         $p_image = apms_wr_thumbnail($row['bo_table'], $pa, 0, 0);
         // 동영상글 체크 - 링크 URL만 체크
         $p_video = false;
         if ($pa['wr_link1']) {
             // Link1
             $p_video = apms_video($pa['wr_link1']) ? true : false;
         }
         if ($pa['wr_link2'] && !$p_video) {
             // Link2
             $p_video = apms_video($pa['wr_link2']) ? true : false;
         }
         // 글타입정리
         if ($p_image && $p_video) {
             //이미지도 있고, 비디오도 있으면
             $as_list = 3;
         } else {
コード例 #2
0
ファイル: board.post.skin.php プロジェクト: peb317/gbamn
echo $gr_id;
?>
";
</script>

<table class="div-table table">
<tbody>
<tr class="active">
	<th class="text-center" scope="col">번호</th>
	<th class="text-center" scope="col">이미지</th>
	<th class="text-center" scope="col">제목</th>
	<th class="text-center" scope="col">날짜</th>
</tr>
<?php 
for ($i = 0; $i < count($list); $i++) {
    $list[$i]['img'] = apms_wr_thumbnail($list[$i]['bo_table'], $list[$i], 40, 40, false, true);
    // 썸네일
    ?>
	<tr>
		<td class="text-center font-11 en">
			<?php 
    echo $list[$i]['num'];
    ?>
		</td>
		<td class="text-center">
			<a href="<?php 
    echo $list[$i]['href'];
    ?>
" target="_blank">
				<?php 
    if ($list[$i]['img']['src']) {
コード例 #3
0
ファイル: apms.lib.php プロジェクト: peb317/gbamn
function thema_widget_write_list($type, $bo_table, $row, $new = 24, $thumb_width = 0, $thumb_height = 0, $is_create = false, $is_crop = true, $crop_mode = 'center', $is_sharpen = true, $um_value = '80/0.5/3')
{
    global $g5, $is_admin;
    // 배열전체를 복사
    $list = $row;
    unset($row);
    $list['bo_table'] = $bo_table;
    $list['update'] = 0;
    if ($type == 'tag') {
        $list['new'] = $list['lastdate'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - $new * 3600) ? true : false;
        $list['date'] = strtotime($list['lastdate']);
        $list['name'] = $list['tag'];
        $list['href'] = G5_BBS_URL . '/tag.php?q=' . urlencode($list['tag']);
        $list['comment'] = $list['cnt'];
    } else {
        if ($type == 'response') {
            $list['subject'] = get_text($list['wr_subject']);
            $list['new'] = $list['regdate'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - $new * 3600) ? true : false;
            $list['date'] = strtotime($list['regdate']);
            $list['name'] = $list['my_name'];
            $list['href'] = G5_BBS_URL . '/response.php?id=' . $list['id'];
            $list['photo'] = apms_photo_url($list['my_id']);
            //회원사진
            $list['comment'] = $list['reply_cnt'] + $list['comment_cnt'] + $list['comment_reply_cnt'] + $list['use_cnt'] + $list['qa_cnt'] + $list['good_cnt'] + $list['nogood_cnt'];
        } else {
            if ($type == 'qa') {
                $list['subject'] = get_text($list['qa_subject']);
                $list['new'] = $list['qa_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - $new * 3600) ? true : false;
                $list['date'] = strtotime($list['qa_datetime']);
                $list['name'] = $list['qa_name'];
                $list['href'] = G5_BBS_URL . '/qaview.php?qa_id=' . $list['qa_id'];
                $list['photo'] = apms_photo_url($list['mb_id']);
                //회원사진
                $list['category'] = $list['qa_category'];
                $list['comment'] = $list['qa_status'] ? 1 : 0;
            } else {
                $list['new'] = $list['wr_datetime'] >= date("Y-m-d H:i:s", G5_SERVER_TIME - $new * 3600) ? true : false;
                $list['secret'] = strstr($list['wr_option'], "secret") ? true : false;
                $list['date'] = strtotime($list['wr_datetime']);
                $list['photo'] = apms_photo_url($list['mb_id']);
                //회원사진
                $list['name'] = $list['wr_name'];
                $list['category'] = $list['ca_name'];
                $list['hit'] = $list['wr_hit'];
                $list['good'] = $list['wr_good'];
                $list['nogood'] = $list['wr_nogood'];
                $list['is_lock'] = $list['as_shingo'] < 0 ? true : false;
                if ($type == 'comment') {
                    $list['reply_name'] = $list['wr_comment_reply'] && $list['as_re_name'] ? $list['as_re_name'] : '';
                    $list['comment'] = $list['wr_comment'] = 0;
                    if (!$list['secret']) {
                        $tmp_write_table = $g5['write_prefix'] . $bo_table;
                        $post = sql_fetch(" select wr_option from {$tmp_write_table} where wr_id = '{$list['wr_parent']}' ", false);
                        //원글 글옵션
                        $list['secret'] = strstr($post['wr_option'], "secret") ? true : false;
                    }
                    if ($list['secret']) {
                        $list['subject'] = $list['wr_subject'] = $list['wr_content'] = '비밀댓글입니다.';
                    } else {
                        if ($list['is_lock']) {
                            $list['subject'] = $list['wr_subject'] = $list['wr_content'] = '잠긴댓글입니다.';
                        } else {
                            $list['subject'] = apms_cut_text($list['wr_content'], 60);
                        }
                    }
                    $list['href'] = G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $list['wr_parent'] . '#c_' . $list['wr_id'];
                } else {
                    if ($type == 'post') {
                        $list['update'] = strtotime($list['as_update']);
                        $list['subject'] = get_text($list['wr_subject']);
                        $list['reply'] = strlen($list['wr_reply']);
                        $list['reply_name'] = $list['reply'] && $list['as_re_name'] ? $list['as_re_name'] : '';
                        $list['href'] = G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $list['wr_parent'];
                        $list['comment'] = $list['wr_comment'];
                        // 링크
                        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=" . $bo_table . "&amp;wr_id=" . $list['wr_id'] . "&amp;no=" . $i;
                            $list['link_hit'][$i] = (int) $list["wr_link{$i}_hit"];
                        }
                        if ($list['secret']) {
                            $list['wr_content'] = '비밀글입니다.';
                        } else {
                            if ($list['is_lock']) {
                                $list['wr_content'] = '잠긴글입니다.';
                            }
                        }
                        if (!$list['secret'] && !$list['is_lock'] && $thumb_width > 0) {
                            $list['img'] = apms_wr_thumbnail($bo_table, $list, $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value);
                        }
                    }
                }
                $list['content'] = $list['wr_content'];
                $list['wr_content'] = '';
            }
        }
    }
    return $list;
}
コード例 #4
0
ファイル: list.skin.pc.php プロジェクト: peb317/gbamn
" id="chk_wr_id_<?php 
        echo $i;
        ?>
">
			</td>
		<?php 
    }
    ?>
		<td class="text-center font-11">
			<?php 
    echo $num;
    ?>
		</td>
		<?php 
    if ($boset['img']) {
        $img = apms_wr_thumbnail($bo_table, $list[$i], 50, 50, false, true);
        // 썸네일
        $img['src'] = !$img['src'] && $boset['photo'] ? apms_photo_url($list[$i]['mb_id']) : $img['src'];
        // 회원사진
        ?>
			<td class="list-img text-center">
				<a href="<?php 
        echo $list[$i]['href'];
        ?>
">
					<?php 
        if ($img['src']) {
            ?>
						<img src="<?php 
            echo $img['src'];
            ?>
コード例 #5
0
ファイル: list.skin.php プロジェクト: peb317/gbamn
            $wr_icon = '<span class="wr-icon wr-hot"></span>';
            $wr_label = '<div class="label-cap bg-red">Hot</div>';
        } else {
            if ($list[$i]['icon_new']) {
                $wr_icon = '<span class="wr-icon wr-new"></span>';
                $wr_label = '<div class="label-cap bg-blue">New</div>';
            }
        }
    }
    if ($wr_id && $list[$i]['wr_id'] == $wr_id) {
        $wr_label = '<div class="label-cap bg-green">Now</div>';
    }
    // 썸네일
    $list[$i]['no_img'] = $board_skin_url . '/img/no-img.jpg';
    // No-Image
    $img = apms_wr_thumbnail($bo_table, $list[$i], $thumb_w, $thumb_h, false, true);
    ?>
				<?php 
    if ($k > 0 && $k % $board['bo_gallery_cols'] == 0) {
        ?>
					<div class="clearfix"></div>
				<?php 
    }
    ?>
				<div class="list-row">
					<div class="list-item">
						<?php 
    if ($thumb_h > 0) {
        ?>
							<div class="imgframe">
								<div class="img-wrap" style="padding-bottom:<?php 
コード例 #6
0
ファイル: board.comment.skin.php プロジェクト: peb317/gbamn
?>
		</select>
	</div>
</div>
<script>
	document.getElementById("gr_id").value = "<?php 
echo $gr_id;
?>
";
</script>

<section class="mypost-media">
	<?php 
$cmt_cnt = count($list);
for ($i = 0; $i < $cmt_cnt; $i++) {
    $list[$i]['img'] = apms_wr_thumbnail($list[$i]['bo_table'], $parent[$i], 80, 80, false, true);
    // 썸네일
    ?>
		<div class="media">
			<div class="photo pull-left">
				<?php 
    if ($list[$i]['img']['src']) {
        ?>
					<img src="<?php 
        echo $list[$i]['img']['src'];
        ?>
" alt="<?php 
        echo $list[$i]['img']['alt'];
        ?>
">
				<?php 
コード例 #7
0
ファイル: apms.meta.lib.php プロジェクト: peb317/gbamn
<?php

if (!defined('_GNUBOARD_')) {
    exit;
}
// 개별 페이지 접근 불가
$seometa = array();
if ($is_seometa == 'view') {
    //게시물
    $seometa['subject'] = apms_get_text($write['wr_subject']);
    $seometa['description'] = apms_cut_text($write['wr_content'], 200);
    $seometa['creator'] = apms_get_text($write['wr_name']);
    $seometa['keyword'] = apms_seo_keyword($write['as_tag'], $write['ca_name']);
    $seometa['type'] = 'article';
    $seometa['url'] = G5_BBS_URL . '/board.php?bo_table=' . $bo_table . '&amp;wr_id=' . $wr_id;
    $seometa['img'] = apms_wr_thumbnail($bo_table, $write, 0, 0);
    // 썸네일
} else {
    if ($is_seometa == 'it') {
        // 상품
        $seometa['subject'] = apms_get_text($it['it_name']);
        $seometa['description'] = $it['it_basic'] ? apms_get_text($it['it_basic']) : apms_cut_text($it['it_explan'], 200);
        $seometa['creator'] = $author['mb_nick'] ? $author['mb_nick'] : $seometa['publisher'];
        $seometa['keyword'] = apms_seo_keyword($it['pt_tag']);
        $seometa['type'] = 'product';
        $seometa['url'] = G5_SHOP_URL . '/item.php?it_id=' . $it['it_id'];
        $seometa['img'] = apms_it_thumbnail($it, 0, 0, false, true);
    } else {
        if ($is_seometa == 'iqa') {
            //상품문의
            $seometa['subject'] = apms_get_text($view['iq_subject']);
コード例 #8
0
ファイル: tag.php プロジェクト: peb317/gbamn
            $list[$i]['subject'] = apms_get_text($post['it_name']);
            $list[$i]['content'] = apms_cut_text($post['it_explan'], 300);
            $list[$i]['hit'] = $post['it_hit'];
            $list[$i]['date'] = strtotime($post['it_time']);
            $list[$i]['comment'] = $post['pt_comment'];
            $list[$i]['img'] = apms_it_thumbnail($post, 0, 0);
        } else {
            $post = sql_fetch(" select * from {$g5['write_prefix']}{$row['bo_table']} where wr_id = '{$row['wr_id']}' ", false);
            $list[$i]['href'] = G5_BBS_URL . '/board.php?bo_table=' . $row['bo_table'] . '&amp;wr_id=' . $row['wr_id'];
            $list[$i]['subject'] = apms_get_text($post['wr_subject']);
            // 비밀글은 검색 불가
            if (strstr($post['wr_option'], 'secret')) {
                $post['wr_content'] = '[비밀글 입니다.]';
            }
            $list[$i]['content'] = apms_cut_text($post['wr_content'], 300);
            $list[$i]['img'] = apms_wr_thumbnail($row['bo_table'], $post, 0, 0);
            $list[$i]['hit'] = $post['wr_hit'];
            $list[$i]['comment'] = $post['wr_comment'];
            $list[$i]['date'] = strtotime($post['wr_datetime']);
        }
    }
    $write_page_rows = G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'];
    $list_page = $_SERVER['PHP_SELF'] . '?q=' . urlencode($q) . '&amp;eq=' . $eq . '&amp;page=';
    $skin_file = $skin_path . '/tag.search.skin.php';
} else {
    $rank = 10;
    //랭킹묶음
    $trow = 100;
    //페이지당 출력 태그수
    //등록태그 현황
    $row = sql_fetch(" select count(*) as cnt from {$g5['apms_tag']} where cnt > 0 ");
コード例 #9
0
ファイル: search.skin.php プロジェクト: peb317/gbamn
    ?>
&amp;<?php 
    echo $search_query;
    ?>
"><?php 
    echo $bo_subject[$idx];
    ?>
 내 결과</a></strong></div>
		<div class="div-sep-wrap">
			<div class="div-sep sep-bold"></div>
		</div>
	</div>
	<div class="search-media">
	<?php 
    for ($i = 0; $i < count($list[$idx]) && $k < $rows; $i++, $k++) {
        $img = apms_wr_thumbnail($list[$idx][$i]['bo_table'], $list[$idx][$i], 80, 80, false, true);
        // 썸네일
        $img['src'] = $img['src'] ? $img['src'] : apms_photo_url($list[$idx][$i]['mb_id']);
        // 회원사진
        if ($list[$idx][$i]['wr_is_comment']) {
            $comment_def = '<span class="tack-icon bg-orange">댓글</span> ';
            $comment_href = '#c_' . $list[$idx][$i]['wr_id'];
            $fa_icon = 'comment';
            $txt = '[댓글] ';
        } else {
            $comment_def = '';
            $comment_href = '';
            $fa_icon = 'file-text-o';
            $txt = '';
        }
        ?>
コード例 #10
0
ファイル: write_update.php プロジェクト: peb317/gbamn
    if (strstr($wr['wr_option'], 'mail') && $wr['wr_email']) {
        $array_email[] = $wr['wr_email'];
    }
    // 중복된 메일 주소는 제거
    $unique_email = array_unique($array_email);
    $unique_email = array_values($unique_email);
    for ($i = 0; $i < count($unique_email); $i++) {
        mailer($wr_name, $wr_email, $unique_email[$i], $subject, $content, 1);
    }
}
// 태그등록
$tag_time = $w == "u" ? $write['wr_datetime'] : G5_TIME_YMDHIS;
apms_add_tag('', $as_tag, $tag_time, $bo_table, $wr_id);
// 이미지글 체크
$wrt = array("chk_img" => true, "wr_id" => $wr_id, "wr_option" => $secret, "wr_content" => stripslashes($wr_content), "wr_link1" => $wr_link1, "wr_link2" => $wr_link2);
$p_image = apms_wr_thumbnail($bo_table, $wrt, 0, 0);
// 동영상글 체크 - 링크 URL만 체크
$p_video = false;
if ($wr_link1) {
    // Link1
    $p_video = apms_video($wr_link1) ? true : false;
}
if ($wr_link2 && !$p_video) {
    // Link2
    $p_video = apms_video($wr_link2) ? true : false;
}
// 글타입정리
if ($p_image && $p_video) {
    //이미지도 있고, 비디오도 있으면
    $as_list = 3;
} else {