📄 admin_linkmod.asp
字号:
<%
Option Explicit
Response.buffer=true
const purviewlevel=4
%>
<!--#include file="admin_PurviewChe.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="admin_Function.asp" -->
<%
dim id,rslinkmod,sitemods,isgood,ispass,SuccessMsg
id=trim(request("id"))
if id="" then
call CloseConn()
response.redirect "admin_Linkmanage.asp"
end if
sitemods=request.form("sitemods")
if sitemods="sitemod" then
set rslinkmod=server.createobject("ADODB.Recordset")
rslinkmod.open "select * from FriendLink where id="&id&"",conn,1,3
rslinkmod("sitetype")=request.form("sitetype")
rslinkmod("linktype")=request.form("linktype")
rslinkmod("sitename")=request.form("sitename")
rslinkmod("siteurl")=request.form("siteurl")
if request.form("logourl")<>"" then
rslinkmod("logourl")=request.form("logourl")
else
rslinkmod("logourl")=request.form("logourltemp")
end if
rslinkmod("sitemaster")=request.form("sitemaster")
rslinkmod("siteemail")=request.form("siteemail")
rslinkmod("siteintro")=request.form("siteintro")
isgood=trim(request.form("isgood"))
if isgood="yes" then
rslinkmod("isgood")=true
else
rslinkmod("isgood")=false
end if
ispass=trim(request.form("ispass"))
if ispass="yes" then
rslinkmod("ispass")=true
else
rslinkmod("ispass")=false
end if
rslinkmod.update
rslinkmod.close
set rslinkmod=nothing
call closeconn()
successmsg=successmsg + "<br><br><li>网站链接修改成功!</li>"
successmsg=successmsg +"<br><br><li>你可以:[<a href='admin_LinkManage.asp'>返回网站链接管理面板</a>]</li>"
call ShowSuccessMsg()
end if
%>
<%
dim rslink
set rslink=server.createobject("ADODB.Recordset")
rslink.open "select * from FriendLink where id="&id&"",conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改网站链接</title>
<style type="text/css">
<!--
.style1 {color: #FF3300}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">
<script language=javascript>
function checkform()
{
if(window.document.form1.sitename.value=="")
{
alert("网站名称不能为空!");
return false;
}
if(window.document.form1.siteurl.value=="")
{
alert("链接地址不能为空!");
return false;
}
if(window.document.form1.sitemaster.value=="")
{
alert("站长名称不能为空!");
return false;
}
if(window.document.form1.siteemail.value.indexOf("@")==-1)
{
alert("请输入正确的邮箱地址!");
return false;
}
if(window.document.form1.siteintro.value=="")
{
alert("网站简介不能为空!");
return false;
}
}
function dellink()
{
if(confirm("你确定要删除这个网站吗?一旦删除,将不能恢复!"))
return true;
else
return false;
}
</script>
<style type="text/css">
<!--
.style2 {color: #FF6600}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><form name="form1" method="post" action="" onsubmit="return checkform();">
<table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="F5F8F5">
<tr>
<td align="center" class="txt1">网站链接修改</td>
</tr>
<tr>
<td align="center" class="tbbgtitle">[<a href="admin_Linkmanage.asp">返回友情链接</a>][<a href="admin_LinkDel.asp?id=<%=rslink("id")%>" onClick="return dellink();">删除</a>]</td>
</tr>
<tr>
<td width="29%" class="txt05">网站类型:
<input name="SiteType" type="radio" value="1">
合作网站
<input name="SiteType" type="radio" value="2" checked>
友情网站
<input name="SiteType" type="radio" value="3">
普通网站</td>
</tr>
<tr>
<td class="txt05">链接类型:
<input name="linktype" type="radio" value="1" checked>
文字链接
<input name="linktype" type="radio" value="2">
LOGO链接</td>
</tr>
<tr>
<td class="txt05">网站名称:
<input name="sitename" type="text" class="but" id="sitename" value="<%=rslink("sitename")%>" size="25" maxlength="50">
<span class="txt06">*</span></td>
</tr>
<tr>
<td class="txt05">链接地址:
<input name="siteurl" type="text" class="but" id="siteurl" value="<%=rslink("siteurl")%>" size="40">
<span class="txt06">*</span></td>
</tr>
<tr>
<td class="txt05">网站LOGO地址:
<input name="logourl" type="text" class="but" id="logourl" value="<%=rslink("logourl")%>" size="40">
<span class="txt06">*</span></td>
</tr>
<tr>
<td class="txt05">站长姓名:
<input name="sitemaster" type="text" class="but" id="sitemaster" value="<%=rslink("sitemaster")%>" maxlength="50">
<span class="txt05">*</span> 站长Email:
<input name="siteemail" type="text" class="but" id="siteemail" value="<%=rslink("siteemail")%>" maxlength="50">
<span class="txt06">*</span></td>
</tr>
<tr>
<td class="txt05"><table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="txt05">网站简介:</td>
<td><textarea name="siteintro" cols="60" rows="8" class="but" id="textarea"><%=rslink("siteintro")%></textarea>
<span class="txt06">*</span></td>
</tr>
</table></td>
</tr>
<tr>
<td class="txt05">设为推荐:
<input name="isgood" type="checkbox" class="but" id="isgood" value="yes" checked>
通过审核:
<input name="ispass" type="checkbox" class="but" id="ispass" value="yes" checked> </td>
</tr>
<tr>
<td align="center" class="tbbgtitle"><input name="Submit" type="submit" class="but" value="修改">
<input name="sitemods" type="hidden" id="sitemods" value="sitemod">
<input name="id" type="hidden" id="id" value="<%=rslink("id")%>"> <input name="logourltemp" type="hidden" id="logourltemp" value="images/logo.gif"></td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
<%
rslink.close
set rslink=nothing
call closeconn()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -