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

📄 other_manage.asp

📁 后台目录:qwbAdmin/Login.asp 登陆用户名:admin 登陆密码:admin
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<% Option Explicit %>
<%'Copyright (c) 2006 Foosun Inc. Code by 邓西%> 
<!--#include file="../../FS_Inc/Const.asp" -->
<!--#include file="../../FS_Inc/Function.asp"-->
<!--#include file="../../FS_InterFace/MF_Function.asp" -->
<!--#include file="../../FS_InterFace/NS_Function.asp" -->
<!--#include file="../../FS_Inc/Func_page.asp" -->
<%
response.buffer=true	
Response.CacheControl = "no-cache"
Dim Conn,User_Conn
MF_Default_Conn
MF_Session_TF
if not MF_Check_Pop_TF("NS_Genal") then Err_Show
Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,strShowErr,showMorePageGo_Type_
Dim Page,cPageNo
Call MF_Check_Pop_TF("NS_Class_000001")
int_RPP=30 '设置每页显示数目
int_showNumberLink_=8 '数字导航显示数目
showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
str_nonLinkColor_="#999999" '非热链接颜色
toF_="<font face=webdings title=""首页"">9</font>"  			'首页 
toP10_=" <font face=webdings title=""上十页"">7</font>"			'上十
toP1_=" <font face=webdings title=""上一页"">3</font>"			'上一
toN1_=" <font face=webdings title=""下一页"">4</font>"			'下一
toN10_=" <font face=webdings title=""下十页"">8</font>"			'下十
toL_="<font face=webdings title=""最后一页"">:</font>"			'尾页
 
Dim OM_OP,OM_OP_Sql_Str,obj_OM_OP_Rs,OM_OP_ID,obj_OM_OP_Rs_EofFlag,obj_OM_OP_Up_Rs,OM_OP_IDFlag,ShowList
OM_OP=Request.QueryString("OM_OP")
obj_OM_OP_Rs_EofFlag=False
If OM_OP="" Or Isnull(OM_OP) Then
	OM_OP="OM_ShowList"
End If
OM_OP_ID=Request.QueryString("ID")
If IsNull(OM_OP_ID) or OM_OP_ID="" Then
	OM_OP_IDFlag=True
Else
	OM_OP_IDFlag=False
End If

If OM_OP="S_AddNew" Then
	Dim OM_Temp_Add_Type,OM_Temp_Add_Name,OM_Temp_Add_LinkUrl,OM_Temp_Add_Email,OM_Temp_Add_Explanation,Re_ID,Up_Action
	OM_Temp_Add_Type=Cint(Request.Form("Sel_Type"))
	Up_Action=Request.QueryString("Up_Action")
	OM_Temp_Add_Name=Replace(Replace(Request.Form("Txt_Name"),"<","&lt;"),">","&gt;")
	OM_Temp_Add_LinkUrl=Replace(Replace(Request.Form("Txt_LinkUrl"),"<","&lt;"),">","&gt;")
	OM_Temp_Add_Email=Replace(Replace(Request.Form("Txt_Email"),"<","&lt;"),">","&gt;")
	OM_Temp_Add_Explanation=Replace(Replace(Request.Form("Txt_Explanation"),"<","&lt;"),">","&gt;")

	If Up_Action="Submit" Then
		Conn.execute("Update FS_NS_General Set G_Type="&OM_Temp_Add_Type&",G_Name='"&OM_Temp_Add_Name&"',G_URL='"&OM_Temp_Add_LinkUrl&"',G_Email='"&OM_Temp_Add_Email&"',G_Content='"&OM_Temp_Add_Explanation&"' where GID="&Cint(OM_OP_ID)&"")
		strShowErr = "<li>修改成功</li>"
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
		Response.end
	Else
		Conn.Execute("insert into FS_NS_General(G_Type,G_Name,G_URL,G_Email,G_Content,isLock) values ("&OM_Temp_Add_Type&",'"&OM_Temp_Add_Name&"','"&OM_Temp_Add_LinkUrl&"','"&OM_Temp_Add_Email&"','"&OM_Temp_Add_Explanation&"',0)")	
		strShowErr = "<li>添加成功</li>"
		Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
		Response.end
	End If
