update and fix code

This commit is contained in:
Amberstone 2024-10-18 11:25:52 +09:00
parent 1aa77a0ada
commit f8f58e6f1b
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
7 changed files with 1345 additions and 1233 deletions

View file

@ -1,34 +1,54 @@
<?php <?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 /**
* from avocado common.lib
* @var string|int $year
* @var string|int $year_pre
* @var string|int $month_pre
* @var string|int $sc_no
*/
if (!defined('_GNUBOARD_'))
exit;
//include_once($board_skin_path."/moonday.php"); // 석봉운님의 음력날짜 함수 //include_once($board_skin_path."/moonday.php"); // 석봉운님의 음력날짜 함수
include_once(G5_LIB_PATH . '/thumbnail.lib.php'); include_once(G5_LIB_PATH . '/thumbnail.lib.php');
if (preg_match('/%/', $width)) { if (preg_match('/%/', $width)) {
$col_width = "14%"; //표의 가로 폭이 100보다 크면 픽셀값입력 //표의 가로 폭이 100보다 크면 픽셀값입력
$col_width = "14%";
} else { } else {
$col_width = round($width/7); //표의 가로 폭이 100보다 작거나 같으면 백분율 값을 입력 //표의 가로 폭이 100보다 작거나 같으면 백분율 값을 입력
$col_width = round($width / 7);
} }
$col_height= 80 ;//내용 들어갈 사각공간의 세로길이를 가로 폭과 같도록
//내용 들어갈 사각공간의 세로길이를 가로 폭과 같도록
$col_height = 80;
$offset = $board['bo_3'] ? " " . $board['bo_3'] . " hours" : ""; $offset = $board['bo_3'] ? " " . $board['bo_3'] . " hours" : "";
$today = date('Ymd', strtotime(date('Y/m/d H:i:s') . $offset)); $today = date('Ymd', strtotime(date('Y/m/d H:i:s') . $offset));
$b_mon = date('n', strtotime($today)); $b_mon = date('n', strtotime($today));
$b_day = date('j', strtotime($today)); $b_day = date('j', strtotime($today));
$b_year = date('Y', strtotime($today)); $b_year = date('Y', strtotime($today));
if ($year < 1) { // 오늘의 달력 일때
// 오늘의 달력 일때
if ($year < 1) {
$month = $b_mon; $month = $b_mon;
$mday = $b_day; $mday = $b_day;
$year = $b_year; $year = $b_year;
} }
if(!$year) $year = date("Y"); if (!$year)
$file_index = $board_skin_path."/day"; ### 기념일 폴더 위치 지정 $year = date("Y");
// 기념일 폴더 위치 지정
$file_index = $board_skin_path . "/day";
### 양력 기념일 파일 지정 : 해당년도 파일이 없으면 기본파일(solar.txt)을 불러온다 // 양력 기념일 파일 지정 : 해당년도 파일이 없으면 기본파일(solar.txt)을 불러온다
// $dayfile = file($file_index."/solar.txt"); // $dayfile = file($file_index."/solar.txt");
$lastday = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); $lastday = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
if ($year%4 == 0) $lastday[2] = 29; if ($year % 4 == 0)
$lastday[2] = 29;
$dayoftheweek = date("w", mktime(0, 0, 0, $month, 1, $year)); $dayoftheweek = date("w", mktime(0, 0, 0, $month, 1, $year));
$cday = 1; $cday = 1;
$sel_mon = sprintf("%02d", $month); $sel_mon = sprintf("%02d", $month);
@ -37,52 +57,75 @@ $sel_mon = sprintf("%02d",$month);
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0); add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
$width = $board['bo_table_width'] ? $board['bo_table_width'] : 1000; $width = $board['bo_table_width'] ? $board['bo_table_width'] : 1000;
if($width>100) $width.="px"; if ($width > 100)
else $width.="%"; $width .= "px";
else
$width .= "%";
$gall_w = $board['bo_1'] ? $board['bo_1'] : 400; $gall_w = $board['bo_1'] ? $board['bo_1'] : 400;
$gall_h = $board['bo_2'] ? $board['bo_2'] : 300; $gall_h = $board['bo_2'] ? $board['bo_2'] : 300;
?>
$year_pre = 0;
$month_pre = 0;
?>
<div id="bo_frame" style="max-width:<?= $width ?>;margin:0 auto;"> <div id="bo_frame" style="max-width:<?= $width ?>;margin:0 auto;">
<!-- 상단 공지 부분 --> <!-- 상단 공지 부분 -->
<nav class="pg_wrap theme-box"> <nav class="pg_wrap theme-box">
<span class="pg control"> <span class="pg control">
<a href="<?php echo G5_BBS_URL."/board.php?bo_table=".$bo_table."&"; <a href="<?= G5_BBS_URL . "/board.php?bo_table=" . $bo_table . "&";
if ($month == 1) { if ($month == 1) {
$year_pre=$year-1; $month_pre=$month; $year_pre = $year - 1;
$month_pre = $month;
} else { } else {
$year_pre=$year-1; $month_pre=$month; $year_pre = $year - 1;
$month_pre = $month;
} }
echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no"); ?>" class="pg_page"> echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no"); ?>" class="pg_page">
<i class="ico prevyr txt-default"><?php echo $year_pre ?></i> <i class="ico prevyr txt-default"><?= $year_pre ?></i>
</a><a href="<?php echo G5_BBS_URL."/board.php?bo_table=".$bo_table."&"; </a><a href="<?= G5_BBS_URL . "/board.php?bo_table=" . $bo_table . "&";
if ($month == 1) { if ($month == 1) {
$year_pre=$year-1; $month_pre=12; $year_pre = $year - 1;
$month_pre = 12;
} else { } else {
$year_pre=$year; $month_pre=$month-1; $year_pre = $year;
$month_pre = $month - 1;
} }
echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no"); ?>" class="pg_page"> echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no"); ?>" class="pg_page">
<i class="ico prevmth txt-default"><?php echo $month_pre ?></i> <i class="ico prevmth txt-default"><?= $month_pre ?></i>
</a> </a>
</span> </span>
<span class="pg"> <span class="pg">
<strong class="year"><?=$year?></strong><?for($m=1;$m<=12;$m++){ <strong class="year"><?= $year ?></strong><?php for ($m = 1; $m <= 12; $m++) {
if ($m == $month) { if ($m == $month) {
?><strong class="pg_current pg_page month" title="<?=$year?>년 <?=$m?>월"><span class="txt-point"><?=$m?></span></strong><?} ?><strong class="pg_current pg_page month" title="<?= $year ?>년 <?= $m ?>월"><span
else{?><a href="<?php echo G5_BBS_URL."/board.php?bo_table=".$bo_table."&year=".$year."&month=".$m."&sc_no=".$sc_no; ?>" class="pg_page month"><span class="txt-default"><?=$m?></span></a><?}?> class="txt-point"><?= $m ?></span></strong><?php } else { ?>
<?}?> <a href="<?= G5_BBS_URL . "/board.php?bo_table=" . $bo_table . "&year=" . $year . "&month=" . $m . "&sc_no=" . $sc_no; ?>"
class="pg_page month">
<span class="txt-default"><?= $m ?></span>
</a>
<?php } ?>
<?php } ?>
</span> </span>
<span class="pg control"> <span class="pg control">
<a href="<?php echo G5_BBS_URL."/board.php?bo_table=".$bo_table."&"; <a href="<?= G5_BBS_URL . "/board.php?bo_table=" . $bo_table . "&";
if ($month == 12) { if ($month == 12) {
$year_pre=$year+1; $month_pre=1; } else {$year_pre=$year; $month_pre=$month+1;} echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no");?>" class="pg_page"> $year_pre = $year + 1;
<i class="ico nextmth txt-default"><?php echo $month_pre ?></i> $month_pre = 1;
</a><a href="<?php echo G5_BBS_URL."/board.php?bo_table=".$bo_table."&"; } else {
if ($month == 12) { $year_pre = $year;
$year_pre=$year+1; $month_pre=$month; } else {$year_pre=$year+1; $month_pre=$month; $month_pre = $month + 1;
} }
echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no"); ?>" class="pg_page"> echo ("year=$year_pre&month=$month_pre&sc_no=$sc_no"); ?>" class="pg_page">
<i class="ico nextyr txt-default"><?php echo $year_pre ?></i> <i class="ico nextmth txt-default"><?= $month_pre ?></i>
</a><a href="<?= G5_BBS_URL . "/board.php?bo_table=" . $bo_table . "&";
if ($month == 12) {
$year_pre = $year + 1;
$month_pre = $month;
} else {
$year_pre = $year + 1;
$month_pre = $month;
}
echo ("year={$year_pre}&month={$month_pre}&sc_no={$sc_no}"); ?>" class="pg_page">
<i class="ico nextyr txt-default"><?= $year_pre ?></i>
</a> </a>
</span> </span>
</nav> </nav>
@ -91,7 +134,7 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
<div class="diary-calendar theme-box"> <div class="diary-calendar theme-box">
<h2 class="this-month txt-point"><?= $year ?>/<?= $sel_mon ?></h2> <h2 class="this-month txt-point"><?= $year ?>/<?= $sel_mon ?></h2>
<div class="controls txt-right"> <div class="controls txt-right">
<?php if ($admin_href) { ?><a href="<?php echo $admin_href ?>" class="ui-btn small admin">관리자</a><?php } ?> <?php if ($admin_href) { ?><a href="<?= $admin_href ?>" class="ui-btn small admin">관리자</a><?php } ?>
</div> </div>
<table class="theme-list calendar-list"> <table class="theme-list calendar-list">
<thead> <thead>
@ -112,7 +155,8 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
$j = 0; // layer id $j = 0; // layer id
// 내용을 보여주는 부분 // 내용을 보여주는 부분
while ($row = sql_fetch_array($result)) { // 제목글 뽑아서 링크 문자열 만들기.. while ($row = sql_fetch_array($result)) { // 제목글 뽑아서 링크 문자열 만들기..
if(strstr($row['wr_option'],"secret") && (!$is_admin || ($row['mb_id'] && $member['mb_id']!=$member['mb_id']))) continue; if (strstr($row['wr_option'], "secret") && (!$is_admin || ($row['mb_id'] && $member['mb_id'] != $member['mb_id'])))
continue;
if (substr($row['wr_1'], 0, 6) < $year . $sel_mon) { if (substr($row['wr_1'], 0, 6) < $year . $sel_mon) {
$start_day = 1; $start_day = 1;
$start_day = (int) $start_day; $start_day = (int) $start_day;
@ -123,12 +167,13 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
$end_day = $start_day; $end_day = $start_day;
if(!$write_href){ $link=''; $cursor=" default";} if (!$write_href) {
else if($is_admin || ($member['mb_id'] && $member['mb_id']==$row['mb_id'])){ $link = '';
$cursor = " default";
} else if ($is_admin || ($member['mb_id'] && $member['mb_id'] == $row['mb_id'])) {
$cursor = ""; $cursor = "";
$link = "get_info('" . $row['wr_1'] . "');"; $link = "get_info('" . $row['wr_1'] . "');";
} } else {
else {
$link = ""; $link = "";
$cursor = " default"; $cursor = " default";
} }
@ -143,14 +188,17 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
$temp = 7 - (($lastday[$month] + $dayoftheweek) % 7); $temp = 7 - (($lastday[$month] + $dayoftheweek) % 7);
if ($temp == 7) $temp = 0; if ($temp == 7)
$temp = 0;
$lastcount = $lastday[$month] + $dayoftheweek + $temp; $lastcount = $lastday[$month] + $dayoftheweek + $temp;
for ($iz = 1; $iz <= $lastcount; $iz++) { // 42번을 칠하게 된다. for ($iz = 1; $iz <= $lastcount; $iz++) { // 42번을 칠하게 된다.
$bgcolor = "days"; // 쭉 흰색으로 칠하고 $bgcolor = "days"; // 쭉 흰색으로 칠하고
if ($b_year==$year && $b_mon==$month && $b_day==$cday) $bgcolor = "today"; // 오늘날짜 표기 if ($b_year == $year && $b_mon == $month && $b_day == $cday)
$bgcolor = "today"; // 오늘날짜 표기
$re = $iz % 7; $re = $iz % 7;
if ($re == 1) echo ("<tr>"); // 주당 7개씩 한쎌씩을 쌓는다. if ($re == 1)
echo ("<tr>"); // 주당 7개씩 한쎌씩을 쌓는다.
if ($dayoftheweek < $iz && $iz <= $lastday[$month] + $dayoftheweek) { if ($dayoftheweek < $iz && $iz <= $lastday[$month] + $dayoftheweek) {
// 전체 루프안에서 숫자가 들어가는 셀들만 해당됨 // 전체 루프안에서 숫자가 들어가는 셀들만 해당됨
// 즉 11월 달에서 1일부터 30 일까지만 해당 // 즉 11월 달에서 1일부터 30 일까지만 해당
@ -159,9 +207,12 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
// 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고 // 여기까지 숫자와 들어갈 내용에 대한 변수들의 세팅이 끝나고
// 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다. // 이제 여기 부터 직접 셀이 그려지면서 그 안에 내용이 들어 간다.
if($re==0) $col="right"; if ($re == 0)
else if($re==1) $col="left"; $col = "right";
else $col=""; else if ($re == 1)
$col = "left";
else
$col = "";
$fr_date = $year . sprintf("%02d", $month) . sprintf("%02d", $cday); $fr_date = $year . sprintf("%02d", $month) . sprintf("%02d", $cday);
echo ("<td width=$col_width height=$col_height class='{$bgcolor} {$col}' valign='top'>"); echo ("<td width=$col_width height=$col_height class='{$bgcolor} {$col}' valign='top'>");
@ -191,8 +242,8 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
} }
} }
*/ */
/*
// 석봉운님의 음력날짜 변수선언 // 석봉운님의 음력날짜 변수선언
/*
$myarray = soltolun($year,$month,$cday); $myarray = soltolun($year,$month,$cday);
if ($myarray[day]==1 || $myarray[day]==11 || $myarray[day]==21) { if ($myarray[day]==1 || $myarray[day]==11 || $myarray[day]==21) {
$moonday ="<font color='gray'>&nbsp;(음)$myarray[month].$myarray[day]$myarray[leap]</font>"; $moonday ="<font color='gray'>&nbsp;(음)$myarray[month].$myarray[day]$myarray[leap]</font>";
@ -208,8 +259,13 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
if ($html_day[$cday]) { if ($html_day[$cday]) {
echo $html_day[$cday]; echo $html_day[$cday];
} else { } else {
if($write_href){ $wlink="get_info('".$fr_date."');"; $cursor="";} if ($write_href) {
else {$wlink=""; $cursor=" default";} $wlink = "get_info('" . $fr_date . "');";
$cursor = "";
} else {
$wlink = "";
$cursor = " default";
}
$html_day[$cday] .= '<a href="#" onclick="' . $wlink . ' return false;" id="w_' . $fr_date . '" class="wr-date ui-btn etc' . $cursor . '" data-date="' . $fr_date . '" data-mood="" data-etc="" data-wid="">'; $html_day[$cday] .= '<a href="#" onclick="' . $wlink . ' return false;" id="w_' . $fr_date . '" class="wr-date ui-btn etc' . $cursor . '" data-date="' . $fr_date . '" data-mood="" data-etc="" data-wid="">';
$html_day[$cday] .= '<i>' . $daytext . '</i>'; $html_day[$cday] .= '<i>' . $daytext . '</i>';
$html_day[$cday] .= '</a>'; $html_day[$cday] .= '</a>';
@ -219,79 +275,92 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
$cday++; // 날짜를 카운팅 $cday++; // 날짜를 카운팅
} }
// 유효날짜가 아니면 그냥 회색을 칠한다. // 유효날짜가 아니면 그냥 회색을 칠한다.
else { echo ("<td width=$col_width height=$col_height class='noday'>&nbsp;</td>"); } else {
if ($re == 0) echo ("</tr>"); echo ("<td width=$col_width height=$col_height class='noday'>&nbsp;</td>");
}
if ($re == 0)
echo ("</tr>");
} // 반복구문이 끝남 } // 반복구문이 끝남
unset($row); unset($row);
?> ?>
</tbody> </tbody>
</table> </table>
</div> </div>
<? if($board['bo_content_head']) { ?> <?php if ($board['bo_content_head']) { ?>
<hr class="padding small"> <hr class="padding small">
<div class="board-notice"> <div class="board-notice">
<?= stripslashes($board['bo_content_head']); ?> <?= stripslashes($board['bo_content_head']); ?>
</div> </div>
<? } ?> <?php } ?>
<?if($is_member && $write_href){?> <?php if ($is_member && $write_href) { ?>
<hr class="padding small"> <hr class="padding small">
<div id="diary_write" class="none-trans"> <div id="diary_write" class="none-trans">
<div class="theme-box"> <div class="theme-box">
<a href="#" onclick="$('#bo_w').toggleClass('on');return false;" id="write_open"> 글쓰기</a> <a href="#" onclick="$('#bo_w').toggleClass('on');return false;" id="write_open"> 글쓰기</a>
<? include_once($board_skin_path.'/write.php');?> <?php include_once($board_skin_path . '/write.php'); ?>
</div> </div>
</div> </div>
<hr class="padding small"> <hr class="padding small">
<?}?> <?php } ?>
</section> </section>
<section id="diary_list"> <section id="diary_list">
<div class="diary-cont"> <div class="diary-cont">
<? <?php
$order = $board['bo_4'] ? "asc" : "desc"; $order = $board['bo_4'] ? "asc" : "desc";
$result = sql_query("SELECT * FROM {$write_table} WHERE wr_1!='' and left(wr_1,6) = '$year$sel_mon' ORDER BY wr_1 {$order}"); $result = sql_query("SELECT * FROM {$write_table} WHERE wr_1!='' and left(wr_1,6) = '$year$sel_mon' ORDER BY wr_1 {$order}");
for ($i = 0; $row = sql_fetch_array($result); $i++) { for ($i = 0; $row = sql_fetch_array($result); $i++) {
if(strstr($row['wr_option'],"secret") && (!$is_admin || ($row['mb_id'] && $member['mb_id']!=$member['mb_id']))) continue; if (strstr($row['wr_option'], "secret") && (!$is_admin || ($row['mb_id'] && $member['mb_id'] != $member['mb_id'])))
continue;
?> ?>
<div class="theme-box" id="w_<?=$row['wr_1']?>" data-date="<?=$row['wr_1']?>" data-wid="<?=$row['wr_id']?>"> <div class="theme-box" id="w_<?= $row['wr_1'] ?>" data-date="<?= $row['wr_1'] ?>"
data-wid="<?= $row['wr_id'] ?>">
<div class="options"> <div class="options">
<h3 class="wr_date"><?=substr($row['wr_1'],0,4)?>/<?=substr($row['wr_1'],4,2)?>/<?=substr($row['wr_1'],6,2)?><span class="secret"><?=strstr($row['wr_option'],"secret") ? " ::":"";?></span></h3> <h3 class="wr_date">
<?= substr($row['wr_1'], 0, 4) ?>/<?= substr($row['wr_1'], 4, 2) ?>/<?= substr($row['wr_1'], 6, 2) ?><span
class="secret"><?= strstr($row['wr_option'], "secret") ? " ::" : ""; ?></span>
</h3>
<p class="btn_confirm"> <p class="btn_confirm">
<? if($is_admin || ($member['mb_id'] && $member['mb_id']==$row['mb_id'])){ <?php if ($is_admin || ($member['mb_id'] && $member['mb_id'] == $row['mb_id'])) {
$cursor = ""; $cursor = "";
$delete_href = ""; $delete_href = "";
// 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능 // 로그인중이고 자신의 글이라면 또는 관리자라면 패스워드를 묻지 않고 바로 수정, 삭제 가능
if (($member['mb_id'] && ($member['mb_id'] == $row['mb_id'])) || $is_admin) { if (($member['mb_id'] && ($member['mb_id'] == $row['mb_id'])) || $is_admin) {
$delete_href = "javascript:del('./delete.php?bo_table=" . $bo_table . "&wr_id=" . $row['wr_id'] . "&page=" . $page . urldecode($qstr) . "');"; $delete_href = "javascript:del('./delete.php?bo_table=" . $bo_table . "&wr_id=" . $row['wr_id'] . "&page=" . $page . urldecode($qstr) . "');";
if ($is_admin) if ($is_admin) {
{
$delete_href = "javascript:del('./delete.php?bo_table=" . $bo_table . "&wr_id=" . $row['wr_id'] . "&token=" . $token . "&page=" . $page . urldecode($qstr) . "');"; $delete_href = "javascript:del('./delete.php?bo_table=" . $bo_table . "&wr_id=" . $row['wr_id'] . "&token=" . $token . "&page=" . $page . urldecode($qstr) . "');";
} }
} } else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
else if (!$write['mb_id']) { // 회원이 쓴 글이 아니라면
$delete_href = "./password.php?w=d&bo_table=" . $bo_table . "&wr_id=" . $row['wr_id'] . "&page=" . $page . $qstr; $delete_href = "./password.php?w=d&bo_table=" . $bo_table . "&wr_id=" . $row['wr_id'] . "&page=" . $page . $qstr;
} }
?><a href="#" onclick="get_info('<?=$row['wr_1']?>'); return false;">M</a><a href="<?=$delete_href?>">D</a><? ?><a href="#" onclick="get_info('<?= $row['wr_1'] ?>'); return false;">M</a><a
href="<?= $delete_href ?>">D</a>
<?php
} ?> } ?>
</p> </p>
</div> </div>
<hr class="line"> <hr class="line">
<div class="ui-cont<?= $row['wr_file'] ? " with-image" : ""; ?>"> <div class="ui-cont<?= $row['wr_file'] ? " with-image" : ""; ?>">
<div class="ui-thumb file" data-file="<?= $row['wr_file'] ?>"> <div class="ui-thumb file" data-file="<?= $row['wr_file'] ?>">
<?if($row['wr_file']){ <?php if ($row['wr_file']) {
$thumb = get_list_thumbnail($bo_table, $row['wr_id'], $gall_w, $gall_h, false, true); $thumb = get_list_thumbnail($bo_table, $row['wr_id'], $gall_w, $gall_h, false, true);
$thumb2 = get_mmb_image($bo_table, $row['wr_id']); $thumb2 = get_mmb_image($bo_table, $row['wr_id']);
?> ?>
<a href="<?=$thumb2['src']?>" onclick="view_img(this.href);return false;"><img src="<?=$thumb['src']?>"></a> <a href="<?= $thumb2['src'] ?>" onclick="view_img(this.href);return false;"><img
<?}?> src="<?= $thumb['src'] ?>"></a>
<?php } ?>
</div> </div>
<div class="diary-text"> <div class="diary-text">
<p class="misc"><?if($row['wr_4']){?><em><?=$board['bo_5'] ? $board['bo_5']: "[날씨]";?></em> <span class="weather"><?=$row['wr_4']?></span><?}if($row['wr_3']){?><em><?=$board['bo_6'] ? $board['bo_6']: "[무드]";?></em> <span class="mood"><?=$row['wr_3']?></span><?}?></p> <p class="misc"><?php if ($row['wr_4']) { ?><em><?= $board['bo_5'] ? $board['bo_5'] : "[날씨]"; ?></em>
<span class="weather"><?= $row['wr_4'] ?></span><?php }
if ($row['wr_3']) { ?><em><?= $board['bo_6'] ? $board['bo_6'] : "[무드]"; ?></em>
<span class="mood"><?= $row['wr_3'] ?></span><?php } ?>
</p>
<div class="content"><?= nl2br($row['wr_content']) ?></div> <div class="content"><?= nl2br($row['wr_content']) ?></div>
</div> </div>
</div> </div>
</div> </div>
<hr class="padding small"> <hr class="padding small">
<?}?> <?php } ?>
</div> </div>
</section> </section>
</div> </div>
@ -307,7 +376,7 @@ $gall_h=$board['bo_2'] ? $board['bo_2'] : 300;
$("#img_cont").empty().html('<p><img src="' + url + '"></p>'); $("#img_cont").empty().html('<p><img src="' + url + '"></p>');
} }
const bo_skin_url = "<?= $board_skin_url ?>"; const bo_skin_url = "<?= $board_skin_url ?>";
<?if($is_member && $write_href){?> <?php if ($is_member && $write_href) { ?>
const idx = $("td.today .wr-date").data("wid"); const idx = $("td.today .wr-date").data("wid");
if (idx != '') $("#btn_submit").prop("disabled", true); if (idx != '') $("#btn_submit").prop("disabled", true);
function get_info(wr_id) { function get_info(wr_id) {
@ -361,6 +430,7 @@ $(window).scroll(function(){
} else if (w_pos < d_pos) { } else if (w_pos < d_pos) {
$("#diary_write").removeClass("scroll-fix").css("transform", "translateY(0)"); $("#diary_write").removeClass("scroll-fix").css("transform", "translateY(0)");
} }
}); } });
<?}?> }
<?php } ?>
</script> </script>

View file

@ -1,20 +1,23 @@
<?php <?php
############################################################# /**
/* * @author 대하 (https://extrashot.tistory.com/pages/Extra-Shot), phpschool 석봉운 (http://www.phpschool.com/bbs2/inc_view.html?id=9914&code=tnt2), Amber (https://info.drk.st/about)
*
PHPschool의 석봉운님 오픈소스를 수정하여 사용하였습니다. * PHPschool의 석봉운님 오픈소스를 수정하여 사용하였습니다.
석봉운님께 감사드립니다. * 석봉운님께 감사드립니다.
주소 http://www.phpschool.com/bbs2/inc_view.html?id=9914&code=tnt2 * 주소 http://www.phpschool.com/bbs2/inc_view.html?id=9914&code=tnt2
*
음력 데이터는 * 음력 데이터는
작은 : 1 * 작은 : 1
큰달 : 2 * 큰달 : 2
윤달이 있는 - 평달이 작고 윤달도 작으면 : 3 * 윤달이 있는 - 평달이 작고 윤달도 작으면 : 3
평달이 작고 윤달이 크면: 4 * 평달이 작고 윤달이 크면: 4
평달이 크고 윤달이 작으면 : 5 * 평달이 크고 윤달이 작으면 : 5
평달과 윤달이 모두 크면: 6 * 평달과 윤달이 모두 크면: 6
* @var int[] $kk
* @var int[] $md
*
* compatible php 5.3.x
*/ */
#############################################################
$kk = array ( $kk = array (
//1841년 ~ 1900년 //1841년 ~ 1900년
1,2,4,1,1,2,1,2,1,2,2,1, 2,2,1,2,1,1,2,1,2,1,2,1, 2,2,2,1,2,1,4,1,2,1,2,1, 2,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,2,1,2,1,2,1,2,1, 1,2,4,1,1,2,1,2,1,2,2,1, 2,2,1,2,1,1,2,1,2,1,2,1, 2,2,2,1,2,1,4,1,2,1,2,1, 2,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,2,1,2,1,2,1,2,1,
@ -63,29 +66,35 @@ $kk = array (
2,2,1,2,1,4,1,1,2,1,2,2, 2,2,1,2,1,1,2,1,1,2,1,2, 2,2,1,2,1,2,1,2,1,1,2,1, 2,2,1,2,5,2,1,2,1,2,1,1, 2,1,2,2,1,2,2,1,2,1,2,1, 2,2,1,2,1,4,1,1,2,1,2,2, 2,2,1,2,1,1,2,1,1,2,1,2, 2,2,1,2,1,2,1,2,1,1,2,1, 2,2,1,2,5,2,1,2,1,2,1,1, 2,1,2,2,1,2,2,1,2,1,2,1,
2,1,1,2,1,2,2,1,2,2,1,2, 1,5,1,2,1,2,1,2,2,2,1,2, 1,2,1,1,2,1,1,2,2,1,2,2); 2,1,1,2,1,2,2,1,2,2,1,2, 1,5,1,2,1,2,1,2,2,2,1,2, 1,2,1,1,2,1,1,2,2,1,2,2);
###################################################
/* /*
$sy/ly : $sy/ly :
$sm/lm : $sm/lm :
$sd/ld : $sd/ld :
$leapyes: 윤달 $leapyes: 윤달
*/ */
###################################################
$md = array(31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); $md = array(31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
function febdays($sy) { function febdays($sy)
if(($sy%100 != 0 && $sy%4 ==0) || $sy%400 ==0) $md[1] = 29; {
else $md[1] = 28; global $md;
if (($sy % 100 != 0 && $sy % 4 == 0) || $sy % 400 == 0)
$md[1] = 29;
else
$md[1] = 28;
return array($md[1]); return array($md[1]);
} }
function alltd($sy) { function alltd($sy)
{
global $md; global $md;
$td = 0; $td = 0;
$ttd = array();
for ($i = 1841; $i <= $sy - 1; $i++) { for ($i = 1841; $i <= $sy - 1; $i++) {
list($md[1]) = febdays($i); $ttd[$i] = array();
$ttd[$i][12] = 0;
$feb_days = febdays($i);
$md[1] = $feb_days[0];
for ($j = 0; $j < 12; $j++) { for ($j = 0; $j < 12; $j++) {
$td += $md[$j]; $td += $md[$j];
$ttd[$i][12] += $md[$j]; $ttd[$i][12] += $md[$j];
@ -95,13 +104,18 @@ function alltd($sy) {
return array($td); return array($td);
} }
function soltolun($sy, $sm, $sd) { function soltolun($sy, $sm, $sd)
global $kk; {
global $md; global $kk, $md;
$ly = 0;
$yoon = "";
list($td) = alltd($sy); $td_result = alltd($sy);
list($md[1]) = febdays($sy); $td = $td_result[0];
for($i=0;$i<$sm-1;$i++) $td += $md[$i]; $feb_days = febdays($sy);
$md[1] = $feb_days[0];
for ($i = 0; $i < $sm - 1; $i++)
$td += $md[$i];
$td += $sd; $td += $sd;
$i = 0; $i = 0;
$temptd = $td; $temptd = $td;
@ -150,28 +164,34 @@ function soltolun($sy, $sm, $sd) {
$temptd -= $mm; $temptd -= $mm;
$i++; $i++;
if($i%12 == 1) $ly += 1; if ($i % 12 == 1)
$ly += 1;
} }
if ($temptd <= 0) { if ($temptd <= 0) {
if($yoon=="*") $temptd += $ymm; if ($yoon == "*")
else $temptd +=$mm; $temptd += $ymm;
else
$temptd += $mm;
} }
$ly += 1840; $ly += 1840;
$lm = $i % 12; $lm = $i % 12;
if($lm==0) $lm=12; if ($lm == 0)
$lm = 12;
$ld = $temptd; $ld = $temptd;
/* output */ /* output */
$myarray["year"] = $ly; $myarray = array(
$myarray["month"] = $lm; "year" => $ly,
$myarray["day"] = $ld; "month" => $lm,
$myarray["leap"] = $yoon; "day" => $ld,
"leap" => $yoon
);
return $myarray; return $myarray;
} }
function luntosol($ly, $lm, $ld) { function luntosol($ly, $lm, $ld, $leapyes = "")
global $kk; {
global $md; global $kk, $md;
$temptd = 0; $temptd = 0;
$dm = ($ly - 1841) * 12 + ($lm - 1) - 1; $dm = ($ly - 1841) * 12 + ($lm - 1) - 1;
@ -195,11 +215,14 @@ function luntosol($ly, $lm, $ld) {
break; break;
} }
} }
$dm = ($ly - 1841) * 12 + ($lm) - 1; $dm = ($ly - 1841) * 12 + ($lm) - 1;
if ($leapyes == "yoon") { if ($leapyes == "yoon") {
switch ($kk[$dm]) { switch ($kk[$dm]) {
case 1: case 1:
case 2 : break; case 2:
break;
case 3: case 3:
case 4: case 4:
$temptd += 29; $temptd += 29;
@ -216,10 +239,12 @@ function luntosol($ly, $lm, $ld) {
$td = $temptd; $td = $temptd;
$tempsy = 1841; $tempsy = 1841;
while (1) { while (1) {
list($md[1]) = febdays($tempsy); $feb_days = febdays($tempsy);
$md[1] = $feb_days[0];
for ($tempsm = 0; $tempsm <= 11; $tempsm++) { for ($tempsm = 0; $tempsm <= 11; $tempsm++) {
$temptd -= $md[$tempsm]; $temptd -= $md[$tempsm];
if($temptd <= 0) break; if ($temptd <= 0)
break;
} }
if ($temptd <= 0) { if ($temptd <= 0) {
$temptd += $md[$tempsm]; $temptd += $md[$tempsm];
@ -234,11 +259,10 @@ function luntosol($ly, $lm, $ld) {
$sd = $tempsd; $sd = $tempsd;
/* output */ /* output */
$myyarray["year"] = $sy; $myyarray = array(
$myyarray["month"] = $sm; "year" => $sy,
$myyarray["day"] = $sd; "month" => $sm,
$myyarray["leap"] = $yoob; "day" => $sd
);
return $myyarray; return $myyarray;
} }
?>

View file

@ -10,3 +10,7 @@
``` ```
php 최소 버전: 5.3 php 최소 버전: 5.3
``` ```
## 설치방법
아보카도가 설치된 폴더의 하위 폴더인 `skin/board/``diary` 라는 폴더를 생성하고 파일을 업로드합니다.

View file

@ -1,5 +1,6 @@
<?php <?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if (!defined("_GNUBOARD_"))
exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH . '/thumbnail.lib.php'); include_once(G5_LIB_PATH . '/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
@ -13,7 +14,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<article id="bo_v" class="theme-box"> <article id="bo_v" class="theme-box">
<h2 id="bo_v_title" class="txt-center"> <h2 id="bo_v_title" class="txt-center">
<?php <?php
if ($category_name) echo $view['ca_name'].' | '; // 분류 출력 끝 if ($category_name)
echo $view['ca_name'] . ' | '; // 분류 출력 끝
echo cut_str(get_text($view['wr_subject']), 70); echo cut_str(get_text($view['wr_subject']), 70);
?> ?>
</h2> </h2>
@ -120,26 +122,29 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<!-- 링크 버튼 시작 { --> <!-- 링크 버튼 시작 { -->
<div id="bo_v_bot"> <div id="bo_v_bot">
<hr class="padding"> <hr class="padding">
<? <?php
ob_start(); ob_start();
?> ?>
<? if ($prev_href || $next_href) { ?> <?php if ($prev_href || $next_href) { ?>
<div class="bo_v_nb"> <div class="bo_v_nb">
<? if ($prev_href) { ?><a href="<? echo $prev_href ?>" class="ui-btn">이전글</a><? } ?> <?php if ($prev_href) { ?><a href="<?php echo $prev_href ?>" class="ui-btn">이전글</a><?php } ?>
<? if ($next_href) { ?><a href="<? echo $next_href ?>" class="ui-btn">다음글</a><? } ?> <?php if ($next_href) { ?><a href="<?php echo $next_href ?>" class="ui-btn">다음글</a><?php } ?>
</div> </div>
<? } ?> <?php } ?>
<div class="bo_v_com"> <div class="bo_v_com">
<? if ($update_href) { ?><a href="<? echo $update_href ?>" class="ui-btn">수정</a><? } ?> <?php if ($update_href) { ?><a href="<?php echo $update_href ?>" class="ui-btn">수정</a><?php } ?>
<? if ($delete_href) { ?><a href="<? echo $delete_href ?>" class="ui-btn" onclick="del(this.href); return false;">삭제</a><? } ?> <?php if ($delete_href) { ?><a href="<?php echo $delete_href ?>" class="ui-btn"
<? if ($copy_href) { ?><a href="<? echo $copy_href ?>" class="ui-btn admin" onclick="board_move(this.href); return false;">복사</a><? } ?> onclick="del(this.href); return false;">삭제</a><?php } ?>
<? if ($move_href) { ?><a href="<? echo $move_href ?>" class="ui-btn admin" onclick="board_move(this.href); return false;">이동</a><? } ?> <?php if ($copy_href) { ?><a href="<?php echo $copy_href ?>" class="ui-btn admin"
<? if ($search_href) { ?><a href="<? echo $search_href ?>" class="ui-btn">검색</a><? } ?> onclick="board_move(this.href); return false;">복사</a><?php } ?>
<a href="<? echo $list_href ?>" class="ui-btn">목록</a> <?php if ($move_href) { ?><a href="<?php echo $move_href ?>" class="ui-btn admin"
<? if ($write_href) { ?><a href="<? echo $write_href ?>" class="ui-btn point">글쓰기</a><? } ?> onclick="board_move(this.href); return false;">이동</a><?php } ?>
<?php if ($search_href) { ?><a href="<?php echo $search_href ?>" class="ui-btn">검색</a><?php } ?>
<a href="<?php echo $list_href ?>" class="ui-btn">목록</a>
<?php if ($write_href) { ?><a href="<?php echo $write_href ?>" class="ui-btn point">글쓰기</a><?php } ?>
</div> </div>
<? <?php
$link_buttons = ob_get_contents(); $link_buttons = ob_get_contents();
ob_end_flush(); ob_end_flush();
?> ?>
@ -172,8 +177,7 @@ $(function() {
}); });
<?php } ?> <?php } ?>
function board_move(href) function board_move(href) {
{
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1"); window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
} }
</script> </script>
@ -201,8 +205,7 @@ $(function() {
$("#bo_v_atc").viewimageresize(); $("#bo_v_atc").viewimageresize();
}); });
function excute_good(href, $el, $tx) function excute_good(href, $el, $tx) {
{
$.post( $.post(
href, href,
{ js: "on" }, { js: "on" },

View file

@ -66,7 +66,8 @@ if ($w == '') {
} }
$len = strlen($write['wr_reply']); $len = strlen($write['wr_reply']);
if ($len < 0) $len = 0; if ($len < 0)
$len = 0;
$reply = substr($write['wr_reply'], 0, $len); $reply = substr($write['wr_reply'], 0, $len);
// 원글만 구한다. // 원글만 구한다.
@ -144,7 +145,8 @@ if ($w == '') {
$reply_number = -1; $reply_number = -1;
$sql = " select MIN(SUBSTRING(wr_reply, {$reply_len}, 1)) as reply from {$write_table} where wr_num = '{$reply_array['wr_num']}' and SUBSTRING(wr_reply, {$reply_len}, 1) <> '' "; $sql = " select MIN(SUBSTRING(wr_reply, {$reply_len}, 1)) as reply from {$write_table} where wr_num = '{$reply_array['wr_num']}' and SUBSTRING(wr_reply, {$reply_len}, 1) <> '' ";
} }
if ($reply_array['wr_reply']) $sql .= " and wr_reply like '{$reply_array['wr_reply']}%' "; if ($reply_array['wr_reply'])
$sql .= " and wr_reply like '{$reply_array['wr_reply']}%' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
if (!$row['reply']) if (!$row['reply'])
@ -203,12 +205,9 @@ if ($config['cf_cert_use'] && !$is_admin) {
} }
// 글자수 제한 설정값 // 글자수 제한 설정값
if ($is_admin || $board['bo_use_dhtml_editor']) if ($is_admin || $board['bo_use_dhtml_editor']) {
{
$write_min = $write_max = 0; $write_min = $write_max = 0;
} } else {
else
{
$write_min = (int) $board['bo_write_min']; $write_min = (int) $board['bo_write_min'];
$write_max = (int) $board['bo_write_max']; $write_max = (int) $board['bo_write_max'];
} }

View file

@ -1,5 +1,6 @@
<?php <?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!defined('_GNUBOARD_'))
exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0); add_stylesheet('<link rel="stylesheet" href="' . $board_skin_url . '/style.css">', 0);
@ -7,7 +8,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<section id="bo_w"> <section id="bo_w">
<hr class="padding small"> <hr class="padding small">
<!-- 게시물 작성/수정 시작 --> <!-- 게시물 작성/수정 시작 -->
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off"> <form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);"
method="post" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>"> <input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
<input type="hidden" name="w" value="<?php echo $w ?>" id="write_w"> <input type="hidden" name="w" value="<?php echo $w ?>" id="write_w">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>"> <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
@ -23,8 +25,10 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
include_once(G5_PLUGIN_PATH . '/jquery-ui/datepicker.php'); include_once(G5_PLUGIN_PATH . '/jquery-ui/datepicker.php');
$offset = $board['bo_3'] ? " " . $board['bo_3'] . " hours" : ""; $offset = $board['bo_3'] ? " " . $board['bo_3'] . " hours" : "";
$today = date('Ymd', strtotime(date('Y/m/d H:i:s') . $offset)); $today = date('Ymd', strtotime(date('Y/m/d H:i:s') . $offset));
if (empty($fr_date)) $fr_date = $today; if (empty($fr_date))
if($w=='' ){if ($_GET['fr_date']) { $fr_date = $today;
if ($w == '') {
if ($_GET['fr_date']) {
$write['wr_1'] = $_GET['fr_date']; $write['wr_1'] = $_GET['fr_date'];
} else { } else {
@ -40,13 +44,15 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<?php if ($is_name) { ?> <?php if ($is_name) { ?>
<p> <p>
<label for="wr_name">이름<strong class="sound_only">필수</strong></label> <label for="wr_name">이름<strong class="sound_only">필수</strong></label>
<input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required" size="10" maxlength="20"> <input type="text" name="wr_name" value="<?php echo $name ?>" id="wr_name" required class="frm_input required"
size="10" maxlength="20">
</p> </p>
<?php } ?> <?php } ?>
<?php if ($is_password) { ?> <?php if ($is_password) { ?>
<p> <p>
<label for="wr_password">패스워드<strong class="sound_only">필수</strong></label> <label for="wr_password">패스워드<strong class="sound_only">필수</strong></label>
<input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?> class="frm_input <?php echo $password_required ?>" maxlength="20"> <input type="password" name="wr_password" id="wr_password" <?php echo $password_required ?>
class="frm_input <?php echo $password_required ?>" maxlength="20">
</p> </p>
<?php } ?> <?php } ?>
<?php if ($option) { ?> <?php if ($option) { ?>
@ -63,18 +69,25 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</p> </p>
<?php } ?> <?php } ?>
<p> <p>
<input type="hidden" name="wr_subject" value="<?php echo $write['wr_1']; ?>" id="wr_subject" required maxlength="255"> <input type="hidden" name="wr_subject" value="<?php echo $write['wr_1']; ?>" id="wr_subject" required
<input type="text" name="wr_1" value="<?php echo $write['wr_1']; ?>" id="wr_1" required class="date full frm_input required" size="21" maxlength="8" placeholder="날짜"> maxlength="255">
<input type="text" name="wr_1" value="<?php echo $write['wr_1']; ?>" id="wr_1" required
class="date full frm_input required" size="21" maxlength="8" placeholder="날짜">
</p> </p>
</div> </div>
<section class="options"> <section class="options">
<input type="text" name="wr_4" id="wr_4" value="<?=$write['wr_4']?>" placeholder="<?=$board['bo_5'] ? $board['bo_5']: "날씨";?>"><input type="text" name="wr_3" id="wr_3" value="<?=$write['wr_3']?>" placeholder="<?=$board['bo_6'] ? $board['bo_6']: "무드";?>"> <input type="text" name="wr_4" id="wr_4" value="<?= $write['wr_4'] ?>"
placeholder="<?= $board['bo_5'] ? $board['bo_5'] : "날씨"; ?>"><input type="text" name="wr_3" id="wr_3"
value="<?= $write['wr_3'] ?>" placeholder="<?= $board['bo_6'] ? $board['bo_6'] : "무드"; ?>">
</section> </section>
<textarea name="wr_content" id="wr_content" maxlength="255" required></textarea> <textarea name="wr_content" id="wr_content" maxlength="255" required></textarea>
<input type="file" id="wr_file" name="bf_file[0]" title="파일첨부 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능" class="frm_file frm_input full"> <input type="file" id="wr_file" name="bf_file[0]" title="파일첨부 : 용량 <?php echo $upload_max_filesize ?> 이하만 업로드 가능"
class="frm_file frm_input full">
<div class="btn_confirm txt-right"> <div class="btn_confirm txt-right">
<label id="file_del" for="bf_file_del0" class="sound_only"><input type="checkbox" id="bf_file_del0" name="bf_file_del[0]" value="1"> 파일 삭제</label> <label id="file_del" for="bf_file_del0" class="sound_only"><input type="checkbox" id="bf_file_del0"
<?if($is_secret){?><label for="secret" id="wr_secret"><input type="checkbox" id="secret" value="secret" name="secret"> 비밀글 </label><?}?> name="bf_file_del[0]" value="1"> 파일 삭제</label>
<?php if ($is_secret) { ?><label for="secret" id="wr_secret"><input type="checkbox" id="secret" value="secret"
name="secret"> 비밀글 </label><?php } ?>
<input type="submit" value="입력" id="btn_submit" accesskey="s" class="ui-btn point"> <input type="submit" value="입력" id="btn_submit" accesskey="s" class="ui-btn point">
</div> </div>
</section> </section>
@ -88,8 +101,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
$(".date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yymmdd", showButtonPanel: true, yearRange: "c-99:c+99" }); $(".date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yymmdd", showButtonPanel: true, yearRange: "c-99:c+99" });
}); });
function html_auto_br(obj) function html_auto_br(obj) {
{
if (obj.checked) { if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다."); result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
if (result) if (result)
@ -101,8 +113,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
obj.value = ""; obj.value = "";
} }
function fwrite_submit(f) function fwrite_submit(f) {
{
var frdate = "<?= $fr_date ?>"; var frdate = "<?= $fr_date ?>";
var subject = ""; var subject = "";

View file

@ -1,5 +1,6 @@
<? <?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if (!defined("_GNUBOARD_"))
exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요. // 자신만의 코드를 넣어주세요.
@ -11,5 +12,5 @@ if($wr_etc){
where wr_id = '{$wr_id}' "; where wr_id = '{$wr_id}' ";
sql_query($sql); sql_query($sql);
} }
goto_url("./board.php?bo_table=$bo_table"); goto_url("./board.php?bo_table=$bo_table");
?>