编辑器里的代码为什么是这样,高手请帮帮忙
这是上传视频的文件,这里的;일之类的文字是怎么做成的,哪位高手给我解释解释,谢谢!<%
Dim abc
Set abc = Server.CreateObject("ABCUpload4.XForm")
abc.AbsolutePath = True
abc.codepage = "65001"
Dim gbn : gbn = abc.item("gbn")
if replace(gbn," ","") = "up" then
Dim perioArry,imgDot,DirectoryPath,webPath
DirectoryPath = Server.MapPath("..") & "\pds_update\"
webPath = "../pds_update/"
Dim objSajin,errorNum
errorNum = 0
Set objSajin = abc("upimage")(1)
if objSajin.FileExists then
if objSajin.Length < (1024 * 1024 * 10) then
perioArry = Split(objSajin.SafeFileName,".")
imgDot = perioArry(Ubound(perioArry))
if LCase(imgDot) = "wmv" or LCase(imgDot) = "avi" or Lcase(imgDot) = "swf" then
sajin = "img_" & svdatefomt & "." & imgDot
objSajin.Save DirectoryPath & sajin
else
errorNum = 3
end if
else
errorNum = 2
end if
else
errorNum = 1
end if
Set objSajin = Nothing
Function svdatefomt()
Dim dt1,dt2,dt3
dt1 = replace(Date,"-","")
dt2 = FormatDateTime(now(),4)
dt3 = second(now)
dt1 = Right(dt1,8)
dt2 = replace(dt2,":","")
if dt3 < 10 then
dt3 = "0" & dt3
end if
svdatefomt = dt1 & dt2 & dt3
End Function
%>
<html>
<head><% if errorNum < 1 then
iwidth = abc.item("width")
iheight = abc.item("height")
dim imgsrc : imgsrc = "<embed src=" & webPath & sajin & " width=" & iwidth & " height=" & iheight & "></embed>" %>
<script type="text/javascript">
<!--
var opener = window.dialogArguments;
opener.easyUtil._editor.innerHTML('<%=imgsrc%>');
self.close();
//-->
</script>
</head>
<body><% else %>
<style>
body {
background: threedface;
color: windowtext;
margin: 10px;
border-style: none;
font:9pt 돋움;
text-align:center;
}
body, button, div, input, select, td, legend { font:9pt 돋움; }
input,select {color:highlight}
button {width:80px;}
fieldset { margin-bottom:5px;text-align:left;padding:5px }
</style>
</head>
<body>
<fieldset>
<legend>Error</legend>
<table border=0 cellspacing=6 cellpadding=0>
<tr height="50">
<td><% select case errorNum
case 1 %>
파일전송이 잘못되었습니다!<% case 2 %>
파일 용량은 10Mb를 초과할 수 없습니다. <% case 3 %>
허용되지 않는 파일 입니다.<% end select %>
</td>
</tr>
</table>
</fieldset>
<button onClick="self.close();">확인</button>
<% end if %>
</body>
</html>
<% else %>
<html>
<head>
<style>
body {
background: threedface;
color: windowtext;
margin: 10px;
border-style: none;
font:9pt 돋움;
text-align:center;
}
body, button, div, input, select, td, legend { font:9pt 돋움; }
input,select {color:highlight}
button {width:80px;}
fieldset { margin-bottom:5px;text-align:left;padding:5px }
</style>
<script type="text/javascript">
<!--
function insertImage()
{
var f=document.tform;
var src = f.upimage.value;
if(!src){alert("동영상파일을 첨부 해주세요!"); return; }
if(!src.match(/\.(avi|wmv|swf)$/i)) { alert("동영상 파일인지 확인해주세요!!"); f.upimage.select(); return; }
var w = f.width.value;
if(!w){
alert("가로 크기를 지정해주세요");
f.w.focus();
return;
}
var h = f.height.value;
if(!h){
alert("세로 크기를 지정해주세요");
f.h.focus();
return
}
f.submit();
}
function NumKeyOnly(){
if((event.keyCode<48)||(event.keyCode>57)) event.returnValue=false;
}
//-->
</script>
</head>
<body scroll="no">
<form action="upmovie.asp" name="tform" method="post" enctype="multipart/form-data">
<input type="hidden" name="gbn" value="up">
<fieldset>
<legend>동영상 선택</legend>
<input type="file" name="upimage" style="width:100%" />
</fieldset>
<fieldset>
<legend>옵션</legend>
<table border=0 cellspacing=6 cellpadding=0>
<tr>
<td>가로*세로</td>
<td>
<input type="text" name="width" size="3" maxlength=3 style="ime-mode:disabled;" onFocus="this.select();" onKeyPress="NumKeyOnly();"> *
<input type="text" name="height" size="3" maxlength=3 style="ime-mode:disabled;" onFocus="this.select();" onKeyPress="NumKeyOnly();">px
</td>
</tr>
</table>
</fieldset>
<button onClick="insertImage()">확인</button>
<button onClick="self.close();">취소</button>
</form>
</body>
</html><% end if %>