End If
If OM_OP="S_DelAll" Then
	Conn.execute("Delete From FS_NS_General")
	strShowErr = "<li>删除成功</li>"
	Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=\admin\news\other_manage.asp?OM_OP=OM_ShowList")
	Response.end
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>常规管理___Powered by foosun Inc.</title>
<link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  <tr class="hback"> 
    <td class="xingmu"><a href="#" onMouseOver="this.T_BGCOLOR='#404040';this.T_FONTCOLOR='#FFFFFF';return escape('<div align=\'center\'>FoosunCMS4.0<br> Code by 邓西 <BR>Copyright (c) 2006 Foosun Inc</div>')" class="sd"><strong>常规管理</strong></a></td>
  </tr>
  <tr> 
      <td width="100%" height="18" class="hback"><div align="left"> <a href="javascript:Sy();">管理首页</a> 
		|<a href="javascript:KeyWord();"> 关键字</a> | <a href="javascript:Source();">来源</a> | 
		<a href="javascript:ZouZe();">作者</a> | <a href="javascript:LinkUrl();">内部链接</a> 
		| 
		<a href="javascript:AddOne();">添加</a> | 
		<a href="javascript:DelAll();">删除全部</a>  </div></td>
  </tr>
</table>

<div align="center">
<%
		Dim OM_OP_Up_Type,OM_OP_Up_Name,OM_OP_Up_Email,OM_OP_Up_Content,OM_OP_Up_Url,Temp_Action
		If OM_OP_IDFlag=False Then
			Set obj_OM_OP_Up_Rs=Conn.Execute("SELECT G_Type,G_Name,G_URL,G_Email,G_Content from FS_NS_General where GID="&Cint(OM_OP_ID)&"")
			If Not obj_OM_OP_Up_Rs.Eof Then
				OM_OP_Up_Type=Cint(obj_OM_OP_Up_Rs("G_Type"))
				OM_OP_Up_Name=obj_OM_OP_Up_Rs("G_Name")
				OM_OP_Up_Url=obj_OM_OP_Up_Rs("G_URL")
				OM_OP_Up_Email=obj_OM_OP_Up_Rs("G_Email")
				OM_OP_Up_Content=obj_OM_OP_Up_Rs("G_Content")
			End If
			Set obj_OM_OP_Up_Rs=Nothing
			Temp_Action="&Up_Action=Submit&ID="&OM_OP_ID
		End If
