AboutEdit.asp
上传用户:dbstep
上传日期:2022-08-06
资源大小:2803k
文件大小:7k
- <HTML xmlns="http://www.w3.org/1999/xhtml">
- <HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
- <TITLE>编辑企业</TITLE>
- <link rel="stylesheet" href="Images/CssAdmin.css">
- <script language="javascript" src="../skweb/JS/Admin.js"></script>
- </HEAD>
- <!--#include file="../skweb/Const.asp" -->
- <!--#include file="../skweb/ConnSiteData.asp" -->
- <!-- #include file="../fckeditor/fckeditor.asp" -->
- <!--#include file="CheckAdmin.asp"-->
- <%
- if Instr(session("AdminPurview"),"|11,")=0 then
- response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
- response.end
- end if
- '========判断是否具有管理权限
- %>
- <BODY>
- <%
- dim Result
- Result=request.QueryString("Result")
- dim ID,AboutName,ViewFlag,Content,Source
- dim GroupID,GroupIdName,Exclusive,ChildFlag
- ID=request.QueryString("ID")
- call AboutEdit()
- %>
-
- <table width="100%" border="0" >
- <form name="editAboutForm" method="post" action="AboutEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
- <tr>
- <td height="24" nowrap ><table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC" id=editProduct idth="100%">
- <tr>
- <td height="29" colspan="2" background="Images/menutitle.gif" bgcolor="#FFFFFF"><table width="470" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="121"><strong><font color="#000000" size="2">企业信息</font></strong></td>
- <td width="87"><a href="AboutEdit.asp?Result=Add"><img src="Images/x1.gif" width="52" height="17" border="0"></a></td>
- <td width="87"><a href="AboutList.asp"><img src="Images/xlm.gif" width="52" height="17" border="0"></a></td>
- <td width="87"> </td>
- <td width="88"> </td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td width="10%" height="20" align="right" bgcolor="#FFFFFF">信息名称:</td>
- <td width="90%" bgcolor="#FFFFFF"><input name="AboutName" type="text" class="textfield" id="AboutName" style="WIDTH: 240;" value="<%=AboutName%>" maxlength="100"> 发布:<input name="ViewFlag" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" <%if ViewFlag then response.write ("checked")%>>
- * 不少于3个字符</td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">新闻来源:</td>
- <td bgcolor="#FFFFFF"><input name="Source" type="text" class="textfield" style="WIDTH: 240;" value="<%=Source%>" maxlength="100"></td>
- </tr>
- <tr>
- <td height="20" align="right" bgcolor="#FFFFFF">查看权限:</td>
- <td bgcolor="#FFFFFF"><select name="GroupID" class="textfield">
- <% call SelectGroup() %>
- </select>
- <input name="Exclusive" type="radio" value=">=" <%if Exclusive="" or Exclusive=">=" then response.write ("checked")%>> 隶属<input type="radio" <%if Exclusive="=" then response.write ("checked")%> name="Exclusive" value="=">专属[隶属:权限值≥可查看,专属:权限值=可查看]</td>
- </tr>
- <tr>
- <td height="20" align="right" valign="top" bgcolor="#FFFFFF">信息内容:<br>
- <td bgcolor="#FFFFFF"><%
- Dim oFCKeditor
- Set oFCKeditor = New FCKeditor
- oFCKeditor.BasePath = "../fckeditor/"
- oFCKeditor.ToolbarSet = "Default"
- oFCKeditor.Width = "100%"
- oFCKeditor.Height = "400"
- oFCKeditor.Value = content
- oFCKeditor.Create "Content"
- %> </td>
- </tr>
- <tr>
- <td height="30" align="right" bgcolor="#FFFFFF"> </td>
- <td valign="bottom" bgcolor="#FFFFFF"><input name="submitSaveEdit" type="submit" id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
- </tr>
- </table></td>
- </tr>
- </form>
- </table>
- </BODY>
- </HTML>
- <%
- sub AboutEdit()
- dim Action,rsCheckAdd,rs,sql
- Action=request.QueryString("Action")
- if Action="SaveEdit" then '保存编辑管理员信息
- set rs = server.createobject("adodb.recordset")
- if len(trim(request.Form("AboutName")))<3 then
- response.write ("<script language=javascript> alert('信息名称为必填项目!');history.back(-1);</script>")
- response.end
- end if
- if Result="Add" then '创建网站管理员
- sql="select * from sk_About"
- rs.open sql,conn,1,3
- rs.addnew
- rs("AboutName")=trim(Request.Form("AboutName"))
- rs("Source")=trim(Request.Form("Source"))
- if Request.Form("ViewFlag")=1 then
- rs("ViewFlag")=Request.Form("ViewFlag")
- else
- rs("ViewFlag")=0
- end if
- rs("Content")=Request.Form("Content")
- GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
- rs("GroupID")=GroupIdName(0)
- rs("Exclusive")=trim(Request.Form("Exclusive"))
- if Request.Form("ChildFlag")=1 then
- rs("ChildFlag")=Request.Form("ChildFlag")
- rs("Sequence")=999
- else
- rs("ChildFlag")=0
- rs("Sequence")=99
- end if
- rs("AddTime")=now()
- end if
- if Result="Modify" then '修改网站管理员
- sql="select * from sk_About where ID="&ID
- rs.open sql,conn,1,3
- rs("AboutName")=trim(Request.Form("AboutName"))
- rs("Source")=trim(Request.Form("Source"))
- if Request.Form("ViewFlag")=1 then
- rs("ViewFlag")=Request.Form("ViewFlag")
- else
- rs("ViewFlag")=0
- end if
- rs("Content")=Request.Form("Content")
- GroupIdName=split(Request.Form("GroupID"),"┎╂┚")
- rs("GroupID")=GroupIdName(0)
- rs("Exclusive")=trim(Request.Form("Exclusive"))
- if Request.Form("ChildFlag")=1 then
- rs("ChildFlag")=Request.Form("ChildFlag")
- rs("Sequence")=100
- else
- rs("ChildFlag")=0
- end if
- end if
- rs.update
- rs.close
- set rs=nothing
- Response.Redirect("Tips/about.asp")
- else '提取管理员信息
- if Result="Modify" then
- set rs = server.createobject("adodb.recordset")
- sql="select * from sk_About where ID="& ID
- rs.open sql,conn,1,1
- AboutName=rs("AboutName")
- Source=rs("Source")
- ViewFlag=rs("ViewFlag")
- GroupID=rs("GroupID")
- Exclusive=rs("Exclusive")
- Content=rs("Content")
- ChildFlag=rs("ChildFlag")
- rs.close
- set rs=nothing
- end if
- end if
- end sub
- %>
- <%
- sub SelectGroup()
- dim rs,sql
- set rs = server.createobject("adodb.recordset")
- sql="select GroupID,GroupName from sk_MemGroup"
- rs.open sql,conn,1,1
- if rs.bof and rs.eof then
- response.write("未设组别")
- end if
- while not rs.eof
- response.write("<option value='"&rs("GroupID")&"┎╂┚"&rs("GroupName")&"'")
- if GroupID=rs("GroupID") then response.write ("selected")
- response.write(">"&rs("GroupName")&"</option>")
- rs.movenext
- wend
- rs.close
- set rs=nothing
- end sub
- %>