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

📄 nomtrade.asp

📁 英文版全站B2B仿阿里巴巴贸易平台网站,全英文
💻 ASP
字号:
<%
	if instr(session("EAPurview"),"23")=0 then
		response.redirect "../login.asp"
		response.end
	end if
%>

<%
	SortID=trim(request("SortID"))
	TypeID=trim(request("TypeID"))
	ChildID=trim(request("ChildID"))
	
	if (SortID<>"") and (not IsNumeric(SortID)) then
		response.write "<SCRIPT language=JavaScript>alert('对不起,参数有误!');"
		response.write "this.location.href='javascript:history.back();'</SCRIPT>"
	end if
	
	if (TypeID<>"") and (not IsNumeric(TypeID)) then
		response.write "<SCRIPT language=JavaScript>alert('对不起,参数有误!');"
		response.write "this.location.href='javascript:history.back();'</SCRIPT>"
	end if
	
	if (ChildID<>"") and (not IsNumeric(ChildID)) then
		response.write "<SCRIPT language=JavaScript>alert('对不起,参数有误!');"
		response.write "this.location.href='javascript:history.back();'</SCRIPT>"
	end if
%>

<!--#include file="../../Inc/DBConn1.asp" -->
<LINK href="../../CSS/style.css" rel="stylesheet" type="text/css"></LINK>

<%	
	if request("action")="nonom" then
		conn.execute("update Trade set IsNominate=false where TID=" & request("TID"))
	end if
%>

<%	
	if request("action")="noaud" then
		conn.execute("update Trade set Flag=0,IsNominate=false where TID=" & request("TID"))
	end if
%>

<%	
	if request("action")="del" then
		set rsimage=server.createobject("adodb.recordset") 
		rsimage.open "select * from Trade where TID=" & request("TID"),conn,1,1  
		
		if not rsimage.EOF then
			if LCase(rsimage("PicPath"))<>"nopic.jpg" then
				strpath="../../Trade/pic/"&rsimage("PicPath")
				Filename  =  Server.MapPath(strpath)
				Set  fs  =  CreateObject("Scripting.FileSystemObject")
				if strpath<>"" then
					If  fs.FileExists(Filename)  Then
						fs.DeleteFile(Filename)
					end if
				end if
			end if
	
			conn.execute("delete from Trade where TID=" & request("TID"))
		end if
		
		rsimage.Close
		Set rsimage=nothing
	end if
