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

📄 index.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../Inc/Commoncode.asp" -->
<!--#include file="../inc/CommonFunction.asp"-->
<%Dim Action
if Request.Form("stype")<>"" then
Response.Cookies(FRHRCMS)("stype")=trim(Request.Form("stype"))
else
Response.Cookies(FRHRCMS)("stype")=""
end if
if Request.Form("keyword")<>"" then
Response.Cookies(FRHRCMS)("keyword")=trim(Request.Form("keyword"))
else
Response.Cookies(FRHRCMS)("keyword")=""
end if
Action=trim(Request("Action"))
Select Case Action
	Case "Add"
		Call SaveData()
	Case Else
		Call main()
End Select
Sub main()
Cid=6
Response.Cookies(FRHRCMS)("ChannelID") = Cid
'读取频道名称
set rs=conn.execute("select * from JOB_Channel where ChannelID="&Cid&"")
if not rs.eof then
ChannelName=rs("ChannelName")
ChannelID=rs("ChannelId")
else
Response.Write("频道ID出错!")
Response.end()
end if
set rs=nothing
'读取模版内容
set rs=conn.execute("select * from JOB_Template where ChannelID="&ChannelID&" and IsDefault="&FR_HR_True&" and IsDefaultInProject="&FR_HR_True&" and typeid=1")
if not rs.eof then
TemplateContent=rs("TemplateContent")
else
Response.Write("读取模板出错!")
Response.end()
end if
rs.close
set rs=nothing
html=TemplateContent
'读取分页
if request("page")<>"" then
	if cint(request("page"))<1 then
	Response.Cookies(FRHRCMS)("Page")=1
	else
	Response.Cookies(FRHRCMS)("Page")=cint(request("page"))
	end if
else        
	Response.Cookies(FRHRCMS)("Page")=1        
end if
%>
<%if GuestBook_EnableVisitor = True or session(FRHRCMS&"user_login")<>"" then
	if session(FRHRCMS&"user_login")<>"" then
	set rst=conn.Execute("select * from JOB_member where Member_login='"&session(""&FRHRCMS&"user_login")&"'")
	memberlogin=session(FRHRCMS&"user_login")
	memberemail=rst("Member_email")
	rst.close
	set rst=nothing
	else
	memberlogin="匿名"
	end if
GBook="<table width='100%' border='0' cellpadding='2' cellspacing='1' bgcolor='#F5F5F5' class='mcomlefttab'><form name='guestbook' action='"&InstallDir&"guestbook/index.asp?Action=Add' method='post' onSubmit='return Juge(this)'>"& vbCrLf
GBook=GBook&"<tr>"& vbCrLf
GBook=GBook&"<td width='11%' align='center' valign='middle' bgcolor='#FFFFFF'>用户名/呢称</td>"& vbCrLf
GBook=GBook&"<td width='89%' valign='top' bgcolor='#FFFFFF'><input name='username' type='text' id='username' value='"&memberlogin&"' size='20'"
	if session(FRHRCMS&"user_login")<>"" then
	GBook=GBook&" 'disabled' />"& vbCrLf
	else
	GBook=GBook&" />"& vbCrLf
	end if
GBook=GBook&"<input type=hidden name=ismember value='' />"& vbCrLf
GBook=GBook&"<a href='../Register.asp'>注册</a>/<a href='../index.asp'>登陆</a> </td>"& vbCrLf
GBook=GBook&"</tr>"& vbCrLf
GBook=GBook&"<tr>"& vbCrLf
GBook=GBook&"<td align=center valign=middle bgcolor=#FFFFFF>邮箱地址</td>"& vbCrLf
GBook=GBook&"<td valign=top bgcolor=#FFFFFF><input name=email type=text id=email value='"&memberemail&"' size=20 />"& vbCrLf
GBook=GBook&"请正确填写您常用的邮箱地址<input name=emailok type=checkbox id=emailok value=1 checked=checked />"& vbCrLf
GBook=GBook&"选择 管理员回复后将发邮件通知您</td>"& vbCrLf
GBook=GBook&"</tr>"& vbCrLf
GBook=GBook&"<tr>"& vbCrLf
GBook=GBook&"<td align=center valign=middle bgcolor=#FFFFFF>留言主题</td>"& vbCrLf
GBook=GBook&"<td valign=top bgcolor=#FFFFFF><input name=title type=text id=title size=40 /></td>"& vbCrLf
GBook=GBook&"</tr>"& vbCrLf
GBook=GBook&"<tr>"& vbCrLf
GBook=GBook&"<td align=center valign=middle bgcolor=#FFFFFF>留言内容</td>"& vbCrLf
GBook=GBook&"<td valign=top bgcolor=#FFFFFF><textarea name=Content cols=80 rows=8 id=Content></textarea></td>"& vbCrLf
GBook=GBook&"</tr>"& vbCrLf
GBook=GBook&"<tr>"& vbCrLf
GBook=GBook&"<td align=center valign=middle bgcolor=#FFFFFF>&nbsp;</td>"& vbCrLf
GBook=GBook&"<td valign=top bgcolor=#FFFFFF>"& vbCrLf
GBook=GBook&"<input name=Submit type=submit class=inputs value='我写好了' />"& vbCrLf
GBook=GBook&"<input name=Submit type=reset class=inputs value='重置' />"& vbCrLf
GBook=GBook&"</td>"& vbCrLf
GBook=GBook&"</tr></form>"& vbCrLf
GBook=GBook&"</table>"& vbCrLf
else
GBook=GBook&"暂未开启游客留言功能,请<a href='../Register.asp'>注册</a>/<a href='../index.asp'>登陆</a>后留言!"& vbCrLf
end if
html=ReplaceLableFlag(ReplaceAllLabel(html))
html=Replace(html,"{$FR_留言列表}",""&GuestBookList(Cid,20)&"")
html=Replace(html,"{$FR_频道地址}",FormatLink(0,ChannelId,0,0,0))
html=Replace(html,"{$FR_频道名称}",ChannelName)
html=Replace(html,"{$FR_频道编号}",Cid)
html=Replace(html,"{$FR_本站公告}",""&Announcehtml(Cid,0)&"")
html=Replace(html,"{$FR_签写留言}",GBook)
Response.Write(CreateHTMLReplace(html))

