index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
</HTML> |
left.asp
<%@language="vbscript" codepage="936"%>
<!--#include file=function/func.asp --> <link href="card.css" rel="stylesheet" type="text/css"> <SCRIPT LANGUAGE="JavaScript" src="note.js"> </SCRIPT> <A HREF="main.asp" target="main">manage_note</A><BR> <A HREF="../../card/index.asp" target="main">card</A> |
main.asp
<%@language="vbscript" codepage="950"%>
<div id="tablemx">
if dnum="yes" then response.cookies("defaultnum")=topnum end if %>
|
manage_note.asp
<%@language="vbscript" codepage="936"%>
call openhpdb select case request("action")
sub edit_note(action)
sql="select top 1 * from custom where custom_id="&custom_id
ELSE IF action="update" then call update(rs,updcolumn,false) END IF END IF
call show() end sub
call outinfo(rs,10) call closedb end sub sub update(rst,columnarray,addnew) if addnew then
end if
next rst.update end sub sub del_note custom_id=request("custom_id") sql="delete from custom where custom_id="&custom_id response.write sql&"Execute success" conn.execute (sql) call show() response.end end sub
--> |
note.js
function sltall()
function search_curr()
} function xmlhttp_get(formdata,url)
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("POST",url,false); xmlhttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded"); xmlhttp.send(formdata); var strXML; strXML=""; strXML=xmlhttp.ResponseText; //alert(strXML);
var xmlDoc=new ActiveXObject("MSXML.DOMDocument"); xmlDoc.async=false;
//var nod = xmlDoc.selectNodes("//note");
}
//set xmlDoc=nothing;
} |
card.css
body{text-align:center;font:12px #0000ff bold;}
|
func.asp
<%
for i = 0 to form_object.elements.length-1
'set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.send(form_value) end function Function URLEncoding(vstrIn)
strconn = "Driver={SQL Server};Description=sqldemo;SERVER=localhost;" _
set conn = server.createobject("adodb.connection")
FUNCTION IIF(cond,expr1,expr2) if cond then iif = expr1 else iif = expr2 end if END FUNCTION sub outinfo(rst,num) if num="" then response.write num&"topnum is null" else allcount=cint(num) end if response.write "<TABLE id=tablemx><FORM name=fm2 METHOD=POST ACTION=manage.asp>"
response.write "<TD>"&rst(k).name&"</TD>" next response.write "<TD>详细信息</TD><TD>联系方式</TD><TD>加入时间</TD>" response.write "</TR>"
response.write "<TR><TD>"&i&"<INPUT TYPE=checkbox NAME=custom_id value='"&rst("custom_id")&"' onclick=javascript:xmlhttp_get(""custom_id="&rst("custom_id")&""",""outresult.asp"")></TD>" for k=0 to 1 response.write "<TD>"&rst(k).value&"</TD>" next rstvalue=""
for k=3 to rst.fields.count-2 if rst(k).value<>"" then rstname=rstname&"["&rst(k).name&"]:<BR>"&vbcrlf
end if next response.write "<TD>"&rstname&"</TD>" response.write "<TD>"&rstvalue&"</TD>" response.write "<TD>"&rst(k).value&"</TD>" response.write "</TR>"&vbcrlf rst.movenext next
end sub %> |
创建数据库脚本
CREATE TABLE [custom] (
|