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

📄 link_add.asp

📁 这是一个物流网站的源代码
💻 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
Language=formatStr(Request("Language"))
if Language="" then Language="C"
table_behind="LinkSort_"
table=Get_Table(table_behind,Language)
Sortid=request("Sortid")  

if Sortid="" or not isnumeric(Sortid) then
   Sortid=0
else
   Sortid=request("Sortid")
end if      

if request.form("add")=1 then
   rs.open"select top 1 * from Link where L_Sortid="&sortid&" and L_Language='"&Language&"' order by L_Order desc",conn,1,1
   if not rs.eof then
      Order=rs("L_Order")+1
   else
      Order=1
   end if
   rs.close
   '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
	'end if   
   rs.open"Link",conn,1,3
	  rs.addnew
        rs("L_Order")=Order
        rs("L_Name")=request("L_Name")
        rs("L_Language")=language
        rs("L_Sortid")=Sortid
        rs("L_Content")=request("content1")
        'rs("L_Power")=request("power")
        rs("L_Pic")=request("textimg")
        'rs("L_Pic2")=request("textimage")
		'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")
		'if request.form("add")=1 then
		'rs("L_Address")=filepath
		'End If
      rs.update
   closeconn
   response.redirect("Link_Admin.asp?language="&language&"&sortid="&sortid)
   response.end
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.language.value == "")
	 {alert("请选择语言版本");
		form.language.focus();
		return false;
	}

	 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"><strong>友情链接</strong>——添加<strong>链接</strong></div></td>
  </tr>
</table>
<form name="form" action="" method="post" onSubmit="return Check()">
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr class="title_top">
    <td colspan="2"><div align="center">添加<strong>链接</strong></div></td>
  </tr>
  <tr class="tdbg">
    <td width="20%">
    <div align="right"><strong>语言版本:</strong></div></td>
    <td><!--#include file="../inc/Language.asp"-->
      <input type="hidden" name="add" value=1 id="add">
      <font color="#FF0000">*</font></td>
  </tr>
  <tr class="tdbg">
    <td height="26"><div align="right"><strong>所属分类:</strong></div></td>
    <td><select name="Sortid" id="Sortid">
      <% If table<>"None" Then %>
      <option value="">类别列表</option>
      <%showtreefornav table,"LS_",0,"rs","",SortId,isadd %>
      <% Else %>
      <option value="" selected>没有分类</option>
      <% End If %>
    </select>
      <font color="#FF0000">*</font></td>
  </tr>
  <tr class="tdbg">
    <td><div align="right"><strong>名称:</strong></div></td>
    <td><input name="L_Name" type="text" id="L_Name" size="40">
      <font color="#FF0000">*</font></td>
  </tr>
  <tr class="tdbg">
    <td><div align="right"><strong>LOGO:</strong></div></td>
    <td><table width="100%" 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';">&nbsp;上传图片</a>&nbsp;&nbsp;<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"></td>
            		        </tr>
            		        <tr>
               		       <td height="17" id="showframe" style="display:none"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  		        <tr>
                   		         <td width="245" height="15"><iframe src='../inc/uppic.asp?up=../../uploadfile/Link_Title/&tup=textimg' frameborder=0 height=25 width="100%" scrolling="no"></iframe>               		              </td>
               		             <td align="left" valign="baseline"><a style="cursor:hand" onClick="document.all.showframe.style.display='none';document.all.hiddenframe.style.display='';">取消</a></td>
           		             </tr>
           		           </table></td>
             		       </tr>
           		         <tr>
             		         <td height="17" id="adddz" style="display:none">&nbsp;
                   		       <input name="dz" type="text" id="dz" onChange="document.all.textimg.value=this.value" size="30" >&nbsp; <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><input name="power" type="radio" value="0" checked>
      所有浏览者
        <input name="power" type="radio" value="1">
      普通会员
      <input name="power" type="radio" value="2">
      商务会员
      <input name="power" type="radio" value="3">
      VIP会员</td>
  </tr>-->
  <tr class="tdbg">
    <td><div align="right"><strong>链接地址:</strong></div></td>
    <td><input name="content1" type="text" id="content1" value="http://" size="40">
      <font color="#FF0000">*</font></td>
  </tr>
  <tr class="tdbg">
    <td><div align="right"><strong>特殊标记:</strong></div></td>
    <td><input name="Commend" type="checkbox" id="Commend" value="1">
推荐</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 name="Submit" type="button" id="Submit" value="添加" onClick="Check()">
&nbsp;
        <input name="reset" type="reset" id="reset" value="取消">
    </span> <span class="style1"> </span> &nbsp;<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 + -