관리자:게시판 복사

This commit is contained in:
whitedot
2012-11-19 16:33:47 +09:00
parent 7c20f6e119
commit 3796000f36
2 changed files with 98 additions and 98 deletions

View File

@ -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="token" name="token" value="<?=$token?>">
<table>
<caption>기존 게시판을 새 게시판으로 복사</caption>
<tbody>
<tr>
<th scope="col">원본 테이블</th>

View File

@ -65,8 +65,8 @@ $sql = " insert into {$g4['board_table']}
bo_subject_len = '{$board['bo_subject_len']}',
bo_page_rows = '{$board['bo_page_rows']}',
bo_new = '{$board['bo_new']}',
bo_hot = '{$board['bo_hot']',
bo_image_width = '{$board['bo_image_width']',
bo_hot = '{$board['bo_hot']}',
bo_image_width = '{$board[bo_image_width]}',
bo_skin = '{$board['bo_skin']}',
bo_include_head = '{$board['bo_include_head']}',
bo_include_tail = '{$board['bo_include_tail']}',
@ -97,7 +97,7 @@ $sql = " insert into {$g4['board_table']}
bo_3 = '{$board['bo_3']}',
bo_4 = '{$board['bo_4']}',
bo_5 = '{$board['bo_5']}',
bo_6 = '{$board['bo_6']',
bo_6 = '{$board['bo_6']}',
bo_7 = '{$board['bo_7']}',
bo_8 = '{$board['bo_8']}',
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)){
$dd = dir($g4['path'].'/data/file/'.$bo_table.'/'.$entry);
@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()) {
if ($entry2 == '.' || $entry2 == '..') continue;
@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);
}
}
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=$g4['charset']\">";
echo "<script type=\"text/javascript\">";
echo "alert('게시판 복사 : {$bo_table} -> {$target_table}";
if ($copy_file)
echo "\\n\\n복사한 파일 : 총 {$copy_file}";
echo ");";
echo "opener.document.location.reload();";
echo "</script>";
goto_url('./board_copy.php?bo_table='.$bo_table.'&amp'.$qstr');
?>
<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>
<?
goto_url('./board_copy.php?bo_table='.$bo_table.'&amp;'.$qstr);
?>