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.

269 lines
6.2 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <% if Session("FONTSIZE") = "" then %>
  5. <!--#include file="iito.inc"-->
  6. <% else %>
  7. <!--#include file="iirtehd.str"-->
  8. <!--#include file="iiset.inc"-->
  9. <%
  10. ' Do not use top.title.Global.update flag if page is loaded into a dialog
  11. bUpdateGlobal = false
  12. 'On Error Resume Next
  13. Dim path, currentobj, baseobj, newname
  14. path=Session("dpath")
  15. Session("path")=path
  16. Session("SpecObj")=""
  17. Session("SpecProps")=""
  18. Set currentobj=GetObject(path)
  19. Dim PICsArray,PICstring, email, seton, expon, ratings, noslider,aratings
  20. PICsArray = currentobj.HttpPics
  21. %>
  22. <!--#include file="iisetfnt.inc"-->
  23. <HTML>
  24. <HEAD>
  25. <TITLE></TITLE>
  26. <SCRIPT LANGUAGE="JavaScript">
  27. function loadHelp(){
  28. top.title.Global.helpFileName="iipy_39";
  29. }
  30. function disableDefault(dir,fromCntrl, toCntrl){
  31. if (!dir){
  32. if (fromCntrl.value != ""){
  33. toCntrl.value = fromCntrl.value;
  34. fromCntrl.value = "";
  35. }
  36. }
  37. else{
  38. if (toCntrl.value != ""){
  39. fromCntrl.value = toCntrl.value;
  40. toCntrl.value = "";
  41. }
  42. }
  43. }
  44. function enableDefault(chkCntrl){
  45. chkCntrl.checked = true;
  46. }
  47. function SetIndex(){
  48. document.hiddenform.index.value = document.cacheform.selCategory.selectedIndex;
  49. parent.list.location.href = "iirtels.asp?level=" +cachedList[document.hiddenform.index.value].sel;
  50. }
  51. </SCRIPT>
  52. </HEAD>
  53. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" TOPMARGIN=10 TEXT="#000000" LINK="#FFFFFF" onLoad="loadList();loadHelp();">
  54. <FORM NAME="userform" onSubmit="return false">
  55. </FORM>
  56. <FORM NAME="cacheform">
  57. <TABLE BORDER=0 CELLPADDING=0>
  58. <TR>
  59. <TD>
  60. <%= sFont("","","",True) %>
  61. <% if Ubound(PICSArray) = 0 then %>
  62. <INPUT TYPE="checkbox" NAME="chkEnableRatings" CHECKED>
  63. <% else %>
  64. <INPUT TYPE="checkbox" NAME="chkEnableRatings" >
  65. <% end if %>
  66. <%= L_ENABLE_TEXT %>
  67. <BR>
  68. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= L_SELCAT_TEXT %><BR>
  69. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= L_MOVESLIDE_TEXT %>
  70. <P>
  71. <TABLE>
  72. <TR>
  73. <TD VALIGN="top">
  74. <%= sFont("","","",True) %>
  75. <%= L_CAT_TEXT %>
  76. </TD>
  77. <TD VALIGN="top">
  78. <%= sFont("","","",True) %>
  79. <%= writeSelect("selCategory",4,"SetIndex();", false) %>
  80. <OPTION VALUE=0 SELECTED><%= L_LANGUAGE_TEXT %>
  81. <OPTION VALUE=1><%= L_NUDITY_TEXT %>
  82. <OPTION VALUE=2><%= L_SEX_TEXT %>
  83. <OPTION VALUE=3><%= L_VIOLENCE_TEXT %>
  84. </SELECT>
  85. </TD>
  86. </TR>
  87. </TABLE>
  88. </TD>
  89. </TR>
  90. </TABLE>
  91. </FORM>
  92. <FORM name="hiddenform">
  93. <INPUT TYPE="hidden" NAME="index" VALUE=0>
  94. </FORM>
  95. <%
  96. If Ubound(PICSArray) = 0 Then
  97. PICString = PICSArray(0)
  98. email = parsePIC(PICstring,L_BY_TEXT,chr(34),chr(34))
  99. seton = parsePIC(PICstring,L_ON_TEXT,chr(34),chr(34))
  100. expon = parsePIC(PICstring,L_EXP_TEXT,chr(34),chr(34))
  101. ratings = parsePIC(PICstring,"(","(",")")
  102. aratings = setRatingsArray(ratings)
  103. Else
  104. PICString = ""
  105. email = ""
  106. seton = ""
  107. expon = ""
  108. ratings = ""
  109. aratings = setRatingsArray(ratings)
  110. End If
  111. function parsePIC(picrating,delimiter,openswith,closeswith)
  112. Dim newString
  113. if InStr(picrating,delimiter) > 0 then
  114. newString = Mid(picrating,InStr(picrating,delimiter)+1)
  115. newString = Mid(newString,InStr(newString,openswith)+1)
  116. newString = Mid(newString,1,InStr(newString,closeswith)-1)
  117. end if
  118. parsePIC = newString
  119. end function
  120. function setRatingsArray(rs)
  121. Dim v,s,n,l
  122. rs = LCase(rs)
  123. v = getRating(rs,"v")
  124. s = getRating(rs,"s")
  125. n = getRating(rs,"n")
  126. l = getRating(rs,"l")
  127. setRatingsArray = Array(v,s,n,l)
  128. end function
  129. function getRating(rs,rt)
  130. rt = Left(Trim(Mid(rs,InStr(rs,rt)+1)),1)
  131. if IsNumeric(rt) then
  132. getRating = rt
  133. noslider = False
  134. else
  135. getRating = 0
  136. noslider = True
  137. end if
  138. end function
  139. %>
  140. <SCRIPT LANGUAGE="JavaScript">
  141. function loadList(){
  142. parent.list.location.href="iirtels.asp?level=" + cachedList[document.hiddenform.index.value].sel + "&noslider=<%= noslider %>";
  143. }
  144. function listFuncs(){
  145. this.bHasList = true;
  146. this.writeList = buildListForm;
  147. this.SetListVals = SetListVals;
  148. this.email = "<%= email %>"
  149. this.seton = "<%= seton %>"
  150. this.expon = "<%= expon %>"
  151. this.mainframe = top.opener.top;
  152. }
  153. function ratingsObj(key,l0,l1,l2,l3,l4,sel){
  154. this.key=key;
  155. this.level=new Array(5)
  156. this.level[0]=l0;
  157. this.level[1]=l1;
  158. this.level[2]=l2;
  159. this.level[3]=l3;
  160. this.level[4]=l4;
  161. this.sel=sel;
  162. this.ratingsok = !(isNaN(sel));
  163. }
  164. function buildListForm(){
  165. numrows = 1
  166. qstr = "numrows="+numrows;
  167. qstr = qstr+"&cols=HttpPics";
  168. top.hlist.location.href = "iihdn.asp?"+qstr;
  169. <% 'the list values will be grabbed by the hiddenlistform script... %>
  170. }
  171. function SetListVals(){
  172. listForm = top.hlist.document.hiddenlistform;
  173. if (document.cacheform.chkEnableRatings.checked){
  174. str = '<%= L_PICLABEL_TEXT & "(" & L_PICVER_TEXT & " " & quote & L_PICURL_TEXT & quote %> l'
  175. if (listFunc.email != ""){
  176. str += ' <%= L_BY_TEXT %> "' + listFunc.email + '"';
  177. }
  178. if (listFunc.seton != ""){
  179. str += ' <%= L_ON_TEXT %> "' + listFunc.seton + '"';
  180. }
  181. if (listFunc.expon != ""){
  182. str += ' <%= L_EXP_TEXT %> "' + listFunc.expon + '"';
  183. }
  184. str += " r (";
  185. for (i=cachedList.length-1;i>-1;i--)
  186. {
  187. str += cachedList[i].key + " " + cachedList[i].sel + " ";
  188. }
  189. //lop off the last space...
  190. str = str.substring(0,str.length-1);
  191. str += "))";
  192. }
  193. else{
  194. str = "";
  195. }
  196. listForm.HttpPics.value = str;
  197. }
  198. cachedList = new Array(4)
  199. cachedList[0] = new ratingsObj("l","<%= L_SLANG_TEXT %>","<%= L_MILD_TEXT %>","<%= L_MODERATE_TEXT %>","<%= L_OBSCENE_TEXT %>","<%= L_CRUDE_TEXT %>",<%= aratings(3) %>);
  200. cachedList[1] = new ratingsObj("n","<%= L_NONE_TEXT %>","<%= L_REVEALING_TEXT %>","<%= L_PARITAL_TEXT %>","<%= L_FRONTAL_TEXT %>","<%= L_PROVACTIVE_TEXT %>",<%= aratings(2) %>);
  201. cachedList[2] = new ratingsObj("s","<%= L_NONE_TEXT %>","<%= L_KISSING_TEXT %>","<%= L_CLOTHED_TEXT %>","<%= L_TOUCHING_TEXT %>","<%= L_EXPLICIT_TEXT %>",<%= aratings(1) %>);
  202. cachedList[3] = new ratingsObj("v","<%= L_NOVIOLENCE_TEXT %>","<%= L_FIGHTING_TEXT %>","<%= L_KILLING_TEXT %>","<%= L_BLOOD_TEXT %>","<%= L_WANTON_TEXT %>",<%= aratings(0) %>);
  203. listFunc = new listFuncs();
  204. </SCRIPT>
  205. </BODY>
  206. </HTML>
  207. <% end if %>