디렉토리 및 파일 생성 퍼미션 정의된 상수로 변경
This commit is contained in:
@ -9,8 +9,8 @@ if ($W == 'd')
|
|||||||
else
|
else
|
||||||
auth_check($auth[$sub_menu], "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
@mkdir(G4_DATA_PATH."/banner", 0707);
|
@mkdir(G4_DATA_PATH."/banner", G4_DIR_PERMISSION);
|
||||||
@chmod(G4_DATA_PATH."/banner", 0707);
|
@chmod(G4_DATA_PATH."/banner", G4_DIR_PERMISSION);
|
||||||
|
|
||||||
$bn_bimg = $_FILES['bn_bimg']['tmp_name'];
|
$bn_bimg = $_FILES['bn_bimg']['tmp_name'];
|
||||||
$bn_bimg_name = $_FILES['bn_bimg']['name'];
|
$bn_bimg_name = $_FILES['bn_bimg']['name'];
|
||||||
|
|||||||
@ -34,8 +34,8 @@ if ($w == "" || $w == "u")
|
|||||||
}
|
}
|
||||||
|
|
||||||
$g4['category_path'] = G4_DATA_PATH."/category";
|
$g4['category_path'] = G4_DATA_PATH."/category";
|
||||||
@mkdir($g4['category_path'], 0707);
|
@mkdir($g4['category_path'], G4_DIR_PERMISSION);
|
||||||
@chmod($g4['category_path'], 0707);
|
@chmod($g4['category_path'], G4_DIR_PERMISSION);
|
||||||
|
|
||||||
if ($ca_image1_del) @unlink("{$g4['category_path']}/{$ca_id}_1");
|
if ($ca_image1_del) @unlink("{$g4['category_path']}/{$ca_id}_1");
|
||||||
if ($ca_image0_del) @unlink("{$g4['category_path']}/{$ca_id}_0");
|
if ($ca_image0_del) @unlink("{$g4['category_path']}/{$ca_id}_0");
|
||||||
|
|||||||
@ -10,8 +10,8 @@ if ($w == 'd')
|
|||||||
else
|
else
|
||||||
auth_check($auth[$sub_menu], "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
@mkdir(G4_DATA_PATH."/content", 0707);
|
@mkdir(G4_DATA_PATH."/content", G4_DIR_PERMISSION);
|
||||||
@chmod(G4_DATA_PATH."/content", 0707);
|
@chmod(G4_DATA_PATH."/content", G4_DIR_PERMISSION);
|
||||||
|
|
||||||
if ($co_himg_del) @unlink(G4_DATA_PATH."/content/{$co_id}_h");
|
if ($co_himg_del) @unlink(G4_DATA_PATH."/content/{$co_id}_h");
|
||||||
if ($co_timg_del) @unlink(G4_DATA_PATH."/content/{$co_id}_t");
|
if ($co_timg_del) @unlink(G4_DATA_PATH."/content/{$co_id}_t");
|
||||||
|
|||||||
@ -10,8 +10,8 @@ if ($W == 'd')
|
|||||||
else
|
else
|
||||||
auth_check($auth[$sub_menu], "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
@mkdir(G4_DATA_PATH."/faq", 0707);
|
@mkdir(G4_DATA_PATH."/faq", G4_DIR_PERMISSION);
|
||||||
@chmod(G4_DATA_PATH."/faq", 0707);
|
@chmod(G4_DATA_PATH."/faq", G4_DIR_PERMISSION);
|
||||||
|
|
||||||
if ($fm_himg_del) @unlink(G4_DATA_PATH."/faq/{$fm_id}_h");
|
if ($fm_himg_del) @unlink(G4_DATA_PATH."/faq/{$fm_id}_h");
|
||||||
if ($fm_timg_del) @unlink(G4_DATA_PATH."/faq/{$fm_id}_t");
|
if ($fm_timg_del) @unlink(G4_DATA_PATH."/faq/{$fm_id}_t");
|
||||||
|
|||||||
@ -109,8 +109,8 @@ function copy_directory($src_dir, $dest_dir)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(!is_dir($dest_dir)) {
|
if(!is_dir($dest_dir)) {
|
||||||
@mkdir($dest_dir, 0707);
|
@mkdir($dest_dir, G4_DIR_PERMISSION);
|
||||||
@chmod($dest_dir, 0707);
|
@chmod($dest_dir, G4_DIR_PERMISSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dir = opendir($src_dir);
|
$dir = opendir($src_dir);
|
||||||
@ -126,15 +126,15 @@ function copy_directory($src_dir, $dest_dir)
|
|||||||
$dest_file = $dest_dir.'/'.$files[$i];
|
$dest_file = $dest_dir.'/'.$files[$i];
|
||||||
if(is_file($src_file)) {
|
if(is_file($src_file)) {
|
||||||
copy($src_file, $dest_file);
|
copy($src_file, $dest_file);
|
||||||
@chmod($dest_file, 0606);
|
@chmod($dest_file, G4_FILE_PERMISSION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 파일복사
|
// 파일복사
|
||||||
$dest_path = G4_DATA_PATH.'/item/'.$new_it_id;
|
$dest_path = G4_DATA_PATH.'/item/'.$new_it_id;
|
||||||
@mkdir($dest_path, 0707);
|
@mkdir($dest_path, G4_DIR_PERMISSION);
|
||||||
@chmod($dest_path, 0707);
|
@chmod($dest_path, G4_DIR_PERMISSION);
|
||||||
$comma = '';
|
$comma = '';
|
||||||
$sql_img = '';
|
$sql_img = '';
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ for($i=1; $i<=10; $i++) {
|
|||||||
if(is_file($file)) {
|
if(is_file($file)) {
|
||||||
$dstfile = $dest_path.'/'.basename($file);
|
$dstfile = $dest_path.'/'.basename($file);
|
||||||
copy($file, $dstfile);
|
copy($file, $dstfile);
|
||||||
@chmod($dstfile, 0606);
|
@chmod($dstfile, G4_FILE_PERMISSION);
|
||||||
$new_img = $new_it_id.'/'.basename($file);
|
$new_img = $new_it_id.'/'.basename($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,8 +10,8 @@ if ($w == 'd')
|
|||||||
else
|
else
|
||||||
auth_check($auth[$sub_menu], "w");
|
auth_check($auth[$sub_menu], "w");
|
||||||
|
|
||||||
@mkdir(G4_DATA_PATH."/event", 0707);
|
@mkdir(G4_DATA_PATH."/event", G4_DIR_PERMISSION);
|
||||||
@chmod(G4_DATA_PATH."/event", 0707);
|
@chmod(G4_DATA_PATH."/event", G4_DIR_PERMISSION);
|
||||||
|
|
||||||
if ($ev_mimg_del) @unlink(G4_DATA_PATH."/event/{$ev_id}_m");
|
if ($ev_mimg_del) @unlink(G4_DATA_PATH."/event/{$ev_id}_m");
|
||||||
if ($ev_himg_del) @unlink(G4_DATA_PATH."/event/{$ev_id}_h");
|
if ($ev_himg_del) @unlink(G4_DATA_PATH."/event/{$ev_id}_h");
|
||||||
|
|||||||
@ -10,8 +10,8 @@ if ($w == '' || $w == 'u')
|
|||||||
else if ($w == 'd')
|
else if ($w == 'd')
|
||||||
auth_check($auth[$sub_menu], "d");
|
auth_check($auth[$sub_menu], "d");
|
||||||
|
|
||||||
@mkdir(G4_DATA_PATH."/item", 0707);
|
@mkdir(G4_DATA_PATH."/item", G4_DIR_PERMISSION);
|
||||||
@chmod(G4_DATA_PATH."/item", 0707);
|
@chmod(G4_DATA_PATH."/item", G4_DIR_PERMISSION);
|
||||||
|
|
||||||
// 파일정보
|
// 파일정보
|
||||||
if($w == "u") {
|
if($w == "u") {
|
||||||
|
|||||||
@ -419,8 +419,8 @@ if($shop_install) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
for ($i=0; $i<count($dir_arr); $i++) {
|
for ($i=0; $i<count($dir_arr); $i++) {
|
||||||
@mkdir($dir_arr[$i], 0707);
|
@mkdir($dir_arr[$i], G4_DIR_PERMISSION);
|
||||||
@chmod($dir_arr[$i], 0707);
|
@chmod($dir_arr[$i], G4_DIR_PERMISSION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -635,8 +635,8 @@ function it_img_upload($srcfile, $filename, $dir)
|
|||||||
return '';
|
return '';
|
||||||
|
|
||||||
if(!is_dir($dir)) {
|
if(!is_dir($dir)) {
|
||||||
@mkdir($dir, 0707);
|
@mkdir($dir, G4_DIR_PERMISSION);
|
||||||
@chmod($dir, 0707);
|
@chmod($dir, G4_DIR_PERMISSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filename = preg_replace("/\s+/", "", $filename);
|
$filename = preg_replace("/\s+/", "", $filename);
|
||||||
@ -660,7 +660,7 @@ function upload_file($srcfile, $destfile, $dir)
|
|||||||
if ($destfile == "") return false;
|
if ($destfile == "") return false;
|
||||||
// 업로드 한후 , 퍼미션을 변경함
|
// 업로드 한후 , 퍼미션을 변경함
|
||||||
@move_uploaded_file($srcfile, $dir.'/'.$destfile);
|
@move_uploaded_file($srcfile, $dir.'/'.$destfile);
|
||||||
@chmod($dir.'/'.$destfile, 0606);
|
@chmod($dir.'/'.$destfile, G4_FILE_PERMISSION);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ class g4_thumb {
|
|||||||
var $green = 0xff;
|
var $green = 0xff;
|
||||||
var $blue = 0xff;
|
var $blue = 0xff;
|
||||||
var $quality = 100;
|
var $quality = 100;
|
||||||
var $permission = 0606;
|
var $permission = G4_FILE_PERMISSION;
|
||||||
|
|
||||||
function g4_thumb($path, $width) {
|
function g4_thumb($path, $width) {
|
||||||
$this->set_path($path);
|
$this->set_path($path);
|
||||||
@ -27,8 +27,8 @@ class g4_thumb {
|
|||||||
// 경로
|
// 경로
|
||||||
function set_path($path) {
|
function set_path($path) {
|
||||||
$this->path = $path;
|
$this->path = $path;
|
||||||
@mkdir($path, 0707);
|
@mkdir($path, G4_DIR_PERMISSION);
|
||||||
@chmod($path, 0707);
|
@chmod($path, G4_DIR_PERMISSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_width($width) {
|
function set_width($width) {
|
||||||
|
|||||||
Reference in New Issue
Block a user