이전의 win_zip 함수 삭제
This commit is contained in:
207
js/common.js
207
js/common.js
@ -3,9 +3,9 @@ var errmsg = "";
|
||||
var errfld = null;
|
||||
|
||||
// 필드 검사
|
||||
function check_field(fld, msg)
|
||||
function check_field(fld, msg)
|
||||
{
|
||||
if ((fld.value = trim(fld.value)) == "")
|
||||
if ((fld.value = trim(fld.value)) == "")
|
||||
error_field(fld, msg);
|
||||
else
|
||||
clear_field(fld);
|
||||
@ -13,7 +13,7 @@ function check_field(fld, msg)
|
||||
}
|
||||
|
||||
// 필드 오류 표시
|
||||
function error_field(fld, msg)
|
||||
function error_field(fld, msg)
|
||||
{
|
||||
if (msg != "")
|
||||
errmsg += msg + "\n";
|
||||
@ -22,7 +22,7 @@ function error_field(fld, msg)
|
||||
}
|
||||
|
||||
// 필드를 깨끗하게
|
||||
function clear_field(fld)
|
||||
function clear_field(fld)
|
||||
{
|
||||
fld.style.background = "#FFFFFF";
|
||||
}
|
||||
@ -36,7 +36,7 @@ function trim(s)
|
||||
{
|
||||
if (s.charAt(i) == ' ')
|
||||
continue;
|
||||
else
|
||||
else
|
||||
{
|
||||
from_pos = i;
|
||||
break;
|
||||
@ -47,12 +47,12 @@ function trim(s)
|
||||
{
|
||||
if (s.charAt(i-1) == ' ')
|
||||
continue;
|
||||
else
|
||||
else
|
||||
{
|
||||
to_pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
t = s.substring(from_pos, to_pos);
|
||||
// alert(from_pos + ',' + to_pos + ',' + t+'.');
|
||||
@ -61,26 +61,26 @@ function trim(s)
|
||||
|
||||
// 자바스크립트로 PHP의 number_format 흉내를 냄
|
||||
// 숫자에 , 를 출력
|
||||
function number_format(data)
|
||||
function number_format(data)
|
||||
{
|
||||
|
||||
|
||||
var tmp = '';
|
||||
var number = '';
|
||||
var cutlen = 3;
|
||||
var comma = ',';
|
||||
var i;
|
||||
|
||||
|
||||
len = data.length;
|
||||
mod = (len % cutlen);
|
||||
k = cutlen - mod;
|
||||
for (i=0; i<data.length; i++)
|
||||
for (i=0; i<data.length; i++)
|
||||
{
|
||||
number = number + data.charAt(i);
|
||||
|
||||
if (i < data.length - 1)
|
||||
|
||||
if (i < data.length - 1)
|
||||
{
|
||||
k++;
|
||||
if ((k % cutlen) == 0)
|
||||
if ((k % cutlen) == 0)
|
||||
{
|
||||
number = number + comma;
|
||||
k = 0;
|
||||
@ -121,10 +121,10 @@ function no_comma(data)
|
||||
}
|
||||
|
||||
// 삭제 검사 확인
|
||||
function del(href)
|
||||
function del(href)
|
||||
{
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
if (g4_charset.toUpperCase() == 'EUC-KR')
|
||||
if (g4_charset.toUpperCase() == 'EUC-KR')
|
||||
document.location.href = href;
|
||||
else
|
||||
document.location.href = encodeURI(href);
|
||||
@ -132,7 +132,7 @@ function del(href)
|
||||
}
|
||||
|
||||
// 쿠키 입력
|
||||
function set_cookie(name, value, expirehours, domain)
|
||||
function set_cookie(name, value, expirehours, domain)
|
||||
{
|
||||
var today = new Date();
|
||||
today.setTime(today.getTime() + (60*60*1000*expirehours));
|
||||
@ -143,7 +143,7 @@ function set_cookie(name, value, expirehours, domain)
|
||||
}
|
||||
|
||||
// 쿠키 얻음
|
||||
function get_cookie(name)
|
||||
function get_cookie(name)
|
||||
{
|
||||
var find_sw = false;
|
||||
var start, end;
|
||||
@ -154,14 +154,14 @@ function get_cookie(name)
|
||||
start = i;
|
||||
end = start + name.length;
|
||||
|
||||
if(document.cookie.substring(start, end) == name)
|
||||
if(document.cookie.substring(start, end) == name)
|
||||
{
|
||||
find_sw = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (find_sw == true)
|
||||
if (find_sw == true)
|
||||
{
|
||||
start = end + 1;
|
||||
end = document.cookie.indexOf(";", start);
|
||||
@ -175,7 +175,7 @@ function get_cookie(name)
|
||||
}
|
||||
|
||||
// 쿠키 지움
|
||||
function delete_cookie(name)
|
||||
function delete_cookie(name)
|
||||
{
|
||||
var today = new Date();
|
||||
|
||||
@ -189,97 +189,97 @@ function delete_cookie(name)
|
||||
// zzzz님께서 알려주셨습니다. 2005/04/12
|
||||
function image_window(img)
|
||||
{
|
||||
var w = img.tmp_width;
|
||||
var h = img.tmp_height;
|
||||
var winl = (screen.width-w)/2;
|
||||
var wint = (screen.height-h)/3;
|
||||
var w = img.tmp_width;
|
||||
var h = img.tmp_height;
|
||||
var winl = (screen.width-w)/2;
|
||||
var wint = (screen.height-h)/3;
|
||||
|
||||
if (w >= screen.width) {
|
||||
winl = 0;
|
||||
h = (parseInt)(w * (h / w));
|
||||
}
|
||||
if (w >= screen.width) {
|
||||
winl = 0;
|
||||
h = (parseInt)(w * (h / w));
|
||||
}
|
||||
|
||||
if (h >= screen.height) {
|
||||
wint = 0;
|
||||
w = (parseInt)(h * (w / h));
|
||||
}
|
||||
if (h >= screen.height) {
|
||||
wint = 0;
|
||||
w = (parseInt)(h * (w / h));
|
||||
}
|
||||
|
||||
var js_url = "<script type='text/javascript'> \n";
|
||||
js_url += "<!-- \n";
|
||||
js_url += "var ie=document.all; \n";
|
||||
js_url += "var nn6=document.getElementById&&!document.all; \n";
|
||||
js_url += "var isdrag=false; \n";
|
||||
js_url += "var x,y; \n";
|
||||
js_url += "var dobj; \n";
|
||||
js_url += "function movemouse(e) \n";
|
||||
js_url += "{ \n";
|
||||
js_url += " if (isdrag) \n";
|
||||
js_url += " { \n";
|
||||
js_url += " dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; \n";
|
||||
js_url += " dobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y; \n";
|
||||
js_url += " return false; \n";
|
||||
js_url += " } \n";
|
||||
js_url += "} \n";
|
||||
js_url += "function selectmouse(e) \n";
|
||||
js_url += "{ \n";
|
||||
js_url += " var fobj = nn6 ? e.target : event.srcElement; \n";
|
||||
js_url += " var topelement = nn6 ? 'HTML' : 'BODY'; \n";
|
||||
js_url += " while (fobj.tagName != topelement && fobj.className != 'dragme') \n";
|
||||
js_url += " { \n";
|
||||
js_url += " fobj = nn6 ? fobj.parentNode : fobj.parentElement; \n";
|
||||
js_url += " } \n";
|
||||
js_url += " if (fobj.className=='dragme') \n";
|
||||
js_url += " { \n";
|
||||
js_url += " isdrag = true; \n";
|
||||
js_url += " dobj = fobj; \n";
|
||||
js_url += " tx = parseInt(dobj.style.left+0); \n";
|
||||
js_url += " ty = parseInt(dobj.style.top+0); \n";
|
||||
js_url += " x = nn6 ? e.clientX : event.clientX; \n";
|
||||
js_url += " y = nn6 ? e.clientY : event.clientY; \n";
|
||||
js_url += " document.onmousemove=movemouse; \n";
|
||||
js_url += " return false; \n";
|
||||
js_url += " } \n";
|
||||
js_url += "} \n";
|
||||
js_url += "document.onmousedown=selectmouse; \n";
|
||||
js_url += "document.onmouseup=new Function('isdrag=false'); \n";
|
||||
js_url += "//--> \n";
|
||||
js_url += "</"+"script> \n";
|
||||
var js_url = "<script type='text/javascript'> \n";
|
||||
js_url += "<!-- \n";
|
||||
js_url += "var ie=document.all; \n";
|
||||
js_url += "var nn6=document.getElementById&&!document.all; \n";
|
||||
js_url += "var isdrag=false; \n";
|
||||
js_url += "var x,y; \n";
|
||||
js_url += "var dobj; \n";
|
||||
js_url += "function movemouse(e) \n";
|
||||
js_url += "{ \n";
|
||||
js_url += " if (isdrag) \n";
|
||||
js_url += " { \n";
|
||||
js_url += " dobj.style.left = nn6 ? tx + e.clientX - x : tx + event.clientX - x; \n";
|
||||
js_url += " dobj.style.top = nn6 ? ty + e.clientY - y : ty + event.clientY - y; \n";
|
||||
js_url += " return false; \n";
|
||||
js_url += " } \n";
|
||||
js_url += "} \n";
|
||||
js_url += "function selectmouse(e) \n";
|
||||
js_url += "{ \n";
|
||||
js_url += " var fobj = nn6 ? e.target : event.srcElement; \n";
|
||||
js_url += " var topelement = nn6 ? 'HTML' : 'BODY'; \n";
|
||||
js_url += " while (fobj.tagName != topelement && fobj.className != 'dragme') \n";
|
||||
js_url += " { \n";
|
||||
js_url += " fobj = nn6 ? fobj.parentNode : fobj.parentElement; \n";
|
||||
js_url += " } \n";
|
||||
js_url += " if (fobj.className=='dragme') \n";
|
||||
js_url += " { \n";
|
||||
js_url += " isdrag = true; \n";
|
||||
js_url += " dobj = fobj; \n";
|
||||
js_url += " tx = parseInt(dobj.style.left+0); \n";
|
||||
js_url += " ty = parseInt(dobj.style.top+0); \n";
|
||||
js_url += " x = nn6 ? e.clientX : event.clientX; \n";
|
||||
js_url += " y = nn6 ? e.clientY : event.clientY; \n";
|
||||
js_url += " document.onmousemove=movemouse; \n";
|
||||
js_url += " return false; \n";
|
||||
js_url += " } \n";
|
||||
js_url += "} \n";
|
||||
js_url += "document.onmousedown=selectmouse; \n";
|
||||
js_url += "document.onmouseup=new Function('isdrag=false'); \n";
|
||||
js_url += "//--> \n";
|
||||
js_url += "</"+"script> \n";
|
||||
|
||||
var settings;
|
||||
|
||||
if (g4_is_gecko) {
|
||||
settings ='width='+(w+10)+',';
|
||||
settings +='height='+(h+10)+',';
|
||||
settings ='width='+(w+10)+',';
|
||||
settings +='height='+(h+10)+',';
|
||||
} else {
|
||||
settings ='width='+w+',';
|
||||
settings +='height='+h+',';
|
||||
settings ='width='+w+',';
|
||||
settings +='height='+h+',';
|
||||
}
|
||||
settings +='top='+wint+',';
|
||||
settings +='left='+winl+',';
|
||||
settings +='scrollbars=no,';
|
||||
settings +='resizable=yes,';
|
||||
settings +='status=no';
|
||||
settings +='top='+wint+',';
|
||||
settings +='left='+winl+',';
|
||||
settings +='scrollbars=no,';
|
||||
settings +='resizable=yes,';
|
||||
settings +='status=no';
|
||||
|
||||
|
||||
win=window.open("","image_window",settings);
|
||||
win.document.open();
|
||||
win.document.write ("<html><head> \n<meta http-equiv='imagetoolbar' CONTENT='no'> \n<meta http-equiv='content-type' content='text/html; charset="+g4_charset+"'>\n");
|
||||
win=window.open("","image_window",settings);
|
||||
win.document.open();
|
||||
win.document.write ("<html><head> \n<meta http-equiv='imagetoolbar' CONTENT='no'> \n<meta http-equiv='content-type' content='text/html; charset="+g4_charset+"'>\n");
|
||||
var size = "이미지 사이즈 : "+w+" x "+h;
|
||||
win.document.write ("<title>"+size+"</title> \n");
|
||||
if(w >= screen.width || h >= screen.height) {
|
||||
win.document.write (js_url);
|
||||
var click = "ondblclick='window.close();' style='cursor:move' title=' "+size+" \n\n 이미지 사이즈가 화면보다 큽니다. \n 왼쪽 버튼을 클릭한 후 마우스를 움직여서 보세요. \n\n 더블 클릭하면 닫혀요. '";
|
||||
}
|
||||
else
|
||||
var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \n\n 클릭하면 닫혀요. '";
|
||||
win.document.write ("<style>.dragme{position:relative;}</style> \n");
|
||||
win.document.write ("</head> \n\n");
|
||||
win.document.write ("<body leftmargin=0 topmargin=0 bgcolor=#dddddd style='cursor:arrow;'> \n");
|
||||
win.document.write ("<title>"+size+"</title> \n");
|
||||
if(w >= screen.width || h >= screen.height) {
|
||||
win.document.write (js_url);
|
||||
var click = "ondblclick='window.close();' style='cursor:move' title=' "+size+" \n\n 이미지 사이즈가 화면보다 큽니다. \n 왼쪽 버튼을 클릭한 후 마우스를 움직여서 보세요. \n\n 더블 클릭하면 닫혀요. '";
|
||||
}
|
||||
else
|
||||
var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \n\n 클릭하면 닫혀요. '";
|
||||
win.document.write ("<style>.dragme{position:relative;}</style> \n");
|
||||
win.document.write ("</head> \n\n");
|
||||
win.document.write ("<body leftmargin=0 topmargin=0 bgcolor=#dddddd style='cursor:arrow;'> \n");
|
||||
win.document.write ("<table width=100% height=100% cellpadding=0 cellspacing=0><tr><td align=center valign=middle><img src='"+img.src+"' width='"+w+"' height='"+h+"' border=0 class='dragme' "+click+"></td></tr></table>");
|
||||
win.document.write ("</body></html>");
|
||||
win.document.close();
|
||||
win.document.write ("</body></html>");
|
||||
win.document.close();
|
||||
|
||||
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
|
||||
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
|
||||
}
|
||||
|
||||
// a 태그에서 onclick 이벤트를 사용하지 않기 위해
|
||||
@ -289,13 +289,6 @@ function win_open(url, name, option)
|
||||
popup.focus();
|
||||
}
|
||||
|
||||
// 우편번호 창
|
||||
function win_zip(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2)
|
||||
{
|
||||
url = g4_path + "/" + g4_bbs + "/zip.php?frm_name="+frm_name+"&frm_zip1="+frm_zip1+"&frm_zip2="+frm_zip2+"&frm_addr1="+frm_addr1+"&frm_addr2="+frm_addr2;
|
||||
win_open(url, "winZip", "left=50,top=50,width=616,height=460,scrollbars=1");
|
||||
}
|
||||
|
||||
// 새로운 패스워드 분실 창 : 100902
|
||||
function win_password_lost()
|
||||
{
|
||||
@ -421,7 +414,7 @@ function get_top_pos(obj)
|
||||
function flash_movie(src, ids, width, height, wmode)
|
||||
{
|
||||
var wh = "";
|
||||
if (parseInt(width) && parseInt(height))
|
||||
if (parseInt(width) && parseInt(height))
|
||||
wh = " width='"+width+"' height='"+height+"' ";
|
||||
return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' "+wh+" id="+ids+"><param name=wmode value="+wmode+"><param name=movie value="+src+"><param name=quality value=high><embed src="+src+" quality=high wmode="+wmode+" type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' "+wh+"></embed></object>";
|
||||
}
|
||||
@ -429,7 +422,7 @@ function flash_movie(src, ids, width, height, wmode)
|
||||
function obj_movie(src, ids, width, height, autostart)
|
||||
{
|
||||
var wh = "";
|
||||
if (parseInt(width) && parseInt(height))
|
||||
if (parseInt(width) && parseInt(height))
|
||||
wh = " width='"+width+"' height='"+height+"' ";
|
||||
if (!autostart) autostart = false;
|
||||
return "<embed src='"+src+"' "+wh+" autostart='"+autostart+"'></embed>";
|
||||
|
||||
Reference in New Issue
Block a user