%>
<table width="98%" border="0" cellpadding="5" cellspacing="1" class="table" id="OM_AddNew" style="display:none">
  <tr class="hback"> 
    <td class="xingmu" colspan="2">添加</td>
  </tr>
 <form name="form_OM_AddNew" id="form_OM_AddNew" method="post" action="other_manage.asp?OM_OP=S_AddNew<%=Temp_Action%>" onSubmit="javascript:return Check_Type();">
  <tr> 
      <td width="290" height="29" class="hback" align="right">类型</td>
      <td width="652" height="29" class="hback">
		<select size="1" name="Sel_Type" onChange="javascript:SelectOpType(this.value);">
		<% If IsNull(OM_OP_ID)=True Or OM_OP_ID="" Then %>
		<option value="0" selected>请选择</option>
		<% End If %>		
		<option value="1" <% If OM_OP_Up_Type=1 Then Response.write "selected" %>>关键字</option>
		<option value="2" <% If OM_OP_Up_Type=2 Then Response.write "selected" %>>来源</option>
		<option value="3" <% If OM_OP_Up_Type=3 Then Response.write "selected" %>>作者</option>
		<option value="4" <% If OM_OP_Up_Type=4 Then Response.write "selected" %>>内部连接</option>
		</select></td>
  </tr>
	<tr id="Tr_Title" style="display:none">
      <td height="28" class="hback" align="right">标题</td>
      <td height="28" class="hback">
		<input type="text" name="Txt_Name" size="50" maxlength="50" value="<%=OM_OP_Up_Name%>">(<font color=red size=2>*</font>)</td>
    </tr>
	<tr id="Tr_Url" style="display:none">
      <td height="-5" class="hback" align="right">链接地址</td>
      <td height="-5" class="hback">
		<input type="text" name="Txt_LinkUrl" size="50" maxlength="50" value="<%=OM_OP_Up_Url%>"></td>
    </tr>   
  <tr id="Tr_Email" style="display:none">
      <td height="-5" class="hback" align="right">电子邮件</td>
      <td height="-5" class="hback">
		<input type="text" name="Txt_Email" size="50" maxlength="50" value="<%=OM_OP_Up_Email%>"></td>
    </tr>
	<tr id="Tr_Explanation" style="display:none"> 
      <td height="-5" class="hback" align="right">说明</td>
      <td height="-5" class="hback">
		<textarea rows="4" name="Txt_Explanation" cols="50" maxlength="200"><%=OM_OP_Up_Content%></textarea></td>
    </tr>
	<tr id="Tr_SubMit" style="display:none">
      <td  height="-5" class="hback" align="center" colspan="2">
		<input type="submit" value=" 提 交 " name="But_AddNew">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="reset" value=" 重 置 " name="But_Clear">(注:(<font color=red size=2>*</font>)为必填)</td>
    </tr>
  </form>
</table>
<table width="98%" border="0" cellpadding="5" cellspacing="1" class="table" id="OM_ShowList" style="display:none">
  <tr class="hback"> 
    <td class="xingmu" width="20%" align="center">标题</td>
    <td class="xingmu" width="8%" align="center">类型</td>
    <td class="xingmu" width="21%" align="center">链接地址</td>
    <td class="xingmu" width="20%" align="center">电子邮件</td>
    <td class="xingmu" width="5%" align="center">状态</td>
    <td class="xingmu" width="26%" align="center">操作</td>
  </tr>
  <form name="form_OM_OP" id="form_OM_OP" method="post" action="other_manage.asp?OM_OP=OM_ShowList&OM_OP_P=P"><input name="Hi_OP_Type" type="hidden" value="">
