link_add.asp

来自「功能介绍: 文章管理」· ASP 代码 · 共 158 行

ASP
158
字号
<!--#include file="../function/tablefunction.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>添加文章</title>
<style type="text/css">
fieldset{
	background: #fffbef;
	width:auto;
}
legend{color:#105096;width:auto;}
.input{
	border: 1px solid #3061AB;
}
.inputhover{
	border: 1px solid #1E3F8C;
}
.inputdown{	background-color: #EEF8F9;	border: 1px solid #0033CC;}
.STYLE2 {color: #FF0000}
</style>
<script>
	function butt(obj,state)
	{	
		if(state==1){
			obj.className="inputhover";}
		if(state==2){
			obj.className="input";}
		if(state==3){
			obj.className="inputdown";}	
	}
</script>
<script language = "JavaScript">
function CheckForm()
{
  if (document.form1.LinkTitle.value=="")
  {
    alert("请填写链接标题!");
	document.form1.LinkTitle.focus();
	return false;
  }
  if (document.form1.ClassName.value=="num")
  {
    alert("请选择链接分类!");
	document.form1.ClassName.focus();
	return false;
  }
      if (document.form1.URL.value=="")
  {
    alert("请填写摘要!");
	form1.URL.focus();
	return false;
  }
  return true;  
}
</script>
</head>
<body style="font-size:12px;">
<!--#include file="../session.asp" -->
<%
	action=request.QueryString("action")
	linkid=request.QueryString("linkid")
	if action="linkEdit" then
		dim msmax2
		set msmax2=new myclass
		set rs2=msmax2.viewRecord("select * from link where linkid="&linkid)
%>
当前位置:<span class="STYLE2">链接管理--->添加链接</span>
<fieldset><br/>
    <legend><strong>添加链接</strong></legend>
    <div align="left" style="width:auto;">
  	<form  name="form1" method="post" onsubmit="return CheckForm();" action="action.asp?action=linkEdit">
		<p>&nbsp;&nbsp;<strong>标题</strong>:
		  <input name="LinkTitle" type="text" class="input" id="LinkTitle" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" size="40" value="<%=rs2("LinkTitle")%>" />
	      <strong>所属分类</strong>:
	<select name="ClassName" class="input">
	  <%
	  	dim msmax1
		set msmax1=new myclass
		set rs1=msmax1.viewRecord("select * from LinkClass")
		do while not rs1.eof and not rs1.bof
	  %>
	  <option value="<%=rs1("ClassName")%>"><%=rs1("ClassName")%></option>
	  <%
	  rs1.movenext
	  loop
	  rs1.close
	  set rs1=nothing
	  %>
	  </select>
  	</p>
	  <p><strong>&nbsp;&nbsp;</strong><strong>上传:</strong>
	    <iframe src="up_form.html"width="720px" height="35px" frameborder="0" scrolling="no"></iframe>
	  </p>
	  <p><strong>&nbsp;&nbsp;图片:</strong>
	    <input name="logo" type="text" class="input" id="logo" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" size="50" value="<%=rs2("logo")%>"/>
&nbsp;</p>
	  <p>
	    &nbsp;&nbsp;&nbsp;<strong>地址:</strong>
	    <input name="URL" type="text" class="input" id="URL" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" size="50"  value="<%=rs2("URL")%>"/>
	  </p>
	  <p>
		  &nbsp;&nbsp;
		  <input name="Submit5" type="submit" class="input" value="添加链接" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)"/>
&nbsp;&nbsp;
<input name="Submit6" type="reset" class="input" value="重新填写" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)"/>
	  </p>
  	</form>
  </div>	
</fieldset>
<%else%>

当前位置:<span class="STYLE2">链接管理--->添加链接</span>
<fieldset><br/>
    <legend><strong>添加链接</strong></legend>
    <div align="left" style="width:auto;">
  	<form  name="form1" method="post" onsubmit="return CheckForm();" action="action.asp?action=linkadd">
		<p>&nbsp;&nbsp;<strong>标题</strong>:
		  <input name="LinkTitle" type="text" class="input" id="LinkTitle" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" size="40" />
	      <strong>所属分类</strong>:
	<select name="ClassName" class="input">
	  <option value="num">请选择所属分类</option>
	  <%
	  	dim msmax
		set msmax=new myclass
		set rs=msmax.viewRecord("select * from LinkClass")
		do while not rs.eof and not rs.bof
	  %>
	  <option value="<%=rs("ClassName")%>"><%=rs("ClassName")%></option>
	  <%
	  rs.movenext
	  loop
	  %>
	  </select>
  	</p>
	  <p><strong>&nbsp;&nbsp;</strong><strong>上传:</strong>
	    <iframe src="up_form.html"width="720px" height="35px" frameborder="0" scrolling="no"></iframe>
	  </p>
	  <p><strong>&nbsp;&nbsp;图片:</strong>
	    <input name="logo" type="text" class="input" id="logo" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" size="50" />
&nbsp;</p>
	  <p>
	    &nbsp;&nbsp;&nbsp;<strong>地址:</strong>
	    <input name="URL" type="text" class="input" id="URL" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)" size="50" />
	  </p>
	  <p>
		  &nbsp;&nbsp;
		  <input name="Submit5" type="submit" class="input" value="添加链接" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)"/>
&nbsp;&nbsp;
<input name="Submit6" type="reset" class="input" value="重新填写" onmousedown="butt(this,3)" onmouseover="butt(this,1)" onmouseout="butt(this,2)"/>
	  </p>
  	</form>
  </div>	
</fieldset>
<%end if%>
</body>
</html>

⌨️ 快捷键说明

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