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

📄 navigationedit.asp

📁 生成html的ASP企业站点,可以进行二次开发的
💻 ASP
字号:
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>导航栏目编辑</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<BODY>
<%
Dim quanxian
quanxian=trim(Request.ServerVariables(name))

if Instr(session("AdminPurview"),"|2,")=0 then
  response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限!</font></div>")
  response.end
end If
dim Result
Result=request.QueryString("Result")
dim ID,NavNameCh,NavNameEn,ViewFlagCh,ViewFlagEn,NavUrl,HtmlNavUrl,OutFlag,Remark
ID=request.QueryString("ID")
call NavEdit()
%>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <th>导航栏目:添加,修改导航栏目相关的内容</th>
  </tr>
  <tr>
    <td height="24" align="center" nowrap  class="forumrow"><a href="NavigationEdit.asp?Result=Add" onClick='changeAdminFlag("添加导航栏目")'>添加导航栏目</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="NavigationList.asp" onClick='changeAdminFlag("导航栏目列表")'>查看导航栏目</a></td>
  </tr>
</table>
<br>
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
<form name="editForm" method="post" action="NavigationEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
  <tr>
    <th height="22" colspan="2">【<%If Result = "Add" then%>添加<%ElseIf Result = "Modify" then%>修改<%End If%>导航】</th>
  </tr>
  <tr>
    <td width="20%" align="right" class="forumRow">中文名称:</td>
    <td width="80%" class="forumRowHighlight"><input name="NavNameCH" type="text" id="NavNameCH" style="width: 200" value="<%=NavNameCH%>" maxlength="100"> 显示:<input name="ViewFlagCH" type="checkbox" value="1" checked <%if ViewFlagCH then response.write ("checked")%>> 
    <font color="red">*</font></td>
  </tr>
  <tr>
    <td width="20%" align="right" class="forumRow">英文名称:</td>
    <td width="80%" class="forumRowHighlight"><input name="NavNameEN" type="text" id="NavNameEN" style="width: 200" value="<%=NavNameEN%>" maxlength="100">
      显示:
      <input name="ViewFlagEN" type="checkbox" value="1" <%if ViewFlagEN then response.write ("checked")%>> <font color="red">*</font></td>
  </tr>  <tr>
    <td align="right" class="forumRow">动态页链接网址:</td>
    <td class="forumRowHighlight"><input name="NavUrl" type="text" id="NavUrl" style="width: 500" value="<%=NavUrl%>"> <font color="red">*</font></td>
  </tr>
  <tr>
    <td align="right" class="forumRow">静态页链接网址:</td>
    <td class="forumRowHighlight"><input name="HtmlNavUrl" type="text" id="HtmlNavUrl" style="width: 500" value="<%=HtmlNavUrl%>"> <font color="red">*</font></td>
  </tr>
  <tr>
    <td width="20%" align="right" class="forumRow">链接状态:</td>
    <td width="80%" class="forumRowHighlight"><input name="OutFlag" type="checkbox" value="1" <%if OutFlag then response.write ("checked")%>>是否外部链接</td>
  </tr>
  <tr>
    <td align="right" class="forumRow">备注:</td>
    <td class="forumRowHighlight"><textarea name="Remark" rows="8" id="Remark" style="width: 500"><%=Remark%></textarea></td>
  </tr>
  <tr>
    <td width="20%" align="right" class="forumRow"></td>
    <td width="80%" class="forumRowHighlight"><input name="submitSaveEdit" type="submit" id="submitSaveEdit" value="保存"> <input type="button" value="返回上一页" onClick="history.back(-1)"></td>
  </tr>
  </form>
</table>
</BODY>
</HTML>
<%
sub NavEdit()
  dim Action,rsCheckAdd,rs,sql
  Action=request.QueryString("Action")
  if Action="SaveEdit" then
    set rs = server.createobject("adodb.recordset")
	if len(trim(request.Form("NavNameCh")))<2 then
      response.write ("<script language=javascript> alert('""中文""名称为必填项目,请填写导航名称并保持至少在一个汉字以上!');history.back(-1);</script>")
      response.end
    end if
    if request.Form("ViewFlagEn")=1 then
      if len(trim(request.Form("NavNameEn")))<1 then
      response.write ("<script language=javascript> alert('您已经选择了""英文""显示,因此英文名称必填!');history.back(-1);</script>")
      response.end
      end if
    end if
	If trim(Request.Form("NavUrl")) = ""  Or trim(Request.Form("HtmlNavUrl")) = "" Then
		response.write ("<script language='javascript'>alert('请填写链接网址!');history.back(-1);</script>")
		response.end
	End If
    if Result="Add" Then
	  sql="select * from LiangJingCMS_Navigation"
      rs.open sql,conn,1,3
      rs.addnew
      rs("NavNameCh")=trim(Request.Form("NavNameCh"))
      rs("NavNameEn")=trim(Request.Form("NavNameEn"))
      rs("NavUrl")=trim(Request.Form("NavUrl"))
	  rs("HtmlNavUrl")=trim(Request.Form("HtmlNavUrl"))
	  if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
	  else
        rs("ViewFlagCh")=0
	  end if
	  if Request.Form("ViewFlagEn")=1 then
        rs("ViewFlagEn")=Request.Form("ViewFlagEn")
	  else
        rs("ViewFlagEn")=0
	  end if
	  if Request.Form("OutFlag")=1 then
        rs("OutFlag")=Request.Form("OutFlag")
	  else
        rs("OutFlag")=0
	  end if
	  rs("Remark")=trim(Request.Form("Remark"))
	  rs("Sequence")=99
	  rs("AddTime")=now()
	end if
	if Result="Modify" Then
      sql="select * from LiangJingCMS_Navigation where ID="&ID
      rs.open sql,conn,1,3
      rs("NavNameCh")=trim(Request.Form("NavNameCh"))
      rs("NavNameEn")=trim(Request.Form("NavNameEn"))
      rs("NavUrl")=trim(Request.Form("NavUrl"))
	  rs("HtmlNavUrl")=trim(Request.Form("HtmlNavUrl"))
	  if Request.Form("ViewFlagCh")=1 then
        rs("ViewFlagCh")=Request.Form("ViewFlagCh")
	  else
        rs("ViewFlagCh")=0
	  end if
	  if Request.Form("ViewFlagEn")=1 then
        rs("ViewFlagEn")=Request.Form("ViewFlagEn")
	  else
        rs("ViewFlagEn")=0
	  end if
	  if Request.Form("OutFlag")=1 then
        rs("OutFlag")=Request.Form("OutFlag")
	  else
        rs("OutFlag")=0
	  end if
	  rs("Remark")=trim(Request.Form("Remark"))
	end if
	rs.update
	rs.close
    set rs=nothing
    response.write "<script language='javascript'>alert('设置成功!');location.replace('NavigationList.asp');</script>"
  else
	if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from LiangJingCMS_Navigation where ID="& ID
      rs.open sql,conn,1,1
	  NavNameCh=rs("NavNameCh")
	  NavNameEn=rs("NavNameEn")
	  ViewFlagCh=rs("ViewFlagCh")
	  ViewFlagEn=rs("ViewFlagEn")
      Remark=rs("Remark")
	  OutFlag=rs("OutFlag")
      NavUrl=rs("NavUrl")
	  HtmlNavUrl=rs("HtmlNavUrl")
	  rs.close
      set rs=nothing
	end if
  end if
end sub
%>

⌨️ 快捷键说明

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