📄 install.asp
字号:
<%
Dim tablename
tablename="linking"
'-----显示一个表里的所有字段名----
function viewfields(name)
sql="select * from "&name
rs.open sql,application("searchlinkzzz"),1,1
n=1
response.write "<br>表"&name&"字段信息表<br><br><table><tr><td>字段次序</td>"
response.write "<td>字段名</td>"
response.write "<td>字段类型</td>"
response.write "<td>最大值</td>"
response.write "<td>数字大小限制</td>"
response.write "</tr>"
for each fi in rs.fields
response.write "<tr><td>"&n&"</td>"
response.write "<td>"&fi.name&"</td>"
response.write "<td>"&fi.Type&"</td>"
response.write "<td>"&fi.Precision&"</td>"
response.write "<td>"&fi.NumericScale&"</td></tr>"
n=n+1
next
response.write "</table>"
rs.close
end function
'-----------创建一个表 为linking创建------------
function createtable()
'sql="if exists (select * from sysobjects where id = object_id(N'[dbo].[linking]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[linking]"
'application("searchlinkzzz").execute(sql)
'ID 号码标识
'username 添加网址的用户
'fen 此网站的得分
'sitename 网站名称
'url 网站网址
'fenleiid 所属分类ID号
'jiji 网站简介
sql="CREATE TABLE linking ("&_
"ID counter CONSTRAINT id PRIMARY KEY,"&_
"username char(10) NOT NULL,"&_
"fen INTEGER NOT NULL,"&_
"sitename char(40) NOT NULL,"&_
"url char(100) NOT NULL,"&_
"fenleiid INTEGER NULL,"&_
"ndatetime datetime NULL,"&_
"jiji char(200) NULL)"
application("searchlinkzzz").execute(sql)
response.write "成功创建表linking!<br>"
creatindex tablename,"idindex","ID"
creatindex tablename,"usernameindex","username"
creatindex tablename,"fenindex","fen"
creatindex tablename,"sitenameindex","sitename"
creatindex tablename,"urlindex","url"
creatindex tablename,"fenleiidindex","fenleiid"
creatindex tablename,"jijiindex","jiji"
end function
'---------建立临时网站存放表----------------
function createtabletemplink()
'sql="if exists (select * from sysobjects where id = object_id(N'[dbo].[templink]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[templink]"
'application("searchlinkzzz").execute(sql)
'ID 号码标识
'username 添加网址的用户
'fen 此网站的得分
'sitename 网站名称
'url 网站网址
'fenleiid 所属分类ID号
'jiji 网站简介
sql="CREATE TABLE templink ("&_
"ID counter CONSTRAINT id PRIMARY KEY,"&_
"username char(10) NOT NULL,"&_
"fen INTEGER NOT NULL,"&_
"sitename char(40) NOT NULL,"&_
"url char(100) NOT NULL,"&_
"fenleiid INTEGER NULL,"&_
"ndatetime datetime NULL,"&_
"jiji char(200) NULL)"
application("searchlinkzzz").execute(sql)
response.write "成功创建表templink!<br>"
creatindex "templink","idindex","ID"
creatindex "templink","usernameindex","username"
creatindex "templink","fenindex","fen"
creatindex "templink","sitenameindex","sitename"
creatindex "templink","urlindex","url"
creatindex "templink","fenleiidindex","fenleiid"
creatindex "templink","jijiindex","jiji"
end function
'-------------------建立ourusers表---------
function createtableourusers()
'sql="if exists (select * from sysobjects where id = object_id(N'[dbo].[ourusers]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[ourusers] "
'application("searchlinkzzz").execute(sql)
sql="CREATE TABLE ourusers ("&_
"ID counter CONSTRAINT id PRIMARY KEY,"&_
"username char(10) NOT NULL,"&_
"pass char(10) NOT NULL,"&_
"mail char(50) NOT NULL,"&_
"icq INTEGER NULL,"&_
"oicq INTEGER NULL,"&_
"address char(150) NULL,"&_
"sex char(2) NULL,"&_
"birthday datetime NULL,"&_
"applytime char(50) NULL,"&_
"homepage char(60) NULL,"&_
"fashu INTEGER,"&_
"bshu INTEGER,"&_
"unbshu INTEGER,"&_
"fen INTEGER)"
application("searchlinkzzz").execute(sql)
response.write "成功创建表ourusers!<br>"
creatindex "ourusers","idindex","ID"
creatindex "ourusers","usernameindex","username"
creatindex "ourusers","sexindex","sex"
creatindex "ourusers","applytimeindex","applytime"
creatindex "ourusers","fashuindex","fashu"
creatindex "ourusers","unbshuindex","unbshu"
creatindex "ourusers","fenindex","fen"
end function
function createtablefenlei()
'sql="if exists (select * from sysobjects where id = object_id(N'[dbo].[fenlei]') and OBJECTPROPERTY(id, N'IsUserTable') =1) drop table [dbo].[fenlei] "
'application("searchlinkzzz").execute(sql)
sql="CREATE TABLE fenlei (id counter CONSTRAINT id PRIMARY KEY,"&_
"fenlei1 char(50) NULL,"&_
"fenlei2 char(50) NULL,"&_
"fenlei3 char(50) NULL,"&_
"fenlei4 char(50) NULL,"&_
"fenlei5 char(50) NULL,"&_
"fenlei6 char(50) NULL,"&_
"fenlei7 char(50) NULL,"&_
"fenlei8 char(50) NULL,"&_
"fenlei9 char(50) NULL,"&_
"fenlei10 char(50) NULL,"&_
"fenlei1id INTEGER NULL,"&_
"fenlei2id INTEGER NULL,"&_
"fenlei3id INTEGER NULL,"&_
"fenlei4id INTEGER NULL,"&_
"fenlei5id INTEGER NULL,"&_
"fenlei6id INTEGER NULL,"&_
"fenlei7id INTEGER NULL,"&_
"fenlei8id INTEGER NULL,"&_
"fenlei9id INTEGER NULL,"&_
"fenlei10id INTEGER NULL,"&_
"num INTEGER NULL,"&_
"expediency INTEGER NULL,"&_
"father INTEGER NULL)"
application("searchlinkzzz").execute(sql)
creatindex "fenlei","idindex","id"
creatindex "fenlei","fenlei1index","fenlei1"
creatindex "fenlei","fenlei2index","fenlei2"
creatindex "fenlei","fenlei3index","fenlei3"
creatindex "fenlei","fenlei4index","fenlei4"
creatindex "fenlei","fenlei5index","fenlei5"
creatindex "fenlei","fenlei6index","fenlei6"
creatindex "fenlei","fenlei7index","fenlei7"
creatindex "fenlei","fenlei8index","fenlei8"
creatindex "fenlei","fenlei9index","fenlei9"
creatindex "fenlei","fenlei10index","fenlei10"
creatindex "fenlei","expediencyindex","expediency"
creatindex "fenlei","fatherindex","father"
end function
function createtableguest()
'sql="if exists (select * from sysobjects where id = object_id(N'[dbo].[guest]') and OBJECTPROPERTY(id, N'IsUserTable') =1) drop table [dbo].[guest] "
'application("searchlinkzzz").execute(sql)
sql="CREATE TABLE guest (id counter CONSTRAINT id PRIMARY KEY,"&_
"username char(10) NOT NULL,"&_
"shuyu INTEGER NOT NULL,"&_
"bq char(20) NULL,"&_
"ndatetime datetime NULL,default date(),"&_
"looktimes INTEGER NOT NULL,"&_
"bt char(100) NOT NULL,"&_
"flag INTEGER NOT NULL,"&_
"ip char(20) NULL,"&_
"userid INTEGER NULL,"&_
"linkid INTEGER NULL,"&_
"guestdata char(50) NULL)"
application("searchlinkzzz").execute(sql)
creatindex "guest","idindex","id"
creatindex "guest","shuyuindex","shuyu"
creatindex "guest","ndatetimeindex","ndatetime"
creatindex "guest","looktimesindex","looktimes"
creatindex "guest","useridindex","userid"
creatindex "guest","linkidindex","linkid"
end function
'-------------------建立china(地址大全)表---------
function createtablechina()
'sql="if exists (select * from sysobjects where id = object_id(N'[dbo].[china]') and OBJECTPROPERTY(id, N'IsUserTable') =1) drop table [dbo].[china] "
'application("searchlinkzzz").execute(sql)
sql="CREATE TABLE china ("&_
"ID counter CONSTRAINT id PRIMARY KEY,"&_
"shi char(20) NULL,"&_
"sheng char(20) NULL,"&_
"district char(20) NULL,"&_
"town char(20) NULL,"&_
"country char(20) NULL,"&_
"url char(100) NULL,"&_
"num INTEGER NULL,"&_
"expediency INTEGER NULL)"
application("searchlinkzzz").execute(sql)
response.write "成功创建表china!<br>"
end function
function creatindex(temptablename,tempindexname,tempfieldname)
sql="CREATE INDEX "&tempindexname&" ON "&temptablename&"("&tempfieldname&")"
application("searchlinkzzz").execute(sql)
response.write temptablename&"表的"&tempfieldname&"字段索引建立成功,索引名为"&tempindexname&"!<br>"
end function
function altertable(tablename,fieldname)
sql= "ALTER TABLE "&tablename&" ADD "&fieldname&" INT NULL"
application("searchlinkzzz").execute(sql)
response.write tablename&"表的"&fieldname&"字段添加成功!<br>"
end function
'---------删除一个表---------------------
'------参数tablename:要删除索引所在表名--
'------参数indexname:要删除索引的名字----
function draptable(name)
sql="if exists (select * from sysobjects where id = object_id(N'[dbo].["&tablename&"]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) DROP TABLE "&name
'sql="DROP TABLE "&name
application("searchlinkzzz").execute(sql)
response.write "成功删除表"&name&"!<br>"
end function
function drapindex(temptablename,tempindexname)
sql="DROP INDEX " & temptablename & "." & tempindexname
'DROP INDEX mytable.mycolumn_index
'sql="DROP INDEX newidindex ON phone"
application("searchlinkzzz").execute sql
'application("searchlinkzzz").Execute "DROP INDEX newidindex ON phone;"
response.write "成功删除表"&temptablename&"中的索引名为"&tempindexname&"的索引!<br>"
end function
if isObject(application("searchlinkzzz"))=0 then%>
<!-- #include file=database.asp -->
<%
end if
Set rs = Server.CreateObject("ADODB.Recordset")
createtabletemplink()
response.write "<font color=ff0000>建立表templink成功!<br></font>"
response.write "<font color=ff0000>正在建立表linking!<br></font>"
createtable()
response.write "<font color=ff0000>建立表linking成功!<br></font>"
response.write "<font color=ff0000>正在建立表ourusers!<br></font>"
createtableourusers()
response.write "<font color=ff0000>建立表正在建立表ourusers成功!<br></font>"
'response.write "<font color=ff0000>正在建立表china!<br></font>"
'createtablechina()
'response.write "<font color=ff0000>建立表china成功!<br></font>"
'createtablefenlei()
viewfields(tablename)
viewfields("linking")
viewfields("ourusers")
viewfields("fenlei")
set rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -