📄 ks.supply.asp
字号:
End IF
RS.Close
.Write ("</td></tr>")
If ID<>"0" Then
Dim ParentID
RS.Open "Select ID FroM KS_Class Where ChannelID=8 And TJ=3 And Tn='" & ID & "' order by id asc",Conn,1,1
If Not RS.Eof Then
ParentID= ID
End IF
RS.Close
RS.Open "Select ID,FolderName From KS_Class Where ChannelID=8 And Tj=3 And TN='" & ParentID & "'order by id asc",conn,1,1
If Not RS.Eof Then
I=0
.Write ("<tr class='tdbg'><td height='25'> 子类导航:")
Do While Not RS.Eof
I=I+1
.Write "<img src=""Images/Folder/domain.gif"" align=absmiddle><a href='#' onclick='OpenTheFolder(""" & RS("ID") & """);'>" & KS.GotTopic(RS(1),8) & "</a> "
If I Mod 8=0 Then .Write "<br>"
RS.MoveNext
Loop
.write ("</td></tr>")
End If
RS.Close
End If
.Write ("</table>")
.write "<table width=""99%"" align='center' style='margin-top:5px' border=""0"" cellpadding=""2"" cellspacing=""1"" class=""border"">"
%>
<form name='form3' method='Post' action='KS.Supply.asp?ID=<%=id%>&keyword='><tr class='tdbg'> <td width='70' height='30' ><strong>查看选项:</strong></td><td><input name='Verific' value="" type='radio' onclick='submit();' <%if KS.G("Verific")="" Then Response.Write " Checked"%>>所有信息 <input name='Verific' type='radio' onclick='submit();' value='0'<%if KS.G("Verific")="0" Then Response.Write " Checked"%>>待审核的信息 <input name='Verific' type='radio' onclick='submit();' value='1'<%if KS.G("Verific")="1" Then Response.Write " Checked"%>>已审核的信息 <input name='IsTop' type='checkbox' onclick='submit()' value='1'<%if KS.G("IsTop")="1" Then Response.Write " Checked"%>> 固顶信息 <input name='Recommend' type='checkbox' onclick='submit()' value='1'<%If KS.G("Recommend")="1" Then Response.Write " Checked"%>> 推荐信息 </td><td><select OnChange="location.href='?id='+this.value;parent.frames['BottomFrame'].location.href='Split.asp?ButtonSymbol=Disabled&FolderID='+this.value;" style='width:150px' name='id'><option value=''>快速跳转至...</option><%=Replace(KS.LoadSelectClass(8),"{ClassID=" & ID & "}","selected")%></select></td></tr></form>
<%
Dim OpStr:OpStr=GetFolderName(ID)
If OpStr="" Then OpStr="所有信息"
If KeyWord="" Then
.Write "<tr class='tdbg'><td colspan=3> 当前位置:" & OpStr & " >> 信息列表</td></tr>"
Else
.Write "<tr class='tdbg'><td colspan=3> 当前位置:" & OpStr & " >> 搜索结果</td></tr>"
End If
.Write "</table>"
Dim Param:Param = " Where DelTF=0"
If KeyWord <> "" Then
Select Case SearchType
Case 0
Param = Param & " And (Title like '%" & KeyWord & "%')"
Case 1
Param = Param & " And GQContent like '%" & KeyWord & "%'"
Case 2
Param = Param & " And UserName like'%" & KeyWord & "%'"
End Select
If StartDate <> "" And EndDate <> "" Then
If CInt(DataBaseType) = 1 Then 'Sql
Param = Param & " And (AddDate>= '" & StartDate & "' And AddDate<= '" & DateAdd("d", 1, EndDate) & "')"
Else 'Access
Param = Param & " And (AddDate>=#" & StartDate & "# And AddDate<=#" & DateAdd("d", 1, EndDate) & "#)"
End If
End If
Else
If ID<>0 Then
Param = Param & " And Tid in (" & KS.GetFolderTid(ID) & ")"
End If
End If
If KS.G("Verific")<>"" Then Param = Param & " And Verific=" & KS.ChkClng(KS.G("Verific"))
If KS.G("IsTop")="1" Then Param = Param & " And IsTop=1"
If KS.G("Recommend")="1" Then Param = Param & " And Recommend=1"
GQDQl ="Select OrderID,GQID,Tid,Title,PhotoUrl,UserName,AddDate,Verific,Recommend,ID,IsTop,TypeID From KS_GQ" & Param & " Order BY adddate Desc"
.Write ("<table width=""99%"" align=center style='margin-top:2px' border=""0"" cellpadding=""2"" cellspacing=""1"" class=""border"">")
.Write ("<form action=""KS.Supply.Asp"" name=""myform"" method=""get"">")
.Write ("<tr align=""center"" class=""title""><td width='30'>选中</td><td width=60> 类 型 </td><td height=23 width=270>名 称</td><td width=100>信息发布</td><td width=150>修改日期</td><td width=60> 审 核 </td><td width=50> 属 性 </td><td width=190> 操 作 </td></tr>")
Set RS = Server.CreateObject("AdoDb.RecordSet")
RS.Open GQDQl, conn, 1, 1
If RS.EOF And RS.BOF Then
If KS.G("Verific")="0" Then
.Write ("<tr class='tdbg'><td height='50' colspan=8 align=center>没有<font color=red>未审核</font>的任何信息!</td></tr>")
Else
.Write ("<tr class='tdbg'><td height='50' colspan=8 align=center>此类别及其子类别中没有任何信息!</td></tr>")
End iF
Else
totalPut = Conn.Execute("Select Count(ID) From KS_GQ" & Param)(0)
If CurrentPage < 1 Then CurrentPage = 1
If (CurrentPage - 1) * MaxPerPage > totalPut Then
If (totalPut Mod MaxPerPage) = 0 Then
CurrentPage = totalPut \ MaxPerPage
Else
CurrentPage = totalPut \ MaxPerPage + 1
End If
End If
If CurrentPage = 1 Then
Call showContent()
Else
If (CurrentPage - 1) * MaxPerPage < totalPut Then
RS.Move (CurrentPage - 1) * MaxPerPage
Call showContent()
Else
CurrentPage = 1
Call showContent()
End If
End If
End If
.Write ("<table width='99%' align=center border='0' cellpadding='0' cellspacing='0'><br>说明:</b>属性中的各项含义:<font color=""red"">固</font>---固顶信息,<font color=""green"">荐</font>---推荐信息 </td></tr></form></table>")
.Write ("</body>")
.Write ("</html>")
End With
Set RS = Nothing:Set conn = Nothing
End Sub
'详细列表显示
Sub showContent()
Dim VeriStr,I,GQID
With Response
Do While Not RS.EOF
GQID = RS(1)
FolderName = RS(3)
ShortName = KS.GotTopic(FolderName, 28)
CreaterStr = RS(5)
CreateDateStr = RS(6)
TypeStr = "供求"
AttributeStr = ""
If RS(8) = 1 Or RS(10) = 1 Then
If RS(8) = 1 Then AttributeStr = AttributeStr & (" <span title=""推荐信息"" style=""cursor:default""><font color=""green"">荐</font></span> ")
If RS(10) = 1 Then AttributeStr = AttributeStr & ("<span title=""固顶信息"" style=""cursor:default""><font color=""red"">固</font></span> ")
Else
AttributeStr = "正常"
End If
.Write ("<tr class='tdbg' onMouseOver=""this.className='tdbgmouseover'"" onMouseOut=""this.className='tdbg'"">")
TitleStr = " TITLE='名 称:" & FolderName & " 日 期:" & CreateDateStr & " 录 入:" & CreaterStr & "'"
.Write ("<td align='center'><input type='checkbox' name='GQID' value='" & GQID & "' id='GQID'></td>")
.Write ("<td align=""center"">" & KS.GetGQTypeName(RS(11)) & "</td>")
.Write ("<td height=20><img src=Images/Folder/TheSmallWordNews1.gif border=0 align=absmiddle>[" & KS.C_C(RS(2),"1")&"] <a href='#' OnClick=""ViewGQ('" &RS(9) &"');""" & TitleStr & ">")
.Write ("" & ShortName & "</a></td>")
.Write ("<td align=""center""> " & CreaterStr & "</td>")
.Write ("<td align=""center"">" & CreateDateStr & "</td>")
If RS(7)=1 Then
.Write ("<td align=""center"">已审</td>")
Else
.Write ("<td align=""center""><font color=red>未审</font></td>")
End If
.Write ("<td align=""center"">" & AttributeStr & "</td>")
.Write ("<td align=""center""><a href='KS.AddSupply.asp?Action=Edit&ID=" & RS(9) & "'>改</a> <a href=""?Action=DelInfo&Page=" & Page & "&" & SearchParam & "&GQID=" & GQID & """ onclick=""return (confirm('确定删除该条信息吗?'))"">删</a> ")
If RS(7) = 1 Then
.Write ("<a href='?Action=Manage&Flag=Verific&V=0&GQID=" & GQID & "' title='取消审核'>取审</a> ")
Else
.Write ("<a href='?Action=Manage&Flag=Verific&V=1&GQID=" & GQID & "' title='审核信息'><font color=""red"">审核</font></a> ")
End If
If RS(10) = 1 Then
.Write ("<a href='?Action=Manage&Flag=IsTop&GQID=" & GQID & "' title='解除固顶'><font color=""red"">解固</font></a> ")
Else
.Write ("<a href='?Action=Manage&Flag=IsTop&GQID=" & GQID & "' title='设为固顶'>固顶</a> ")
End If
If RS(8) = 1 Then
.Write ("<a href='?Action=Manage&Flag=Recommend&GQID=" & GQID & "' title='取消推荐'><font color=""green"">取推</font></a>")
Else
.Write ("<a href='?Action=Manage&Flag=Recommend&GQID=" & GQID & "' title='设为推荐'>推荐</a>")
End If
.Write ("</td></tr>")
I = I + 1
RS.MoveNext
If I >= MaxPerPage Then Exit Do
Loop
.Write ("<tr> ")
.Write ("<td colspan=""8"" class='tdbg' align=""right""> ")
'显示分页信息
Call KS.ShowPageParamter(totalPut, MaxPerPage, "KS.Supply.asp", True, "条信息", CurrentPage, "ID=" & ID & "&Verific=" & KS.G("Verific") & "&IsTop=" & KS.G("IsTop")&"&Recommend=" & KS.G("Recommend") & "&" & SearchParam)
.Write ("</td>")
.Write ("</tr>")
.Write ("</table>")
End With
End Sub
'设置管理
Public Sub Manage()
Dim GQID,I
GQID = KS.G("GQID")
GQID = Split(GQID, ",")
Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")
For I=0 To Ubound(GQID)
RS.Open "Select IsTop,Recommend,Verific From KS_GQ Where GQID='" & GQID(I) & "'" ,Conn,1,3
If Not RS.Eof Then
Select Case KS.G("Flag")
Case "IsTop"
If RS(0)=1 Then RS(0)=0 Else RS(0)=1
Case "Recommend"
If RS(1)=1 Then RS(1)=0 Else RS(1)=1
Case "Verific"
RS(2)=KS.ChkClng(KS.G("V"))
End Select
RS.Update
End If
RS.Close
Next
Set RS=Nothing
Response.Redirect Request.ServerVariables("HTTP_REFERER")
End Sub
'删除信息
Public Sub DelGQ()
Dim K, GQID, CurrPath, GQDir, FolderID, Page,GQContentArr, TotalPage, I, CurrPathAndName, FExt, Fname
Page = Request("Page")
GQID = KS.G("GQID"):GQID = Split(GQID, ",")
Dim RS:Set RS=Server.CreateObject("ADODB.Recordset")
For K = LBound(GQID) To UBound(GQID)
RS.Open "Select * FROM [KS_GQ] Where GQID='" & GQID(K) & "'", conn, 1, 3
If RS.EOF And RS.BOF Then
Call KS.AlertHistory("参数传递出错!", -1)
Set KS = Nothing
Exit Sub
Else
FolderID = Trim(RS("Tid"))
'删除评论
conn.Execute ("Delete From KS_Comment Where ChannelID=8 and InfoID=" & GQID(K))
FExt = Mid(Trim(RS("Fname")), InStrRev(Trim(RS("Fname")), ".")) '分离出扩展名
Fname = Replace(Trim(RS("Fname")), FExt, "") '分离出文件名 如 2005/9-10/1254ddd
'删除物理文件
CurrPath = Replace(KS.Setting(3) & KS.C_S(ChannelID,8) & KS.C_C(folderid,2),"//","/")
CurrPathAndName = CurrPath & RS("Fname")
Call KS.DeleteFile(CurrPathAndName)
End If
RS.Delete:RS.Close
Next
If KeyWord = "" Then
Response.Write ("<script>location.href='KS.supply.asp?ChannelID=" & ChannelID&"&ID=" & FolderID & "&Page=" & Page & "';</script>")
Else
Response.Write ("<script>location.href='KS.supply.asp?ChannelID=" & ChannelID&"&KeyWord=" & KeyWord & "&SearchType=" & SearchType & "&StartDate=" & StartDate & "&EndDate=" & EndDate & "&ID=" & FolderID & "&Page=" & Page & "';</script>")
End If
End Sub
'添加信息
Sub GetGQInfo()
Dim Action,OpStr
If Action="Edit" Then
FolderID = Trim(KS.G("FolderID"))
If Not KS.ReturnPowerResult(ChannelID, "M" & ChannelID & "10002") Then
Call KS.ReturnErr(2, "KS.Supply.asp?ChannelID=" & ChannelID &"&Page=" & Page & "&ID=" & FolderID)
Exit Sub
End If
Action="EditSave":OpStr="编 辑 供 求 信 息"
Dim RSE:Set RSE=Server.CreateObject("ADODB.RECORDSET")
Dim ID:ID=KS.ChkClng(KS.G("ID"))
RSE.Open "Select * From KS_GQ Where ID=" & ID,Conn,1,3
IF RSE.EOF And RSE.Bof Then
Response.Write "<script>alert('非法传递参数!');history.back();</script>"
response.end
End If
BigClassID=RSE("BigClassID")
SmallClassID=RSE("Tid")
Title=RSE("Title")
Price=RSE("Price")
TypeID=RSE("TypeID")
PhotoUrl=RSE("PhotoUrl")
ValidDate=RSE("ValidDate")
GQContent=RSE("GQContent")
ContactMan=RSE("ContactMan")
Tel=RSE("Tel")
CompanyName=RSE("CompanyName")
Address=RSE("Address")
Province=RSE("Province")
City=RSE("City")
Email=RSE("Email")
Zip=RSE("Zip")
Fax=RSE("Fax")
HomePage=RSE("HomePage")
KeyWords=RSE("KeyWords")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -