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

📄 getarticlelist.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../conn/conn.asp" -->
<!--#include file="../../Inc/Commoncode.asp" -->
<!--#include file="../checkvalid.asp"-->
<%
If Not FRAdminLevel(404) Then
	Call ErrorMsg()
End If
Dim Action
Dim FoundErr,ErrMsg
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Finereason HRCMS 6.0 后台管理系统</title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script language="javascript">
<!--
function fnRemoveBrank(strSource)
{
 return strSource.replace(/^\s*/,'').replace(/\s*$/,'');
}
function String.prototype.lenB()
{
return this.replace(/[^\x00-\xff]/g,"**").length;
}
function Juge(theForm)
{
  if (fnRemoveBrank(theForm.LabelName.value) == "")
  {
    alert("请输入标签名称!");
    theForm.LabelName.focus();
    return (false);
  }
//  if (fnRemoveBrank(theForm.cid.value) == "")
//  {
//    alert("请选择频道!");
//    theForm.cid.focus();
//    return (false);
//  }
//    if (fnRemoveBrank(theForm.tid.value) == "")
//  {
//    alert("请选择栏目!");
//    theForm.tid.focus();
//    return (false);
//  } 
//    var objv = fnRemoveBrank(theForm.imgnum.value);
//	var pattern = /^[0-9]+$/;
//	flag = pattern.test(objv);
//	if(!flag)
//	{
//	alert("图片数量应该为整数数字!");
//	theForm.imgnum.focus();
//	return (false);
//	} 
//    var objv = fnRemoveBrank(theForm.imgw.value);
//	var pattern = /^[0-9]+$/;
//	flag = pattern.test(objv);
//	if(!flag)
//	{
//	alert("图片宽度应该为整数数字!");
//	theForm.imgw.focus();
//	return (false);
//	}  
//  	var objv = fnRemoveBrank(theForm.imgh.value);
//	var pattern = /^[0-9]+$/;
//	flag = pattern.test(objv);
//	if(!flag)
//	{
//	alert("图片高度应该为整数数字!");
//	theForm.imgh.focus();
//	return (false);
//	} 
//    if (fnRemoveBrank(theForm.order.value) == "")
//  {
//    alert("请选择排序方式!");
//    theForm.order.focus();
//    return (false);
//  } 
//	var objv = fnRemoveBrank(theForm.font_left.value);
//	var pattern = /^[0-9]+$/;
//	flag = pattern.test(objv);
//	if(!flag)
//	{
//	alert("标题字数应该为整数数字!");
//	theForm.font_left.focus();
//	return (false);
//	}
   if (fnRemoveBrank(theForm.Labelorder.value) != "")
  {
	var objv = fnRemoveBrank(theForm.Labelorder.value);
	var pattern = /^[0-9]+$/;
	  flag = pattern.test(objv);
	  if(!flag)
	  {
		alert("标签级别要求为数字!请重新输入。");
		theForm.Labelorder.focus();
		return (false);
	   }
   } 
 }
 //-->
</script></head>
<body>
<%
Action=trim(Request("Action"))
select case Action
	Case "Add"
		Call ShowData()
	Case "Modify"
		Call ShowData()
	Case "SaveData"
		Call SaveData()
end select
Sub ShowData()
ChannelID=trim(Request("ChannelID"))
LabelID=trim(request.QueryString("LabelID"))
If LabelID<>"" and IsNumeric(LabelID) Then
	sql="select * from JOB_Label where LabelID=" & LabelID
	set rs=server.CreateObject (FR_HR_RS)
	rs.open sql,conn,1,1
	if not rs.eof then
		LabelName=Rs("LabelName")
		LabelName=Replace(LabelName,"{$FR_","")
		LabelName=Replace(LabelName,"}","")
		LabelType=Rs("LabelType")
		LabelContent=Rs("LabelContent")
		LabelContent=Replace(LabelContent,"{$GetArticleList(","")
		LabelContent=Replace(LabelContent,")}","")
		LabelContents=Split(LabelContent,",")
		LabelIntro=Rs("LabelIntro")
		Labelorder=Rs("Labelorder")
	end if
	rs.Close
	Set rs=Nothing
if ChannelID<>"" then
cid=ChannelID
else
	if LabelContents(0)=chr(34)&"-1"&chr(34) then
	cid="-1"
	else
	cid=LabelContents(0)
	end if
