관리자:게시판 복사
This commit is contained in:
@ -15,6 +15,7 @@ include_once($g4['path'].'/head.sub.php');
|
|||||||
<input type="hidden" id="bo_table" name="bo_table" value="<?=$bo_table?>">
|
<input type="hidden" id="bo_table" name="bo_table" value="<?=$bo_table?>">
|
||||||
<input type="hidden" id="token" name="token" value="<?=$token?>">
|
<input type="hidden" id="token" name="token" value="<?=$token?>">
|
||||||
<table>
|
<table>
|
||||||
|
<caption>기존 게시판을 새 게시판으로 복사</caption>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">원본 테이블</th>
|
<th scope="col">원본 테이블</th>
|
||||||
|
|||||||
@ -65,8 +65,8 @@ $sql = " insert into {$g4['board_table']}
|
|||||||
bo_subject_len = '{$board['bo_subject_len']}',
|
bo_subject_len = '{$board['bo_subject_len']}',
|
||||||
bo_page_rows = '{$board['bo_page_rows']}',
|
bo_page_rows = '{$board['bo_page_rows']}',
|
||||||
bo_new = '{$board['bo_new']}',
|
bo_new = '{$board['bo_new']}',
|
||||||
bo_hot = '{$board['bo_hot']',
|
bo_hot = '{$board['bo_hot']}',
|
||||||
bo_image_width = '{$board['bo_image_width']',
|
bo_image_width = '{$board[bo_image_width]}',
|
||||||
bo_skin = '{$board['bo_skin']}',
|
bo_skin = '{$board['bo_skin']}',
|
||||||
bo_include_head = '{$board['bo_include_head']}',
|
bo_include_head = '{$board['bo_include_head']}',
|
||||||
bo_include_tail = '{$board['bo_include_tail']}',
|
bo_include_tail = '{$board['bo_include_tail']}',
|
||||||
@ -97,7 +97,7 @@ $sql = " insert into {$g4['board_table']}
|
|||||||
bo_3 = '{$board['bo_3']}',
|
bo_3 = '{$board['bo_3']}',
|
||||||
bo_4 = '{$board['bo_4']}',
|
bo_4 = '{$board['bo_4']}',
|
||||||
bo_5 = '{$board['bo_5']}',
|
bo_5 = '{$board['bo_5']}',
|
||||||
bo_6 = '{$board['bo_6']',
|
bo_6 = '{$board['bo_6']}',
|
||||||
bo_7 = '{$board['bo_7']}',
|
bo_7 = '{$board['bo_7']}',
|
||||||
bo_8 = '{$board['bo_8']}',
|
bo_8 = '{$board['bo_8']}',
|
||||||
bo_9 = '{$board['bo_9']}',
|
bo_9 = '{$board['bo_9']}',
|
||||||
@ -135,7 +135,7 @@ if ($copy_case == 'schema_data_both')
|
|||||||
if(is_dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry)){
|
if(is_dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry)){
|
||||||
$dd = dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry);
|
$dd = dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry);
|
||||||
@mkdir($g4['path'].'/data/file/'.$target_table.'/'.$entry, 0707);
|
@mkdir($g4['path'].'/data/file/'.$target_table.'/'.$entry, 0707);
|
||||||
@chmod('$g4['path']/data/file/$target_table/$entry', 0707);
|
@chmod($g4['path'].'/data/file/'.$target_table.'/'.$entry, 0707);
|
||||||
while ($entry2 = $dd->read()) {
|
while ($entry2 = $dd->read()) {
|
||||||
if ($entry2 == '.' || $entry2 == '..') continue;
|
if ($entry2 == '.' || $entry2 == '..') continue;
|
||||||
@copy($g4['path'].'/data/file/'.$bo_table.'/'.$entry.'/'.$entry2, $g4['path'].'/data/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
@copy($g4['path'].'/data/file/'.$bo_table.'/'.$entry.'/'.$entry2, $g4['path'].'/data/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
||||||
@ -195,15 +195,14 @@ if (count($file_copy))
|
|||||||
sql_query($sql, FALSE);
|
sql_query($sql, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=$g4['charset']\">";
|
|
||||||
echo "<script type=\"text/javascript\">";
|
<meta http-equiv="content-type" content="text/html; charset=<?=$g4['charset']?>">
|
||||||
echo "alert('게시판 복사 : {$bo_table} -> {$target_table}";
|
<script>
|
||||||
if ($copy_file)
|
alert('게시판 복사 : <?=$bo_table?> > <?=$target_table?> 성공 <? if ($copy_file) echo PHP_EOL.' 복사한 파일 : 총 <?=$copy_file?>개';?>');
|
||||||
echo "\\n\\n복사한 파일 : 총 {$copy_file}개";
|
opener.document.location.reload();
|
||||||
echo ");";
|
</script>
|
||||||
echo "opener.document.location.reload();";
|
|
||||||
echo "</script>";
|
<?
|
||||||
|
goto_url('./board_copy.php?bo_table='.$bo_table.'&'.$qstr);
|
||||||
goto_url('./board_copy.php?bo_table='.$bo_table.'&'.$qstr');
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user