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"); @mkdir("$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"); @chmod("$g4[path]/data/file/$target_table/$entry/$entry2", 0707); $copy_file++; } $dd->close(); } else { @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++; } } $d->close(); // 글복사 $sql = " insert into $g4[write_prefix]$target_table select * from $g4[write_prefix]$bo_table "; sql_query($sql); // 게시글수 저장 $sql = " select bo_count_write, bo_count_comment from $g4[board_table] where bo_table = '$bo_table' "; $row = sql_fetch($sql); $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' "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) $file_copy[$i] = $row; } if (count($file_copy)) { for ($i=0; $i"; echo ""; goto_url("./board_copy.php?bo_table=$bo_table&$qstr"); ?>