GNU/skin/board/A095_jy_note/view.skin.php
<?php
 if (!defined('_GNUBOARD_')) exit;
 error_reporting(E_ALL); // 에러 출력
 ini_set('display_errors', '1'); // 에러 출력
 error_reporting(0); // 에러 메세지 숨김
 //-----------------------------------------------
 include_once(G5_LIB_PATH.'/thumbnail.lib.php');
 //----------------------------------------------
 ## 죄회수 / 클릭 / 테이블 & 필드
 include_once($jeongyeon_path.'/code.php');
 //----------------------------------------------
 ## 이전 데이터 호출
 if ($wr_id) {
    $pre_num = $write['wr_num'] + 1; // 글 수정 시 : 이전 넘버
 } else {
    $new_board = sql_query("select * from $write_table where wr_id is not null order by wr_datetime desc limit 1"); // 새글 시 : 최근 넘버
    $lat_board = sql_fetch_array($new_board);
    $pre_num = $lat_board['wr_num'];
 }
 $board_pre = sql_fetch(" select * from $write_table where wr_num = $pre_num "); // 이전 데이터
 $board_no1 = sql_fetch(" select * from $write_table where wr_num = '-1' "); // 첫 데이터
 //-------------------------------------------------------------------------------------------------
?>
<!----------| CSS |--------->
 <link rel="stylesheet" href="<?=$board_skin_url;?>/style.css">