end if
if LabelContents(1)=chr(34)&"-1"&chr(34) then
tid="-1"
else
tid=LabelContents(1)
end if
imgs=LabelContents(2)
num=LabelContents(3)
tjnews=LabelContents(4)
tjhome=LabelContents(5)
homepic=LabelContents(6)
homehot=LabelContents(7)
order=LabelContents(8)
font_left=LabelContents(9)
target=LabelContents(10)
dates=LabelContents(11)
suffix=LabelContents(12)
rows=LabelContents(13)
else
num=20
rows=1
LabelName=""
LabelIntro="请输入标签介绍..."
Labelorder=0
End If
%>
<table width="51%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
  <tr>
    <th colspan="2" align="right"><%if LabelID<>"" then:Response.Write("编辑"&LabelName):else:Response.Write("添加文章列表"):end if%>标签</th>
  </tr>
  <form action="?Action=SaveData&LabelID=<%=LabelID%>" method="post" name="labelform" onSubmit="return Juge(this)">
  <tr>
    <td align="right">标签名称:</td>
    <td>{$FR_<input name="LabelName" type="text" size="15" value="<%=LabelName%>" <%if LabelID<>"" and LabelType=<5 then Response.Write("readonly")%> />
      }请输入中文汉字作为标签名称</td>
  </tr>
  <tr>
    <td width="22%" align="right">所属频道:</td>
    <td width="78%"><select name="cid" onChange="javascript:window.location='GetArticleList.asp?Action=<%=Action%>&LabelID=<%=LabelID%>&ChannelID='+this.options[this.selectedIndex].value;">
      <option value="-1" <%if cid="-1" then Response.Write("selected") %>>当前频道</option>
      <option value="0" <%if cid="0" then Response.Write("selected") %>>全部频道</option>
      <%sql="select * from JOB_Channel where ModuleType=10"
			set rsw=conn.execute(sql)
			if not rsw.eof then
			do while not rsw.eof%>
      <option value="<%=rsw("ChannelID")%>" <%if cid=trim(rsw("ChannelID")) then Response.Write("selected") %>><%=rsw("ChannelName")%></option>
      <%rsw.movenext
			loop
			end if
			rsw.close
			set rsw=nothing%>
    </select></td>
  </tr>
  <tr>
    <td align="right">所属栏目:</td>
    <td><label>
      <select name="tid">
        <option value="">请选择栏目</option>
		<option value="-1" <%if tid="-1" then Response.Write("selected") %>>当前栏目</option>
        <option value="0" <%if tid="0" then Response.Write("selected") %>>所有栏目</option>
        <%
		if cid<>"-1" and cid<>"0" and cid<>"" then
		set rsw=conn.execute("select * from job_hrnewsType where type_fid="&cid&"")
		do while not rsw.eof%>
        <option value="<%=rsw("typeid")%>" <%if tid=trim(rsw("typeid")) then Response.Write("selected") %>><%=rsw("type")%></option>
        <%rsw.movenext
loop
rsw.close
set rsw=nothing
end if
%>
      </select>
    </label></td>
  </tr>
  <tr>
    <td align="right">标题图标:</td>
    <td><input name="imgs" type="checkbox" class="checkbox" value="1" <%if imgs=1 then Response.Write("checked")%>>
显示</td>
  </tr>
  <tr>
    <td align="right">显示数量:</td>
    <td><input name="num" type="text" size="4" value="<%=num%>"></td>
  </tr>
  <tr>
    <td align="right">文章属性:</td>
    <td><input name="tjnews" type="checkbox" class="checkbox" id="tjnews" value="1" <%if tjnews=1 then Response.Write("checked")%>>
      小类推荐&nbsp;
      <input name="tjhome" type="checkbox" class="checkbox" id="tjhome" value="1" <%if tjhome=1 then Response.Write("checked")%>>
      首页推荐&nbsp;
      <input name="homepic" type="checkbox" class="checkbox" id="homepic" value="1" <%if homepic=1 then Response.Write("checked")%>>
      首页推荐(图)&nbsp;
      <input name="homehot" type="checkbox" class="checkbox" id="homehot" value="1" <%if homehot=1 then Response.Write("checked")%> >
      频道头条(图)</td>
  </tr>
  <tr>
    <td align="right">标题字数:</td>
    <td><input name="font_left" type="text" size="4" value="<%=font_left%>"></td>
  </tr>
  <tr>
    <td align="right">是否显示时间:</td>
    <td><select name="dates">
	<option value="0" <%if dates=0 then Response.Write("selected")%>>不显示时间</option>
      <option value="1" <%if dates=1 then Response.Write("selected")%>>某年某月某日</option>
      <option value="2" <%if dates=2 then Response.Write("selected")%>>年/月/日</option>
      <option value="3" <%if dates=3 then Response.Write("selected")%>>月/日</option>
      <option value="4" <%if dates=4 then Response.Write("selected")%>>年\月\日</option>
      <option value="8" <%if dates=8 then Response.Write("selected")%>>年-月-日</option>
	  <option value="9" <%if dates=9 then Response.Write("selected")%>>月-日</option>
    </select></td>
  </tr>
  
  <tr>
    <td align="right">是否显示省略号:</td>
    <td><input name="suffix" type="checkbox" class="checkbox" value="1" <%if suffix=1 then Response.Write("checked")%>>
      显示“...”</td>
  </tr>
  <tr>
    <td align="right">显示列数:</td>
    <td><input name="rows" type="text" size="4" value="<%=rows%>">
      列</td>
  </tr>
  <tr>
    <td align="right">排序方式:</td>
    <td><select name="order">
      <option value="newsid desc" <%if order="newsid desc" then Response.Write("selected")%>>按ID正序排列</option>
      <option value="newsid asc" <%if order="newsid asc" then Response.Write("selected")%>>按ID反序排列</option>
      <option value="hits desc" <%if order="hits desc" then Response.Write("selected")%>>按点击次数</option>
      <option value="Dateandtime desc" <%if order="Dateandtime desc" then Response.Write("selected")%>>按时间正序排列</option>
      <option value="Dateandtime asc" <%if order="Dateandtime asc" then Response.Write("selected")%>>按时间反序排列</option>
    </select></td>
  </tr>
  <tr>
    <td align="right">打开方式:</td>
    <td><select name="target">
      <option value="_blank" <%if target="_blank" then Response.Write("selected")%>>新窗口打开</option>
      <option value="_self" <%if target="_self" then Response.Write("selected")%>>原窗口打开</option>
    </select></td>
  </tr>
  <tr>
    <td align="right">标签介绍:</td>
    <td><label>
      <textarea name="LabelIntro" cols="60" rows="4"><%=LabelIntro%></textarea>
    </label></td>
  </tr>
  <tr>
    <td align="right">标签级别:</td>
    <td><input name="Labelorder" type="text" size="4" value="<%=Labelorder%>">
      级别较高标签将被优先转换</td>
  </tr>
  <tr>
    <td colspan="2" align="center"><label>
      <input name="Submit" type="submit" class="inputs" value="保 存">
         
      <input name="Submit2" type="reset" class="inputs" value="重 置"> 
       <input name="Submit3" type="button" class="inputs" value="取  消" onClick="window.close();">
    </label></td>
  </tr>
  </form>
