?? index.asp
字號:
<%@ codepage ="936" %>
<%
if Request.Cookies("globalec")("globalecmaster")="" or Request.Cookies("globalec")("masterflag")="" then
response.write "<script language='javascript'>"
response.write"this.location.href='../login.asp';</SCRIPT>"
response.end
end if
if instr(Request.Cookies("globalec")("masterflag"),"71")=0 then
response.redirect "../err.asp"
response.end
end if
%>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../css/style.css" rel=stylesheet type=text/css>
<SCRIPT language=javascript1.2 src="../css/iXs_Main.js"></SCRIPT>
<script>
var checkflag="false";
function check(field){
if(checkflag=="false"){
for(i=0;i<field.length;i++){
field[i].checked=true;}
checkflag="true";
return "解除全選"; }
else {
for(i=0;i<field.length;i++) {
field[i].checked=false;}
checkflag="false";
return "選擇全部";}}
</script>
<title>幫助信息管理</title>
<%
if not isempty(request("selAnnounce")) then
newsidlist=request("selAnnounce")
if instr(newsidlist,",")>0 then
dim newsidarr
newsidArr=split(newsidlist)
dim log_newsid
for i = 0 to ubound(newsidarr)
log_newsid=clng(newsidarr(i))
call deleteannounce(log_newsid)
next
else
call deleteannounce(clng(newsidlist))
end if
end if
keywords=replace_text(request("keywords"))
if request("typeid")>"" then
if Chkrequest(request("typeid")) then
typeid=request("typeid")
else
Response.Redirect ("/login/chklogin.asp?login=4")
end if
end if
set rs=server.createobject("adodb.recordset")
sql="select * from news"
if typeid>"" then sql=sql&" where typeid="&typeid&""
if keywords>"" then sql=sql&" and title like '%"&keywords&"%'"
sql=sql&" order by newsid desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
msg_per_page=20 '定義每頁顯示記錄條數
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align=center class="tableBorder">
<tr>
<th height=25 colspan="2" class="tableHeaderText">商業信息管理 </th>
</tr>
<tr>
<td colspan="2" class="forumRowHighlight"><p><B>注意</B>:<BR>
①類別直接與發布的信息相關聯,刪除類別可能會影響到以前發布的專項商機信息。<BR> </td>
</tr>
<tr>
<td width="10%" height=25 class="forumRowHighlight"> <B>操作選項</B></td>
<FORM name=searchForm action="index.asp" method=post onsubmit="javascript:if(doSearch()==false) return false;"><td class="forumRowHighlight">
關鍵字:<input name="keywords" type="text" value="<%=keywords%>">
所屬類別:
<select name="typeid" size="1">
<%
set rs1=conn.execute("select * from newsType")
do while not rs1.eof
response.write "<option value='"&rs1("typeid")&"'>"&rs1("type")&" 類信息</option>"&chr(13)+chr(10)
rs1.movenext
loop
rs1.close
%>
</select> <input type="submit" value="立刻查找" id=submit name=submit>
</td></form>
</tr>
<tr>
<td height=25 class="forumRowHighlight"> </td>
<td class="forumRowHighlight"><a href="index.asp">管理商業信息</a> | <a href="addinfo.asp">添加商業信息</a> | <a href="type.asp">管理信息類別</a> | <a href="Class_Ok.asp?action=add_class_1">添加信息類別</a> | [<a href="javascript:location.reload()">刷新頁面</a>] </td>
</tr>
</table>
<SCRIPT LANGUAGE='JavaScript' SRC='/js/search.js' TYPE='text/javascript'></script>
<!--#include file="../../inc/headpage.asp"-->
<Form name="search" method="POST" action="index.asp">
<table wnewsidth="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
<tr>
<th class="tableHeaderText" height=25 colspan="5">商業資訊信息列表</th>
<tr>
<td colspan="5">
<%
if rs.eof then
response.Write"<br><br><div align='center'>暫無數據信息</div><br><br>"
else
%>
</td>
</tr>
<tr height=25 class=bodytitle>
<td width="60%" align="left" class=bodytitle wnewsidth="446"><font color="ff6600"><b>信息標題</b></font></td>
<td width="12%" align="center" class=bodytitle wnewsidth="263"><font color="ff6600"><b>所屬類別</b></font></td>
<td width="14%" align="center" class=bodytitle wnewsidth="113"><font color="ff6600"><b>發布日期</b></font></td>
<td width="7%" align="center" class=bodytitle wnewsidth="62"><font color="ff6600"><b>修改</b></font></td>
<td width="7%" align="center" class=bodytitle wnewsidth="57"><input name="submit2" type='submit' value='刪除'></td>
</tr>
<%
do while not rs.eof and rowcount > 0%>
<tr height="20">
<td align="left" class=forumRow> <a href="edit.asp?newsid=<%=rs("newsid")%>" target="_blank"><%=replace(rs("title"),keywords,"<font color=red>"&keywords&"</font>")%></a> <%if rs("tjnews")=1 or rs("tjhome")=1 or rs("homepic")=1 or rs("homehot")=1 then%><img src="../images/thanx.gif" alt="此條信息已設置推薦,點擊修改可重新設置推薦屬性!" width="19" height="19" align="absmiddle"><%end if%> <%if rs("picture")<>"nopicture.gif" then%><img src="../images/haveimg.gif" alt="此條信息為圖片標題:<br><img src=/UploadFile/<%=rs("picture")%> border=1 width=220 height=150>" width="12" height="12" border="0">
<%end if%></td>
<td class=forumRow align="center">
<%
set rs5=conn.execute("select typeid,type from newstype where typeid="&rs("typeid")&"")
response.write"<a href='index.asp?typeid="&rs5("typeid")&"'>"&rs5("type")&" 類</a>"
%></td>
<td wnewsidth="113" align="center" class=forumRow><%=FormatDate(rs("dateandtime"),2)%> </td>
<td align="center" class=forumRow><a href="edit.asp?newsid=<%=rs("newsid")%>">修改</a></td>
<td wnewsidth="57" align="center" class=forumRow><input type='checkbox' name='selAnnounce' value='<%=cstr(rs("newsid"))%>'></td>
</tr>
<%
icolor=icolor+1
if icolor>1 then icolor=0
rowcount=rowcount-1
rs.movenext
loop
end if
%>
<tr height="20" bgcolor="#ffffff">
<td colspan="5" align="left" class=forumRow><div align="right">
<input name="button" type=button onClick="this.value=check(this.form)" value=" 全部選定 ">
</div></td>
</tr>
<tr height="20" bgcolor="#ffffff">
<td class=forumrowHighLight align="center" colspan="5"><b><%=listPages("index.asp?typeid="&typeid&"&keywords="&keywords&"")%></b></td>
</tr>
</table>
</form>
<%
sub deleteannounce(newsid)
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="delete from [news] where newsid="&cstr(newsid)
conn.execute sql
if err.Number<>0 then
err.clear
response.write "刪 除 失 敗 !<br>"
end if
End sub
%>
<!--#include file="../copy.asp" -->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -