Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

201 lines
5.8 KiB

  1. <%
  2. Const BOLD = True
  3. Const STYLE = "color:black;font-size:9pt;font-family:"
  4. Dim quote
  5. quote = chr(34)
  6. '***************generic wizard global vars***************
  7. Dim sSystemFontSize, iThisPage, iNextPage, iPrevPage
  8. sSystemFontSize = "SMALL"
  9. iThisPage = CInt(Request("iThisPage"))
  10. if iThisPage = 0 then
  11. iThisPage = 1
  12. end if
  13. iNextPage = iThisPage + 1
  14. iPrevPage = iThisPage - 1
  15. '***************generic wizard functions***************
  16. Function sStaticText(sDesc,BOLD)
  17. Dim sOutputStr
  18. sOutputStr = "<TR><TD VALIGN='top' COLSPAN = 2>"
  19. sOutputStr = sOutputStr & sFont("","","",True)
  20. if BOLD then
  21. sOutputStr = sOutputStr & "<B>"
  22. end if
  23. sOutputStr = sOutputStr & sDesc
  24. sOutputStr = sOutputStr & "<P>"
  25. sOutputStr = sOutputStr & "</FONT>"
  26. sOutputStr = sOutputStr & "</TD></TR>"
  27. sStaticText = sOutputStr
  28. End Function
  29. Function sTextBox(sName, sDesc, iSize, onBlur)
  30. Dim sOutputStr
  31. sOutputStr = sTextBoxwChange(sName, sDesc, iSize, onBlur,"")
  32. sTextBox = sOutputStr
  33. End Function
  34. Function sTextBoxwChange(sName, sDesc, iSize, onBlur,onChange)
  35. Dim sOutputStr
  36. sOutputStr = sTextBoxwDefault(sName, sDesc, iSize, onBlur, onChange, "")
  37. sTextBoxwChange = sOutputStr
  38. End Function
  39. Function sTextBoxwDefault(sName, sDesc, iSize, onBlur, onChange, sDefault)
  40. Dim sOutputStr
  41. Dim sValue
  42. ' Don't let default overwrite persisted info
  43. sValue = Request(sName)
  44. if sValue = "" then
  45. sValue = sDefault
  46. end if
  47. sOutputStr = "<TR><TD VALIGN='top'>"
  48. sOutputStr = sOutputStr & sFont("","","",True)
  49. sOutputStr = sOutputStr & sDesc & "<BR>"
  50. sOutputStr = sOutputStr & "<INPUT NAME=" & quote & sName & quote & " VALUE=" & quote & sValue & quote
  51. sOutputStr = sOutputStr & " SIZE = " & (Session("BrowserTBScalePct") * iSize/100)
  52. if onBlur <> "" then
  53. sOutputStr = sOutputStr & " onBlur=" & quote & onBlur & quote
  54. end if
  55. if onChange <> "" then
  56. sOutputStr = sOutputStr & " onChange=" & quote & onChange & quote
  57. end if
  58. if Session("hasStyles") then
  59. sOutputStr = sOutputStr & Session("DEFINPUTSTYLE")
  60. end if
  61. sOutputStr = sOutputStr & "><P>"
  62. sOutputStr = sOutputStr & "</FONT>"
  63. sOutputStr = sOutputStr & "</TD></TR>"
  64. sTextBoxwDefault = sOutputStr
  65. End Function
  66. Function sHidden(sName, sValue)
  67. Dim sOutputStr
  68. sOutputStr = "<TR><TD VALIGN='top'>"
  69. sOutputStr = sOutputStr & "<INPUT TYPE='hidden' NAME=" & quote & sName & quote & " VALUE=" & quote & sValue & quote & "><P>"
  70. sOutputStr = sOutputStr & "</TD></TR>"
  71. sHidden = sOutputStr
  72. End Function
  73. Function sCheckBox(sName, sDesc)
  74. Dim sOutputStr
  75. sOutputStr = "<TR><TD VALIGN='top'>"
  76. sOutputStr = sOutputStr & sFont("","","",True)
  77. sOutputStr = sOutputStr & "<INPUT TYPE='checkbox' NAME=" & quote & sName & quote
  78. if Request(sName) <> "" then
  79. sOutputStr = sOutputStr & " CHECKED "
  80. end if
  81. sOutputStr = sOutputStr & ">&nbsp;" & sDesc & "<BR>"
  82. sOutputStr = sOutputStr & "</FONT>"
  83. sOutputStr = sOutputStr & "</TD></TR>"
  84. sCheckBox = sOutputStr
  85. End Function
  86. Function sRadio(sName, sVal, sDesc, sDefault, onClick)
  87. Dim sOutputStr, lastval
  88. sOutputStr = "<TR><TD VALIGN='top'>"
  89. sOutputStr = sOutputStr & sFont("","","",True)
  90. sOutputStr = sOutputStr & "<INPUT TYPE='radio' NAME=" & quote & sName & quote
  91. sOutputStr = sOutputStr & " VALUE=" & quote & sVal & quote
  92. lastval = Request(sName)
  93. if isNumeric(lastval) then
  94. lastval = cInt(lastval)
  95. else
  96. lastval = sDefault
  97. end if
  98. if lastval = sVal then
  99. sOutputStr = sOutputStr & " CHECKED"
  100. end if
  101. if onClick <> "" then
  102. sOutputStr = sOutputStr & " OnClick=" & quote & onClick & quote
  103. end if
  104. sOutputStr = sOutputStr & "></TD><TD VALIGN='middle'>"
  105. sOutputStr = sOutputStr & sFont("","","",True)
  106. sOutputStr = sOutputStr & sDesc & "<BR>"
  107. sOutputStr = sOutputStr & "</FONT>"
  108. sOutputStr = sOutputStr & "</TD></TR>"
  109. sRadio = sOutputStr
  110. End Function
  111. Function sSelect(sName, iSize, onChange, bMultiple)
  112. Dim sOutputStr
  113. sOutputStr = "<TR><TD VALIGN='top'>"
  114. sOutputStr = sOutputStr & sFont("","","",True)
  115. sOutputStr = sOutputStr & "<SELECT NAME=" & quote & sName & quote & " SIZE = " & iSize
  116. if onChange <> "" then
  117. sOutputStr = sOutputStr & " onChange=" & quote & onChange & quote
  118. end if
  119. if bMultiple then
  120. sOutputStr = sOutputStr & " MULTIPLE"
  121. end if
  122. if Session("hasStyles") then
  123. sOutputStr = sOutputStr & " style=" & quote & STYLE & Session("FONTFACE") & quote
  124. end if
  125. sOutputStr = sOutputStr & ">"
  126. sSelect = sOutputStr
  127. End Function
  128. Function closeSelect()
  129. Dim sOutputStr
  130. sOutputStr = "</SELECT></TD></TR>"
  131. closeSelect = sOutputStr
  132. End Function
  133. Function sOption(sCaption,sValue, bIsSelected)
  134. Dim sOutputStr
  135. sOutputStr = sOutputStr & "<OPTION"
  136. if sValue <> "" then
  137. sOutputStr = sOutputStr & " VALUE=" & quote & sValue & quote
  138. end if
  139. if bIsSelected then
  140. sOutputStr = sOutputStr & " SELECTED"
  141. end if
  142. sOutputStr = sOutputStr & ">" & sCaption
  143. sOutputStr = sOutputStr & "</OPTION>"
  144. sOption = sOutputStr
  145. End Function
  146. Function sTextArea(sName, sDesc, sText, iRows, iCols, bEnabled)
  147. Dim sOutputStr
  148. sOutputStr = "<TR><TD VALIGN='top'>"
  149. sOutputStr = sOutputStr & sFont("","","",True)
  150. sOutputStr = sOutputStr & sDesc & "<BR>"
  151. sOutputStr = sOutputStr & "<TEXTAREA NAME=" & quote & sName & quote & " ROWS = " & iRows & " COLS = " & iCols
  152. sOutputStr = sOutputStr & " WRAP=VIRTUAL"
  153. if Session("hasStyles") then
  154. sOutputStr = sOutputStr & " style=" & quote & STYLE & Session("FONTFACE") & quote
  155. end if
  156. sOutputStr = sOutputStr & ">"
  157. sOutputStr = sOutputStr & sText
  158. sOutputStr = sOutputStr & "</TEXTAREA>"
  159. sOutputStr = sOutputStr & "</FONT>"
  160. sOutputStr = sOutputStr & "</TD></TR>"
  161. sTextArea = sOutputStr
  162. End Function
  163. Function sSpace(iNumRows)
  164. Dim sOutputStr
  165. sOutputStr = ""
  166. For i = 0 to iNumRows
  167. sOutputStr = "<TR><TD VALIGN='top'>"
  168. sOutputStr = sOutputStr & sFont("","","",True)
  169. sOutputStr = sOutputStr & "&nbsp;"
  170. sOutputStr = sOutputStr & "</FONT>"
  171. sOutputStr = sOutputStr & "</TD></TR>"
  172. Next
  173. sSpace = sOutputStr
  174. End Function
  175. %>