Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -18,11 +18,11 @@ include_once($g4['path'].'/head.sub.php');
|
||||
<caption>기존 게시판을 새 게시판으로 복사</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="col">원본 테이블</th>
|
||||
<th scope="col">원본 테이블명</th>
|
||||
<td><?=$bo_table?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"><label for="target_table">복사할 TABLE</label></th>
|
||||
<th scope="col"><label for="target_table">복사 테이블명</label></th>
|
||||
<td><input type="text" id="target_table" name="target_table" maxlength="20" class="required alnum_" required="required" title="복사할 TABLE"> 영문자, 숫자, _ 만 가능 (공백없이)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -53,6 +53,11 @@ include_once($g4['path'].'/head.sub.php');
|
||||
<script>
|
||||
function fboardcopy_check(f)
|
||||
{
|
||||
if (f.bo_table.value == f.target_table.value) {
|
||||
alert("원본 테이블명과 복사할 테이블명이 달라야 합니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
<? echo chk_captcha_js(); ?>
|
||||
|
||||
return true;
|
||||
|
||||
@ -12,14 +12,13 @@ if (!chk_captcha()) {
|
||||
$target_table = escape_trim($_POST['target_table']);
|
||||
$target_subject = escape_trim($_POST['target_subject']);
|
||||
|
||||
if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table))
|
||||
{
|
||||
if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
||||
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
||||
}
|
||||
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g4['board_table']} where bo_table = '$target_table' ");
|
||||
if ($row['cnt'])
|
||||
alert($target_table.'은(는) 이미 존재하는 게시판 TABLE 입니다.\\n\\n복사할 TABLE로 사용할 수 없습니다.');
|
||||
alert($target_table.'은(는) 이미 존재하는 게시판 테이블명 입니다.\\n복사할 테이블명으로 사용할 수 없습니다.');
|
||||
|
||||
check_token();
|
||||
|
||||
@ -119,20 +118,11 @@ $f = @fopen($file, 'w');
|
||||
@chmod($file, 0606);
|
||||
|
||||
$copy_file = 0;
|
||||
if ($copy_case == 'schema_data_both')
|
||||
{
|
||||
if ($copy_case == 'schema_data_both') {
|
||||
$d = dir($g4['path'].'/data/file/'.$bo_table);
|
||||
while ($entry = $d->read())
|
||||
{
|
||||
while ($entry = $d->read()) {
|
||||
if ($entry == '.' || $entry == '..') continue;
|
||||
|
||||
/*
|
||||
@copy('$g4['path']/data/file/$bo_table/$entry', '$g4['path']/data/file/$target_table/$entry');
|
||||
@chmod('$g4['path']/data/file/$target_table/$entry', 0707);
|
||||
|
||||
$copy_file++;
|
||||
*/
|
||||
|
||||
// 김선용 201007 :
|
||||
if(is_dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry)){
|
||||
$dd = dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry);
|
||||
@ -164,11 +154,6 @@ if ($copy_case == 'schema_data_both')
|
||||
$sql = " update {$g4['board_table']} set bo_count_write = '{$row['bo_count_write']}', bo_count_comment = '{$row['bo_count_comment']}' where bo_table = '$target_table' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 05.05.24
|
||||
// 파일테이블 복사
|
||||
//$sql = ' insert into $g4['board_file_table'] select "$target_table", wr_id, bf_no, bf_source, bf_file, bf_download, bf_content from $g4['board_file_table'] where bo_table = "$bo_table" ';
|
||||
//sql_query($sql);
|
||||
|
||||
// 4.00.01
|
||||
// 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;)
|
||||
$sql = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' ";
|
||||
@ -177,10 +162,8 @@ if ($copy_case == 'schema_data_both')
|
||||
$file_copy[$i] = $row;
|
||||
}
|
||||
|
||||
if (count($file_copy))
|
||||
{
|
||||
for ($i=0; $i<count($file_copy); $i++)
|
||||
{
|
||||
if (count($file_copy)) {
|
||||
for ($i=0; $i<count($file_copy); $i++) {
|
||||
$sql = " insert into {$g4['board_file_table']}
|
||||
set bo_table = '$target_table',
|
||||
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||
@ -197,14 +180,8 @@ if (count($file_copy))
|
||||
sql_query($sql, FALSE);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=<?=$g4['charset']?>">
|
||||
<script>
|
||||
alert('게시판 복사 : <?=$bo_table?> > <?=$target_table?> 성공 <? if ($copy_file) echo PHP_EOL.' 복사한 파일 : 총 <?=$copy_file?>개';?>');
|
||||
opener.document.location.reload();
|
||||
</script>
|
||||
echo "<script>opener.document.location.reload();</script>";
|
||||
|
||||
<?
|
||||
goto_url('./board_copy.php?bo_table='.$bo_table.'&'.$qstr);
|
||||
?>
|
||||
alert("복사에 성공 했습니다.", './board_copy.php?bo_table='.$bo_table.'&'.$qstr);
|
||||
?>
|
||||
@ -656,10 +656,9 @@ if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
|
||||
<th scope="row"><label for="bo_reply_order">답변 달기</label></th>
|
||||
<td>
|
||||
<select id="bo_reply_order" name="bo_reply_order">
|
||||
<option value="1">나중에 쓴 답변 아래로 달기 (기본)
|
||||
<option value='0'>나중에 쓴 답변 위로 달기
|
||||
<option value="1" <?=get_selected($board['bo_reply_order'], 1, true);?>>나중에 쓴 답변 아래로 달기 (기본)
|
||||
<option value="0" <?=get_selected($board['bo_reply_order'], 0);?>>나중에 쓴 답변 위로 달기
|
||||
</select>
|
||||
<script> document.fboardform.bo_reply_order.value = "<?=$board['bo_reply_order']?>"; </script>
|
||||
</td>
|
||||
<td class="group_setting">
|
||||
<input type="checkbox" id="chk_reply_order" name="chk_reply_order" value="1">
|
||||
@ -671,27 +670,26 @@ if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
|
||||
<td>
|
||||
<?=help('리스트에서 기본으로 정렬에 사용할 필드를 선택합니다. "기본"으로 사용하지 않으시는 경우 속도가 느려질 수 있습니다.')?>
|
||||
<select id="bo_sort_field" name="bo_sort_field">
|
||||
<option value="">wr_num, wr_reply : 기본</option>
|
||||
<option value="wr_datetime asc">wr_datetime asc : 날짜 이전것 부터</option>
|
||||
<option value="wr_datetime desc">wr_datetime desc : 날짜 최근것 부터</option>
|
||||
<option value="wr_hit asc, wr_num, wr_reply">wr_hit asc : 조회수 낮은것 부터</option>
|
||||
<option value="wr_hit desc, wr_num, wr_reply">wr_hit desc : 조회수 높은것 부터</option>
|
||||
<option value="wr_last asc">wr_last asc : 최근글 이전것 부터</option>
|
||||
<option value="wr_last desc">wr_last desc : 최근글 최근것 부터</option>
|
||||
<option value="wr_comment asc, wr_num, wr_reply">wr_comment asc : 댓글수 낮은것 부터</option>
|
||||
<option value="wr_comment desc, wr_num, wr_reply">wr_comment desc : 댓글수 높은것 부터</option>
|
||||
<option value="wr_good asc, wr_num, wr_reply">wr_good asc : 추천수 낮은것 부터</option>
|
||||
<option value="wr_good desc, wr_num, wr_reply">wr_good desc : 추천수 높은것 부터</option>
|
||||
<option value="wr_nogood asc, wr_num, wr_reply">wr_nogood asc : 비추천수 낮은것 부터</option>
|
||||
<option value="wr_nogood desc, wr_num, wr_reply">wr_nogood desc : 비추천수 높은것 부터</option>
|
||||
<option value="wr_subject asc, wr_num, wr_reply">wr_subject asc : 제목 내림차순</option>
|
||||
<option value="wr_subject desc, wr_num, wr_reply">wr_subject desc : 제목 오름차순</option>
|
||||
<option value="wr_name asc, wr_num, wr_reply">wr_name asc : 글쓴이 내림차순</option>
|
||||
<option value="wr_name desc, wr_num, wr_reply">wr_name desc : 글쓴이 오름차순</option>
|
||||
<option value="ca_name asc, wr_num, wr_reply">ca_name asc : 분류명 내림차순</option>
|
||||
<option value="ca_name desc, wr_num, wr_reply">ca_name desc : 분류명 오름차순</option>
|
||||
<option value="" <?=get_selected($board['bo_sort_field'], "" );?>>wr_num, wr_reply : 기본</option>
|
||||
<option value="wr_datetime asc" <?=get_selected($board['bo_sort_field'], "wr_datetime asc" );?>>wr_datetime asc : 날짜 이전것 부터</option>
|
||||
<option value="wr_datetime desc" <?=get_selected($board['bo_sort_field'], "wr_datetime desc" );?>>wr_datetime desc : 날짜 최근것 부터</option>
|
||||
<option value="wr_hit asc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_hit asc, wr_num, wr_reply" );?>>wr_hit asc : 조회수 낮은것 부터</option>
|
||||
<option value="wr_hit desc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_hit desc, wr_num, wr_reply" );?>>wr_hit desc : 조회수 높은것 부터</option>
|
||||
<option value="wr_last asc" <?=get_selected($board['bo_sort_field'], "wr_last asc" );?>>wr_last asc : 최근글 이전것 부터</option>
|
||||
<option value="wr_last desc" <?=get_selected($board['bo_sort_field'], "wr_last desc" );?>>wr_last desc : 최근글 최근것 부터</option>
|
||||
<option value="wr_comment asc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_comment asc, wr_num, wr_reply" );?>>wr_comment asc : 댓글수 낮은것 부터</option>
|
||||
<option value="wr_comment desc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_comment desc, wr_num, wr_reply" );?>>wr_comment desc : 댓글수 높은것 부터</option>
|
||||
<option value="wr_good asc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_good asc, wr_num, wr_reply" );?>>wr_good asc : 추천수 낮은것 부터</option>
|
||||
<option value="wr_good desc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_good desc, wr_num, wr_reply" );?>>wr_good desc : 추천수 높은것 부터</option>
|
||||
<option value="wr_nogood asc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_nogood asc, wr_num, wr_reply" );?>>wr_nogood asc : 비추천수 낮은것 부터</option>
|
||||
<option value="wr_nogood desc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_nogood desc, wr_num, wr_reply" );?>>wr_nogood desc : 비추천수 높은것 부터</option>
|
||||
<option value="wr_subject asc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_subject asc, wr_num, wr_reply" );?>>wr_subject asc : 제목 내림차순</option>
|
||||
<option value="wr_subject desc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_subject desc, wr_num, wr_reply" );?>>wr_subject desc : 제목 오름차순</option>
|
||||
<option value="wr_name asc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_name asc, wr_num, wr_reply" );?>>wr_name asc : 글쓴이 내림차순</option>
|
||||
<option value="wr_name desc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "wr_name desc, wr_num, wr_reply" );?>>wr_name desc : 글쓴이 오름차순</option>
|
||||
<option value="ca_name asc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "ca_name asc, wr_num, wr_reply" );?>>ca_name asc : 분류명 내림차순</option>
|
||||
<option value="ca_name desc, wr_num, wr_reply" <?=get_selected($board['bo_sort_field'], "ca_name desc, wr_num, wr_reply" );?>>ca_name desc : 분류명 오름차순</option>
|
||||
</select>
|
||||
<script> document.fboardform.bo_sort_field.value = "<?=$board['bo_sort_field']?>"; </script>
|
||||
</td>
|
||||
<td class="group_setting">
|
||||
<input type="checkbox" id="chk_sort_field" name="chk_sort_field" value="1">
|
||||
|
||||
@ -105,7 +105,7 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
<?=get_paging($config[cf_write_pages], $page, $total_page, $_SERVER[PHP_SELF].'?'.$qstr.'&page=');?>
|
||||
</div>
|
||||
|
||||
<div class="btn_window">
|
||||
<div class="btn_win">
|
||||
<a href="javascript:window.close();">창닫기</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -120,7 +120,7 @@ a {color:#000;text-decoration:none}
|
||||
#ol_after li {float:left}
|
||||
#ol_after_rec {background:#fff}
|
||||
#ol_after_rec a {display:inline-block;position:relative;width:60px;height:50px;font-size:0.9em;vertical-align:top}
|
||||
#ol_after_rec span {position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;line-height:7em}
|
||||
#ol_after_rec span {position:absolute;top:0;left:0;padding-top:30px;width:100%;height:20px;text-align:center}
|
||||
#ol_after_rec #ol_after_pt {width:97px;border-right:1px solid #ddd;border-left:1px solid #ddd}
|
||||
#ol_after_memo span {background:url('../img/ol_after_bg.jpg')}
|
||||
#ol_after_memo:focus span,
|
||||
|
||||
@ -35,13 +35,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<<<<<<< HEAD
|
||||
<?=captcha_html();?>
|
||||
|
||||
<div class="btn_window btn_confirm">
|
||||
=======
|
||||
<div class="btn_win">
|
||||
>>>>>>> 41f59fa9ae589fc22660fde7d19293f195aede31
|
||||
<input type="submit" id="btn_submit" class="btn_submit" value="보내기">
|
||||
<a href="javascript:window.close();">창닫기</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user