<%
	If OM_OP="OM_ShowList" Then
		Dim OM_OP_Action,OM_OP_P
		OM_OP_Action=Request.QueryString("Action")
		OM_OP_P=Request.QueryString("OM_OP_P")
		If OM_OP_Action="Lock" Then
			Conn.execute("Update FS_NS_General Set isLock=1 Where GID="&Cint(OM_OP_ID)&"")
		'Response.Write("<script language=javascript>alert('"&Request.QueryString("ShowList")&"')<script>")
		'Response.End()

		End If
		If OM_OP_Action="UnLock" Then
			Conn.execute("Update FS_NS_General Set isLock=0 Where GID="&Cint(OM_OP_ID)&"")
		End If
		'--------------by chen  修改单个删除  ----2/6--------------------
		If OM_OP_Action="DelOne" Then
			Conn.execute("Delete From FS_NS_General Where GID="&Cint(OM_OP_ID)&"")
			strShowErr = "<li>删除成功</li>"
			Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
			Response.end
		End If
			response.Write(OM_OP_P)
			'response.end

		If OM_OP_P="P" Then
			Dim OM_OP_Temp_P_Type,OM_OP_Temp_P_ID,OM_OP_IOM_OP_Temp_P_Flag,OM_OP_IOM_OP_Temp_P_I,i,int_tempID
			OM_OP_Temp_P_Type=Request.Form("hi_OP_Type")
			OM_OP_Temp_P_ID=Request.Form("Che_OPType")
			If OM_OP_Temp_P_ID="" or IsNull(OM_OP_Temp_P_ID) Then
				strShowErr = "<li>请选择要批量操作的内容!</li>"
				Response.Redirect("lib/Error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
				Response.end
			End If
			'int_tempID=Split(OM_OP_Temp_P_ID,",")
'			For i=1 To Ubound(OM_OP_Temp_P_ID)
'				int_tempID=int_tempID&OM_OP_Temp_P_ID(i)
'			Next
			'Response.Write(int_tempID)
			'Response.End()
			Select Case OM_OP_Temp_P_Type
				Case "P_Lock"
					Conn.execute("Update FS_NS_General Set isLock=1 Where GID in("&DelHeadAndEndDot(OM_OP_Temp_P_ID)&")")
					strShowErr = "<li>批量锁定成功</li>"
					Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
					Response.end
				Case "P_UnLock"
					Conn.execute("Update FS_NS_General Set isLock=0 Where GID in("&DelHeadAndEndDot(OM_OP_Temp_P_ID)&")")
					strShowErr = "<li>批量解锁成功</li>"
					Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
					Response.end
				'-----------by  chen 修改批量删除 ---2/6-------------------
				Case "P_Del"
					Conn.execute("Delete From FS_NS_General Where GID in("&DelHeadAndEndDot(OM_OP_Temp_P_ID)&")")
					strShowErr = "<li>批量删除成功</li>"
					Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=\admin\news\other_manage.asp?OM_OP=OM_ShowList")
					Response.end
			End Select
		End If
		ShowList=Request.QueryString("ShowList")
		If ShowList="" or Isnull(ShowList) Then
			OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Order By G_Type"
		Else
			Select Case Cstr(ShowList)
				Case "Keyword"
					OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Where G_Type=1"
				Case "Source"
					OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Where G_Type=2"
				Case "ZouZe"
					OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Where G_Type=3"
				Case "LinkUrl"
					OM_OP_Sql_Str="Select GID,G_Type,G_Name,G_URL,G_Email,isLock from FS_NS_General Where G_Type=4"
			End Select
		End If
		Set obj_OM_OP_Rs=CreateObject(G_FS_RS)
		
		obj_OM_OP_Rs.Open OM_OP_Sql_Str,Conn,1,1			
		
		Dim OM_Temp_Type,OM_Temp_IsLock,OM_Temp_Url,OM_Temp_Email,OM_Temp_Name

		If Not obj_OM_OP_Rs.Eof Then
			obj_OM_OP_Rs_EofFlag=True
			
			obj_OM_OP_Rs.PageSize=int_RPP
			cPageNo=NoSqlHack(Request.QueryString("page"))
			If cPageNo="" Then cPageNo = 1
			If not isnumeric(cPageNo) Then cPageNo = 1
			cPageNo = Clng(cPageNo)
			If cPageNo>obj_OM_OP_Rs.PageCount Then cPageNo=obj_OM_OP_Rs.PageCount 
			If cPageNo<=0 Then cPageNo=1
			obj_OM_OP_Rs.AbsolutePage=cPageNo
			
			For int_Start=1 TO int_RPP  
%>
 	<tr>
<%
				OM_Temp_Name=obj_OM_OP_Rs("G_Name")
				OM_Temp_Type=Cint(obj_OM_OP_Rs("G_Type"))
				Select Case OM_Temp_Type
					Case 1
						OM_Temp_Type="关键字"
					Case 2
						OM_Temp_Type="来源"
					Case 3
						OM_Temp_Type="作者"
					Case 4
						OM_Temp_Type="内部链接"
				End Select
				OM_Temp_IsLock=Cint(obj_OM_OP_Rs("isLock"))
				Select Case OM_Temp_IsLock
					Case 0

⌨️ 快捷键说明

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