A class MSN space of case Manage system

Source: Internet
Author: User
Tags exit sql

Data structure and add page no, look, the select is saved.

<vbscript ">% @LANGUAGE =" VBSCRIPT "codepage=" 936 "%>
<!--#include file= "connections/conn.asp"-->
<%
Dim Recordset1
Dim recordset1_numrows

Set Recordset1 = Server.CreateObject ("ADODB. Recordset ")
Recordset1.activeconnection = mm_conn_string
Recordset1.source = "Select UserID, Username from dbo." [User] "
Recordset1.cursortype = 0
Recordset1.cursorlocation = 2
Recordset1.locktype = 1
Recordset1.open ()

Recordset1_numrows = 0
%>
<%
Dim Recordset2
Dim recordset2_numrows

Set Recordset2 = Server.CreateObject ("ADODB. Recordset ")
Recordset2.activeconnection = mm_conn_string
Recordset2.source = "Select ProjectID, projectname from dbo." ProjectID "
Recordset2.cursortype = 0
Recordset2.cursorlocation = 2
Recordset2.locktype = 1
Recordset2.open ()

Recordset2_numrows = 0
%>
<%
Set Conninner = Server.CreateObject ("ADODB. Connection ")
Conninner. Open mm_conn_string

function Haschild (CID)
Dim haschildid,sql,rs
Haschildid=cint (CID)
Sql= "SELECT * from Takelist where fid=" & Haschildid
Set Rs=server.createobject ("ADODB. Recordset ")
Rs.Open sql,conninner,3,3
If not Rs. EOF Then
Haschild=true
Else
Haschild=false
End If
Set rs=nothing
End Function

function Menunub (Maid)
Dim sql,rs,mnub
Sql= "Select FID from Takelist where takelistid=" & Maid
Rs=conninner.execute (SQL)
Mnub=0
If not Rs. EOF Then
Mnub=menunub (RS ("FID")) +1
Else
Exit function
End If
Set rs=nothing
Menunub=cint (MNUB)
End Function

Function Get_style (level)
If Cint (level) =0 Then
Get_style= ""
Else
get_style= "style=" "Display:none" ""
End If
End Function

Function get_pid (ID)
Dim rs,sql
Sql= "Select Fid from Takelist where takelistid=" &id
Set Rs=conninner.execute (SQL)
If not Rs. EOF and not Rs. BOF Then
Get_pid=rs ("Fid")
Else
Get_pid=0
End If
Set rs=nothing
End Function

Function Get_level (ID)
Dim rs,sql
Sql= "Select fid from takelist Where takelistid=" &id
Set Rs=conninner.execute (SQL)
If not Rs. Eof and not Rs.bof then
Level=get_level (RS ("FID")) +1
Else
Exit Function
End If
Set rs=nothing
Get_level=cint (Level)
End Function

Function Chk_next (Id,level)
Dim rs,sql
Dim tempid
Tempid=id
Aid=id
Curlevel=get_level (Tempid)

For I=curlevel to level step-1
Tempid=get_pid (Tempid)
Next
For I=curlevel to Level+1 step-1
Aid=get_pid (AID)
Next

Set rs=server.createobject ("Adodb.recordset")
Sql= "SELECT * from Takelist Where fid=" &tempId& "
Rs.Open sql,conninner,3,3
Wida=0
If Rs.recordcount>1 Then

Rs. MoveLast
If Aid=rs ("Takelistid") Then
Chk_next=false
Else
Chk_next=true
End If
Else
Chk_next=false
End If
Rs.close ()
Set rs=nothing
End Function

%>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title>takelist manage</title>
<script language= "JavaScript" type= "Text/javascript" >
function ExpandIT (objdiv,objimg)
{
if (document.all.divs[objdiv].style.display== "None")
{document.all.divs[objdiv].style.display= "";
Objimg.src= "Http://www.163design.net/a/y/images/sub.gif";
}
else{
Document.all.divs[objdiv].style.display= "None";
Objimg.src= "Images/plus.gif";
}
}
var hid=0
function ExpandAll (A,BA)
{
if (hid==0)
{
for (var i=0; i<document.all.divs.length;i++)
{
if (document.all.divs[i). FID==BA)
{
document.all.divs[i].style.display= "Block";
for (Var j=0;j<document.all.divs.length;j++)
{
if (document.all.divs[j].md==document.all.divs[i). Fid)
{
ExpandAll (J,document.all.divs[j]. Fid)
}
}
}

}
Hid=1
}
Else
{
&n



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.