<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charSet=gb2312">
	<title>生成专项商机所有内容页</title>
	<style type="text/css">
	<!--
	body {
		margin-left: 0px;
		margin-top: 0px;
		margin-right: 0px;
		margin-bottom: 0px;
		background-color: #E4EDF9;
	}
	body,td,th {
		font-size: 12px;
	}
	-->
	</style>
	</head>
<body>
<% data_path="../../../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../../../conn/conn.asp"-->
<!--#include file="../../../inc/safe.asp"-->
<!--#include file="../index/temp_inc.asp"-->
<!--#include file="../../../inc/filesystem.asp"--> 
<%
	    if issession=0 then
		   gsid=Replace_Text(request.Cookies("Yxmemberid"))
		   else
		   gsid=session("id")
		 end if
 	if  gsid=""   then 
		Response.Redirect(HOPE_InStallDir&"login/login1.asp")
	End If
%>
   
<%
	'------------绑定参数 start----------------- 
	alls=request("all")
	schtmls=request("schtml")
	'------------绑定参数  end----------------- 
%>
 <%
  	Set rs=Server.CreateObject("adodb.recordSet")
	rs.Open ("select vipinfo_detail from [Yixiang_worldec_Temp] where yx_selected=1"),conn,1,1
	 If rs.Eof Then 
	    Response.Write("<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>对不起！该模版不存在！</font><a href='#' onclick='javascript:window.close();'>关闭</a>")
	    Response.End()
	  End If
     If Not rs.Eof Then
	pencat=rs("vipinfo_detail")
	rs.Close
	End If
    If Request("page")<>"" Then
      If Cint(Request("page"))<1 Then
         currentPage=1
      Else
         currentPage=Cint(Request("page"))
      End If
   Else        
      currentPage=1        
   End If
 	If Request("TopNew")>"" Then
	If ChkRequest(Request("TopNew")) Then
	TopNew=Request("TopNew")
	Else
	Response.Redirect (HOPE_InstallDir&"login/chklogin.asp?login=4")
	End If
	End If  
      MaxPerPage=1
	 Set rs=Server.CreateObject("adodb.recordSet")
	 If Request("all")="vipinfo" then
	 SQL="select vipinfo_id,viptype from Yixiang_vipinfo where vipinfo_id in ("&Request("selAnnounce")&") order by dateandtime asc"
	 rs.Open SQL,conn,1,1
		
		
		
		
     End If
     If not rs.Eof Then
     rs.Pagesize=MaxPerPage
     mpage=rs.Pagecount     '得到总条数
	 If currentPage>mpage Then
	 	Response.Write "<b>生成完成，完成时间"&Now()&"</b> <a href='javascript:window.close();'>关闭</a>"
		Response.End
	End If
     If TopNew>"" Then currentPage=mpage-TopNew
     rs.Move  (currentPage-1)*MaxPerPage
       If mpage>=currentPage Then
         ttid=rs("vipinfo_id")
		 typeid=rs("viptype")
       End If
	 Else
	   Response.write "按需生成完成"
	   Response.End
     End If
	 rs.Close
	If typeid="" Then
	Response.Write "没有要生成的信息"
	   Response.End
     End If 
	 HOPE_Sort=""	 
	sorttype="select * from Yixiang_vipinfo_class where typeid="&typeid&""
	Set rssorttype=Server.CreateObject("adodb.recordSet")
	rssorttype.Open sorttype,conn,1,1
	If not rssorttype.Eof Then
	HOPE_Sort=HOPE_Sort&"<a href='"&HOPE_InstallDir&"vipinfo/"&rssorttype("typeid")&".html'>"&rssorttype("type")&"</a>"
	ttname=rssorttype("type")
 	rssorttype.Close
	End If
 	Set rs=Server.CreateObject("adodb.recordSet")
	rs.Open ("select * from Yixiang_vipinfo where vipinfo_id="&ttid&""),conn,1,1
 	dateandtime=rs("dateandtime")
	period=rs("vipperiod")
	Hope_Gsmc=rs("gsmc")
  	Hope_Lxr=Hope_Lxr&"<script type='text/javascript' src='"&HOPE_InstallDir&"showrolemsg.js'></script><script   language='vbscript'>sub   window_onload() AjaxSearchmsg() end  sub </script><input type='text' id='installurlmsg'  style='display:none; width:12;height:1'  value='"&HOPE_InstallDir&"'/><div id='search_resultmsg' style=""display:none"">"&rs("lxr")&"<br>email:"&rs("email")&"<br>电话:"&rs("phone")&"<br>公司地址:"&rs("gsdz")&"<br>传真:"&rs("fax")&"<br>邮编:"&rs("post")&"</div>"
	select case period
		case "一周"
			period=7
		case "半月"
			period=15
		case "一个月"
			period=30
		case "三个月"
			period=90
		case "六个月"
			period=180
		case "一年"
			period=365	
		case "长期"
			period=1000
		end select
	'标志此条信息为已经生存HTML
	conn.execute("update Yixiang_vipinfo set html_pass=1 where vipinfo_id="&ttid&"")
 	
	HOPE_CountInfo=HOPE_CountInfo&""&changechr(rs("vipcontent"))&""
	HOPE_AddTime=HOPE_AddTime&""&FormatDate(dateandtime,1)&""
	HOPE_EndTime=HOPE_EndTime&""&FormatDate(dateandtime+period,1)&""	
	 HOPE_AskId=ttid
	 HOPE_TradeInfoID=ttid
	 HOPE_Pic=""
		   If rs("picture")<>"nopicture.gif" Then
  			HOPE_Pic="<A  href=#zoom> <img src="&HOPE_InstallDir&"UploadFile/"&rs("picture")&"  border=0  width=100 height=100> </A>" 
			Else
		 	HOPE_Pic="<A class=s href=#zoom><div style='width=100;height=100'>无图</div></A>" 
 			End If
	 
	 
	 
	HOPE_InfoPicTure=HOPE_InfoPicTure&"<a name=zoom></a><TABLE width=550 height=350 border=1 bordercolor=#FFF3E3 align=center cellPadding=0 cellSpacing=0 class=porductborder>" 
 	 HOPE_InfoPicTure=HOPE_InfoPicTure&"<TR>" 
	HOPE_InfoPicTure=HOPE_InfoPicTure&"<TD align=middle> <div align=center>" 
	If rs("picture")<>"nopicture.gif" Then
	HOPE_InfoPicTure=HOPE_InfoPicTure&"<IMG src="&HOPE_InstallDir&"UploadFile/"&rs("picture")&" NAME=prodView onload=""javascript:if(this.width>650){this.width=650 }"" border=0>" 
	Else
	HOPE_InfoPicTure=HOPE_InfoPicTure&"<FONT class=C color=#cecfce>无图</FONT>" 
	End If
	HOPE_InfoPicTure=HOPE_InfoPicTure&"</div></TD>" 
	HOPE_InfoPicTure=HOPE_InfoPicTure&"</TR>" 
	HOPE_InfoPicTure=HOPE_InfoPicTure&"</TABLE>"
	
	HOPE_InnerHTML="<script language=""javascript"" type=""text/javascript"" src="""&HOPE_InstallDir&"js/powerpoint.js""></script>"
	 HOPE_InnerHTML=HOPE_InnerHTML&"<div id=""main_hope_m"">内容加载中</div>"
	 HOPE_InnerHTML=HOPE_InnerHTML&"<script type=text/javascript>getPage('"&HOPE_InstallDir&"vipinfo/vipinfo.asp?id="&rs("vipinfo_id")&"','main_hope_m');</script>"
	
  	'--------------按生成状态显示--------------------------
	 if schtmls="开始生成从未生成的" then
		Response.write "<br><font color=#FF0000><b>正在生成,请等待.</b></font>"
	 else
		Response.Write "<br><b>已生成/要生成的页面条数:<font color=#FF0000>"&currentPage-1&"</font>/<font color=#FF0000><b>"&mpage&"</b></font>个"
	 end if
	If mpage<currentPage Then
	Response.Write ",完成时间"&Now()&"</b> "
	Else
 	   HOPE_TradeInfo="["&ttname&"]"&rs("vipshowname")&""       '页面标题
	   HOPE_Quyu=rs("country")&"<small> > </small>"&rs("city")&""
	   HOPE_JiaGe=rs("vippricetems")&""
 	 
	 ' 导航标签#HOPE_TradeGo#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
	
	 HOPE_TradeGo="<a href='"&HOPE_InstallDir&"'>首页</a> <small>></small> <a href='"&HOPE_InstallDir&"vipinfo/'>专项商机</a> <small>></small> "&HOPE_Sort
	 
  	pencat=Hope_HtmlResult(pencat)
	
	Set fso =YXFSO
	Set sort_save = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"vipinfo/offerdetail/"&typeid&"-"&ttid&".html"))
	sort_save.Write pencat
	sort_save.Close
    '------------按生成状态传递参数----------------
	if schtmls="开始生成从未生成的" then
		Response.Write "<meta http-equiv=Refresh content='0; URL=makedetail.asp?all="&Request("all")&"&id1="&id1&"&id2="&id2&"&schtml="&schtmls&"'>"
	else
		Response.Write "<meta http-equiv=Refresh content='0; URL=makedetail.asp?all="&Request("all")&"&id1="&id1&"&id2="&id2&"&page="&currentPage+1&"&selAnnounce="&request("selAnnounce")&"'>"
	end if
	End If
  rs.Close
  Set rs=nothing
  conn.Close
   Set conn=nothing
   
   Function changechr(fString)
If Not IsNull(fString) Then
fString = trim(fString)
fString = replace(fString, "--", "——")  
fString = replace(fString, "%20", "")    
fString = replace(fString, "==", "")     
fString = replace(fString, "&gt;", ">")
fString = replace(fString, "&lt;", "<")
fString = Replace(fString, CHR(32), " ")		 
fString = Replace(fString, CHR(9), " ")			 
fString = Replace(fString, CHR(39), "&#39;")	 
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
changechr = fString
End If
End Function
%>