<!----------| SCRIPT |--------->
 <script src="<?=G5_JS_URL;?>/viewimageresize.js"></script>
 <article id='VIEW'>
   <!----------| BUTTON : WRITE : POP |--------->
    <div class='Write'>
        <? if ($write_href) { ?> <button type='button' onclick="location.href='<?=$write_href.$x2url;?>'">WRITE</button><? } ?>
        <? if ($update_href) { ?> <button type='button' onclick="location.href='<?=$update_href;?>'">UPDATE</button><? } ?>
        <button type='button' onclick="location.href='<?=$list_href.$x2url;?>'">LIST</button>
    </div>
   <!----------| SUBJECT |--------->
    <section class='Subject'>
        <p><?=cut_str(get_text($view['wr_subject']), 100);?></p>
        <?
        if ($view['x2_datetime']) {
            $x2_datetime = $view['x2_datetime'];
            $x2_datetime = explode(" ", $x2_datetime);
            $x2_end_day = explode(":", $x2_datetime[1]);
            $x2_end_day = $x2_end_day[0].":".$x2_end_day[1];
            $x2_end = " ~ ".$x2_datetime[0];
        } else {
            $x2_end = "";
        }
        ?>
        <span tooltip="<?=date("Y.m.d h:i", strtotime($view['wr_datetime']))." ~ ".$x2_datetime[0]." ".$x2_end_day;?>" flow="right"><?=date("Y.m.d", strtotime($view['wr_datetime'])).$x2_end;?></span>
    </section>
   <!----------| DOWNLOAD & IMAGE |--------->
    <?
    ## FILE : DOWNLOAD
    include_once("{$board_skin_path}/view/view.file.php");
    ## FILE : IMAGE
    include_once("{$board_skin_path}/view/view.image.php");
    ?>
   <!----------| CONTENT & LINK |--------->
   <!----------| CONTENT |--------->
    <? if($view['content']) { ?>
        <table cellpadding="0" cellspacing="0" align="center" class="Table">
            <tr>
                <td colspan="2" class="Content">
                   <!----------| CONTENT |--------->
                    <?
                    $vc = str_replace("%[","<span class='VcSpan'>",$view['content']);
                    $vc = str_replace("]%","</span>",$vc);
                    $vc = str_replace("[Table]","<div class='VcDiv'>",$vc);
                    $vc = str_replace("[/Table]","</div>",$vc);
                    $vc = str_replace("[Title]","<span class='VcTitle'>",$vc);
                    $vc = str_replace("[/Title]","</span>",$vc);
                    $vc = str_replace("[Sub]","<span class='VcSub'>",$vc);
                    $vc = str_replace("[/Sub]","</span>",$vc);
                    $vc = str_replace("[Box]\r<br/>","<div class='VcBox'>",$vc);
                    $vc = str_replace("[/Box]","</div>",$vc);
                    $vc = str_replace("^[","<span class='VcTime'>",$vc);
                    $vc = str_replace("]^","</span>",$vc);
                    echo $vc;
                    ?>
                </td>
            </tr>
        </table>
    <? } ?>
   <!----------| LINK |--------->
    <? if ($view['link'][1] || $view['link'][2]) { ?>
        <table cellpadding="0" cellspacing="0" align="center" class="Link">
            <?
            $cnt = 0;
            for ($i=1; $i<=count($view['link']); $i++) {
                if ($view['link'][$i]) {
                    $cnt++;
                    $link = cut_str($view['link'][$i], 100);
                    $view['link_href'][$i] = str_replace('127.0.0.1',$_SERVER['HTTP_HOST'],$view['link_href'][$i]); // 관리자 도메인을 사용자 도메인으로 치환
            ?>
                    <tr>
                        <td class="Left" onclick="window.open('<?=$view['link_href'][$i];?>')" tooltip="관련 링크 : 이동" flow="left">
                            관련 링크
                        </td>
                        <td class="Right">
                            <?=$link?>
                        </td>
                    </tr>
            <?
                }
            }
            ?>
        </table>
    <? } ?>
   <!----------| TAG |--------->
    <table cellpadding="0" cellspacing="0" align="center" class="Tag">
            <tr>
                <td class="Left">
                    태그
                </td>
                <td class="Right">
                    <?
                    $x2_tag = explode(",", $view['x2_tag']);
                    for ($i=0; $i<count($x2_tag); $i++) {
                    ?>
                        <div onclick="location.href='?bo_table=<?=$bo_table;?>&sfl=x2_tag&stx=<?=$x2_tag[$i];?>'">#<?=$x2_tag[$i];?></div>
                    <? } ?>
                </td>
            </tr>
    </table>
   <!----------| COMMENT |--------->
    <?//include_once(G5_BBS_PATH.'/view_comment.php');?>
   <!----------| PREV & NEXT |--------->
    <? if ($prev_href || $next_href) { ?>
    <section class='Next'>
        <? if ($prev_href) { ?><button type='button' class='Left' onclick="location.href='<?=$prev_href;?>'"><label>다음</label><label><?=cut_str($prev_wr_subject,40,"…");?></label></button><? } ?>
        <? if ($next_href) { ?><button type='button' class='Right' onclick="location.href='<?=$next_href;?>'"><label><?=cut_str($next_wr_subject,40,"…");?></label><label>이전</label></button><? } ?>
    </section>
    <? } ?>
   <!----------| COMMENT |--------->
    <? //include_once(G5_BBS_PATH.'/view_comment.php'); ## COMMENT ?>
   <!----------| BUTTON |--------->
    <section class='Button'>
        <div>
            <? if ($delete_href) { ?> <button type='button' onclick="location.href='<?=$delete_href;?>'">DELETE</button><? } ?>
            <? if ($copy_href) { ?> <button type='button' onclick="location.href='<?=$copy_href;?>'">COPY</button><? } ?>
            <? if ($move_href) { ?> <button type='button' onclick="location.href='<?=$move_href;?>'">MOVE</button><? } ?>
        &nbsp;</div>
        <div>
            <? if (!$code) { ?><span><button type='button' onclick="location.href='<?=$list_href;?>'">LIST</button><? } ?>
            <? if ($search_href) { ?> <button type='button' onclick="location.href='<?=$search_href;?>'"><? if (!$code) { echo "SEARCH LIST"; } ?></button><? } ?>
            </span>
        </div>
        <div>&nbsp;</div>
    </section>
    <!-- SCRIPT -->
    <? include_once("{$board_skin_path}/view/view.script.php"); ?>
 </article>
<!----------| HIDDEN : HEAD & TAIL & LocalPage|--------->
 <? if ($code == "no") { ?><style type="text/css">.HEAD, .TAIL, .LocalPage, #ADD-BOTTOM-BUTTON, #ADD-RIGHT-BUTTON, #top_btn { display:none; }</style><? } ?>