⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 urlmanage.asp

📁 天创商务网客户资源管理系统 v1,asp+Access,iis5
💻 ASP
字号:
<!--#include file = include.asp-->
<!--#include file = CheckPurview.asp-->
<%
'==========================================
'
' 渐飞商务信息更新系统
'
' 
'
'==========================================
'
'子程序作用:相关联接管理程序
'最后修改时间:2003-04-06 23:35:12
'==========================================
action=request("action")
if action="添加" then
  'Call CheckUrl
  UrlName=trim(request("UrlName"))
  UrlPath=trim(request("UrlPath"))
  set rs=conn.execute("select UrlName from UrlManage where UrlName='"&UrlName&"'")
  if not rs.eof then Call Succeed("true","联接名已存在","",""):response.end
  if UrlName="" or UrlPath="" then Call Succeed("true","联接名、路径都不能为空","",""):response.end
  set rs=server.createobject("adodb.recordset")
  sql="select * from UrlManage"
  rs.open sql,conn,3,3
  rs.addnew  
  rs("UrlName")=UrlName
  rs("UrlPath")=UrlPath
  rs.update
  rs.close
  set rs=nothing
elseif action="删除" then
  'Call CheckUrl
  Num=request("UrlID").count
  for i=1 to num
    conn.execute("Delete from UrlManage where UrlID="&request("UrlID")(i))
  next
elseif action="修改" then
  'Call CheckUrl
  UrlName=trim(request("UrlName"))
  UrlPath=trim(request("UrlPath"))
  'set rs=conn.execute("select UrlName from UrlManage where UrlName='"&UrlName&"'")
  'if not rs.eof then Call Succeed("true","联接名已存在","",""):response.end
  if UrlName="" or UrlPath="" then Call Succeed("true","联接名、路径都不能为空","",""):response.end
  set rs=server.createobject("adodb.recordset")
  sql="select * from UrlManage where UrlID="&request("UrlID")
  rs.open sql,conn,3,3
  rs("UrlName")=UrlName
  rs("UrlPath")=UrlPath
  rs.update
  rs.close
  set rs=nothing
  response.redirect"urlManage.asp"
end if
page=request("page")
if page<=1 or page="" then page=1
set rs=server.createobject("adodb.recordset")
sql="select UrlPath,UrlName,UrlID from UrlManage order by UrlID desc"
rs.open sql,conn,1,1

rs.pagesize=20
for i=1 to rs.pagesize*(page-1)
  if not rs.eof then
    rs.movenext
  end if
next
if ccur(page)=ccur(rs.pagecount) then
  NextPage=Page
else
  NextPage=page+1
end if

if Page=1 then
  AscendPage=page
else
  AscendPage=Page-1
end if

%>
<body background="images/BLogo.gif">
<table width="63%" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#4397c5">
  <tr bgcolor="#FFFFFF"> 
    <td colspan="3" height="25">
    <!--#include file = topMenu.htm--></td>
  </tr>
  <tr>
  <td bgcolor=#ffffff>
<%
if request("oper")="modify" then
set rs=conn.execute("select UrlPath,UrlName,UrlID from UrlManage where UrlID="&request("UrlID"))
if rs.eof then Call Succeed("true","系统不存在此联接","","0"):response.end
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<form name=form method="post" action="">
  <tr bgcolor="#ffffff"> 
    <td width="49%" height="23" bgcolor="#ffffff" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><u>联接名</u><br>
      <font color=#c0c0c0>请填写要联接的关键字如填写“渐飞”,系统会把商务信息内容包含有“渐飞”的内容联接到下面填写的路径中</font></td>
    <td width="51%" height="23" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><input type="text" class=form80 name="UrlName" value=<%=rs(1)%>></td>
  </tr>
  <tr bgcolor="#ffffff"> 
    <td height="23" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><u>联接路径</u><br>
      <font color=#c0c0c0>需要连接到的路径,如上面的联接名“渐飞”要联接到htt://www.xunt.net,填入htt://www.xunt.net即可</font></td>
    <td height="23" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>
	<input type="text" class=form80 name="UrlPath" value="<%=rs(0)%>"></td>
  </tr>
  <tr align="center" bgcolor="#ffffff"> 
    <td height="23" colspan="2" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>
	<input type="hidden" name=UrlID value="<%=request("UrlID")%>">
	<input type="submit" class=button value="修改" name="action" onclick="return modify()">
	<input type="button" class=button value="返回" onclick="javascript:history.back()"></td>
  </tr>
  </form>