End Sub
Sub SaveData()
	Titles=Trim(Request.Form("Title"))
	Content=Trim(Request.Form("Content"))
	username=Trim(Request.Form("username"))
	email=Trim(Request.Form("email"))
	emailok=Request.Form("emailok")
	if emailok<>1 then
		emailok=0
	end if
	If Titles="" Then
		Response.Write ("<script language=JavaScript>{alert('请输入留言主题!');history.back();}</script>")
		Response.End 
	End If
	If Content="" Then
		Response.Write ("<script language=JavaScript>{alert('请输入留言内容!');history.back();}</script>")
		Response.End
	Else
	End If

	set rs=Server.CreateObject(FR_HR_RS)
	sql="select * from JOB_GuestBook"
	rs.open sql,conn,1,3
	rs.AddNew
	rs("Title")=Titles
	rs("Content")=Content
	rs("username")=username
	rs("UserEmail")=email
	rs("AddTime")=now()
	rs("pass")=0
	rs("hfemail")=emailok
	rs("ismember")=0
	rs.update
	rs.close
	set rs=nothing
    response.redirect InstallDir&"guestbook/index.asp"
	response.End()
end sub
Function GuestBookList(Cid,PerPageNumber)
Dim NewsRS, NewsSql, totalPut, Page
Set NewsRS = Server.CreateObject(FR_HR_RS)
NewsSql="select * from JOB_GuestBook where pass=1"
stype=Request.Cookies(FRHRCMS)("stype")
keyword=Request.Cookies(FRHRCMS)("keyword")
If stype<>"" Then
	if stype="stitle" then
	NewsSql=NewsSql&" and title like '%"&keyword&"%'"
	else
	NewsSql=NewsSql&" and Content like '%"&keyword&"%'"
	end if
end if
NewsSql=NewsSql&" order by id desc"
NewsRS.open NewsSql,conn,1,1
	if NewsRS.eof and NewsRS.bof then
	html="暂无任何留言!"
	else
	totalPut=NewsRS.recordcount
	'读取页数
	Page=Request.Cookies(FRHRCMS)("Page")
		if Page<>1 then
		NewsRS.move (Page-1)*PerPageNumber
		end if
	html="<table width='100%' border=0 cellpadding=2 cellspacing=1 bgcolor=#F5F5F5 class='mcomlefttab'>"
	i=0
	do while not NewsRS.eof
	i=i+1
	id=NewsRS("id")
	Titles=NewsRS("Title")
	if stype="stitle" and keyword<>"" then
	Titles=Replace(Titles,keyword,"<font color=#FF0000>"&keyword&"</font>")
	end if
	Content=NewsRS("Content")
	if stype<>"stitle" and keyword<>"" then
	Content=Replace(Content,keyword,"<font color=#FF0000>"&keyword&"</font>")
	end if
	username=NewsRS("username")
	dateandtime=NewsRS("AddTime")
	reContent=NewsRS("reContent")
		if isnull(reContent) then
		reContent="尚未回复!"
		end if
	html=html&"<tr>"
	html=html&"<td colspan=2 bgcolor=#F0F7FF>留言主题:"&Titles&"</td>"
	html=html&"<td width=15% bgcolor=#F0F7FF>留言人:"&username&"</td>"
	html=html&"<td width=17% bgcolor=#F0F7FF>"&dateandtime&"</td>"
	html=html&" </tr>"
	html=html&"<tr>"
	html=html&"<td width=7% align=center valign=middle bgcolor=#FFFFFF>内容</td>"
	html=html&"<td colspan=3 valign=top bgcolor=#FFFFFF>"&Content&"<br />            <span class=STYLE1>回复:</span>"&reContent&"</td>"
	html=html&"</tr>"
		if i>=Cint(PerPageNumber) then exit do
	NewsRS.movenext
	loop
	html=html&"<tr>"
	html=html&"<td colspan=4 align=center valign=middle bgcolor=#FFFFFF>"
		If totalput>0 Then
		html=html&Htmlpages(Cid,0,totalPut,PerPageNumber,true,"条留言",Page)
		End If
	html=html&"</td>"
	html=html&"</tr>" 
	html=html&"</table>"
	end if
NewsRS.close
set NewsRS=nothing
GuestBookList=html
End Function

Conn.Close:Set Conn=Nothing
%>

⌨️ 快捷键说明

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