📄 link_edit.asp
字号:
<!--#include file="../inc/CheckAdmin.asp"-->
<!--#include file="../inc/Config.asp"-->
<!--#include file="../inc/Navtree.asp"-->
<!--#include file="../inc/Conn.asp"-->
<%
Dim Language,table,Sortid,delsImg
Language=formatStr(Request("Language"))
if Language="" then Language="C"
table_behind="LinkSort_"
table=Get_Table(table_behind,Language)
Sortid=request("Sortid")
id=request("id")
If id="" or not isnumeric(id) then Check_Alert "非法操作","Link_admin.asp"
Sortid=request("Sortid")
If Sortid="" or not isnumeric(Sortid) then Check_Alert "非法操作","Link_admin.asp"
if request.form("add")=1 then
'if Trim(Request.Form("Commend2"))="1" then
'sql="select top 1 * from T_temple where tp_flag=1 and TP_Language like '%"&Language&"%' order by Tp_id desc"
'set rs=Server.CreateObject("adodb.recordset")
'rs.open sql,conn,1,1
'mb_code=rs("Tp_temple")
'rs.close
'c_title=Trim(Request.Form("L_Name"))
'c_content=Trim(Request.Form("content1"))
'lan=Trim(Request.Form("language"))
'response.Write lan
'response.End()
'fname = makefilename(now()) ''makefilename为自定义函数
'folder = "../../LinkCenter/"
'filepath = folder&fname
'sql = "Select * from asp2html"
'Set rs = Server.CreateObject ("ADODB.Recordset")
'rs.Open sql,conn,3,2
'rs.addnew
'rs("a_title")=c_title
'rs("a_content")=c_content
'rs("a_filepath")=fname
'rs("A_language")=lan
'rs.update
'rs.close
'c_title=htmlencode(c_title)
'c_content=htmlencode(c_content)
'mb_code=replace(mb_code,"$sshsoft1$",c_title)
'mb_code=replace(mb_code,"$sshsoft1$",c_title)
'mb_code=replace(mb_code,"$sshsoft2$",c_content)
'response.Write mb_code&"<br>"
'paths=Server.MapPath(filepath)
'response.Write paths
'response.End()
'Set fso = Server.CreateObject("Scripting.FileSystemObject")
'Set fout = fso.CreateTextFile(paths, True)
'fout.WriteLine mb_code
'fout.close
'else
'fname=""
'end if
rs.open"select * from Link where L_id="&request("id"),conn,1,3
rs("L_Name")=request("L_Name")
'rs("L_Language")=language
rs("L_Sortid")=request.form("Sortid")
rs("L_Content")=request("content1")
'rs("L_Power")=request("power")
set delImg=createobject("scripting.filesystemobject")
if rs("L_Pic")<>request("textimg") and left(rs("L_Pic"),4)=cstr(year(now())) then
delsImg=trim(rs("L_Pic"))
delsImg=server.mappath("../../uploadfile/Link_title/"&delsImg)
if delimg.fileexists(delsImg) then
delImg.deletefile(delsImg)
end if
end if
rs("L_Pic")=request("textimg")
'if Trim(Request.Form("Commend2"))="1" then
'if rs("L_address")<>filepath then
'delsImg2=trim(rs("L_address"))
'delsImg2=server.mappath(delsImg2)
'if delimg.fileexists(delsImg2) then
'delImg.deletefile(delsImg2)
'end if
'end if
'rs("L_Address")=filepath
'End If
'rs("L_Model")=request("L_Model")
'rs("L_Price")=request("L_Price")
'rs("L_Memo")=request("Others")
rs("L_Special")=request("Commend")
rs("L_Editor")=session("admin")
rs.update
set delImg=nothing
set delImg2=nothing
closeconn
response.redirect("Link_Admin.asp?language="&language&"&sortid="&request.form("Sortid"))
response.end
end if
if request("id")<>"" then
rs.open"select * from Link where L_Id="&request("id"),conn,1,1
if not rs.eof then
title=rs("L_Name")
content=rs("L_Content")
id=rs("L_id")
Sortid=rs("L_Sortid")
'Power=rs("L_Power")
'Memo=rs("L_Memo")
textimg=rs("L_Pic")
'textimage=rs("L_Pic2")
Commend=rs("L_special")
'Model=rs("L_Model")
'Price=rs("L_Price")
end if
rs.close
end if
if left(textimg,4)=cstr(year(now())) then
spicpath="../../uploadfile/Link_title/"&textimg
elseif textimg<>"" then
spicpath=textimg
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站管理系统</title>
<link href="../Css_Main.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {color: #FF0000}
.style1 {color: #CCCCCC}
-->
</style>
</head>
<script language="JavaScript">
function Check()
{
if (form.Sortid.value == "")
{alert("请选择类别");
form.Sortid.focus();
return false;
}
if (form.L_Name.value == "")
{alert("产品名称不能为空");
form.L_Name.focus();
return false;
}
document.form.submit();
}
</script>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr>
<td class="title_dh"><div align="center">友情链接——修改链接</div></td>
</tr>
</table>
<form name="form" action="" method="post">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="title_top">
<td colspan="3"><div align="center">修改链接</div></td>
</tr>
<tr class="tdbg">
<td width="20%">
<div align="right"><strong>语言版本:</strong></div></td>
<td colspan="2"><%= Check_Language(Language) %>
<input type="hidden" name="add" value=1 id="add"></td>
</tr>
<tr class="tdbg">
<td height="26"><div align="right"><strong>所属分类:</strong></div></td>
<td colspan="2"><select name="Sortid" id="select">
<option value="">类别列表</option>
<%showtreefornav table,"LS_",0,"rs","",SortId,isadd %>
</select>
<font color="#FF0000">*</font></td>
</tr>
<tr class="tdbg">
<td><div align="right"><strong>名称:</strong></div></td>
<td colspan="2"><input name="L_Name" type="text" id="L_Name" size="40" value="<%= title %>">
<font color="#FF0000">*</font></td>
</tr>
<tr class="tdbg">
<td><div align="right"><strong><strong>LOGO:</strong></strong></div></td>
<td id="showpic" style="display:'<%if len(textimg)>11 then%><%else%>none<%end if%>'" ><table width="100%">
<tr>
<td valign="middle" width="21%" id="pic"><a href="<%=spicpath%>" target="_blank"><img src="<%=spicpath%>" width="120" height="50" id="image" border="0"></a></td>
<td valign="middle"><a style="cursor:'hand'" onClick="document.all.hidpic.style.display='';document.all.showpic.style.display='none';"> 更改图片</a> <a style="cursor:hand" onClick="document.all.textimg.value='';document.all.showpic.style.display='none';document.all.hidpic.style.display='';">删除图片</a></td>
</tr>
</table></td>
<td id="hidpic" style="display:'<%if len(textimg)>11 then%>none<%end if%>'" ><table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="hiddenframe"><a style="cursor:hand" onClick="document.all.showframe.style.display='';document.all.hiddenframe.style.display='none';"> 上传图片</a> <a style="cursor:hand" onClick="document.all.adddz.style.display='';document.all.hiddenframe.style.display='none';">插入图片URL</a>
<input name="textimg" type="hidden" id="textimg" value="<%= textimg %>"></td>
</tr>
<tr>
<td height="17" id="showframe" style="display:none"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15"> <div align="left">
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="245"><iframe src='../inc/uppic.asp?up=../../uploadfile/Link_title/&tup=textimg' frameborder=0 height=25 width="100%" scrolling="no"></iframe></td>
<td><div align="left"><a style="cursor:hand" onClick="document.all.showframe.style.display='none';document.all.hiddenframe.style.display='';">取消</a></div></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="17" id="adddz" style="display:none">
<input name="dz" type="text" id="dz" onChange="document.all.textimg.value=this.value" size="30" >
<a style="cursor:hand" onClick="document.all.adddz.style.display='none';document.all.hiddenframe.style.display='';">取消</a> </td>
</tr>
</table></td>
</tr>
<!--<tr class="tdbg">
<td><div align="right"><strong>浏览权限:</strong></div></td>
<td colspan="2"><input name="power" type="radio" value="0" <% 'if Power=0 then Response.Write(" checked") %>>
所有浏览者
<input name="power" type="radio" value="1" <% 'if Power=1 then Response.Write(" checked") %>>
普通会员
<input name="power" type="radio" value="2" <% 'if Power=2 then Response.Write(" checked") %>>
商务会员
<input name="power" type="radio" value="3" <% 'if Power=3 then Response.Write(" checked") %>>
VIP会员</td>
</tr>-->
<tr class="tdbg">
<td><div align="right"><strong>链接地址:</strong></div></td>
<td colspan="2"><input name="content1" type="text" id="content1" size="40" value="<%= Content %>">
<font color="#FF0000">*</font></td>
</tr>
<tr class="tdbg">
<td><div align="right"><strong>特殊标记:</strong></div></td>
<td colspan="2"><input name="Commend" type="checkbox" id="Commend" value="1" <% if commend=1 then response.Write(" checked") %>>
推荐</td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40">
<div align="center"><span class="style1">
<input type="hidden" name="id" value="<%= id %>">
<input name="Submit" type="button" id="Submit" value="修改" onClick="Check()">
<input name="reset" type="reset" id="reset" value="取消">
</span> <span class="style1">
<input name="reset2" type="button" id="reset2" value="返回" onClick="history.back();">
</span></div></td>
</tr>
</table></form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -