SelectClass.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:5k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../../FS_Inc/Function.asp" -->
  5. <!--#include file="../../FS_Inc/Md5.asp" -->
  6. <!--#include file="strlib.asp" -->
  7. <html>
  8. <title>会员注册step 3 of  4 step</title>
  9. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  10. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  11. <meta name="keywords" content="风讯,风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  12. <link href="../images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  13. </head>
  14. <style>
  15. .LableSelectItem {
  16. background-color:highlight;
  17. cursor: hand;
  18. color: white;
  19. text-decoration: underline;
  20. }
  21. .LableItem {
  22. cursor: hand;
  23. }
  24. </style>
  25. <body ondragstart="return false;" onselectstart="return false;" topmargin="12" leftmargin="0">
  26. <table width="98%" height="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  27.   <tr class="hback">
  28.     <td valign="top">
  29. <table width="100%" border="0" cellpadding="2" cellspacing="1">
  30. <%
  31. Dim TypeSql,RsTypeObj
  32. TypeSql = "Select vClassName,ParentID,VCID from FS_ME_VocationClass  where Parentid = 0 Order by VCID desc"
  33. Set RsTypeObj = User_Conn.Execute(TypeSql)
  34. if Not RsTypeObj.Eof then
  35. do while Not RsTypeObj.Eof
  36. %>
  37. <tr ParentID="<% = RsTypeObj("ParentID") %>"> 
  38.   <td><table border="0" cellspacing="0" cellpadding="0">
  39.   <tr> 
  40. <td>+</td>
  41. <td>
  42. <span onDblClick="SubmitLable(this);" Extend="False" class="LableItem" TypeID="<% = RsTypeObj("VCID")&"***"&RsTypeObj("vClassName") %>" onClick="SelectFolder(this)">
  43.   <% = RsTypeObj("vClassName") %>
  44.   </span></td>
  45.   </tr>
  46. </table></td>
  47. </tr>
  48.         <%
  49. Response.Write(GetChildTypeList(RsTypeObj("VCID"),""," style=""display:none;"" "))
  50. RsTypeObj.MoveNext
  51. loop
  52. end if
  53. %>
  54.       </table>
  55.     </td>
  56.   </tr>
  57. </table>
  58. </body>
  59. </html>
  60. <%
  61. Set User_Conn = Nothing
  62. Function GetChildTypeList(TypeID,CompatStr,ShowStr)
  63. Dim ChildTypeListRs,ChildTypeListStr,TempStr
  64. Set ChildTypeListRs = User_Conn.Execute("Select vClassName,ParentID,VCID from FS_ME_VocationClass where ParentID=" & TypeID & "" )
  65. TempStr = CompatStr & "&nbsp;&nbsp;&nbsp;&nbsp;"
  66. do while Not ChildTypeListRs.Eof
  67.    GetChildTypeList = GetChildTypeList & "<tr TypeFlag=""Class"" ParentID=""" & ChildTypeListRs("ParentID") & """ " & ShowStr & ">" & Chr(13) & Chr(10)
  68. GetChildTypeList = GetChildTypeList & "<td>" & Chr(13) & Chr(10)
  69. GetChildTypeList = GetChildTypeList & "<table border=""0"" cellspacing=""0"" cellpadding=""0"">" & Chr(13) & Chr(10) & "<tr>"  & Chr(13) & Chr(10) & "<td>" & TempStr & "-</td>"
  70. GetChildTypeList = GetChildTypeList & "<td><span onDblClick=""SubmitLable(this);"" class=""LableItem"" TypeID=""" & ChildTypeListRs("VCID")&"***"&ChildTypeListRs("vClassName") & """ Extend=""False"" onClick=""SelectFolder(this)"">" & ChildTypeListRs("vClassName") & "</span></td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>"
  71. GetChildTypeList = GetChildTypeList & "</td>" & Chr(13) & Chr(10)
  72. GetChildTypeList = GetChildTypeList & "</tr>" & Chr(13) & Chr(10)
  73. GetChildTypeList = GetChildTypeList & GetChildTypeList(ChildTypeListRs("VCID"),TempStr,ShowStr)
  74. ChildTypeListRs.MoveNext
  75. loop
  76. ChildTypeListRs.Close
  77. Set ChildTypeListRs = Nothing
  78. End Function
  79. %>
  80. <script language="JavaScript">
  81. function SelectLable(Obj)
  82. {
  83. for (var i=0;i<document.all.length;i++)
  84. {
  85. if (document.all(i).className=='LableSelectItem') document.all(i).className='LableItem';
  86. }
  87. Obj.className='LableSelectItem';
  88. }
  89. function SelectFolder(Obj)
  90. {
  91. var CurrObj;
  92. for (var i=0;i<document.all.length;i++)
  93. {
  94. if (document.all(i).className=='LableSelectItem') document.all(i).className='LableItem';
  95. }
  96. Obj.className='LableSelectItem';
  97. if (Obj.Extend=='True')
  98. {
  99. ShowOrDisplay(Obj,'none',true);
  100. Obj.Extend='False';
  101. }
  102. else
  103. {
  104. ShowOrDisplay(Obj,'',false);
  105. Obj.Extend='True';
  106. }
  107. }
  108. function ShowOrDisplay(Obj,Flag,Tag)
  109. {
  110. for (var i=0;i<document.all.length;i++)
  111. {
  112. CurrObj=document.all(i);
  113. if (CurrObj.ParentID==Obj.TypeID.split('***')[0])
  114. {
  115. CurrObj.style.display=Flag;
  116. if (Tag) 
  117. if (CurrObj.TypeFlag=='Class') ShowOrDisplay(CurrObj.children(0).children(0).children(0).children(0).children(1).children(0),Flag,Tag);
  118. }
  119. }
  120. }
  121. function SubmitLable(Obj)
  122. {
  123. var LableName=Obj.TypeID;
  124. window.returnValue=LableName;
  125. window.close();
  126. }
  127. window.onunload=SetReturnValue;
  128. function SetReturnValue()
  129. {
  130. if (typeof(window.returnValue)!='string') window.returnValue='';
  131. }
  132. </script>