</table>
<%else%>
</td></tr>
<tr>
<td>
</td>
</tr>
<tr>
<td bgcolor=#ffffff><br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<form name=form1 method="post" action="">
<%  
for i=1 to rs.pagesize
if rs.eof then exit for
%>
  <tr bgcolor="#ffffff"> 
    <td width="70%" height="25" bgcolor="#ffffff" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>
	<font color=#c0c0c0>联接名:</font><a href="<%=rs(0)%>" target=_blank><%=rs(1)%></a>
	<font color=#c0c0c0>联接路径:</font><%=rs(0)%>
    </td>
    <td width="30%" height="10" bgcolor="#ffffff" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; align=right>
	<a href="UrlManage.asp?oper=modify&UrlID=<%=rs(2)%>">修改</a>    
	<input type="Checkbox" Name=UrlID Value="<%=rs(2)%>">
	</td>
  </tr>
<%
rs.movenext
next
%>
  <tr bgcolor="#ffffff">
    <td width="70%" height="10" bgcolor="#ffffff" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; align=left>
    <a href="UrlManage.asp?Page=1">首页</a>
	<a href="UrlManage.asp?Page=<%=AscendPage%>">上一页</a>
	<a href="UrlManage.asp?Page=<%=NextPage%>">下一页</a>
	<a href="UrlManage.asp?Page=<%=rs.pagecount%>">尾页</a>
	<b><font color=red><%=Page%></font>/<%=rs.pagecount%></b>
	<select onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
<%
  for i=1 to rs.pagecount
%>
	  <option value="UrlManage.asp?Page=<%=i%>" <%if ccur(page)=ccur(i) then response.write"selected"%>>第<%=i%>页</option>
<%
  next
%>
	</select>
    </td>
    <td width="30%" height="10" bgcolor="#ffffff" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; align=right>
	<input type=submit value="删除" name=action class=button onclick="return Del()">
	选中所有<input type="checkbox" name="chkall" onclick="CheckAll(this.form)">	
    </td>
  </tr>
</form>
</table>
</td></tr>

<tr>
<td bgcolor=#ffffff><br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<form name=form method="post" action="">
  <tr bgcolor="#ffffff"> 
    <td width="49%" height="23" bgcolor="#ffffff" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><u>联接名</u><br>
      <font color=#c0c0c0>请填写要联接的关键字如填写“渐飞”,系统会把商务信息内容包含有“渐飞”的内容联接到下面填写的路径中</font></td>
    <td width="51%" height="23" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><input type="text" class=form80 name="UrlName"></td>
  </tr>
  <tr bgcolor="#ffffff"> 
    <td height="23" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><u>联接路径</u><br>
      <font color=#c0c0c0>需要连接到的路径,如上面的联接名“渐飞”要联接到htt://www.xunt.net,填入htt://www.xunt.net即可</font></td>
    <td height="23" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';><input type="text" class=form80 name="UrlPath" value="http://"></td>
  </tr>
  <tr align="center" bgcolor="#ffffff"> 
    <td height="23" colspan="2" onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor='';>	
	<input type="submit" class=button value="添加" name="action" onclick="return CheckUrl()"></td>
  </tr>
  </form>
</table>
<%
rs.close
set rs=nothing
end if
%>
  </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -