|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
国内有些大的CRM厂商的ASP就写得不错.无论是概念还是它里面用JAVASCRIPT的能力.并不是说现在的程序员用了ASP.NET来写程序就可以说自己高档了数据布局和add页面 就不写了看select救出来了
<VBSCRIPT">%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%>
<!--#includefile="Connections/conn.asp"-->
<%
DimRecordset1
DimRecordset1_numRows
SetRecordset1=Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection=MM_conn_STRING
Recordset1.Source="SELECTUserID,UsernameFROMdbo.[User]"
Recordset1.CursorType=0
Recordset1.CursorLocation=2
Recordset1.LockType=1
Recordset1.Open()
Recordset1_numRows=0
%>
<%
DimRecordset2
DimRecordset2_numRows
SetRecordset2=Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection=MM_conn_STRING
Recordset2.Source="SELECTProjectID,ProjectNameFROMdbo.ProjectID"
Recordset2.CursorType=0
Recordset2.CursorLocation=2
Recordset2.LockType=1
Recordset2.Open()
Recordset2_numRows=0
%>
<%
Setconninner=Server.CreateObject("ADODB.Connection")
conninner.OpenMM_conn_STRING
functionhaschild(cid)
dimhaschildid,sql,rs
haschildid=Cint(cid)
sql="select*fromtakelistwherefid="&haschildid
setrs=Server.CreateObject("ADODB.Recordset")
rs.opensql,conninner,3,3
ifnotrs.EOFthen
haschild=TRUE
else
haschild=FALSE
endif
setrs=nothing
endfunction
functionMenuNub(Maid)
dimsql,rs,Mnub
sql="selectfidfromtakelistwheretakelistid="&Maid
rs=conninner.execute(sql)
Mnub=0
ifnotrs.EOFthen
Mnub=MenuNub(rs("fid"))+1
else
exitfunction
endif
setrs=nothing
MenuNub=Cint(Mnub)
endfunction
FunctionGet_style(Level)
IfCint(Level)=0then
Get_style=""
Else
Get_style="style=""display:none"""
Endif
EndFunction
Functionget_pid(id)
dimrs,sql
sql="selectFidfromtakelistwheretakelistid="&id
Setrs=Conninner.Execute(Sql)
ifnotrs.EOFandnotrs.BOFthen
get_pid=rs("Fid")
else
get_pid=0
endif
setrs=nothing
endFunction
FunctionGet_level(id)
dimrs,sql
Sql="SelectfidfromtakelistWheretakelistid="&id
Setrs=Conninner.Execute(Sql)
Ifnotrs.Eofandnotrs.bofthen
Level=Get_level(rs("fid"))+1
Else
ExitFunction
Endif
Setrs=nothing
Get_level=Cint(Level)
EndFunction
FunctionChk_next(id,Level)
dimrs,sql
dimtempId
tempId=id
aId=id
curLevel=Get_level(tempId)
Fori=curLeveltoLevelstep-1
tempId=Get_Pid(tempId)
Next
Fori=curLeveltoLevel+1step-1
aId=Get_Pid(aId)
Next
Setrs=server.createobject("adodb.recordset")
Sql="Select*fromtakelistWherefid="&tempId&""
rs.openSql,Conninner,3,3
wida=0
IfRs.recordcount>1then
rs.MoveLast
ifaid=rs("takelistid")then
Chk_next=false
Else
Chk_next=true
Endif
Else
Chk_next=false
Endif
Rs.close()
Setrs=nothing
EndFunction
%>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">
<title>takelistmanage</title>
<scriptlanguage="JavaScript"type="text/JavaScript">
functionexpandIt(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";
}
}
varhid=0
functionexpandall(a,ba)
{
if(hid==0)
{
for(vari=0;i<document.all.DIVs.length;i++)
{
if(document.all.DIVs[i].Fid==ba)
{
document.all.DIVs[i].style.display="block";
for(varj=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
我想详细了解ASP整站代码与PSP整站代码有什么优缺点,那个更好,更安全,更用容易维护,和管理。。。 |
|