first commit
This commit is contained in:
21
Lib/infiles/Reporting_config.asp
Normal file
21
Lib/infiles/Reporting_config.asp
Normal file
@@ -0,0 +1,21 @@
|
||||
<%
|
||||
Option ExPlicit
|
||||
Dim SV_NAME : SV_NAME = "1.235.195.34"
|
||||
Dim DB_NAME : DB_NAME = "new_cati"
|
||||
Dim UID : UID = "sa"
|
||||
Dim PWD : PWD = "krco#51304"
|
||||
|
||||
Dim SV_NAME1 : SV_NAME1 = "1.235.195.34"
|
||||
Dim DB_NAME1 : DB_NAME1 = "krc_survey"
|
||||
Dim UID1 : UID1 = "sa"
|
||||
Dim PWD1 : PWD1 = "krco#51304"
|
||||
dim ksurvey, ksurvey2, DBopener
|
||||
|
||||
'ksurvey = "Provider=SQLOLEDB;Server=1.235.195.34;Initial Catalog="&DB_NAME1&";uid="&UID1&";pwd="&PWD1&";" 'krc_survey db
|
||||
ksurvey2 = "Provider=SQLOLEDB;Server="&SV_NAME1&";Initial Catalog="&DB_NAME1&";uid="&UID1&";pwd="&PWD1&";" 'report db
|
||||
|
||||
|
||||
ksurvey = "Provider=SQLOLEDB;Server="&SV_NAME&";Initial Catalog="&DB_NAME&";uid="&UID&";pwd="&PWD&";" 'cati db
|
||||
|
||||
'ksurvey = "Provider=SQLOLEDB;Server="&SV_NAME1&";Initial Catalog="&DB_NAME1&";uid=sa;pwd=dudgus25;" 'krc_survey db
|
||||
%>
|
||||
75
Lib/infiles/basic.css
Normal file
75
Lib/infiles/basic.css
Normal file
@@ -0,0 +1,75 @@
|
||||
body,td,tr,input {
|
||||
font-family: '맑은 고딕', 'Malgun Gothic', verdana;
|
||||
font-size: 12px;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
.body {
|
||||
font-family: '맑은 고딕', 'Malgun Gothic', verdana;
|
||||
font-size: 12px;
|
||||
border: 0px;
|
||||
margin-left: 0px;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
.td {
|
||||
font-family: '맑은 고딕', 'Malgun Gothic', verdana;
|
||||
font-size: 12px;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
.input,textarea {
|
||||
font-family: '맑은 고딕', 'Malgun Gothic', verdana;
|
||||
font-size: 12px;
|
||||
border-width:1px;
|
||||
background-color:#F0F3F5;
|
||||
color:black;
|
||||
border-color:black;
|
||||
}
|
||||
|
||||
.tableWline {
|
||||
background-image: url(http://sendmail.randr.co.kr/img/etc/table_point1.gif);
|
||||
background-attachment:fixed;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.tableHline {
|
||||
background-image: url(http://sendmail.randr.co.kr/img/etc/table_point2.gif);
|
||||
background-attachment: fixed;
|
||||
background-repeat: repeat-y;
|
||||
}
|
||||
|
||||
a:link {color:blue; text-decoration:none}
|
||||
a:visited {text-decoration : none; COLOR: #0000ff}
|
||||
a:active text-decoration : none; COLOR: #0000ff}
|
||||
a:hover {text-decoration : underline:none; COLOR: #CC0000}
|
||||
|
||||
.stTable {font-family: '맑은 고딕', 'Malgun Gothic', verdana;font-size:12px;line-height:120%;border-style: ridge; padding-left: 1; padding-right: 1; padding-top: 1;
|
||||
padding-bottom: 1 }
|
||||
|
||||
|
||||
.tinput { font-family: '맑은 고딕', 'Malgun Gothic', verdana; font-size:12px; background-color: #ECE1F7; border: 1px solid #8484FF;margin-left:2px; }
|
||||
.tnuminput { font-family: '맑은 고딕', 'Malgun Gothic', verdana; font-size:12px; background-color: #ECE1F7; border: 1px solid #8484FF;margin-left:2px;text-align:right;margin-right:2px; }
|
||||
|
||||
.tbutton { font-family: '맑은 고딕', 'Malgun Gothic', verdana;font-size:12px;boder:1px; border-color:gray; height:20px;border-width:1px;
|
||||
background-color:#000000;color:white;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.trightvline {border-right-style:solid;border-right-color:white;border-right-width:1px; }
|
||||
|
||||
|
||||
.tbbottomline {border-bottom-style:dotted;border-bottom-color:#e2e2e2;border-bottom-width:1px;line-height:120%; }
|
||||
|
||||
.tbbottomline2 {border-bottom-color:#120000;border-left-width:1px;border-right-width:1px;border-top-width:1px; border-bottom-style:dashed;border-bottom-width:1px;}
|
||||
|
||||
/* ------- */
|
||||
.post_write {padding-left: 5px; }
|
||||
|
||||
#id_background {background:#fff url(http://static.naver.com/common/login/bg_login_id_main_4.gif) no-repeat 0px 0px;}
|
||||
#pwd_background {background:#fff url(/mainimages/loginpwd.gif) no-repeat 0px 0px;}
|
||||
.input_text{display:block; position:relative; border:1px solid #bebebe; width:98px; height:16px; color:#F0F3F5; *margin:-1px 0; padding:4px 2px 0 2px; font-size:12px; vertical-align:top;}
|
||||
|
||||
.uid {background:#fff url(http://static.naver.com/common/login/bg_login_id_main_4.gif) no-repeat 0px 0px;}
|
||||
.upw {background:#fff url(http://static.naver.com/common/login/bg_login_pw_main_4.gif) no-repeat 0px 0px;}
|
||||
108
Lib/infiles/basic_table.css
Normal file
108
Lib/infiles/basic_table.css
Normal file
@@ -0,0 +1,108 @@
|
||||
html, body, form, fieldset, h1, h2, h3, h4, h5, h6, p, pre, blockquote, ul, ol, dl, address {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
body {
|
||||
font:80%/150% "Trebuchet MS",Verdana,Arial,Helvetica,sans-serif;
|
||||
}
|
||||
p {
|
||||
text-align:center;
|
||||
}
|
||||
a:link {
|
||||
color:#d42945;
|
||||
text-decoration:none;
|
||||
border-bottom:1px dotted #ffbac8;
|
||||
}
|
||||
a:visited {
|
||||
color:#d42945;
|
||||
border-bottom:none;
|
||||
text-decoration:none;
|
||||
}
|
||||
a:hover,
|
||||
a:focus {
|
||||
color:#f03b58;
|
||||
border-bottom:1px solid #f03b58;
|
||||
text-decoration:none;
|
||||
}
|
||||
table a,
|
||||
table a:link,
|
||||
table a:visited {
|
||||
border:none;
|
||||
}
|
||||
|
||||
img {
|
||||
border:0;
|
||||
margin-top:.5em;
|
||||
}
|
||||
table {
|
||||
/*width:95%;*/
|
||||
border-top:1px solid #e5eff8;
|
||||
border-right:1px solid #e5eff8;
|
||||
margin:1em auto;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
caption {
|
||||
color: #9ba9b4;
|
||||
font-size:.94em;
|
||||
letter-spacing:.1em;
|
||||
margin:1em 0 0 0;
|
||||
padding:0;
|
||||
caption-side:top;
|
||||
text-align:center;
|
||||
}
|
||||
tr.odd td {
|
||||
background:#f7fbff
|
||||
/*background:#CDECFA*/
|
||||
}
|
||||
tr.odd .column1{
|
||||
background:#f4f9fe;
|
||||
}
|
||||
.column1 {
|
||||
background:#f9fcfe;
|
||||
}
|
||||
td {
|
||||
color:#678197;
|
||||
border-bottom:1px solid #e5eff8;
|
||||
border-left:1px solid #e5eff8;
|
||||
padding:.3em 1em;
|
||||
/*text-align:center;*/
|
||||
}
|
||||
th {
|
||||
font-weight:normal;
|
||||
color: #678197;
|
||||
/*text-align:left;*/
|
||||
border-bottom: 1px solid #e5eff8;
|
||||
border-left:1px solid #e5eff8;
|
||||
padding:.3em 1em;
|
||||
}
|
||||
thead th {
|
||||
/*background:#f4f9fe;*/
|
||||
background:#E3EDF8;
|
||||
|
||||
/*text-align:center;*/
|
||||
/*font:bold 1.0em/2em "Century Gothic","Trebuchet MS",Arial,Helvetica,sans-serif;*/
|
||||
font: 1.0em "Century Gothic","Trebuchet MS",Arial,Helvetica,sans-serif;
|
||||
color:#66a3d3
|
||||
}
|
||||
thead td {
|
||||
|
||||
}
|
||||
tfoot th {
|
||||
/*text-align:center;*/
|
||||
background:#f4f9fe;
|
||||
}
|
||||
tfoot th strong {
|
||||
font:bold 1.2em "Century Gothic","Trebuchet MS",Arial,Helvetica,sans-serif;
|
||||
margin:.5em .5em .5em 0;
|
||||
color:#66a3d3;
|
||||
}
|
||||
tfoot th em {
|
||||
color:#f03b58;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
||||
.bt{ font-face:????u;font-size:12px;boder:1px; border-color:gray; height:20px;border-width:1px; background-color:#5a5a5a;color:white;}
|
||||
208
Lib/infiles/db_comm.asp
Normal file
208
Lib/infiles/db_comm.asp
Normal file
@@ -0,0 +1,208 @@
|
||||
<!--METADATA TYPE= "typelib" NAME= "ADODB Type Library" FILE="C:\Program Files\Common Files\SYSTEM\ADO\msado15.dll" -->
|
||||
<%
|
||||
Class clsDBcomm
|
||||
Private DefaultConnection
|
||||
|
||||
private sub Class_Initialize()
|
||||
Set DefaultConnection = Nothing
|
||||
End Sub
|
||||
|
||||
|
||||
'===================================
|
||||
' SQL Query를 실행하고, RecordSet을 반환한다.
|
||||
'===================================
|
||||
Public Function ExecSQLReturnRS(strSQL, params, connectionString, dbstr)
|
||||
If IsObject(connectionString) Then
|
||||
If connectionString is Nothing Then
|
||||
If DefaultConnection is Nothing Then
|
||||
Set DefaultConnection = CreateObject("ADODB.Connection")
|
||||
DefaultConnection.Open dbstr
|
||||
End If
|
||||
Set connectionString = DefaultConnection
|
||||
End If
|
||||
End If
|
||||
dim rs, cmd
|
||||
Set rs = CreateObject("ADODB.RecordSet")
|
||||
Set cmd = CreateObject("ADODB.Command")
|
||||
|
||||
cmd.ActiveConnection = connectionString
|
||||
cmd.CommandText = strSQL
|
||||
cmd.CommandType = adCmdText
|
||||
Set cmd = collectParams(cmd, params)
|
||||
rs.CursorLocation = adUseClient
|
||||
'response.Write strSQL & vbcrlf
|
||||
' READ ONLY
|
||||
rs.Open cmd, , adOpenStatic, adLockReadOnly
|
||||
|
||||
Set cmd.ActiveConnection = Nothing
|
||||
Set cmd = Nothing
|
||||
Set rs.ActiveConnection = Nothing
|
||||
|
||||
Set ExecSQLReturnRS = rs
|
||||
End Function
|
||||
|
||||
'===================================
|
||||
' SQL Query를 실행하고 UPDATE 실행
|
||||
'===================================
|
||||
Public Function ExecSQLReturnRS2(strSQL, params, connectionString, dbstr)
|
||||
If IsObject(connectionString) Then
|
||||
If connectionString is Nothing Then
|
||||
If DefaultConnection is Nothing Then
|
||||
Set DefaultConnection = CreateObject("ADODB.Connection")
|
||||
DefaultConnection.Open dbstr
|
||||
End If
|
||||
Set connectionString = DefaultConnection
|
||||
End If
|
||||
End If
|
||||
dim rs
|
||||
Set rs = CreateObject("ADODB.RecordSet")
|
||||
' Set cmd = CreateObject("ADODB.Command")
|
||||
'
|
||||
' cmd.ActiveConnection = connectionString
|
||||
' cmd.CommandText = strSQL
|
||||
' cmd.CommandType = adCmdText
|
||||
' Set cmd = collectParams(cmd, params)
|
||||
'
|
||||
rs.CursorLocation = adUseClient
|
||||
|
||||
' READ UPATE
|
||||
rs.Open strSQL, connectionString, adOpenStatic, adLockPessimistic
|
||||
|
||||
|
||||
' Set cmd.ActiveConnection = Nothing
|
||||
' Set cmd = Nothing
|
||||
' Set rs.ActiveConnection = Nothing
|
||||
|
||||
Set ExecSQLReturnRS2 = rs
|
||||
End Function
|
||||
|
||||
|
||||
'===================================
|
||||
' SQL Query를 실행 (Rs 반환없음)
|
||||
'===================================
|
||||
Public Sub ExecSQL(strSQL,params,connectionString, dbstr)
|
||||
If IsObject(connectionString) Then
|
||||
If connectionString is Nothing Then
|
||||
If DefaultConnection is Nothing Then
|
||||
Set DefaultConnection = CreateObject("ADODB.Connection")
|
||||
DefaultConnection.Open dbstr
|
||||
End If
|
||||
Set connectionString = DefaultConnection
|
||||
End If
|
||||
End If
|
||||
|
||||
dim cmd
|
||||
Set cmd = CreateObject("ADODB.Command")
|
||||
|
||||
cmd.ActiveConnection = connectionString
|
||||
cmd.CommandText = strSQL
|
||||
cmd.CommandType = adCmdText
|
||||
Set cmd = collectParams(cmd, params)
|
||||
|
||||
cmd.Execute , , adExecuteNoRecords
|
||||
|
||||
Set cmd.ActiveConnection = Nothing
|
||||
Set cmd = Nothing
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
'+++++++++++++++++++
|
||||
|
||||
|
||||
|
||||
'---------------------------------------------------
|
||||
' 트랜잭션을 시작하고, Connetion 개체를 반환한다.
|
||||
'---------------------------------------------------
|
||||
Public Function BeginTrans(connectionString)
|
||||
If IsObject(connectionString) Then
|
||||
If connectionString is Nothing Then
|
||||
connectionString = DefaultConnString
|
||||
End If
|
||||
End If
|
||||
|
||||
Set conn = Server.CreateObject("ADODB.Connection")
|
||||
conn.Open connectionString
|
||||
conn.BeginTrans
|
||||
Set BeginTrans = conn
|
||||
End Function
|
||||
|
||||
'---------------------------------------------------
|
||||
' 활성화된 트랜잭션을 커밋한다.
|
||||
'---------------------------------------------------
|
||||
Public Sub CommitTrans(connectionObj)
|
||||
If Not connectionObj Is Nothing Then
|
||||
connectionObj.CommitTrans
|
||||
connectionObj.Close
|
||||
Set ConnectionObj = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'---------------------------------------------------
|
||||
' 활성화된 트랜잭션을 롤백한다.
|
||||
'---------------------------------------------------
|
||||
Public Sub RollbackTrans(connectionObj)
|
||||
If Not connectionObj Is Nothing Then
|
||||
connectionObj.RollbackTrans
|
||||
connectionObj.Close
|
||||
Set ConnectionObj = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'+++++++++++++++++++
|
||||
|
||||
|
||||
|
||||
|
||||
'---------------------------
|
||||
' -- Nothing
|
||||
'---------------------------
|
||||
Public Sub Dispose
|
||||
if (Not DefaultConnection is Nothing) Then
|
||||
if (DefaultConnection.State = adStateOpen) Then DefaultConnection.Close
|
||||
Set DefaultConnection = Nothing
|
||||
End if
|
||||
End Sub
|
||||
|
||||
|
||||
'---------------------------------------------------------------------------
|
||||
'Array로 넘겨오는 파라메터를 Parsing 하여 Parameter 객체를
|
||||
'생성하여 Command 객체에 추가한다.
|
||||
'---------------------------------------------------------------------------
|
||||
Private Function collectParams(cmd,argparams)
|
||||
If VarType(argparams) = 8192 or VarType(argparams) = 8204 or VarType(argparams) = 8209 then
|
||||
params = argparams
|
||||
For i = LBound(params) To UBound(params)
|
||||
l = LBound(params(i))
|
||||
u = UBound(params(i))
|
||||
' Check for nulls.
|
||||
If u - l = 4 Then
|
||||
|
||||
If VarType(params(i)(4)) = vbString Then
|
||||
If params(i)(4) = "" Then
|
||||
v = Null
|
||||
Else
|
||||
v = params(i)(4)
|
||||
End If
|
||||
Else
|
||||
v = params(i)(4)
|
||||
End If
|
||||
cmd.Parameters.Append cmd.CreateParameter(params(i)(0), params(i)(1), params(i)(2), params(i)(3), v)
|
||||
End If
|
||||
Next
|
||||
|
||||
Set collectParams = cmd
|
||||
Exit Function
|
||||
Else
|
||||
Set collectParams = cmd
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
%>
|
||||
119
Lib/infiles/fun_module.asp
Normal file
119
Lib/infiles/fun_module.asp
Normal file
@@ -0,0 +1,119 @@
|
||||
<%
|
||||
|
||||
|
||||
' 히든값 넘기기
|
||||
Sub f_hiddenNext()
|
||||
Dim x
|
||||
For Each x in xform
|
||||
if left(x,2)="ff" Then
|
||||
If Trim(x)<>"ffnextpage" Then
|
||||
response.write "<input type='hidden' name='"&x&"' value='"&xform(x)&"' >"&vbCrLf
|
||||
End If
|
||||
end if
|
||||
next
|
||||
end Sub
|
||||
|
||||
|
||||
|
||||
' ----------------------------------------------------------------------------------
|
||||
'값 가져오기
|
||||
|
||||
function fy_GetQue(mo_field)
|
||||
|
||||
dim mo_DBopener,mo_objdb,mo_sql
|
||||
Call ClsOpen(mo_DBopener) : Dim mo_openDB : mo_openDB=ksurvey
|
||||
|
||||
mo_sql="select "&mo_field&" from "&xTable
|
||||
mo_sql=mo_sql&" where ffid='"&request.item("ffid")&"' "
|
||||
Call RsSQL(mo_DBopener,mo_openDB,mo_sql,mo_objdb)
|
||||
fy_GetQue=""
|
||||
if not mo_objdb.Eof then
|
||||
fy_GetQue=mo_objdb(0)
|
||||
end if
|
||||
|
||||
Call CloseSQL(mo_objdb)
|
||||
Call CloseCls(mo_DBopener)
|
||||
end function
|
||||
|
||||
' ----------------------------------------------------------------------------------
|
||||
|
||||
' 입력값 치환..
|
||||
Function f_replace(mo,t)
|
||||
Select Case t
|
||||
Case 1
|
||||
mo=Replace(mo,"'","")
|
||||
mo=Replace(mo,"""","")
|
||||
mo=Replace(mo," ","")
|
||||
mo=Replace(mo,"<","")
|
||||
mo=Replace(mo,">","")
|
||||
Case 2 ' 설문조사용
|
||||
mo=Replace(mo,"""","'")
|
||||
' mo=Replace(mo,"""","")
|
||||
' mo=Replace(mo," ","")
|
||||
mo=Replace(mo,"<","(")
|
||||
mo=Replace(mo,">",")")
|
||||
Case 3
|
||||
' 변환없음..
|
||||
|
||||
|
||||
Case 4 ' 숫자 ""시 --> 0: 리턴..
|
||||
mo=Replace(mo,"'","")
|
||||
mo=Replace(mo,"""","")
|
||||
mo=Replace(mo," ","")
|
||||
mo=Replace(mo,"<","")
|
||||
mo=Replace(mo,">","")
|
||||
If Trim(mo)="" Then mo=0
|
||||
|
||||
Case 5 ' textarea: 입력값 보여주기..
|
||||
mo=Replace(mo,"'","")
|
||||
mo=Replace(mo,"""","")
|
||||
' mo=Replace(mo," ","")
|
||||
mo=Replace(mo,"<","")
|
||||
mo=Replace(mo,">","")
|
||||
|
||||
mo=Replace(mo,"<","<")
|
||||
mo=Replace(mo,">",">")
|
||||
mo=Replace(mo,vbCrLf,"<br>")
|
||||
|
||||
Case 6 ' html 적용시..
|
||||
mo=Replace(mo,"'","")
|
||||
mo=Replace(mo,"""","")
|
||||
' mo=Replace(mo," ","")
|
||||
' mo=Replace(mo,"<","")
|
||||
' mo=Replace(mo,">","")
|
||||
|
||||
' mo=Replace(mo,"<","<")
|
||||
' mo=Replace(mo,">",">")
|
||||
mo=Replace(mo,vbCrLf,"<br>")
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
mo=fncRegularReplace(mo, "select", "[select]")
|
||||
mo=fncRegularReplace(mo, "update", "[update]")
|
||||
mo=fncRegularReplace(mo, "insert", "[insert]")
|
||||
mo=fncRegularReplace(mo, "drop", "[drop]")
|
||||
mo=fncRegularReplace(mo, "delete", "[delete]")
|
||||
mo=fncRegularReplace(mo, "create", "[create]")
|
||||
mo=fncRegularReplace(mo, "alert", "[alert]")
|
||||
|
||||
f_replace=mo
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
'// Regular Expression으로 문자열 교체..
|
||||
Function fncRegularReplace( pOrgString, pPatternString, pReplaceString)
|
||||
Dim objRegExp : Set objRegExp = New RegExp
|
||||
|
||||
objRegExp.Pattern = pPatternString
|
||||
objRegExp.IgnoreCase = True
|
||||
objRegExp.Global = True
|
||||
|
||||
fncRegularReplace = objRegExp.Replace( pOrgString, pReplaceString)
|
||||
End Function
|
||||
|
||||
|
||||
%>
|
||||
|
||||
|
||||
183
Lib/infiles/fun_save.asp
Normal file
183
Lib/infiles/fun_save.asp
Normal file
@@ -0,0 +1,183 @@
|
||||
<!-- #include file="ini.asp" -->
|
||||
<%
|
||||
' 페이지 체크
|
||||
function f_pageCk(xado, xopenDB, xTable)
|
||||
|
||||
|
||||
dim x, xsql, ysql, usql, xobjdb
|
||||
xsql=" select ffpagelog, ffpage from "&xTable
|
||||
xsql=xsql&" where ffid='"&f_replace(request.form("ffid"),2)&"' "
|
||||
xsql=xsql&" and fftype='"&f_replace(request.form("fftype"),2)&"' "
|
||||
Call RsSQL(xado, xopenDB, xsql,xobjdb)
|
||||
If xobjdb.eof Then
|
||||
Call CloseCls(DBopener)
|
||||
response.write "<br> 정상적인 접근이 아닙니다. 처음부터 다시 진행하여 주시기 바랍니다. "
|
||||
response.end
|
||||
end if
|
||||
|
||||
dim xNum : xNum=split(xobjdb(0),"#")
|
||||
dim xNumYN : xNumYN="Y"
|
||||
dim xNumPage : xNumPage=""
|
||||
for i=0 to ubound(xNum)
|
||||
if trim(xNum(i))<>"" then
|
||||
if trim(ffnextpage)=trim(xNum(i)) then
|
||||
xNumYN="N"
|
||||
exit for
|
||||
end if
|
||||
end if
|
||||
next
|
||||
|
||||
|
||||
select case xNumYN
|
||||
case "Y" : xNumPage=""
|
||||
case "N" : xNumPage=xobjdb(1)
|
||||
end select
|
||||
Call CloseSQL(xobjdb)
|
||||
|
||||
f_pageCk=xNumPage
|
||||
|
||||
end function
|
||||
|
||||
|
||||
'#######################
|
||||
|
||||
|
||||
'데이터 저장
|
||||
Sub f_dataSave(xado, xopenDB, xTable) '-- xado:ADO클레스 , xopenDB:연결정보, xTable : 저장테이블명
|
||||
dim x, xsql, ysql, usql, xobjdb
|
||||
usql=""
|
||||
|
||||
' 구분별..
|
||||
For Each x in request.form
|
||||
|
||||
x_field=mid(x,3,len(x)) ' 저장필드명.
|
||||
select case Lcase(left(x,2))
|
||||
Case "s_" ' 단일
|
||||
usql=usql&","&x_field&"='"&f_replace(request.form(x),2)&"'"
|
||||
|
||||
Case "t_" ' text
|
||||
usql=usql&","&x_field&"='"&f_replace(request.form(x),2)&"'"
|
||||
|
||||
Case "m_" ' 멀티
|
||||
for j=1 to request.form(x).count
|
||||
usql=usql&","&x_field&"__"&request.form(x)(j)&"='"&f_replace(request.form(x)(j),2)&"'"
|
||||
next
|
||||
|
||||
Case "g_" ' 시간등록
|
||||
usql=usql&","&x_field&"=getdate() "
|
||||
End Select
|
||||
|
||||
Next
|
||||
|
||||
' 업데이트 쿼리.
|
||||
xsql=" update "&xTable&" set "
|
||||
|
||||
' 업데이트 기준
|
||||
If request.form("ffid")="" Then '-- Error
|
||||
Call CloseCls(DBopener)
|
||||
response.write "<br> 정상적인 접근이 아닙니다. 처음부터 다시 진행하여 주시기 바랍니다. "
|
||||
response.end
|
||||
|
||||
else ' 업데이트 기준
|
||||
ysql=" ffid='"&f_replace(request.form("ffid"),2)&"' "
|
||||
ysql=ysql&" and fftype='"&f_replace(request.form("fftype"),2)&"' "
|
||||
|
||||
end if
|
||||
|
||||
' SQL 생성.
|
||||
xsql=xsql&" fftype='"&f_replace(request.form("fftype"),2)&"' "
|
||||
xsql=xsql&usql&" where "&ysql
|
||||
' response.write xsql
|
||||
' response.End
|
||||
Call ExSQL(xado, xopenDB, xsql)
|
||||
|
||||
|
||||
|
||||
|
||||
'########## 진행상태 업데이트 ###################
|
||||
if not isnull(request.form("ffing")) then
|
||||
xsql=" update "&xTable&" set "
|
||||
xsql=xsql&" ffing='"&f_replace(request.form("ffing"),2)&"' "
|
||||
xsql=xsql&usql&" where "&ysql
|
||||
Call ExSQL(xado, xopenDB, xsql)
|
||||
end if
|
||||
|
||||
|
||||
'########## ffend(완료시간) 저장 ###################
|
||||
if not request.form("ffend")="0" then
|
||||
xsql=" update "&xTable&" set "
|
||||
xsql=xsql&" ffend=getdate() "
|
||||
xsql=xsql&usql&" where "&ysql
|
||||
Call ExSQL(xado, xopenDB, xsql)
|
||||
end if
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'#######################
|
||||
|
||||
' 페이지 정보 저장
|
||||
sub f_pageSave(xado, xopenDB, xTable)
|
||||
|
||||
dim x, xsql, ysql, usql, xobjdb
|
||||
xsql=" update "&xTable&" set "
|
||||
xsql=xsql&" ffpage='"&ffnextpage&"' "
|
||||
xsql=xsql&",ffpagelog=ffpagelog+'#'+'"&ffnextpage&"' " '-- 분리자(#)
|
||||
xsql=xsql&",ffpagecount=ffpagecount+1 "
|
||||
xsql=xsql&" where ffid='"&f_replace(request.form("ffid"),2)&"' "
|
||||
xsql=xsql&" and fftype='"&f_replace(request.form("fftype"),2)&"' "
|
||||
Call ExSQL(xado, xopenDB, xsql)
|
||||
|
||||
end sub
|
||||
|
||||
'#######################
|
||||
|
||||
|
||||
|
||||
' ----------------------------------------------------------------------------------
|
||||
' ----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
' 클레스 생성
|
||||
Sub clsOpen(mo)
|
||||
Set mo = new clsDBcomm
|
||||
End Sub
|
||||
|
||||
|
||||
' select 실행 : read only
|
||||
Sub RsSQL(clsN, mo_openDB, mo_sql, moobj)
|
||||
Set moobj = clsN.ExecSQLReturnRS(mo_sql, Nothing, Nothing,mo_openDB)
|
||||
End Sub
|
||||
|
||||
|
||||
' select 실행. : read update
|
||||
Sub RsSQL2(clsN, mo_openDB, mo_sql, moobj)
|
||||
Set moobj = clsN.ExecSQLReturnRS2(mo_sql, Nothing, Nothing,mo_openDB)
|
||||
End Sub
|
||||
|
||||
|
||||
' SQL 실행. : 리턴없음
|
||||
Sub ExSQL(clsN, mo_openDB, mo_sql)
|
||||
Call clsN.ExecSQL(mo_sql, Nothing, Nothing,mo_openDB)
|
||||
End Sub
|
||||
|
||||
|
||||
'연결종료
|
||||
Sub CloseSQL(mo)
|
||||
mo.Close
|
||||
Set mo = Nothing
|
||||
End Sub
|
||||
|
||||
' 클레스 종료
|
||||
Sub CloseCls(mo)
|
||||
mo.Dispose
|
||||
Set mo = Nothing
|
||||
End Sub
|
||||
|
||||
|
||||
' ----------------------------------------------------------------------------------
|
||||
' ----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
%>
|
||||
183
Lib/infiles/fun_save_copy.asp
Normal file
183
Lib/infiles/fun_save_copy.asp
Normal file
@@ -0,0 +1,183 @@
|
||||
<!-- #include file="ini_copy.asp" -->
|
||||
<%
|
||||
' 페이지 체크
|
||||
function f_pageCk(xado, xopenDB, xTable)
|
||||
|
||||
|
||||
dim x, xsql, ysql, usql, xobjdb
|
||||
xsql=" select ffpagelog, ffpage from "&xTable
|
||||
xsql=xsql&" where ffid='"&f_replace(request.form("ffid"),2)&"' "
|
||||
xsql=xsql&" and fftype='"&f_replace(request.form("fftype"),2)&"' "
|
||||
Call RsSQL(xado, xopenDB, xsql,xobjdb)
|
||||
If xobjdb.eof Then
|
||||
Call CloseCls(DBopener)
|
||||
response.write "<br> 정상적인 접근이 아닙니다. 처음부터 다시 진행하여 주시기 바랍니다. "
|
||||
response.end
|
||||
end if
|
||||
|
||||
dim xNum : xNum=split(xobjdb(0),"#")
|
||||
dim xNumYN : xNumYN="Y"
|
||||
dim xNumPage : xNumPage=""
|
||||
for i=0 to ubound(xNum)
|
||||
if trim(xNum(i))<>"" then
|
||||
if trim(ffnextpage)=trim(xNum(i)) then
|
||||
xNumYN="N"
|
||||
exit for
|
||||
end if
|
||||
end if
|
||||
next
|
||||
|
||||
|
||||
select case xNumYN
|
||||
case "Y" : xNumPage=""
|
||||
case "N" : xNumPage=xobjdb(1)
|
||||
end select
|
||||
Call CloseSQL(xobjdb)
|
||||
|
||||
f_pageCk=xNumPage
|
||||
|
||||
end function
|
||||
|
||||
|
||||
'#######################
|
||||
|
||||
|
||||
'데이터 저장
|
||||
Sub f_dataSave(xado, xopenDB, xTable) '-- xado:ADO클레스 , xopenDB:연결정보, xTable : 저장테이블명
|
||||
dim x, xsql, ysql, usql, xobjdb
|
||||
usql=""
|
||||
|
||||
' 구분별..
|
||||
For Each x in request.form
|
||||
|
||||
x_field=mid(x,3,len(x)) ' 저장필드명.
|
||||
select case Lcase(left(x,2))
|
||||
Case "s_" ' 단일
|
||||
usql=usql&","&x_field&"='"&f_replace(request.form(x),2)&"'"
|
||||
|
||||
Case "t_" ' text
|
||||
usql=usql&","&x_field&"='"&f_replace(request.form(x),2)&"'"
|
||||
|
||||
Case "m_" ' 멀티
|
||||
for j=1 to request.form(x).count
|
||||
usql=usql&","&x_field&"__"&request.form(x)(j)&"='"&f_replace(request.form(x)(j),2)&"'"
|
||||
next
|
||||
|
||||
Case "g_" ' 시간등록
|
||||
usql=usql&","&x_field&"=getdate() "
|
||||
End Select
|
||||
|
||||
Next
|
||||
|
||||
' 업데이트 쿼리.
|
||||
xsql=" update "&xTable&" set "
|
||||
|
||||
' 업데이트 기준
|
||||
If request.form("ffid")="" Then '-- Error
|
||||
Call CloseCls(DBopener)
|
||||
response.write "<br> 정상적인 접근이 아닙니다. 처음부터 다시 진행하여 주시기 바랍니다. "
|
||||
response.end
|
||||
|
||||
else ' 업데이트 기준
|
||||
ysql=" ffid='"&f_replace(request.form("ffid"),2)&"' "
|
||||
ysql=ysql&" and fftype='"&f_replace(request.form("fftype"),2)&"' "
|
||||
|
||||
end if
|
||||
|
||||
' SQL 생성.
|
||||
xsql=xsql&" fftype='"&f_replace(request.form("fftype"),2)&"' "
|
||||
xsql=xsql&usql&" where "&ysql
|
||||
' response.write xsql
|
||||
' response.End
|
||||
Call ExSQL(xado, xopenDB, xsql)
|
||||
|
||||
|
||||
|
||||
|
||||
'########## 진행상태 업데이트 ###################
|
||||
if not isnull(request.form("ffing")) then
|
||||
xsql=" update "&xTable&" set "
|
||||
xsql=xsql&" ffing='"&f_replace(request.form("ffing"),2)&"' "
|
||||
xsql=xsql&usql&" where "&ysql
|
||||
Call ExSQL(xado, xopenDB, xsql)
|
||||
end if
|
||||
|
||||
|
||||
'########## ffend(완료시간) 저장 ###################
|
||||
if not request.form("ffend")="0" then
|
||||
xsql=" update "&xTable&" set "
|
||||
xsql=xsql&" ffend=getdate() "
|
||||
xsql=xsql&usql&" where "&ysql
|
||||
Call ExSQL(xado, xopenDB, xsql)
|
||||
end if
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'#######################
|
||||
|
||||
' 페이지 정보 저장
|
||||
sub f_pageSave(xado, xopenDB, xTable)
|
||||
|
||||
dim x, xsql, ysql, usql, xobjdb
|
||||
xsql=" update "&xTable&" set "
|
||||
xsql=xsql&" ffpage='"&ffnextpage&"' "
|
||||
xsql=xsql&",ffpagelog=ffpagelog+'#'+'"&ffnextpage&"' " '-- 분리자(#)
|
||||
xsql=xsql&",ffpagecount=ffpagecount+1 "
|
||||
xsql=xsql&" where ffid='"&f_replace(request.form("ffid"),2)&"' "
|
||||
xsql=xsql&" and fftype='"&f_replace(request.form("fftype"),2)&"' "
|
||||
Call ExSQL(xado, xopenDB, xsql)
|
||||
|
||||
end sub
|
||||
|
||||
'#######################
|
||||
|
||||
|
||||
|
||||
' ----------------------------------------------------------------------------------
|
||||
' ----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
' 클레스 생성
|
||||
Sub clsOpen(mo)
|
||||
Set mo = new clsDBcomm
|
||||
End Sub
|
||||
|
||||
|
||||
' select 실행 : read only
|
||||
Sub RsSQL(clsN, mo_openDB, mo_sql, moobj)
|
||||
Set moobj = clsN.ExecSQLReturnRS(mo_sql, Nothing, Nothing,mo_openDB)
|
||||
End Sub
|
||||
|
||||
|
||||
' select 실행. : read update
|
||||
Sub RsSQL2(clsN, mo_openDB, mo_sql, moobj)
|
||||
Set moobj = clsN.ExecSQLReturnRS2(mo_sql, Nothing, Nothing,mo_openDB)
|
||||
End Sub
|
||||
|
||||
|
||||
' SQL 실행. : 리턴없음
|
||||
Sub ExSQL(clsN, mo_openDB, mo_sql)
|
||||
Call clsN.ExecSQL(mo_sql, Nothing, Nothing,mo_openDB)
|
||||
End Sub
|
||||
|
||||
|
||||
'연결종료
|
||||
Sub CloseSQL(mo)
|
||||
mo.Close
|
||||
Set mo = Nothing
|
||||
End Sub
|
||||
|
||||
' 클레스 종료
|
||||
Sub CloseCls(mo)
|
||||
mo.Dispose
|
||||
Set mo = Nothing
|
||||
End Sub
|
||||
|
||||
|
||||
' ----------------------------------------------------------------------------------
|
||||
' ----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
%>
|
||||
18
Lib/infiles/ini.asp
Normal file
18
Lib/infiles/ini.asp
Normal file
@@ -0,0 +1,18 @@
|
||||
<!-- #include file="../Config.asp" -->
|
||||
<%
|
||||
' ---------- 연 결 -------------------------------------------------------------------
|
||||
' ----------------------------------------------------------------------------------
|
||||
|
||||
dim ksurvey, ksurvey2,ksurvey3, DBopener
|
||||
ksurvey = "Provider=SQLOLEDB;Server=1.235.195.34;Initial Catalog="&DB_NAME1&";uid="&UID1&";pwd="&PWD1&";" 'krc_survey db
|
||||
ksurvey2 = "Provider=SQLOLEDB;Server=1.235.195.34;Initial Catalog="&DB_NAME&";uid="&UID&";pwd="&PWD&";" 'capi db
|
||||
'ksurvey3 = "Provider=SQLOLEDB; Server=" & SV_NAME2 & ";Initial Catalog=" & DB_NAME2 & "; UID=" & UID2 & "; PWD=" & PWD2 ' ep_reruit
|
||||
|
||||
'ksurvey2 = "Provider=SQLOLEDB;Server=10.10.13.115;Initial Catalog="&DB_NAME&";uid="&UID1&";pwd="&PWD1&";" 'krc_survey db
|
||||
'ksurvey = "Provider=SQLOLEDB;Server=10.10.13.115;Initial Catalog="&DB_NAME1&";uid="&UID1&";pwd="&PWD1&";" 'krc_survey db
|
||||
'ksurvey2 = "Provider=SQLOLEDB;Server="&SV_NAME&";Initial Catalog="&DB_NAME&";uid=sa;pwd=dudgus25;" 'capi db
|
||||
'ksurvey = "Provider=SQLOLEDB;Server="&SV_NAME1&";Initial Catalog="&DB_NAME1&";uid=sa;pwd=dudgus25;" 'krc_survey db
|
||||
|
||||
' ----------------------------------------------------------------------------------
|
||||
' ----------------------------------------------------------------------------------
|
||||
%>
|
||||
19
Lib/infiles/ini_Copy.asp
Normal file
19
Lib/infiles/ini_Copy.asp
Normal file
@@ -0,0 +1,19 @@
|
||||
<!-- #include file="../Config.asp" -->
|
||||
<%
|
||||
' ---------- 연 결 -------------------------------------------------------------------
|
||||
' ----------------------------------------------------------------------------------
|
||||
|
||||
dim ksurvey, ksurvey2,ksurvey3, DBopener
|
||||
'ksurvey = "Provider=SQLOLEDB;Server=1.235.195.34;Initial Catalog="&DB_NAME1&";uid="&UID1&";pwd="&PWD1&";" 'krc_survey db
|
||||
ksurvey2 = "Provider=SQLOLEDB;Server=1.235.195.34;Initial Catalog="&DB_NAME&";uid="&UID&";pwd="&PWD&";" 'capi db
|
||||
ksurvey3 = "Provider=SQLOLEDB; Server=" & SV_NAME2 & ";Initial Catalog=" & DB_NAME2 & "; UID=" & UID2 & "; PWD=" & PWD2 ' ep_reruit
|
||||
|
||||
'ksurvey2 = "Provider=SQLOLEDB;Server="&SV_NAME&";Initial Catalog="&DB_NAME&";uid=sa;pwd=dudgus25;" 'capi db
|
||||
ksurvey = "Provider=SQLOLEDB;Server=10.10.13.115;Initial Catalog="&DB_NAME1&";uid=sa;pwd=dudgus25;" 'krc_survey db
|
||||
|
||||
'ksurvey2 = "Provider=SQLOLEDB;Server="&SV_NAME&";Initial Catalog="&DB_NAME&";uid=sa;pwd=dudgus25;" 'capi db
|
||||
'ksurvey = "Provider=SQLOLEDB;Server=10.10.13;Initial Catalog="&DB_NAME1&";uid=sa;pwd=dudgus25;" 'krc_survey db
|
||||
|
||||
' ----------------------------------------------------------------------------------
|
||||
' ----------------------------------------------------------------------------------
|
||||
%>
|
||||
91
Lib/infiles/krc_css.css
Normal file
91
Lib/infiles/krc_css.css
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
#topMenu
|
||||
{/*topMenu<6E><75> ID<49><44> <20><><EFBFBD><EFBFBD> <20>±<EFBFBD><C2B1><EFBFBD> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD>*/
|
||||
height: 30px;/*topMenu<6E><75> <20><><EFBFBD≯<EFBFBD> 30px<70><78> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϸ<EFBFBD> <20>Ʒ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)*/
|
||||
display:inline-block;
|
||||
}
|
||||
#topMenu ul
|
||||
{
|
||||
display:inline-block;
|
||||
border-radius : 5px;
|
||||
}
|
||||
#topMenu ul li
|
||||
{/* topMenu<6E><75> ID<49><44> <20><><EFBFBD><EFBFBD> <20>±<EFBFBD> <20>ȿ<EFBFBD> <ul> <20>±<EFBFBD> <20>ȿ<EFBFBD> <li> <20>±<EFBFBD><C2B1><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
list-style: none;/*<li> <20>±״<C2B1> <20><><EFBFBD><EFBFBD> <20>̹<EFBFBD><CCB9><EFBFBD>ó<EFBFBD><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ش<EFBFBD> */
|
||||
color: black;/*<2A>۾<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
background-color: #f8f8f8;/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ȸ<><C8B8>(RGB(2D,2D,2D)<29><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
float: left;/* <li><3E>±<C2B1><D7B5><EFBFBD> <20><><EFBFBD>ʿ<EFBFBD> <20>帣<EFBFBD><E5B8A3> <20><><EFBFBD><EFBFBD>(<28><EFBFBD><D7B7><EFBFBD> <20>Ʒ<EFBFBD><C6B7>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>)*/
|
||||
line-height: 30px;/* <20>۾<EFBFBD><DBBE><EFBFBD> <20><><EFBFBD><EFBFBD><EEB5A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD≯<EFBFBD> 30px<70><78> <20><><EFBFBD><EFBFBD>*/
|
||||
vertical-align: middle;/*<2A><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EEB5A5> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD> line-height<68><74> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD>) */
|
||||
text-align: center;/* <20>۾<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EEB5A5> <20><><EFBFBD><EFBFBD>*/
|
||||
border-radius : 5px;
|
||||
}
|
||||
|
||||
#topMenu .menuLink
|
||||
{/* topMenu <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD> <20><><EFBFBD><EFBFBD> <20>±<EFBFBD> <20>ȿ<EFBFBD> <20>ִ<EFBFBD> menuLink Ŭ<><C5AC><EFBFBD><EFBFBD> <20>±<C2B1><D7B5><EFBFBD> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD>*/
|
||||
text-decoration:none;/*<2A><>ũ(<a> <20>±<EFBFBD>)<29><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⺻ <20>ٹ<EFBFBD> ȿ<><C8BF>(<28><><EFBFBD><EFBFBD> <20><>)<29><> <20><><EFBFBD><EFBFBD> */
|
||||
color: black;/*<2A><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
display: inline-block;/*<2A><>ũ<EFBFBD><C5A9> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ִ<EFBFBD> <20>κ<EFBFBD> <20>Ӹ<EFBFBD><D3B8>ƴ϶<C6B4> <20><>ü <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD>ص<EFBFBD> <20><>ũ<EFBFBD><C5A9> <20>ɸ<EFBFBD><C9B8><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
width: 180px;/* <20><EFBFBD><DEB4><EFBFBD>ũ<EFBFBD><C5A9> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>*/
|
||||
font-family: Helvetica Neue,Helvetica,Arial,sans-serif;
|
||||
font-size: 17px;/*<2A><>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 12px<70><78> <20><><EFBFBD><EFBFBD> */
|
||||
font-weight: bold;/*<2A><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD>*/
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;/*<2A>⺻ <20><>Ʈ <20><><EFBFBD><EFBFBD>, <20>ý<EFBFBD><C3BD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
border-radius : 5px;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
#topMenu .menuLink:hover
|
||||
{/*topMenu <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD> <20><><EFBFBD><EFBFBD> <20>±<EFBFBD> <20>ȿ<EFBFBD> menuLinkŬ<6B><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>±<C2B1> <20><><EFBFBD>콺<EFBFBD><ECBDBA> over<65>Ǹ<EFBFBD> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD> */
|
||||
color: White;/*<2A>۾<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
background-color: #D9D9D9;/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
border-radius : 5px;
|
||||
}
|
||||
/*
|
||||
div#menubar
|
||||
{
|
||||
text-align:center;
|
||||
|
||||
padding: 24px;border:0px;
|
||||
|
||||
}
|
||||
|
||||
div#menubar > button{
|
||||
|
||||
font-family: Malgun Gothic,Gulim,Arial,Helvetica,sans-serif;
|
||||
|
||||
font-size: 18px;
|
||||
border:0px;
|
||||
font-weight:bold;
|
||||
|
||||
background: #CCCCCC;
|
||||
|
||||
padding: 12px 20px;
|
||||
|
||||
color: #FFFFFF;
|
||||
|
||||
margin-right: 10px;
|
||||
|
||||
text-decoration: none;
|
||||
|
||||
border-radius:5px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
div#menubar > button > i{
|
||||
|
||||
|
||||
font-weight:bold;
|
||||
|
||||
|
||||
}
|
||||
|
||||
div#menubar > button:hover{
|
||||
|
||||
background: #FFFFFF;
|
||||
|
||||
color: #AAA9A9;
|
||||
|
||||
}
|
||||
*/
|
||||
486
Lib/infiles/valueck.js
Normal file
486
Lib/infiles/valueck.js
Normal file
@@ -0,0 +1,486 @@
|
||||
|
||||
|
||||
function form_check(form, fields) {
|
||||
var lah = new ckForm(form);
|
||||
if (fields) lah.setCheckFields(fields);
|
||||
var wmf = lah.go();
|
||||
if (wmf == false) alert(lah.getErrorMessage());
|
||||
return wmf;
|
||||
}
|
||||
|
||||
ckForm = function(form) {
|
||||
this.FUNC_MAP = {
|
||||
|
||||
// 특정응답값 로직체크..
|
||||
email : "this.func_email",
|
||||
hangul : "this.func_hangul",
|
||||
engonly : "this.func_engonly",
|
||||
number : "this.func_number"
|
||||
/*
|
||||
residentno: "this.func_residentno", // 주민번호 체크 미사용
|
||||
jumin : "this.func_jumin", // 주민번호 체크 미사용
|
||||
foreignerno:"this.func_foreignerno",
|
||||
bizno : "this.func_bizno",
|
||||
phone : "this.func_phone",
|
||||
homephone : "this.func_homephone",
|
||||
handphone : "this.func_handphone"
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.ERR_MSG = {
|
||||
// 에러메세지..
|
||||
system : "ckForm Error: ",
|
||||
ck : "응답하지 않은 문항이 있습니다 ",
|
||||
ckuirenum:"이 항목들 중에 {ckuirenum}개 이상의 항목이 입력되어야 합니다.",
|
||||
notequal : "입력된 내용이 일치하지 않습니다.",
|
||||
invalid : "입력된 내용이 형식에 어긋납니다.",
|
||||
minbyte : "입력된 내용의 길이가 {minbyte}Byte 이상이어야 합니다.",
|
||||
maxbyte : "입력된 내용의 길이가 {maxbyte}Byte를 초과할 수 없습니다.",
|
||||
mincheck : "{mincheck}개의 항목이상으로 선택하세요.",
|
||||
maxcheck : "{maxcheck}개의 항목이하로 선택하세요.",
|
||||
minselect: "{minselect}개의 항목이상으로 선택하세요.",
|
||||
maxselect: "{maxselect}개의 항목이하로 선택하세요.",
|
||||
imageonly: "이미지 파일만 첨부할 수 있습니다."
|
||||
}
|
||||
this.ERR_DO = {
|
||||
// 포커스 구분...
|
||||
text : "select focus",
|
||||
select : "focus",
|
||||
check : "focus",
|
||||
radio : "focus",
|
||||
file : "focus",
|
||||
hidden : ""
|
||||
}
|
||||
this.ERR_SYS = '_SYSERR_';
|
||||
this.fields = form.elements;
|
||||
this.form = form;
|
||||
this.errMsg = "";
|
||||
}
|
||||
|
||||
ckForm.prototype.setForm = function(form) {
|
||||
this.form = form;
|
||||
}
|
||||
|
||||
ckForm.prototype.setFunc = function(map, func) {
|
||||
if (typeof(this.FUNC_MAP[map]) == "string") return;
|
||||
this.FUNC_MAP[map] = func;
|
||||
}
|
||||
|
||||
ckForm.prototype.setCheckFields = function(fields) {
|
||||
this.fields = [];
|
||||
if(typeof(fields) == 'string')
|
||||
// 단일
|
||||
if(this.form.elements[fields].disabled=="false"){
|
||||
this.fields = [this.form.elements[fields]];
|
||||
}
|
||||
else
|
||||
//멀티
|
||||
for(var i=0, s=fields.length; i<s; i++){
|
||||
if(this.form.elements[fields[i]].disabled=="false"){
|
||||
this.fields[this.fields.length] = this.form.elements[fields[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ckForm.prototype.setUnCheckFields = function(fields) {
|
||||
this.fields = [];
|
||||
var _isUnCheckEl;
|
||||
|
||||
if(typeof(fields) == 'string')
|
||||
fields = [fields];
|
||||
for (var i=0, s=this.form.elements.length; i<s; i++) {
|
||||
_isUnCheckEl = false;
|
||||
for (var j=0, t=fields.length; j<t; j++) {
|
||||
if (this.form.elements[i] == this.form.elements[fields[j]]) {
|
||||
_isUnCheckEl = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!_isUnCheckEl) this.fields[this.fields.length] = this.form.elements[i];
|
||||
}
|
||||
}
|
||||
|
||||
ckForm.prototype.setParam = function(el, name, value) {
|
||||
el.setAttribute(name, value);
|
||||
}
|
||||
|
||||
ckForm.prototype.delParam = function(el, name) {
|
||||
el.removeAttribute(name);
|
||||
}
|
||||
|
||||
ckForm.prototype.go = function() {
|
||||
for (var i=0,s=this.fields.length; i<s; i++) {
|
||||
var el = this.fields[i];
|
||||
if (!this.isValidElement(el)) continue;
|
||||
|
||||
var elType = this.getType(el);
|
||||
var trim = el.getAttribute("TRIM");
|
||||
var ck = el.getAttribute("ck");
|
||||
var ckuirenum = el.getAttribute("ckUIRENUM");
|
||||
var minbyte = parseInt(el.getAttribute("MINBYTE"),10);
|
||||
var maxbyte = parseInt(el.getAttribute("MAXBYTE"),10);
|
||||
var mincheck = parseInt(el.getAttribute("MINCHECK"),10);
|
||||
var maxcheck = parseInt(el.getAttribute("MAXCHECK"),10);
|
||||
var minselect = parseInt(el.getAttribute("MINSELECT"),10);
|
||||
var maxselect = parseInt(el.getAttribute("MAXSELECT"),10);
|
||||
var option = el.getAttribute("OPTION");
|
||||
var match = el.getAttribute("MATCH");
|
||||
var span = el.getAttribute("SPAN");
|
||||
var glue = el.getAttribute("GLUE");
|
||||
var pattern = el.getAttribute("PATTERN");
|
||||
var imageonly = el.getAttribute("IMAGEONLY");
|
||||
|
||||
if (trim != null && (elType == "text" || elType == "hidden")) {
|
||||
switch (trim) {
|
||||
case "trim":
|
||||
el.value = el.value.replace(/^\s+/, "").replace(/\s+$/, "");
|
||||
break;
|
||||
case "compress":
|
||||
el.value = el.value.replace(/\s+/, "");
|
||||
break;
|
||||
case "ltrim":
|
||||
el.value = el.value.replace(/^\s+/, "");
|
||||
break;
|
||||
case "rtrim":
|
||||
el.value = el.value.replace(/\s+$/, "");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var elEmpty = this.isEmpty(el, elType);
|
||||
|
||||
if (ck != null) {
|
||||
if (ck == "ck") {
|
||||
if (elEmpty) return this.raiseError(el, "ck");
|
||||
} else {
|
||||
ckuirenum = parseInt(ckuirenum, 10);
|
||||
var _num = 0;
|
||||
var _name = [];
|
||||
if (ckuirenum > 0) {
|
||||
for (var j=0; j<this.form.elements.length; j++) {
|
||||
var _el = this.form.elements[j];
|
||||
if (ck == _el.getAttribute("ck")) {
|
||||
if(!this.isEmpty(_el, this.getType(_el))) _num++;
|
||||
_name[_name.length] = this.getName(_el);
|
||||
}
|
||||
}
|
||||
if(_num < ckuirenum)
|
||||
return this.raiseError(el, "ckuirenum", _name.join(", "));
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((minbyte > 0 || maxbyte > 0) && (elType == "text" || elType == "hidden")) {
|
||||
var _tmp = el.value;
|
||||
var _len = el.value.length;
|
||||
for (j=0; j<_tmp.length; j++) {
|
||||
if (_tmp.charCodeAt(j) > 128) _len++;
|
||||
}
|
||||
if (minbyte > 0 && _len < minbyte) return this.raiseError(el, "minbyte");
|
||||
if (maxbyte > 0 && _len > maxbyte) return this.raiseError(el, "maxbyte");
|
||||
}
|
||||
if (match != null && elType != "file") {
|
||||
if (typeof this.form.elements[match] == "undefined")
|
||||
return this.raiseError(this.ERR_SYS, "Element '"+ match +"' is not found.");
|
||||
else if (el.value != this.form.elements[match].value)
|
||||
return this.raiseError(el, "notequal");
|
||||
}
|
||||
if (option != null && !elEmpty && elType != "file") {
|
||||
var _options = option.split(" ");
|
||||
for (var j in _options) {
|
||||
var _func = eval(this.FUNC_MAP[_options[j]]);
|
||||
if (span != null) {
|
||||
var _value = [];
|
||||
for (var k=0; k<parseInt(span,10); k++) {
|
||||
try {
|
||||
_value[k] = this.fields[i+k].value;
|
||||
} catch (e) {
|
||||
return this.raiseError(this.ERR_SYS, (i+k) +"th Element is not found.");
|
||||
}
|
||||
}
|
||||
try {
|
||||
var _result = _func(el, _value.join(glue == null ? "" : glue));
|
||||
} catch (e) {
|
||||
return this.raiseError(this.ERR_SYS, "function map '"+ _options[j] +"' is not exist.");
|
||||
}
|
||||
if (_result !== true) return this.raiseError(el, _result);
|
||||
} else {
|
||||
try {
|
||||
var _result = _func(el);
|
||||
} catch (e) {
|
||||
return this.raiseError(this.ERR_SYS, "function map '"+ _options[j] +"' is not exist.");
|
||||
}
|
||||
if (_result !== true) return this.raiseError(el, _result);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pattern != null && !elEmpty && elType != "file") {
|
||||
try {
|
||||
pattern = new RegExp(pattern);
|
||||
} catch (e) {
|
||||
return this.raiseError(this.ERR_SYS, "Invalid Regular Expression '"+ pattern +"'");
|
||||
}
|
||||
if (!pattern.test(el.value)) return this.raiseError(el, "invalid");
|
||||
}
|
||||
if ((mincheck > 0 || maxcheck > 0) && elType == "check") {
|
||||
var _checks = this.form.elements[el.name];
|
||||
var _num = 0;
|
||||
if (typeof _checks.length != "undefined") {
|
||||
for (var j=0; j<_checks.length; j++) {
|
||||
if (_checks[j].checked) _num++;
|
||||
}
|
||||
} else {
|
||||
if (_checks.checked) _num++;
|
||||
}
|
||||
if (mincheck > 0 && _num < mincheck) return this.raiseError(el, "mincheck");
|
||||
if (maxcheck > 0 && _num > maxcheck) return this.raiseError(el, "maxcheck");
|
||||
}
|
||||
if ((minselect > 0 || maxselect > 0) && elType == "multiselect") {
|
||||
var _num = 0;
|
||||
for (var j=0; j<el.options.length; j++) {
|
||||
if (el.options[j].selected) _num++;
|
||||
}
|
||||
if (minselect > 0 && _num < minselect) return this.raiseError(el, "minselect");
|
||||
if (maxselect > 0 && _num > maxselect) return this.raiseError(el, "maxselect");
|
||||
}
|
||||
if (imageonly != null && elType == "file") {
|
||||
var fn = el.value;
|
||||
if (fn != "") {
|
||||
var dotIndex = fn.lastIndexOf(".");
|
||||
var ext = fn.substring(dotIndex+1).toLowerCase();
|
||||
if(ext != "jpg" && ext != "jpeg" && ext != "gif" && ext != "png")
|
||||
return this.raiseError(el, "imageonly");
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
ckForm.prototype.isValidElement = function(el) {
|
||||
return el.name && el.tagName.match(/^input|select|textarea$/i) && !el.disabled;
|
||||
}
|
||||
|
||||
ckForm.prototype.isEmpty = function(el, type) {
|
||||
switch (type) {
|
||||
case "file": case "text": case "hidden":
|
||||
if (el.value == null || el.value == "") return true;
|
||||
break;
|
||||
case "select": case "multiselect":
|
||||
if (el.selectedIndex == -1 || el[el.selectedIndex].value == null ||
|
||||
el[el.selectedIndex].value == "")
|
||||
return true;
|
||||
break;
|
||||
case "check": case "radio":
|
||||
var elCheck = this.form.elements[el.name];
|
||||
var elChecked = false;
|
||||
if (typeof elCheck.length != "undefined") {
|
||||
for (var j=0; j<elCheck.length; j++) {
|
||||
if (elCheck[j].checked == true) elChecked = true;
|
||||
}
|
||||
} else {
|
||||
if (elCheck.checked == true) elChecked = true;
|
||||
}
|
||||
if (elChecked == false) return true;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
ckForm.prototype.getType = function(el) {
|
||||
switch (el.tagName.toLowerCase()) {
|
||||
case "select":
|
||||
return el.multiple == true ? "multiselect" : "select";
|
||||
case "textarea": return "text";
|
||||
case "input":
|
||||
switch (el.type.toLowerCase()) {
|
||||
case "radio": return "radio";
|
||||
case "checkbox": return "check";
|
||||
case "file": return "file";
|
||||
case "text": case "password": return "text";
|
||||
case "hidden": return "hidden";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ckForm.prototype.raiseError = function(el, type, elName) {
|
||||
if (el == this.ERR_SYS) {
|
||||
this.errMsg = this.ERR_MSG["system"] + type;
|
||||
return false;
|
||||
}
|
||||
var pattern = /\{([a-zA-Z0-9_]+)\}/i;
|
||||
var msg = this.ERR_MSG[type] ? this.ERR_MSG[type] : type;
|
||||
var elType = this.getType(el);
|
||||
var elName = elName ? elName : this.getName(el);
|
||||
var errDo = el.getAttribute("ERRDO") ? el.getAttribute("ERRDO") : this.ERR_DO[elType];
|
||||
var _errDos = errDo ? errDo.split(" ") : [];
|
||||
|
||||
if (el.getAttribute("ERRMSG") != null) msg = el.getAttribute("ERRMSG");
|
||||
if (pattern.test(msg) == true) {
|
||||
while (pattern.exec(msg)) msg = msg.replace(pattern, el.getAttribute(RegExp.$1));
|
||||
}
|
||||
for (var i in _errDos) {
|
||||
switch (_errDos[i]) {
|
||||
case "delete": el.value = ""; break;
|
||||
case "select": el.select(); break;
|
||||
case "focus": el.focus(); break;
|
||||
}
|
||||
}
|
||||
//----------------- h
|
||||
|
||||
// 경고문(alert) 등록시. ex( halt="체크박스 버튼을 체크해 주세요" )
|
||||
if(!(el.getAttribute("HALT") == null || el.getAttribute("HALT") == "")){
|
||||
this.errMsg = ""+el.getAttribute("HALT") +"\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// nname 인자가 없는경우 메세지 ex(nname="" : 메세지 --> this.ERR_MSG )
|
||||
if(el.getAttribute("rname") == null || el.getAttribute("rname") == ""){
|
||||
this.errMsg = ""+msg +"\n";
|
||||
return false;
|
||||
}else{
|
||||
// this.errMsg = "["+ elName +"]\n\n- "+ msg +"\n";
|
||||
this.errMsg = ""+msg +"\n";
|
||||
return false;
|
||||
}
|
||||
//------------------- h
|
||||
|
||||
}
|
||||
|
||||
ckForm.prototype.getErrorMessage = function() {
|
||||
return this.errMsg;
|
||||
}
|
||||
|
||||
ckForm.prototype.getName = function(el) {
|
||||
return el.getAttribute("rname") == null || el.getAttribute("rname") == ""
|
||||
? el.name : el.getAttribute("rname");
|
||||
}
|
||||
/**
|
||||
* validate functions
|
||||
*/
|
||||
ckForm.prototype.func_email = function(el,value) {
|
||||
var value = value ? value : el.value;
|
||||
var pattern = /^[_a-zA-Z0-9-\.]+@[\.a-zA-Z0-9-]+\.[a-zA-Z]+$/;
|
||||
return pattern.test(value) ? true : "invalid";
|
||||
}
|
||||
|
||||
ckForm.prototype.func_hangul = function(el) {
|
||||
var pattern = /[가-힝]/;
|
||||
return pattern.test(el.value) ? true : "반드시 한글을 포함해야 합니다";
|
||||
}
|
||||
|
||||
ckForm.prototype.func_engonly = function(el) {
|
||||
var pattern = /^[a-zA-Z]+$/;
|
||||
return pattern.test(el.value) ? true : "invalid";
|
||||
}
|
||||
|
||||
ckForm.prototype.func_number = function(el) {
|
||||
var pattern = /^[0-9]+$/;
|
||||
return pattern.test(el.value) ? true : "반드시 숫자로만 입력해야 합니다";
|
||||
}
|
||||
|
||||
/*
|
||||
ckForm.prototype.func_residentno = function(el,value) {
|
||||
var pattern = /^(\d{6})-?(\d{5}(\d{1})\d{1})$/;
|
||||
var num = value ? value : el.value;
|
||||
if (!pattern.test(num)) return "invalid";
|
||||
num = RegExp.$1 + RegExp.$2;
|
||||
if (RegExp.$3 == 7 || RegExp.$3 == 8 || RegExp.$4 == 9)
|
||||
if ((num[7]*10 + num[8]) %2) return "invalid";
|
||||
|
||||
var sum = 0;
|
||||
var last = num.charCodeAt(12) - 0x30;
|
||||
var bases = "234567892345";
|
||||
for (var i=0; i<12; i++) {
|
||||
if (isNaN(num.substring(i,i+1))) return "invalid";
|
||||
sum += (num.charCodeAt(i) - 0x30) * (bases.charCodeAt(i) - 0x30);
|
||||
}
|
||||
var mod = sum % 11;
|
||||
if(RegExp.$3 == 7 || RegExp.$3 == 8 || RegExp.$4 == 9)
|
||||
return (11 - mod + 2) % 10 == last ? true : "invalid";
|
||||
else
|
||||
return (11 - mod) % 10 == last ? true : "invalid";
|
||||
}
|
||||
*/
|
||||
/*
|
||||
ckForm.prototype.func_jumin = function(el,value) {
|
||||
var pattern = /^([0-9]{6})-?([0-9]{7})$/;
|
||||
var num = value ? value : el.value;
|
||||
if (!pattern.test(num)) return "invalid";
|
||||
num = RegExp.$1 + RegExp.$2;
|
||||
|
||||
var sum = 0;
|
||||
var last = num.charCodeAt(12) - 0x30;
|
||||
var bases = "234567892345";
|
||||
for (var i=0; i<12; i++) {
|
||||
if (isNaN(num.substring(i,i+1))) return "invalid";
|
||||
sum += (num.charCodeAt(i) - 0x30) * (bases.charCodeAt(i) - 0x30);
|
||||
}
|
||||
var mod = sum % 11;
|
||||
return (11 - mod) % 10 == last ? true : "invalid";
|
||||
}
|
||||
*/
|
||||
/*
|
||||
ckForm.prototype.func_foreignerno = function(el,value) {
|
||||
var pattern = /^(\d{6})-?(\d{5}[7-9]\d{1})$/;
|
||||
var num = value ? value : el.value;
|
||||
if (!pattern.test(num)) return "invalid";
|
||||
num = RegExp.$1 + RegExp.$2;
|
||||
if ((num[7]*10 + num[8]) %2) return "invalid";
|
||||
|
||||
var sum = 0;
|
||||
var last = num.charCodeAt(12) - 0x30;
|
||||
var bases = "234567892345";
|
||||
for (var i=0; i<12; i++) {
|
||||
if (isNaN(num.substring(i,i+1))) return "invalid";
|
||||
sum += (num.charCodeAt(i) - 0x30) * (bases.charCodeAt(i) - 0x30);
|
||||
}
|
||||
var mod = sum % 11;
|
||||
return (11 - mod + 2) % 10 == last ? true : "invalid";
|
||||
}
|
||||
*/
|
||||
/*
|
||||
ckForm.prototype.func_bizno = function(el,value) {
|
||||
var pattern = /([0-9]{3})-?([0-9]{2})-?([0-9]{5})/;
|
||||
var num = value ? value : el.value;
|
||||
if (!pattern.test(num)) return "invalid";
|
||||
num = RegExp.$1 + RegExp.$2 + RegExp.$3;
|
||||
var cVal = 0;
|
||||
for (var i=0; i<8; i++) {
|
||||
var cKeyNum = parseInt(((_tmp = i % 3) == 0) ? 1 : ( _tmp == 1 ) ? 3 : 7);
|
||||
cVal += (parseFloat(num.substring(i,i+1)) * cKeyNum) % 10;
|
||||
}
|
||||
var li_temp = parseFloat(num.substring(i,i+1)) * 5 + "0";
|
||||
cVal += parseFloat(li_temp.substring(0,1)) + parseFloat(li_temp.substring(1,2));
|
||||
return parseInt(num.substring(9,10)) == 10-(cVal % 10)%10 ? true : "invalid";
|
||||
}
|
||||
*/
|
||||
/*
|
||||
ckForm.prototype.func_phone = function(el,value) {
|
||||
var pattern = /^(0[2-8][0-5]?|01[01346-9])-?([1-9]{1}[0-9]{2,3})-?([0-9]{4})$/;
|
||||
var pattern15xx = /^(1544|1566|1577|1588|1644|1688)-?([0-9]{4})$/;
|
||||
var num = value ? value : el.value;
|
||||
return pattern.exec(num) || pattern15xx.exec(num) ? true : "invalid";
|
||||
}
|
||||
|
||||
ckForm.prototype.func_homephone = function(el,value) {
|
||||
var pattern = /^(0[2-8][0-5]?)-?([1-9]{1}[0-9]{2,3})-?([0-9]{4})$/;
|
||||
var pattern15xx = /^(1544|1566|1577|1588|1644|1688)-?([0-9]{4})$/;
|
||||
var num = value ? value : el.value;
|
||||
return pattern.exec(num) || pattern15xx.exec(num) ? true : "invalid";
|
||||
}
|
||||
|
||||
ckForm.prototype.func_handphone = function(el,value) {
|
||||
var pattern = /^(01[01346-9])-?([1-9]{1}[0-9]{2,3})-?([0-9]{4})$/;
|
||||
var num = value ? value : el.value;
|
||||
return pattern.exec(num) ? true : "invalid";
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user