window.alert('".$message."'); history.go(-1); "; exit; } // end func /* ************************* °°Àº È£½ºÆ®¿¡¼­ ³Ñ¾î¿Ô´ÂÁö üũ ************************* */ function referer(){ $referer = explode('/',preg_replace("/http:\/\//",'',$_SERVER[HTTP_REFERER])); if ($referer[0] <> $_SERVER[HTTP_HOST]) { echo" "; exit; } } // end func referer(); if($_SERVER['REQUEST_METHOD'] <> 'POST') { goBack('Á¤»óÀûÀÎ ¹æ¹ýÀ¸·Î Á¢±ÙÇϽʽÿä.') ; } // ¾÷·Îµå µð·ºÅ丮°¡ ÀÖ´ÂÁö üũ if (!@is_dir($dir)) { goBack('¾÷·Îµå Æú´õ°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.'); } // ¾÷·Îµå Æú´õÀÇ ÆÛ¹Ì¼Ç 707ÀÎÁö üũ if(substr(decoct(fileperms($dir)),2) <> 707){ goBack("¾÷·Îµå Æú´õÀÇ ÆÛ¹Ì¼Ç 707·Î º¯°æÇØ ÁÖ¼¼¿ä."); } /*************************************************************************************** ************************* ÆÄÀÏ Àü¼Û ****************************************************************************************/ if(is_uploaded_file($_FILES['upfile']['tmp_name']) && ($_FILES['upfile']['size'] > 0)) { $upfile = time(); // À̹ÌÁöÀ̸é.. if($_POST['type']==1){ $tmp_file = @getimagesize($_FILES['upfile']['tmp_name'],&$type); $upfile .= '.img.gm'; // (1) = gif, (2) = jpg, (3) = png, (4) = swf, (5) = psd, (6) = bmp if(($tmp_file[2] != 1) && ($tmp_file[2] != 2) && ($tmp_file[2] != 6)) { goBack('GIF,JPG,BMP È®ÀåÀÚ°¡ ¾÷·Îµå °¡´ÉÇÕ´Ï´Ù.'); } } // ¹Ìµð¾îÀ̸é.. else{ $ext = substr($_FILES['upfile']['name'],strrpos(stripslashes($_FILES['upfile']['name']),'.')+1); $media_chk = ''; foreach($old as $key => $value){ if($value == $ext){ $media_chk = 1; break; } } $upfile .= '.midi.'.$ext; if($media_chk <> 1) goBack('¹Ìµð¾îÆÄÀϸ¸ ¾÷·ÎµåÇØ ÁÖ¼¼¿ä.'); } // end if if(!@move_uploaded_file($_FILES['upfile']['tmp_name'],$dir.'/'.$upfile)) { @unlink($dir.'/'.$upfile); goBack('ÆÄÀÏÀ» º¹»çÇϴµ¥ ½ÇÆÐÇÏ¿´½À´Ï´Ù.'); } @chmod($dir.'/'.$upfile,0606); } // end if /*************************************************************************************** ************************* ³»¿ëÀ» ¿¡µðÅÍ¿¡ »ðÀÔ ****************************************************************************************/ if(is_file($dir.'/'.$upfile)){ $imgsize = (int)$_POST['imgsize']; $title = addslashes($_POST['title']); $alignment = $_POST['alignment']; $upfile_ok = $dir.'/'.addslashes($upfile); $file_path = $_POST['url'].'/'.$upfile_ok; ECHO "\n"; } else{ ECHO "\n"; } ?>