</table>
<%End Sub%>
</body>
</html>
<%Sub SaveData()
	LabelID=trim(request.QueryString("LabelID"))
	LabelName=Trim(Request.Form("LabelName"))
	LabelName=Replace(LabelName,LabelName,"{$FR_"&LabelName&"}")
	cid=Trim(Request.Form("cid"))
	if cid="-1" then
		cid=chr(34)&cid&chr(34)
	end if
	tid=Trim(Request.Form("tid"))
	if tid="-1" then
		tid=chr(34)&tid&chr(34)
	end if
	imgs=Trim(Request.Form("imgs"))
	if imgs="" then
	imgs=0
	end if
	num=Trim(Request.Form("num"))
	if num="" then
	num=10
	end if
	tjnews=Trim(Request.Form("tjnews"))
	if tjnews="" then
	tjnews=0
	end if
	tjhome=Trim(Request.Form("tjhome"))
	if tjhome="" then
	tjhome=0
	end if
	homepic=Trim(Request.Form("homepic"))
	if homepic="" then
	homepic=0
	end if
	homehot=Trim(Request.Form("homehot"))
	if homehot="" then
	homehot=0
	end if
	order=Trim(Request.Form("order"))
	font_left=Trim(Request.Form("font_left"))
	target=Trim(Request.Form("target"))
	dates=Trim(Request.Form("dates"))
	if dates="" then
	dates=9
	end if
	suffix=Trim(Request.Form("suffix"))
	if suffix="" then
	suffix=0
	end if
	rows=Trim(Request.Form("rows"))
	if rows="" then
	rows=2
	end if
	LabelContent="{$GetArticleList("&cid&","&tid&","&imgs&","&num&","&tjnews&","&tjhome&","&homepic&","&homehot&","&order&","&font_left&","&target&","&dates&","&suffix&","&rows&")}"
	LabelIntro=Trim(Request.Form("LabelIntro"))
	Labelorder=Trim(Request.Form("Labelorder"))
	If LabelName="" Then
		Response.Write ("<script language=JavaScript>{alert('请输入标签名称!');history.back();}</script>")
		Response.End 
	End If
	If Labelorder="" then
		Labelorder=0
	end if

	set rs=Server.CreateObject(FR_HR_RS)
	if LabelID<>"" and IsNumeric(LabelID) then
	sql="select * from JOB_Label where LabelID=" & LabelID
	else
	sql="select * from JOB_Label"
	end if
	rs.open sql,conn,1,3
	if LabelID="" then
	rs.AddNew
	rs("LabelType")=6
	rs("Labeladddate")=now()
	end if
	rs("LabelName")=LabelName
	rs("LabelContent")=LabelContent
	rs("LabelIntro")=LabelIntro
	rs("Labelorder")=Labelorder
	rs("Labeleditdate")=now()
	rs.update
	rs.close
	set rs=nothing
	Response.Write ("<script language=JavaScript>{alert('操作成功!');window.opener.location.reload();window.close();}</script>")
	Response.End
end sub
%>

⌨️ 快捷键说明

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