%>
<center>
	<TABLE border="0" cellPadding="0" cellSpacing="0" align="center" width="100%" ID="Table1">
		<Form name="Form1" method="POST" action="NomTrade.asp" ID="Form1">
			<TR>
				<td>
					<IMG align=absbottom border="0" src="../../images/search.gif">
					搜索关键字:<input type="text" name="SearchText" size="16" value="<%=trim(request("SearchText"))%>">
					<%						
						if request("SortID")<>"" and IsNumeric(SortID) then
							SortID=Cint(request("SortID"))
						else
							SortID=0
						end if
						
						if request("TypeID")<>"" and IsNumeric(TypeID) then
							TypeID=Cint(request("TypeID"))
						else
							TypeID=0
						end if
						
						if request("ChildID")<>"" and IsNumeric(ChildID) then
							ChildID=Cint(request("ChildID"))
						else
							ChildID=0
						end if
						
						TradeType=request("TradeType")
					%>
					
					<%
						Dim TypeRs2,TypeStr2,count1
						Set TypeRs2=server.CreateObject("ADODB.Recordset")
						TypeStr2="select * from Sort2 order by TypeID ASC"
						TypeRs2.open TypeStr2,conn,1,1
					%> 
					<script language = "JavaScript">
						var onecount1;
						onecount1=0;
						subcat1 = new Array();
						<%
						count1 = 0
						do while not TypeRs2.eof 
						%>
						subcat1[<%=count1%>] = new Array("<%= trim(TypeRs2("TypeName"))%>","<%= trim(TypeRs2("SortID"))%>","<%= trim(TypeRs2("TypeID"))%>");
						<%
						count1 = count1 + 1
						TypeRs2.movenext
						loop
						TypeRs2.close
						%>
						onecount1=<%=count1%>;
				
						function changelocation1(locationid)
						{
						document.Form1.TypeID.length = 0; 
						var locationid=locationid;
						var i;
						document.Form1.TypeID.options[0] = new Option("-行业子类-","");
						for (i=0;i < onecount1; i++)
							{
								if (subcat1[i][1] == locationid)
								{ 
									document.Form1.TypeID.options[document.Form1.TypeID.length] = new Option(subcat1[i][0], subcat1[i][2]);
								}  
							}      
						}    
					</script> 
					<%
						Set SortRs1=server.CreateObject("ADODB.Recordset")
						SortStr1="select * from Sort1 order by SortID ASC"
						SortRs1.open SortStr1,conn,1,1
					%> 
					<SELECT name=SortID onChange="javascript:changelocation1(document.Form1.SortID.options[document.Form1.SortID.selectedIndex].value)" size="1" ID="Select3">
						<option value="">-行业大类-</option>
						<%
							while not SortRs1.eof
						%>
						<option value="<%=SortRs1("SortID")%>" <%if SortRs1("SortID")=SortID then%> selected <%end if%>><%=SortRs1("SortName")%></option>
						<%
				 				SortRs1.movenext
							wend
						%>
					</select> 
					<%
						SortRs1.close
						Set SortRs1=nothing
					%>
					<select name="TypeID" ID="Select4">
						<option value="">-行业子类-</option>
						<%
							Set TypeRs3=server.CreateObject("ADODB.recordset")
							TypeStr3="select * from Sort2 where SortID="& SortID &" order by TypeID ASC"
							TypeRs3.open TypeStr3,conn,1,1
							if not(TypeRs3.eof and TypeRs3.bof) then
								while not TypeRs3.eof
						%>
						<option value="<%=TypeRs3("TypeID")%>" <%if TypeRs3("TypeID")=TypeID then%> selected <%end if%>><%=TypeRs3("TypeName")%></option>
						<% 
									TypeRs3.movenext
								wend
							end if
							TypeRs3.close
							set TypeRs3 = nothing
						%>
					</select>
					
					<select name="TradeType" ID="Select1">
						<option value="">--Trade Lead Type--</option>
						<option value="Buy" <%if TradeType="Buy" then%> selected <%end if%>>Buy</option>
						<option value="Sell" <%if TradeType="Sell" then%> selected <%end if%>>Sell</option>
						<option value="Agent" <%if TradeType="Agent" then%> selected <%end if%>>Agent</option>
						<option value="Cooperation" <%if TradeType="Cooperation" then%> selected <%end if%>>Cooperation</option>
					</select>
					
					<INPUT align=absmiddle border="0" src="../../images/search1.gif" type="image" ID="Image1" NAME="Image1">
				</td>
			</TR>
			<tr>
				<td height=10></td>
			</tr>
		</Form>
	</TABLE>
	
	<TABLE border="0" cellspacing="1" width="100%" cellpadding="4" ID="Table2">
		<TR height=30 bgcolor="#F78200"> 
			<TD width="8%" align="center"><font color="#FFFFFF"><b>ID号</b></font></TD>
			<TD width="25%" align="center"><font color="#FFFFFF"><b>信息标题</b></font></TD>
			<TD width="25%" align="center"><font color="#FFFFFF"><b>相关企业</b></font></TD>
			<TD width="7%" align="center"><font color="#FFFFFF"><b>图片</b></font></TD>
			<TD width="10%" align="center"><font color="#FFFFFF"><b>群发邮件</b></font></TD>
			<TD width="10%" align="center"><font color="#FFFFFF"><b>推荐</b></font></TD>
			<TD width="10%" align="center"><font color="#FFFFFF"><b>审核</b></font></TD>
			<TD width="7%" align="center"><font color="#FFFFFF"><b>删除</b></font></TD>
		</TR>
		<%
			SearchText=trim(request("SearchText"))
			SortID=trim(request("SortID"))
			TypeID=trim(request("TypeID"))
			ChildID=trim(request("ChildID"))
			TradeType=trim(request("TradeType"))
			
			set Rs=server.CreateObject("ADODB.Recordset")
			RsStr="Select * from Trade where flag=1 and IsNominate=true and (TradeTitle like '%" & SearchText & "%' or Explain like '%" & SearchText & "%')"
			if SortID<>"" then
				RsStr=RsStr & " and SortID=" & SortID
			end if
			if TypeID<>"" then
				RsStr=RsStr & " and TypeID=" & TypeID
			end if
			'if ChildID<>"" then
			'	RsStr=RsStr & " and ChildID=" & ChildID
			'end if
			if TradeType<>"" then
				RsStr=RsStr & " and TradeType='" & TradeType & "'"
			end if
			RsStr=RsStr & " Order By TID desc"
			Rs.open RsStr,Conn,3,3
			Rs_Rows=20
			Rs.PageSize=Rs_Rows
			Rs_Total=Rs.RecordCount
			Page_Total=Rs.PageCount
			CurrentPage=1
			if (request.QueryString("CurrentPage")<>"" and isnumeric(request.QueryString("CurrentPage")) and request.QueryString("CurrentPage")>=1) then CurrentPage=request.QueryString("CurrentPage")
			PageBegin=(CurrentPage-1)*Rs_Rows+1
			PageEnd=PageBegin+Rs_Rows-1
			if PageEnd>Rs.RecordCount then PageEnd=Rs.RecordCount
			if Rs.recordCount<>0 then Rs.AbsolutePage=CurrentPage
			if Not(Rs.bof and Rs.eof) then
				while (not Rs.eof) and (PageBegin<=PageEnd)
		%>
		<TR height=23 <%if PageBegin mod 2=1 then%> bgcolor="#F6F6F6" <%else%> bgcolor="#FFFFFF" <%end if%>> 
			<TD width="8%" align="center"><%=Rs("TID")%></TD>
			<TD width="25%" align="left"><a href="EditTrade.asp?TID=<%=Rs("TID")%>"><%=Rs("TradeTitle")%></a></TD>
			<TD width="25%" align="left"><%Set UCRs=conn.execute("select * from UserCompany where UID=" & Rs("UID"))%><%if not UCRs.EOF then%><a href="../../Company/CompanyDetail.asp?UID=<%=UCRs("UID")%>" target=_blank><%=UCRs("CompanyName")%></a><%end if%></TD>
			<TD width="7%" align="center"><%if LCase(Rs("PicPath"))="nopic.jpg" then%>No Pic<%else%><a href="../../Trade/Pic/<%=Rs("PicPath")%>" target=_blank>Preview</a><%end if%></TD>
			<TD width="10%" align="center"><a href="javascript:;" onclick="javascript:window.open('QunFaMail.asp?TID=<%=rs("TID")%>','QunFaMail','status=no,scrollbars=no,top=200,left=250,width=200,height=120')">Send Email</a></TD>
			<TD width="10%" align="center"><a href="NomTrade.asp?CurrentPage=<%=CurrentPage%>&SearchText=<%=SearchText%>&SortID=<%=SortID%>&TypeID=<%=TypeID%>&action=nonom&TID=<%=Rs("TID")%>">撤消推荐</a></TD>
			<TD width="10%" align="center"><a href="NomTrade.asp?CurrentPage=<%=CurrentPage%>&SearchText=<%=SearchText%>&SortID=<%=SortID%>&TypeID=<%=TypeID%>&action=noaud&TID=<%=Rs("TID")%>">撤消审核</a></TD>
			<TD width="7%" align="center"><a href="NomTrade.asp?CurrentPage=<%=CurrentPage%>&SearchText=<%=SearchText%>&SortID=<%=SortID%>&TypeID=<%=TypeID%>&action=del&TID=<%=Rs("TID")%>" onclick="return confirm('确定要删除这条信息吗?')">删除</a></TD>
		</TR>
		<%
					PageBegin=PageBegin+1
					Rs.movenext
				wend
			else
		%>
		<tr height=50>
			<td colspan=8 align=center>没有您查找的信息!</td>
		</tr>
		<%
			end if
			Rs.close
		%>
		<TR height=30 bgcolor="#F78200"> 
			<TD colspan=8 align=center style="color:#FFFFFF;">
				<%
					if Page_Total=0 then
						CurrentPage=0
					end if
				%>
				(共 <%=Page_Total%>  页,第 <%=CurrentPage%> 页,共检索到 <%=Rs_Total%> 条记录)
				<%
					if Cint(CurrentPage)<>1 and Page_Total<>0 then
						response.Write "<a href='NomTrade.asp?CurrentPage=1&SearchText=" & SearchText & "&SortID=" & SortID & "&TypeID=" & TypeID & "&TradeType=" & TradeType & "' class=Head1>首页</a>"
					else
						response.Write "首页"
					end if
				%>&nbsp;
				<%
					if Cint(CurrentPage)<>1 and Page_Total<>0 then
						response.Write "<a href='NomTrade.asp?CurrentPage=" & currentPage-1 & "&SearchText=" & SearchText & "&SortID=" & SortID & "&TypeID=" & TypeID & "&TradeType=" & TradeType & "' class=Head1>上一页</a>"
					else
						response.Write "上一页"
					end if
				%>&nbsp;
				<%
					if Cint(CurrentPage)<>Page_Total and Page_Total<>0 then
						response.Write "<a href='NomTrade.asp?CurrentPage=" & currentPage+1 & "&SearchText=" & SearchText & "&SortID=" & SortID & "&TypeID=" & TypeID & "&TradeType=" & TradeType & "' class=Head1>下一页</a>"
					else
						response.Write "下一页"
					end if
				%>&nbsp;
				<%
					if Cint(CurrentPage)<>Page_Total and Page_Total<>0 then
						response.Write "<a href='NomTrade.asp?CurrentPage=" & Page_Total & "&SearchText=" & SearchText & "&SortID=" & SortID & "&TypeID=" & TypeID & "&TradeType=" & TradeType & "' class=Head1>尾页</a>"
					else
						response.Write "尾页"
					end if
				%>&nbsp;
			</TD>
		</TR>
	</table>
</center>

⌨️ 快捷键说明

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