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

📄 navigationedit.asp

📁 此系统都是基于ASP+ACCESS技术开发的电子商务平台,属于全自动化、全智能的在线方式管理、维护、更新的网站管理系统。此系统直接上传到你的网站空间就可以使用了。完全后台操作。
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2008-2010 - GLGK.COM-STUDIO" />
<META NAME="Author" CONTENT="冠龙科技,www.glgk.com" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<TITLE>编辑导航</TITLE>
<link rel="stylesheet" href="Images/CssAdmin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<%
if Instr(session("AdminPurview"),"|113,")=0 then 
  response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
  response.end
end if
'========判断是否具有管理权限
%>
<BODY>
<iframe width="260" height="166" id="colourPalette" src="../Include/SelColor.htm" style="visibility:hidden;position:absolute; left:0px;top:0px;border:1px gray solid #000000" frameborder="0" scrolling="no" ></iframe>
<% 
dim Result
Result=request.QueryString("Result")
dim ID,NavNameCh,NavNameEn,ViewFlagCh,ViewFlagEn,NavUrl,OutFlag,NavFullNameCh,NavFullNameEn,ParentID,SortPath,Color
ID=request.QueryString("ID")
call NavEdit() 
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
  <tr>
    <td height="24" nowrap><font color="#FFFFFF"><img src="Images/Explain.gif" width="18" height="18" border="0" align="absmiddle">&nbsp;<strong>导航栏目:添加,修改导航栏目相关的内容</strong></font></td>
  </tr>
  <tr>
    <td height="24" align="center" nowrap  bgcolor="#EBF2F9"><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 width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
  <form name="editForm" method="post" action="NavigationEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
  <tr>
    <td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editProduct idth="100%">

      <tr>
        <td width="160" height="20" align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="right">中文名称:</td>
        <td><input name="NavNameCh" type="text" class="textfield" id="NavNameCh" style="WIDTH: 240;" value="<%=NavNameCh%>" maxlength="100">&nbsp;显示:<input name="ViewFlagCh" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" checked <%if ViewFlagCh then response.write ("checked")%>>
&nbsp;*&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="right">英文名称:</td>
        <td><input name="NavNameEn" type="text" class="textfield" id="NavNameEn" style="WIDTH: 240;" value="<%=NavNameEn%>" maxlength="100">&nbsp;显示:<input name="ViewFlagEn" type="checkbox" value="1" style='HEIGHT: 13px;WIDTH: 13px;' <%if ViewFlagEn then response.write ("checked")%>></td>
      </tr>
      <tr>
        <td height="20" align="right">显示颜色:</td>
        <td><input name="Color" type="text" class="textfield" style="color:<%=Color%>;WIDTH:80;" onClick="Getcolor(this);" value="<%=Color%>" size="7" maxlength="7">&nbsp;&nbsp;<img src="Images/NoColor.gif" id="NoColor" style="cursor:pointer;" onClick="document.getElementById('Color').value = document.getElementById('NoColor').id;"></td>
      </tr>
      <tr>
        <td height="20" align="right">链接网址:</td>
        <td><input name="NavUrl" type="text" class="textfield" id="NavUrl" style="WIDTH: 480;" value="<%=NavUrl%>">&nbsp;*</td>
      </tr>
      <tr>
        <td height="20" align="right">状  态:</td>
        <td><input name="OutFlag" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" <%if OutFlag then response.write ("checked")%>>&nbsp;外链</td>
      </tr>
      <tr>
        <td height="20" align="right">中文全称:</td>
        <td><input name="NavFullNameCh" type="text" class="textfield" id="NavFullNameCh" style="WIDTH: 480;" value="<%=NavFullNameCh%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">英文全称:</td>
        <td><input name="NavFullNameEn" type="text" class="textfield" id="NavFullNameEn" style="WIDTH: 480;" value="<%=NavFullNameEn%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">类  别:</td>
        <td>
		<select name="Sort" style="color:#333; font-size:12px;">
		<% call SelectNav() %>
        </select>
		</td>
      </tr>
      <tr>
        <td height="30" align="right">&nbsp;</td>
        <td valign="bottom"><input name="submitSaveEdit" type="submit" class="button"  id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
      </tr>
      <tr>
        <td height="20" align="right">&nbsp;</td>
        <td valign="bottom">&nbsp;</td>
      </tr>
    </table></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")))<1 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 Result="Add" then '创建网站管理员
	  sql="select * from Navigation"
      rs.open sql,conn,1,3
      rs.addnew
      rs("NavNameCh")=trim(Request.Form("NavNameCh"))
      rs("NavNameEn")=trim(Request.Form("NavNameEn"))
	  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
      rs("NavUrl")=trim(Request.Form("NavUrl"))
	  if Request.Form("OutFlag")=1 then
        rs("OutFlag")=Request.Form("OutFlag")
	  else
        rs("OutFlag")=0
	  end if
      rs("Color")=Request.Form("Color")
	  rs("NavFullNameCh")=trim(Request.Form("NavFullNameCh"))
	  rs("NavFullNameEn")=trim(Request.Form("NavFullNameEn"))
      if (rs("ParentID")=0 and split(Request.Form("Sort"),"┎╂┚")(0)<>0) or (rs("ParentID")<>0 and split(Request.Form("Sort"),"┎╂┚")(0)=0) then
        response.write ("<script language=javascript> alert('不能将现为“主导航栏”重置为二级导航栏,也不能“二级导航栏”重置为“主导航栏”!');history.back(-1);</script>")
        response.end
      end if
	  rs("ParentID")=split(Request.Form("Sort"),"┎╂┚")(0)
	  rs("SortPath")=split(Request.Form("Sort"),"┎╂┚")(1)&rs("ID")&","
	  rs("Sequence")=99
	  rs("AddTime")=now()
	end if  
	if Result="Modify" then '修改网站管理员
      sql="select * from Navigation where ID="&ID
      rs.open sql,conn,1,3
      rs("NavNameCh")=trim(Request.Form("NavNameCh"))
      rs("NavNameEn")=trim(Request.Form("NavNameEn"))
	  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
      rs("NavUrl")=trim(Request.Form("NavUrl"))
	  if Request.Form("OutFlag")=1 then
        rs("OutFlag")=Request.Form("OutFlag")
	  else
        rs("OutFlag")=0
	  end if
      rs("Color")=Request.Form("Color")
	  rs("NavFullNameCh")=trim(Request.Form("NavFullNameCh"))
	  rs("NavFullNameEn")=trim(Request.Form("NavFullNameEn"))
      if (rs("ParentID")=0 and split(Request.Form("Sort"),"┎╂┚")(0)<>0) or (rs("ParentID")<>0 and split(Request.Form("Sort"),"┎╂┚")(0)=0) then
        response.write ("<script language=javascript> alert('不能将现为“主导航栏”重置为二级导航栏,也不能“二级导航栏”重置为“主导航栏”!');history.back(-1);</script>")
        response.end
      end if
	  rs("ParentID")=split(Request.Form("Sort"),"┎╂┚")(0)
	  rs("SortPath")=split(Request.Form("Sort"),"┎╂┚")(1)&rs("ID")&","
	end if
	rs.update
	rs.close
    set rs=nothing 
    response.write "<script language=javascript> alert('成功编辑导航栏目!');changeAdminFlag('导航栏目列表');location.replace('NavigationList.asp');</script>"
  else '提取管理员信息
	if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from Navigation where ID="& ID
      rs.open sql,conn,1,1
	  NavNameCh=rs("NavNameCh")
	  NavNameEn=rs("NavNameEn")
	  NavFullNameCh=rs("NavFullNameCh")
	  NavFullNameEn=rs("NavFullNameEn")
	  ParentID=rs("ParentID")
	  SortPath=rs("SortPath")
	  ViewFlagCh=rs("ViewFlagCh")
	  ViewFlagEn=rs("ViewFlagEn")
      NavUrl=rs("NavUrl")
      OutFlag=rs("OutFlag")
	  Color=rs("Color")
	  rs.close
      set rs=nothing 
	end if
  end if
end sub

sub SelectNav()
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from Navigation where ParentID=0 order by Sequence asc"
  rs.open sql,conn,1,1
  response.write ("<option value=""0┎╂┚0,"">主导航栏</option>")
  while not rs.eof
    response.write ("<option value="""&rs("ID")&"┎╂┚"&rs("SortPath")&"""")
    if ParentID=rs("ID") then response.write ("selected")
    response.write ("> "&rs("NavNameCh")&"&nbsp;|&nbsp;"&rs("NavNameEn")&"</option>")
    rs.movenext
  wend
  rs.close
  set rs=nothing
end sub
%>

⌨️ 快捷键说明

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