Comm_periodDayCalendar.xfdl 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\default_typedef.xml"/>
  4. <Form id="dl_periodDayCalendar" classname="CommonBtn" inheritanceid="" position="absolute 0 0 410 255" titletext="Comm_FromTo" onload="dl_periodDayCalendar_onload" scrollbars="none">
  5. <Layouts>
  6. <Layout>
  7. <Static id="stc_Body" text="Message" class="St_popupBg02" enable="false" position="absolute 0 0 405 250" style=":disabled {padding:0 0 0 90;}"/>
  8. <Static id="Static00" class="sta_Month" position="absolute 1 1 404 33"/>
  9. <Button id="btn_Close" taborder="1" text="Close" onclick="btn_Close_onclick" class="btn5" position="absolute 205 219 259 239"/>
  10. <Button id="btn_Ok" taborder="1" text="Select" onclick="btn_Ok_onclick" class="btn5" position="absolute 141 219 203 239"/>
  11. <Div id="divTo" taborder="1" class="div_POPCA_divLine" position="absolute 208 0 404 209">
  12. <Layouts>
  13. <Layout>
  14. <Static id="stcD36" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 185 36 209" anchor="default"/>
  15. <Static id="stcD42" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 185 186 209" anchor="default"/>
  16. <Static id="stcD41" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 185 161 209" anchor="default"/>
  17. <Static id="stcD40" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 185 136 209" anchor="default"/>
  18. <Static id="stcD39" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 185 111 209" anchor="default"/>
  19. <Static id="stcD38" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 185 86 209" anchor="default"/>
  20. <Static id="stcD37" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 185 61 209" anchor="default"/>
  21. <Static id="stcD29" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 162 36 186" anchor="default"/>
  22. <Static id="stcD22" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 139 36 163" anchor="default"/>
  23. <Static id="stcD15" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 116 36 140" anchor="default"/>
  24. <Static id="stcD8" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 93 36 117" anchor="default"/>
  25. <Static id="stcD28" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 139 186 163" anchor="default"/>
  26. <Static id="stcD35" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 162 186 186" anchor="default"/>
  27. <Static id="stcD21" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 116 186 140" anchor="default"/>
  28. <Static id="stcD14" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 93 186 117" anchor="default"/>
  29. <Static id="stcD34" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 162 161 186" anchor="default"/>
  30. <Static id="stcD27" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 139 161 163" anchor="default"/>
  31. <Static id="stcD20" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 116 161 140" anchor="default"/>
  32. <Static id="stcD13" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 93 161 117" anchor="default"/>
  33. <Static id="stcD12" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 93 136 117" anchor="default"/>
  34. <Static id="stcD19" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 116 136 140" anchor="default"/>
  35. <Static id="stcD26" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 139 136 163" anchor="default"/>
  36. <Static id="stcD33" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 162 136 186" anchor="default"/>
  37. <Static id="stcD32" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 162 111 186" anchor="default"/>
  38. <Static id="stcD25" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 139 111 163" anchor="default"/>
  39. <Static id="stcD18" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 116 111 140" anchor="default"/>
  40. <Static id="stcD11" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 93 111 117" anchor="default"/>
  41. <Static id="stcD10" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 93 86 117" anchor="default"/>
  42. <Static id="stcD17" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 116 86 140" anchor="default"/>
  43. <Static id="stcD24" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 139 86 163" anchor="default"/>
  44. <Static id="stcD31" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 162 86 186" anchor="default"/>
  45. <Static id="stcD30" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 162 61 186" anchor="default"/>
  46. <Static id="stcD23" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 139 61 163" anchor="default"/>
  47. <Static id="stcD16" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 116 61 140" anchor="default"/>
  48. <Static id="stcD9" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 93 61 117" anchor="default"/>
  49. <Static id="stcD2" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 70 61 94" style="color:dimgray; " anchor="default"/>
  50. <Static id="stcD7" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 70 186 94" anchor="default"/>
  51. <Static id="stcD6" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 70 161 94" style="color:dimgray; " anchor="default"/>
  52. <Static id="stcD5" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 70 136 94" anchor="default"/>
  53. <Static id="stcD4" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 70 111 94" anchor="default"/>
  54. <Static id="stcD3" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 70 86 94" style="color:dimgray; " anchor="default"/>
  55. <Static id="stcD1" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 70 36 94" anchor="default"/>
  56. <Static id="stcYear" text="2012" class="St_POPCA_stcYear" position="absolute 26 9 80 24" style="align:center middle; " anchor="default"/>
  57. <Button id="btn_NextYear" taborder="1" onclick="btn_NextYear_onclick" class="icon_next_year" position="absolute 80 9 96 25" anchor="default"/>
  58. <Button id="btn_PreYear" taborder="1" onclick="btn_PreYear_onclick" class="icon_pre_year" position="absolute 10 9 26 25" anchor="default"/>
  59. <Combo id="cboMon" taborder="1" innerdataset="dstMonth" codecolumn="code" datacolumn="code" onitemchanged="cbo_Mon_onitemchanged" position="absolute 118 7 167 27" anchor="default" class="calendar_output"/>
  60. <Button id="btn_PreMon" taborder="1" onclick="btn_PreMon_onclick" class="icon_pre_month" position="absolute 99 9 115 25" anchor="default"/>
  61. <Button id="btn_NextMon" taborder="1" onclick="btn_NextMon_onclick" class="icon_next_month" position="absolute 170 9 186 25" anchor="default"/>
  62. <Static id="stc0" text="Sun" class="St_CalDW_Sun" position="absolute 10 47 37 71" anchor="default"/>
  63. <Static id="stc1" text="Mon" class="St_CalDW_Day" position="absolute 35 47 61 71" anchor="default"/>
  64. <Static id="stc2" text="Tue" class="St_CalDW_Day" position="absolute 60 47 86 71" anchor="default"/>
  65. <Static id="stc3" text="Wed" class="St_CalDW_Day" position="absolute 85 47 111 71" anchor="default"/>
  66. <Static id="stc4" text="Thu" class="St_CalDW_Day" position="absolute 110 47 136 71" anchor="default"/>
  67. <Static id="stc5" text="Fri" class="St_CalDW_Day" position="absolute 135 47 161 71" anchor="default"/>
  68. <Static id="stc6" text="Sat" class="St_CalDW_Sat" position="absolute 160 47 186 71" anchor="default"/>
  69. </Layout>
  70. </Layouts>
  71. </Div>
  72. <Div id="divFrom" taborder="2" class="div_POPCA_divLine" position="absolute 8 0 204 209">
  73. <Layouts>
  74. <Layout>
  75. <Static id="stcD36" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 185 36 209" anchor="default"/>
  76. <Static id="stcD42" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 185 186 209" anchor="default"/>
  77. <Static id="stcD41" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 185 161 209" anchor="default"/>
  78. <Static id="stcD40" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 185 136 209" anchor="default"/>
  79. <Static id="stcD39" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 185 111 209" anchor="default"/>
  80. <Static id="stcD38" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 185 86 209" anchor="default"/>
  81. <Static id="stcD37" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 185 61 209" anchor="default"/>
  82. <Static id="stcD29" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 162 36 186" anchor="default"/>
  83. <Static id="stcD22" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 139 36 163" anchor="default"/>
  84. <Static id="stcD15" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 116 36 140" anchor="default"/>
  85. <Static id="stcD8" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 93 36 117" anchor="default"/>
  86. <Static id="stcD28" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 139 186 163" anchor="default"/>
  87. <Static id="stcD35" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 162 186 186" anchor="default"/>
  88. <Static id="stcD21" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 116 186 140" anchor="default"/>
  89. <Static id="stcD14" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 93 186 117" anchor="default"/>
  90. <Static id="stcD34" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 162 161 186" anchor="default"/>
  91. <Static id="stcD27" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 139 161 163" anchor="default"/>
  92. <Static id="stcD20" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 116 161 140" anchor="default"/>
  93. <Static id="stcD13" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 93 161 117" anchor="default"/>
  94. <Static id="stcD12" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 93 136 117" anchor="default"/>
  95. <Static id="stcD19" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 116 136 140" anchor="default"/>
  96. <Static id="stcD26" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 139 136 163" anchor="default"/>
  97. <Static id="stcD33" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 162 136 186" anchor="default"/>
  98. <Static id="stcD32" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 162 111 186" anchor="default"/>
  99. <Static id="stcD25" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 139 111 163" anchor="default"/>
  100. <Static id="stcD18" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 116 111 140" anchor="default"/>
  101. <Static id="stcD11" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 93 111 117" anchor="default"/>
  102. <Static id="stcD10" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 93 86 117" anchor="default"/>
  103. <Static id="stcD17" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 116 86 140" anchor="default"/>
  104. <Static id="stcD24" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 139 86 163" anchor="default"/>
  105. <Static id="stcD31" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 162 86 186" anchor="default"/>
  106. <Static id="stcD30" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 162 61 186" anchor="default"/>
  107. <Static id="stcD23" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 139 61 163" anchor="default"/>
  108. <Static id="stcD16" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 116 61 140" anchor="default"/>
  109. <Static id="stcD9" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 93 61 117" anchor="default"/>
  110. <Static id="stcD2" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 35 70 61 94" style="color:dimgray; " anchor="default"/>
  111. <Static id="stcD7" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 160 70 186 94" anchor="default"/>
  112. <Static id="stcD6" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 135 70 161 94" style="color:dimgray; " anchor="default"/>
  113. <Static id="stcD5" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 110 70 136 94" anchor="default"/>
  114. <Static id="stcD4" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 85 70 111 94" anchor="default"/>
  115. <Static id="stcD3" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 60 70 86 94" style="color:dimgray; " anchor="default"/>
  116. <Static id="stcD1" text="1" onclick="stcD_onclick" class="St_CalDay" position="absolute 10 70 36 94" anchor="default"/>
  117. <Static id="stcYear" text="2010" class="St_POPCA_stcYear" position="absolute 26 9 80 24" style="align:center middle; " anchor="default"/>
  118. <Button id="btn_NextYear" taborder="2" onclick="btn_NextYear_onclick" class="icon_next_year" position="absolute 80 9 96 25" anchor="default"/>
  119. <Button id="btn_PreYear" taborder="3" onclick="btn_PreYear_onclick" class="icon_pre_year" position="absolute 10 9 26 25" anchor="default"/>
  120. <Combo id="cboMon" taborder="4" innerdataset="dstMonth" codecolumn="code" datacolumn="code" onitemchanged="cbo_Mon_onitemchanged" position="absolute 118 7 167 27" anchor="default" class="calendar_output"/>
  121. <Button id="btn_PreMon" taborder="5" onclick="btn_PreMon_onclick" class="icon_pre_month" position="absolute 99 9 115 25" anchor="default"/>
  122. <Button id="btn_NextMon" taborder="6" onclick="btn_NextMon_onclick" class="icon_next_month" position="absolute 170 9 186 25" anchor="default"/>
  123. <Static id="stc0" text="Sun" class="St_CalDW_Sun" position="absolute 10 47 37 71" anchor="default"/>
  124. <Static id="stc1" text="Mon" class="St_CalDW_Day" position="absolute 35 47 61 71" anchor="default"/>
  125. <Static id="stc2" text="Tue" class="St_CalDW_Day" position="absolute 60 47 86 71" anchor="default"/>
  126. <Static id="stc3" text="Wed" class="St_CalDW_Day" position="absolute 85 47 111 71" anchor="default"/>
  127. <Static id="stc4" text="Thu" class="St_CalDW_Day" position="absolute 110 47 136 71" anchor="default"/>
  128. <Static id="stc5" text="Fri" class="St_CalDW_Day" position="absolute 135 47 161 71" anchor="default"/>
  129. <Static id="stc6" text="Sat" class="St_CalDW_Sat" position="absolute 160 47 186 71" anchor="default"/>
  130. </Layout>
  131. </Layouts>
  132. </Div>
  133. </Layout>
  134. </Layouts>
  135. <Bind>
  136. <BindItem id="item2" compid="btn_Close" propid="text" datasetid="gdstDomain" columnid="FW000333"/>
  137. <BindItem id="item0" compid="btn_Ok" propid="text" datasetid="gdstDomain" columnid="FW000379"/>
  138. </Bind>
  139. <Objects>
  140. <Dataset id="dstYear" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  141. <ColumnInfo>
  142. <Column id="year" type="STRING" size="256"/>
  143. </ColumnInfo>
  144. </Dataset>
  145. <Dataset id="dstDayChOpt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  146. <ColumnInfo>
  147. <Column id="CODE" type="STRING" size="256"/>
  148. <Column id="NAME" type="STRING" size="256"/>
  149. </ColumnInfo>
  150. <Rows>
  151. <Row>
  152. <Col id="CODE">1</Col>
  153. <Col id="NAME">This Week</Col>
  154. </Row>
  155. <Row>
  156. <Col id="CODE">2</Col>
  157. <Col id="NAME">Last Week</Col>
  158. </Row>
  159. <Row>
  160. <Col id="CODE">3</Col>
  161. <Col id="NAME">This Mon</Col>
  162. </Row>
  163. <Row>
  164. <Col id="CODE">4</Col>
  165. <Col id="NAME">Last Mon</Col>
  166. </Row>
  167. <Row>
  168. <Col id="CODE">5</Col>
  169. <Col id="NAME">This Quarter</Col>
  170. </Row>
  171. <Row>
  172. <Col id="CODE">6</Col>
  173. <Col id="NAME">Last Quarter</Col>
  174. </Row>
  175. <Row>
  176. <Col id="CODE">7</Col>
  177. <Col id="NAME">This Year(Sum)</Col>
  178. </Row>
  179. <Row>
  180. <Col id="CODE">8</Col>
  181. <Col id="NAME">This Year(Tot)</Col>
  182. </Row>
  183. <Row>
  184. <Col id="CODE">9</Col>
  185. <Col id="NAME">Last Year(Sum)</Col>
  186. </Row>
  187. <Row>
  188. <Col id="CODE">10</Col>
  189. <Col id="NAME">Last Year(Tot)</Col>
  190. </Row>
  191. </Rows>
  192. </Dataset>
  193. <Dataset id="dstDayOpt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  194. <ColumnInfo>
  195. <Column id="CODE" type="STRING" size="256"/>
  196. <Column id="NAME" type="STRING" size="256"/>
  197. </ColumnInfo>
  198. <Rows>
  199. <Row>
  200. <Col id="CODE">1</Col>
  201. <Col id="NAME">일반</Col>
  202. </Row>
  203. <Row>
  204. <Col id="CODE">2</Col>
  205. <Col id="NAME">영업일</Col>
  206. </Row>
  207. </Rows>
  208. </Dataset>
  209. <Dataset id="dstCalendar" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  210. <ColumnInfo>
  211. <Column id="a" type="STRING" size="256"/>
  212. <Column id="b" type="STRING" size="256"/>
  213. <Column id="d1" type="STRING" size="256"/>
  214. <Column id="d11" type="STRING" size="256"/>
  215. <Column id="d2" type="STRING" size="256"/>
  216. <Column id="d22" type="STRING" size="256"/>
  217. <Column id="d3" type="STRING" size="256"/>
  218. <Column id="d33" type="STRING" size="256"/>
  219. <Column id="d4" type="STRING" size="256"/>
  220. <Column id="d44" type="STRING" size="256"/>
  221. <Column id="d5" type="STRING" size="256"/>
  222. <Column id="d55" type="STRING" size="256"/>
  223. <Column id="d6" type="STRING" size="256"/>
  224. <Column id="d66" type="STRING" size="256"/>
  225. <Column id="d7" type="STRING" size="256"/>
  226. </ColumnInfo>
  227. </Dataset>
  228. <Dataset id="dstMonth" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  229. <ColumnInfo>
  230. <Column id="code" type="STRING" size="256"/>
  231. </ColumnInfo>
  232. <Rows>
  233. <Row>
  234. <Col id="code">1</Col>
  235. </Row>
  236. <Row>
  237. <Col id="code">2</Col>
  238. </Row>
  239. <Row>
  240. <Col id="code">3</Col>
  241. </Row>
  242. <Row>
  243. <Col id="code">4</Col>
  244. </Row>
  245. <Row>
  246. <Col id="code">5</Col>
  247. </Row>
  248. <Row>
  249. <Col id="code">6</Col>
  250. </Row>
  251. <Row>
  252. <Col id="code">7</Col>
  253. </Row>
  254. <Row>
  255. <Col id="code">8</Col>
  256. </Row>
  257. <Row>
  258. <Col id="code">9</Col>
  259. </Row>
  260. <Row>
  261. <Col id="code">10</Col>
  262. </Row>
  263. <Row>
  264. <Col id="code">11</Col>
  265. </Row>
  266. <Row>
  267. <Col id="code">12</Col>
  268. </Row>
  269. </Rows>
  270. </Dataset>
  271. <Dataset id="dstDayOptE" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  272. <ColumnInfo>
  273. <Column id="CODE" type="STRING" size="256"/>
  274. <Column id="NAME" type="STRING" size="256"/>
  275. </ColumnInfo>
  276. <Rows>
  277. <Row>
  278. <Col id="CODE">1</Col>
  279. <Col id="NAME">General</Col>
  280. </Row>
  281. <Row>
  282. <Col id="CODE">2</Col>
  283. <Col id="NAME">Business Day</Col>
  284. </Row>
  285. </Rows>
  286. </Dataset>
  287. <Dataset id="dstHoliday" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  288. <ColumnInfo>
  289. <Column id="wkymd" type="STRING" size="256"/>
  290. <Column id="text_color" type="STRING" size="256"/>
  291. <Column id="kname" type="STRING" size="256"/>
  292. </ColumnInfo>
  293. </Dataset>
  294. <Dataset id="dstCalMonth" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  295. <ColumnInfo>
  296. <Column id="mon" type="STRING" size="256"/>
  297. <Column id="chk" type="STRING" size="256"/>
  298. </ColumnInfo>
  299. <Rows>
  300. <Row>
  301. <Col id="mon">1 M</Col>
  302. <Col id="chk"/>
  303. </Row>
  304. <Row>
  305. <Col id="mon">2 M</Col>
  306. <Col id="chk"/>
  307. </Row>
  308. <Row>
  309. <Col id="mon">3 M</Col>
  310. <Col id="chk"/>
  311. </Row>
  312. <Row>
  313. <Col id="mon">4 M</Col>
  314. <Col id="chk"/>
  315. </Row>
  316. <Row>
  317. <Col id="mon">5 M</Col>
  318. <Col id="chk"/>
  319. </Row>
  320. <Row>
  321. <Col id="mon">6 M</Col>
  322. <Col id="chk"/>
  323. </Row>
  324. <Row>
  325. <Col id="mon">7 M</Col>
  326. <Col id="chk"/>
  327. </Row>
  328. <Row>
  329. <Col id="mon">8 M</Col>
  330. <Col id="chk"/>
  331. </Row>
  332. <Row>
  333. <Col id="mon">9 M</Col>
  334. <Col id="chk"/>
  335. </Row>
  336. <Row>
  337. <Col id="mon">10 M</Col>
  338. <Col id="chk"/>
  339. </Row>
  340. <Row>
  341. <Col id="mon">11 M</Col>
  342. <Col id="chk"/>
  343. </Row>
  344. <Row>
  345. <Col id="mon">12 M</Col>
  346. <Col id="chk"/>
  347. </Row>
  348. </Rows>
  349. </Dataset>
  350. <Dataset id="dstDayChOptE" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  351. <ColumnInfo>
  352. <Column id="CODE" type="STRING" size="256"/>
  353. <Column id="NAME" type="STRING" size="256"/>
  354. </ColumnInfo>
  355. <Rows>
  356. <Row>
  357. <Col id="CODE">1</Col>
  358. <Col id="NAME">Today</Col>
  359. </Row>
  360. <Row>
  361. <Col id="CODE">2</Col>
  362. <Col id="NAME">Yesterday</Col>
  363. </Row>
  364. <Row>
  365. <Col id="CODE">3</Col>
  366. <Col id="NAME">ThisWeek</Col>
  367. </Row>
  368. <Row>
  369. <Col id="CODE">4</Col>
  370. <Col id="NAME">LastWeek</Col>
  371. </Row>
  372. <Row>
  373. <Col id="CODE">5</Col>
  374. <Col id="NAME">ThisMonth</Col>
  375. </Row>
  376. <Row>
  377. <Col id="CODE">6</Col>
  378. <Col id="NAME">LastMonth</Col>
  379. </Row>
  380. <Row>
  381. <Col id="CODE">7</Col>
  382. <Col id="NAME">ThisQuarter</Col>
  383. </Row>
  384. <Row>
  385. <Col id="CODE">8</Col>
  386. <Col id="NAME">LastQuarter</Col>
  387. </Row>
  388. <Row>
  389. <Col id="CODE">9</Col>
  390. <Col id="NAME">ThisYear(Today)</Col>
  391. </Row>
  392. <Row>
  393. <Col id="CODE">10</Col>
  394. <Col id="NAME">ThisYear(12/31)</Col>
  395. </Row>
  396. <Row>
  397. <Col id="CODE">11</Col>
  398. <Col id="NAME">LastYear</Col>
  399. </Row>
  400. </Rows>
  401. </Dataset>
  402. </Objects>
  403. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  404. * System Name : KMTC
  405. * Job Name : Composite to Div
  406. * File Name : dl_periodDayCalendar.xfdl
  407. * Creator : TOBESOFT
  408. * Make Date : 2013.01.18
  409. *
  410. * Description : Calendar Day Period Select Composite
  411. *---------------------------------------------------------------------------------------
  412. * Modify Date Modifier Modify Description
  413. *---------------------------------------------------------------------------------------
  414. * 2013.01.18 TOBESOFT Initial Make Program
  415. *
  416. *---------------------------------------------------------------------------------------
  417. ****************************************************************************************/
  418. //=======================================================================================
  419. // Common Lib Include
  420. //---------------------------------------------------------------------------------------
  421. //include "Lib::xCommon.xjs";
  422. //=======================================================================================
  423. // Global Form Variable
  424. //---------------------------------------------------------------------------------------
  425. var iv_maMonth = new Array(12);
  426. var iv_msToday;
  427. var iv_mvArgValue;
  428. var iv_msStDate, iv_msEdDate;
  429. var iv_msSundayPosition = "F";
  430. // Sun ~ Fri : iv_msSundayPosition = "F"
  431. // Mon ~ Sun : iv_msSundayPosition = "L"
  432. /****************************************************************************************
  433. * Description : Form Initialization
  434. * Argument : obj : Object Event has occurred
  435. * : e : Event Object
  436. * return :
  437. ****************************************************************************************/
  438. function dl_periodDayCalendar_onload(obj:Form, e:LoadEventInfo)
  439. {
  440. iv_maMonth = [31,0,31,30,31,30,31,31,30,31,30,31];
  441. fn_TitleSet(divFrom);
  442. fn_TitleSet(divTo);
  443. }
  444. //=======================================================================================
  445. // Event
  446. //---------------------------------------------------------------------------------------
  447. /****************************************************************************************
  448. * Components : Combo
  449. * Event : onitemchanged
  450. * Argument : 01.obj : Object Event has occurred
  451. * : 02.e : Event Object
  452. * Description : Selected month
  453. ****************************************************************************************/
  454. function cbo_Mon_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  455. {
  456. var oDiv = obj.parent;
  457. var strYY = oDiv.stcYear.text;
  458. var nM = new String(e.postindex + 1);
  459. var strMM = nM.padLeft(2,"0");
  460. if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
  461. else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
  462. fn_SetCalendar(oDiv, strYY, strMM, "");
  463. }
  464. /****************************************************************************************
  465. * Components : Radio
  466. * Event : onitemchanged
  467. * Argument : 01.obj : Object Event has occurred
  468. * : 02.e : Event Object
  469. * Description : Selected calendar option
  470. ****************************************************************************************/
  471. function rdo_DayChOpt_onitemchanged(obj:Radio, e:ItemChangeEventInfo)
  472. {
  473. var sDate;
  474. var sGb = e.postvalue;
  475. switch(sGb) {
  476. // This week
  477. case "1" : var nIdx = ufn_getDay(ufn_getDate());
  478. iv_msStDate = ufn_addDate(ufn_getDate(), (0-nIdx));
  479. iv_msEdDate = ufn_addDate(ufn_getDate(), (6-nIdx));
  480. break;
  481. // Before week
  482. case "2" : sDate = ufn_addDate(ufn_getDate(), -7);
  483. var nIdx = ufn_getDay(sDate);
  484. iv_msStDate = ufn_addDate(sDate, (0-nIdx));
  485. iv_msEdDate = ufn_addDate(sDate, (6-nIdx));
  486. break;
  487. // This month
  488. case "3" : sDate = ufn_getDate().substr(0, 6) + "01";
  489. iv_msStDate = sDate;
  490. iv_msEdDate = sDate.substr(0, 6) + fn_LastDateNum(sDate);
  491. break;
  492. // Before month
  493. case "4" : sDate = ufn_addMonth(ufn_getDate(), -1).substr(0, 6) + "01";
  494. iv_msStDate = sDate;
  495. iv_msEdDate = sDate.substr(0, 6) + fn_LastDateNum(sDate);
  496. break;
  497. // Quarter
  498. case "5" : var aDate = fn_GetCurQDate(ufn_getDate());
  499. iv_msStDate = aDate[0];
  500. iv_msEdDate = aDate[1];
  501. break;
  502. // Before quarter
  503. case "6" : var aDate = fn_GetCurQDate(ufn_getDate());
  504. aDate = fn_GetCurQDate(ufn_addMonth(aDate[0], -1));
  505. iv_msStDate = aDate[0];
  506. iv_msEdDate = aDate[1];
  507. break;
  508. // This year(Accumulated)
  509. case "7" : sDate = ufn_getDate().substr(0, 4) + "0101";
  510. iv_msStDate = sDate;
  511. iv_msEdDate = ufn_getDate();
  512. break;
  513. // This year(Total)
  514. case "8" : sDate = ufn_getDate().substr(0, 4);
  515. iv_msStDate = sDate + "0101";
  516. iv_msEdDate = sDate + "1231";
  517. break;
  518. // Before year(Accumulated)
  519. case "9" : sDate = (parseInt(ufn_getDate().substr(0, 4) - 1)).toString();
  520. iv_msStDate = sDate + "0101"
  521. iv_msEdDate = sDate + ufn_getDate().substr(4, 4);
  522. break;
  523. // Before year(Total)
  524. case "10" : sDate = ufn_addMonth(ufn_getDate(), -12).substr(0, 4);
  525. iv_msStDate = sDate + "0101";
  526. iv_msEdDate = sDate + "1231";
  527. break;
  528. }
  529. fn_SetDay("F", iv_msStDate);
  530. fn_SetDay("T", iv_msEdDate);
  531. }
  532. /****************************************************************************************
  533. * Components : Button
  534. * Event : onclick
  535. * Argument : 01.obj : Object Event has occurred
  536. * : 02.e : Event Object
  537. * Description : Selected next month
  538. ****************************************************************************************/
  539. function btn_NextMon_onclick(obj:Button, e:ClickEventInfo)
  540. {
  541. var oDiv = obj.parent;
  542. var strYY = oDiv.stcYear.text;
  543. var nM = ufn_decode(oDiv.cboMon.index,11,1,oDiv.cboMon.index+2);
  544. if(nM==1) {
  545. oDiv.stcYear.text = (parseInt(strYY) + 1).toString();
  546. strYY = oDiv.stcYear.text;
  547. }
  548. var strM = new String(nM);
  549. var strMM = strM.padLeft(2,"0");
  550. if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
  551. else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
  552. fn_SetCalendar(oDiv, strYY, strMM, "");
  553. }
  554. /****************************************************************************************
  555. * Components : Button
  556. * Event : onclick
  557. * Argument : 01.obj : Object Event has occurred
  558. * : 02.e : Event Object
  559. * Description : Selected prev month
  560. ****************************************************************************************/
  561. function btn_PreMon_onclick(obj:Button, e:ClickEventInfo)
  562. {
  563. var oDiv = obj.parent;
  564. var strYY = oDiv.stcYear.text;
  565. var nM = ufn_decode(oDiv.cboMon.index,0,12,oDiv.cboMon.index);
  566. if(nM==12) {
  567. oDiv.stcYear.text = (parseInt(strYY) - 1).toString();
  568. strYY = oDiv.stcYear.text;
  569. }
  570. var strM = new String(nM);
  571. var strMM = strM.padLeft(2,"0");
  572. if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
  573. else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
  574. fn_SetCalendar(oDiv, strYY, strMM, "");
  575. }
  576. /****************************************************************************************
  577. * Components : Button
  578. * Event : onclick
  579. * Argument : 01.obj : Object Event has occurred
  580. * : 02.e : Event Object
  581. * Description : Selected next year
  582. ****************************************************************************************/
  583. function btn_NextYear_onclick(obj:Button, e:ClickEventInfo)
  584. {
  585. var oDiv = obj.parent;
  586. var strYY = oDiv.stcYear.text;
  587. oDiv.stcYear.text = (parseInt(strYY) + 1).toString();
  588. strYY = oDiv.stcYear.text;
  589. var nM = oDiv.cboMon.index + 1;
  590. var strM = new String(nM);
  591. var strMM = strM.padLeft(2,"0");
  592. if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
  593. else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
  594. fn_SetCalendar(oDiv,strYY,strMM,"");
  595. }
  596. /****************************************************************************************
  597. * Components : Button
  598. * Event : onclick
  599. * Argument : 01.obj : Object Event has occurred
  600. * : 02.e : Event Object
  601. * Description : Selected prev year
  602. ****************************************************************************************/
  603. function btn_PreYear_onclick(obj:Button, e:ClickEventInfo)
  604. {
  605. var oDiv = obj.parent;
  606. var strYY = oDiv.stcYear.text;
  607. oDiv.stcYear.text = (parseInt(strYY) - 1).toString();
  608. strYY = oDiv.stcYear.text;
  609. var nM = oDiv.cboMon.index + 1;
  610. var strM = new String(nM);
  611. var strMM = strM.padLeft(2,"0");
  612. if(oDiv.name == "divFrom") iv_msStDate = strYY + strMM + iv_msStDate.substr(6, 2);
  613. else iv_msEdDate = strYY + strMM + iv_msEdDate.substr(6, 2);
  614. fn_SetCalendar(oDiv,strYY,strMM,"");
  615. }
  616. /****************************************************************************************
  617. * Components : Static
  618. * Event : onclick
  619. * Argument : 01.obj : Object Event has occurred
  620. * : 02.e : Event Object
  621. * Description : Selected current date
  622. ****************************************************************************************/
  623. function stcD_onclick(obj:Static, e:ClickEventInfo)
  624. {
  625. var oDiv = obj.parent;
  626. var strYY = oDiv.stcYear.text;
  627. var strIdx = new String(oDiv.cboMon.index+1);
  628. var strMM = strIdx.padLeft(2,"0");
  629. var strDD = obj.text.padLeft(2,"0");
  630. if(oDiv.name == "divTo") iv_msEdDate = strYY + strMM + strDD;
  631. else iv_msStDate = strYY + strMM + strDD;
  632. fn_SetCalendar(oDiv,strYY,strMM,strDD);
  633. }
  634. /****************************************************************************************
  635. * Components : Button
  636. * Event : onclick
  637. * Argument : 01.obj : Object Event has occurred
  638. * : 02.e : Event Object
  639. * Description : Selected ok button
  640. ****************************************************************************************/
  641. function btn_Ok_onclick(obj:Button, e:ClickEventInfo)
  642. {
  643. var sFromDate = iv_msStDate;
  644. var sToDate = iv_msEdDate;
  645. if(ufn_isDate(sToDate) == true && ufn_isDate(sToDate) == true){
  646. var retVal = ufn_compareDate(sFromDate, sToDate);
  647. if(retVal > 0){
  648. alert("from date 보다 to date가 작을수 없습니다");
  649. return false;
  650. }
  651. }else{
  652. alert("The date format is not");
  653. return false;
  654. }
  655. var aRtnVal = new Array(3);
  656. aRtnVal[0] = iv_msStDate;
  657. aRtnVal[1] = iv_msEdDate;
  658. aRtnVal[2] = "N";
  659. closePopup(aRtnVal);
  660. }
  661. /****************************************************************************************
  662. * Components : Button
  663. * Event : onclick
  664. * Argument : 01.obj : Object Event has occurred
  665. * : 02.e : Event Object
  666. * Description : Selected close button
  667. ****************************************************************************************/
  668. function btn_Close_onclick(obj:Button, e:ClickEventInfo)
  669. {
  670. closePopup();
  671. }
  672. //=======================================================================================
  673. // User Function
  674. //---------------------------------------------------------------------------------------
  675. /****************************************************************************************
  676. * Description : Load calendar of day
  677. * Argument : none
  678. * return : none
  679. ****************************************************************************************/
  680. function fn_TitleSet(oDiv)
  681. {
  682. if(iv_msSundayPosition == "L") {
  683. oDiv.stc0.text = "Mon";
  684. oDiv.stc1.text = "Tue";
  685. oDiv.stc2.text = "Wed";
  686. oDiv.stc3.text = "The";
  687. oDiv.stc4.text = "Fri";
  688. oDiv.stc5.text = "Sat";
  689. oDiv.stc6.text = "Sun";
  690. } else {
  691. oDiv.stc0.text = "Sun";
  692. oDiv.stc1.text = "Mon";
  693. oDiv.stc2.text = "Tue";
  694. oDiv.stc3.text = "Wed";
  695. oDiv.stc4.text = "The";
  696. oDiv.stc5.text = "Fri";
  697. oDiv.stc6.text = "Sat";
  698. }
  699. }
  700. function fn_CrCal()
  701. {
  702. if(iv_mvArgValue[0] <> null) iv_msStDate = iv_mvArgValue[0];
  703. if(iv_mvArgValue[1] <> null) iv_msEdDate = iv_mvArgValue[1];
  704. if(iv_msStDate == null) iv_msStDate = "";
  705. if(iv_msEdDate == null) iv_msEdDate = "";
  706. if(iv_msStDate.length == 0) {
  707. iv_msStDate = (ufn_getDate()).substr(0,8);
  708. }
  709. if(iv_msEdDate.length == 0) {
  710. iv_msEdDate = (ufn_getDate()).substr(0,8);
  711. }
  712. var strYY = iv_msStDate.substr(0,4);
  713. var strMM = iv_msStDate.substr(4,2);
  714. var strDD = iv_msStDate.substr(6,2);
  715. fn_SetCalendar(divFrom, strYY,strMM,strDD);
  716. strYY = iv_msEdDate.substr(0,4);
  717. strMM = iv_msEdDate.substr(4,2);
  718. strDD = iv_msEdDate.substr(6,2);
  719. fn_SetCalendar(divTo, strYY,strMM,strDD);
  720. }
  721. /****************************************************************************************
  722. * Description : Load calendar
  723. * Argument : 1.oDiv : Division object
  724. * : 2.strYY : yyyy
  725. * : 3.strMM : MM
  726. * : 4.strDD : DD
  727. * return : none
  728. ****************************************************************************************/
  729. function fn_SetCalendar(oDiv, strYY, strMM, strDD)
  730. {
  731. var bCurMonth = false;
  732. if(strDD == null) strDD = "";
  733. if(strDD.length == 0) strDD = ufn_getDate().substr(6,2);
  734. if((ufn_getDate().substr(0,4) == strYY) && (ufn_getDate().substr(4,2) == strMM)) {
  735. bCurMonth = true;
  736. }
  737. dstCalendar.clearData();
  738. var nLastDay = iv_maMonth[parseInt(strMM)-1];
  739. oDiv.cboMon.index = parseInt(strMM)-1;
  740. oDiv.stcYear.text = strYY;
  741. // The final date set in February
  742. if(parseInt(strMM) == 2) {
  743. nLastDay = ufn_getMonthLastDay(strYY+strMM+"01");
  744. }
  745. var nFDay = ufn_getDay(strYY + strMM + "01");
  746. if(iv_msSundayPosition == "L") {
  747. nFDay = ufn_decode(nFDay,0,7,nFDay);
  748. } else{
  749. nFDay++;
  750. }
  751. var svnFDay = nFDay;
  752. var strLastDay = new String(nLastDay);
  753. var nLDay = ufn_getDay(strYY + strMM + strLastDay.padLeft(2, "0"));
  754. if(iv_msSundayPosition == "L") {
  755. nLDay = ufn_decode(nLDay,0,7,nLDay);
  756. } else{
  757. nLDay++;
  758. }
  759. var nLineCnt = parseInt((31 + (nFDay-1) + (7-nLDay)) / 7);
  760. var objDay,objWeek;
  761. var nSundayValue = 1;
  762. if(iv_msSundayPosition == "L") {
  763. nSundayValue = 0;
  764. } else {
  765. nSundayValue = 1;
  766. }
  767. // Initialize the day
  768. for(var i=1;i<=42;i++)
  769. {
  770. objDay = eval(oDiv.name + ".stcD" + i);
  771. objDay.style.background = "#f8f8f8";
  772. objDay.style.color = "";
  773. objDay.style.font = "Dotum,8";
  774. objDay.text = "";
  775. objDay.visible = true;
  776. objDay.DisableColor = objDay.Color;
  777. objDay.DisableBkColor = "#c2c2c2";
  778. }
  779. // Dummy
  780. for(var i=1;i<nFDay;i++)
  781. {
  782. objDay = eval(oDiv.name + ".stcD" + i);
  783. objDay.visible = true;
  784. }
  785. var strSvDate;
  786. var nCurLine = 0;
  787. for(var i=1;i<=nLastDay;i++)
  788. {
  789. objDay = eval(oDiv.name + ".stcD" + nFDay);
  790. objDay.text = i;
  791. // Today
  792. if(bCurMonth) {
  793. if(parseInt(ufn_getDate().substr(6,2)) == i) {
  794. objDay.style.background = "#c6e29a";
  795. }
  796. }
  797. // Fri/Sun
  798. var strI = new String(i);
  799. if(ufn_getDay(strYY + strMM + strI.padLeft(2, "0")) == 0) objDay.style.color = "#b50000";
  800. else if(ufn_getDay(strYY + strMM + strI.padLeft(2, "0")) == 6) objDay.style.color = "#008b9b";
  801. // Selected date
  802. if(parseInt(strDD) == i) {
  803. objDay.style.background = "#41aec4";
  804. objDay.style.color = "#ffffff";
  805. objDay.style.color = "#ffffff";
  806. objDay.style.font = "Tahoma,8,bold";
  807. }
  808. objDay.visible = true;
  809. nFDay++;
  810. }
  811. // Dummy
  812. var nDum;
  813. if(nFDay <= 29) {
  814. nDum = 28;
  815. } else if(nFDay <= 36) {
  816. nDum = 35;
  817. } else {
  818. nDum = 42;
  819. }
  820. for(var i=(nLastDay+1);i<=nDum;i++)
  821. {
  822. objDay = eval(oDiv.name + ".stcD" + i);
  823. objDay.visible = true;
  824. }
  825. }
  826. function fn_SetDay(sGb, sDate)
  827. {
  828. var oDiv;
  829. if(sGb == "F") oDiv = divFrom;
  830. else oDiv = divTo;
  831. strYY = sDate.substr(0,4);
  832. strMM = sDate.substr(4,2);
  833. strDD = sDate.substr(6,2);
  834. fn_SetCalendar(oDiv, strYY,strMM, strDD);
  835. }
  836. function fn_LastDateNum(sDate)
  837. {
  838. var nMonth, nLastDate;
  839. nMonth = parseInt(sDate.substr(4,2), 10);
  840. if( nMonth == 1 || nMonth == 3 || nMonth == 5 || nMonth == 7 || nMonth == 8 || nMonth == 10 || nMonth == 12 ){
  841. nLastDate = 31;
  842. }else if( nMonth == 2 ) {
  843. nLastDate = ufn_getMonthLastDay(sDate);
  844. }else{
  845. nLastDate = 30;
  846. }
  847. return nLastDate;
  848. }
  849. function fn_GetCurQDate(sDate)
  850. {
  851. var aRtnVal = new Array(2);
  852. var sYear = sDate.substr(0, 4);
  853. var sMon1, sMon2;
  854. var nMonth = parseInt(sDate.substr(4,2));
  855. if((nMonth >= 1) && (nMonth <= 3))
  856. {
  857. sMon1 = "01";
  858. sMon2 = "03";
  859. }
  860. else if((nMonth >= 4) && (nMonth <= 6))
  861. {
  862. sMon1 = "04";
  863. sMon2 = "06";
  864. }
  865. else if((nMonth >= 7) && (nMonth <= 9))
  866. {
  867. sMon1 = "07";
  868. sMon2 = "09";
  869. }
  870. else if((nMonth >= 10) && (nMonth <= 12))
  871. {
  872. sMon1 = "10";
  873. sMon2 = "12";
  874. }
  875. aRtnVal[0] = sYear + sMon1 + "01";
  876. aRtnVal[1] = sYear + sMon2 + fn_LastDateNum(sYear + sMon2 + "01");
  877. return aRtnVal;
  878. }
  879. /****************************************************************************************
  880. * Components : 날짜를 입력받아 요일 숫자를 반환
  881. * Argument : sDate 'yyyyMMdd'
  882. * return : 0 = Sunday ~ 6 = Saturday
  883. ****************************************************************************************/
  884. function ufn_getDay(sDate)
  885. {
  886. var date = new Date();
  887. date.setYear(String(sDate).substr(0, 4));
  888. date.setMonth(String(sDate).substr(4, 2) - 1);
  889. date.setDate(String(sDate).substr(6, 2));
  890. return date.getDay();
  891. }
  892. /****************************************************************************************
  893. * Components : Add Date
  894. * Argument : sDate 'yyyyMMdd'
  895. * nOffSet Increase/Decrease value
  896. * return : 'yyyyMMdd'
  897. ****************************************************************************************/
  898. function ufn_addDate(sDate, nOffSet)
  899. {
  900. var date = new Date();
  901. date.setYear(String(sDate).substr(0, 4));
  902. date.setMonth(String(sDate).substr(4, 2)-1);
  903. date.setDate(String(sDate).substr(6, 2)-(nOffSet*-1));
  904. return ufn_getDateToStr(date);
  905. }
  906. /****************************************************************************************
  907. * Description : Converted to a String Date Type
  908. * Argument : date date Type
  909. * return : yyyyMMdd
  910. ****************************************************************************************/
  911. function ufn_getDateToStr(date)
  912. {
  913. if(ufn_isNull(date)) return;
  914. var strYear = date.getYear().toString();
  915. var sMonth = (date.getMonth()+1).toString();
  916. var sDate = date.getDate().toString();
  917. if(strYear.length==2)
  918. strYear = '19'+strYear;
  919. else if(strYear.length==1)
  920. strYear = '190'+strYear;
  921. if(sMonth.length==1)
  922. sMonth = '0'+sMonth;
  923. if(sDate.length==1)
  924. sDate = '0'+sDate;
  925. return strYear+sMonth+sDate;
  926. }
  927. /****************************************************************************************
  928. * Description : Returns the current date.
  929. * Argument : none
  930. * return : yyyyMMdd
  931. ****************************************************************************************/
  932. function ufn_getDate() {
  933. var d = new Date();
  934. var s = d.getFullYear()
  935. + ((d.getMonth() + 1) + "").padLeft(2, '0')
  936. + (d.getDate() + "").padLeft(2, '0');
  937. return (s);
  938. }
  939. /****************************************************************************************
  940. * Description : Add Month
  941. * Argument : sMonth 'yyyyMM'
  942. * nOffSet Increase/Decrease value
  943. * return : 'yyyyMM'
  944. ****************************************************************************************/
  945. function ufn_addMonth(sMonth, nOffSet)
  946. {
  947. var date = new Date();
  948. date.setYear(String(sMonth).substr(0, 4));
  949. date.setMonth(String(sMonth).substr(4, 2)-1-(nOffSet*-1));
  950. return ufn_getDateToStr(date).substr(0, 6);
  951. }
  952. /****************************************************************************************
  953. * Description : Decode
  954. * Argument : none
  955. * return : decode
  956. ****************************************************************************************/
  957. function ufn_decode()
  958. {
  959. var varRtnValue = null;
  960. var arrArgument = ufn_decode.arguments;
  961. var varValue = arrArgument[0];
  962. var bIsDefault = false;
  963. var nCount = 0;
  964. if((arrArgument.length % 2) == 0) {
  965. nCount = arrArgument.length - 1;
  966. bIsDefault = true;
  967. } else {
  968. nCount = arrArgument.length;
  969. bIsDefault = false;
  970. }
  971. for(var i = 1; i < nCount; i+=2)
  972. {
  973. if(varValue == arrArgument[i]){
  974. varRtnValue = arrArgument[i+1];
  975. i = nCount;
  976. }
  977. }
  978. if(varRtnValue == null && bIsDefault){
  979. varRtnValue = arrArgument[arrArgument.length-1];
  980. }
  981. return varRtnValue;
  982. }
  983. /****************************************************************************************
  984. * Description : Compare the two dates.
  985. * Argument : sFormDate yyyyMMdd ex) "20120501"
  986. sToDate yyyyMMdd ex) "20120530"
  987. * @return
  988. * <p>1. The date is equal to two : return 0</p>
  989. * <p>2. sFormDate < sToDate : return -1</p>
  990. * <p>3. strFromDate > sToDate : return 1</p>
  991. * <p>4. Unless the date format : return null</p>
  992. ****************************************************************************************/
  993. function ufn_compareDate(sFormDate, sToDate)
  994. {
  995. var retVal;
  996. if (ufn_isDate(sFormDate) && ufn_isDate(sToDate)) {
  997. if (sFormDate == sToDate) {
  998. retVal = 0;
  999. } else if (sFormDate < sToDate) {
  1000. retVal = -1;
  1001. } else if (sFormDate > sToDate) {
  1002. retVal = 1;
  1003. }
  1004. }
  1005. return retVal;
  1006. }
  1007. /****************************************************************************************
  1008. * Description : Last day of the month
  1009. * Argument : sMonth 'yyyyMMdd'
  1010. * return : 'yyyyMMdd'
  1011. ****************************************************************************************/
  1012. function ufn_getMonthLastDay(sMonth)
  1013. {
  1014. var iLastDay;
  1015. var iYear = parseInt(String(sMonth).substr(0, 4),10) ;
  1016. var iMonth = parseInt(String(sMonth).substr(4, 2),10);
  1017. switch(iMonth)
  1018. {
  1019. case 2 :
  1020. if( ((iYear%4)==0) && ((iYear%100)!=0) || ((iYear%400)==0) )
  1021. iLastDay = 29;
  1022. else
  1023. iLastDay = 28;
  1024. break;
  1025. case 4 :
  1026. case 6 :
  1027. case 9 :
  1028. case 11 :
  1029. iLastDay = 30;
  1030. break;
  1031. default:
  1032. iLastDay = 31;
  1033. break;
  1034. }
  1035. return iLastDay;
  1036. }]]></Script>
  1037. </Form>
  1038. </FDL>