<!--#include file="../prohead.asp"-->
<!--#include file="../../inc/Safe.asp"-->
 <!--#include file="../checkrole.asp"-->
        <script>
<!-- Author By CnKnow.com
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
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 "选择全部";}}

function isgo()
	{
	var isok=true;
 	 for (var i=0;i<document.search.elements.length;i++)
		{
		if(document.search.elements[i].checked==true)
		{
		isok=false;
		break;
		}
 		}
		if(isok)
		{
		alert("请选择要进行操作的项!");
		return false;
		}
 	}
function ShowTr(id)
{
var obg='reinfo'+id;
var Fname='F'+id;
var obj=document.getElementById(obg);
var Fid=document.getElementById(Fname);
if (obj.style.display=="block")
{
 obj.style.display = "none";
 Fid.innerHTML="| 查看";
 obj.innerHTML="";
}
 
if (obj.style.display=="none")
{
 obj.style.display="block"
  Fid.innerHTML="| 关闭";
}
}
</script>
 <%
 call checkuser("cp")
if issession=0 then
gsid=Replace_Text(request.Cookies("Yxmemberid"))
else
gsid=session("id")
end if
 %>
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
 <link href="../images/css.css" rel="stylesheet" type="text/css">
 

<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD 
    style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(../images/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle>
      <BR>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
              <TD width="74%"><IMG height=32 src="../images/product_manage.gif" width=576 
            border=0></TD>
              <TD width="26%" background="../images/info_bg.gif">&nbsp;</TD>
        </TR>

	    </TBODY></TABLE>

<%
 
sql="select * from Yixiang_productshow where gsid="&gsid&" order by flag desc,idate desc"
 set rs=server.createobject("adodb.recordset") 
rs.open sql,conn,1,1 
if rs.eof or rs.bof then 
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="content_border">
			          <TR>
                        <TD height=30 align="right" class=M><img src="../images/classpic.gif"> <a href="addclass.asp">产品大类管理</a>&nbsp;&nbsp;<img src="../images/classpic.gif"> <a href="addclass_1.asp">产品小类管理</a></TD>
                      </TR>
		<tr> 
		<td align="center">
    <br>
    <table width="95%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="65%" class="C"> <font color="#FF0000">您暂无有效的产品信息！</font><font color="#FF0000">&nbsp;</font></td>
    <td width="35%" align="right"><font color="#FF0000"><a href="add_product.asp">发布我的产品信息</a></font></td>
    </tr>
    </table>
    <br>
    <BR>
		</td>
		</tr>
	  </table>
<%
else 

msg_per_page=10 '定义每页显示记录条数
rs.pagesize=msg_per_page '定义分页记录集每页显示记录数

if not (rs.eof and rs.bof) then
	totalrec=RS.RecordCount'总记录条数
	if rs.recordcount mod msg_per_page=0 then'计算总页数,recordcount:数据的总记录数
		n=rs.recordcount\msg_per_page'n:总页数
	else
		n=rs.recordcount\msg_per_page+1                        
	end if                                                                
	currentpage=request("page")'currentpage:当前页
	If currentpage <> "" then
		currentpage =  cint(currentpage)
		if currentpage < 1 then  
			currentpage = 1
		end if  
		if err.number <> 0 then '错误处理
			err.clear
			currentpage=1
		end if
	else
		currentpage=1
	End if                                                                
	if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
		currentPage=1
	end if
	rs.absolutepage=currentpage'absolutepage：设置指针指向某页开头
	rowcount=rs.pagesize'pagesize：设置每一页的数据记录数
end if
%>
<TABLE border=0 cellPadding=3 cellSpacing=1 align="center">
  <TBODY>
    <TR> 
      <TD height=40>
<%
sql1="select count(id) from Yixiang_productshow where gsid="&gsid&""
set totle=conn.execute(sql1)
totle4=totle(0)

sql2="select count(id) from Yixiang_productshow where gsid="&gsid&" and flag=1"
set totle2=conn.execute(sql2)
totle5=totle2(0)
response.write"<b>您总共发布了"
response.write"<font color='#ff0000'> "&totle4&"</font> 条产品信息，"
response.write"已审核<font color='#ff0000'> "&totle5&"</font> 条，"
response.write"尚未通过审核<font color='#ff0000'> "&(totle4-totle5)&"</font> 条。"

totle.close
set totle=nothing
totle2.close 
set totle2=nothing
%></td>
      </TR>
</TBODY>
</TABLE>
<FORM name=searchForm action="" method=post>

          <TABLE width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#111111" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" 退定文件夹中。\	???毎??style="border-collapse: collapse">
            <TR height=25 bgcolor="#e8f4ff"> 
              <TD align="center"><font color="#CC3300"><b>状态</b></font></TD>
              <TD align="center" bgcolor="#e8f4ff"><font color="#CC3300"><b>产品名称</b></font></TD>
              <TD align="center"><font color="#CC3300"><b>发布时间</b></font></TD>
              <TD colspan="6" align="center"><font color="#CC3300"><b>操作</b></font></TD>
            </TR>
            <%do while not rs.eof and rowcount > 0%>
            <TR height="20" bgcolor="#ffffff"> 
              <TD width="70" align="center"> <% if rs("flag")=1 then %> <font color="#666666">已审</font> <%else%> <font color="#FF0000">待审</font> <%end if%> <%if rs("flag")<>1  then %> <span  onClick="ShowTr('<%=rs("id")%>');" id="F<%=rs("id")%>">| 查看</span><%end if%></td>
              <TD width="163" ><%if rs("flag")=1 then%><a title="<%=rs("cpmc")%>" href="<%=HOPE_InstallDir%>productshow/info.asp?id=<%=rs("id")%>" target="_blank"><%else%><a title="<%=rs("cpmc")%>" href="edit1.asp?id=<%=rs("id")%>"><%end if%><%=rs("cpmc")%></a></td>
              <TD width="122" align="center"> <%=rs("idate")%></td>
              <TD width="69" align="center"> <a href="edit1.asp?id=<%=rs("id")%>">修改</a></td>
              <TD width="69" align="center"><a href="addtrad.asp?id=<%=rs("id")%>">加入销售</a></td>
              <TD width="50" align="center"><a href="del.asp?id=<%=rs("id")%>" onClick="return sureok()">删除</a></td>
              <TD width="49" align="center"><a href="Afresh.asp?id=<%=rs("id")%>">重发</a></td>
              <TD width="54" align="center"><a href="toprice.asp?pid=<%=rs("id")%>">设为竞价</a></td>
              <TD width="40" align="center"><input type='checkbox' name='id' value='<%=cstr(rs("ID"))%>'></td>
            </TR>
			<tr id="reinfo<%=rs("id")%>" style="display:none" ><td colspan=9>管理员回复：
			<%if len(rs("returninfo"))>0 then 
			response.Write rs("returninfo")
			else
			response.Write "暂时没有回复！"
			end if 
			%></td></tr>
<%
rowcount=rowcount-1
rs.movenext
loop
%>
          </TABLE>
<TABLE width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#111111" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" style="border-collapse: collapse">
<TR height=25><td><div align="right">
  <input type="submit" name="tuibtn" value=" 批量重发" onClick="this.form.action = 'Afresh.asp'; this.form.submit();">
  <input type="submit" name="tuibtn" value="批量删除"  onClick="this.form.action = 'del.asp'; this.form.submit();">
  <input type=button value=" 全部选定 " onClick="this.value=check(this.form)">
</div></td></tr>
<TR height=25 bgcolor="#e8f4ff">
  <td><%call listPages()%></td>
</tr>
</table>
<BR><BR>
</form>
<%end if%>
            <BR><TABLE class=bdr1 cellSpacing=0 cellPadding=0 width="100%" 
              border=0><TBODY>
              <TR>
                <TD height=103>
                  <TABLE class=bdr2 cellSpacing=0 cellPadding=0 width="100%" 
                  border=0>
                    <TBODY>
                    <TR>
                      <TD class=lh13 height=91><SPAN 
                        class=M>特别提醒：</SPAN><BR><BR>
                                1、为保证产品信息的真实合法性，您发布的产品信息并不会立即在网上发布：<BR>
                                <font color=red>&nbsp; </font><BR>
                                2、发布产品信息后，为保证客户及时与您联系，请确保您的联系信息（特别是电话、电子邮箱地址）准确无误。<BR>
                                <BR>
                        3、请勿一天内重复提交相同内容的产品信息，否则将不被审核通过。<BR>
                        <BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR>
    
<BR><BR></TD></TR></TBODY></TABLE>
</TABLE>
<%


sub listPages() 
   if not (rs.eof and rs.bof) then
	gopage=currentpage
	totalpage=n
	blockPage=Int((gopage-1)/10)*10+1
	if blockPage = 1 Then
		Response.Write "<span disabled>【←前10页</span>&nbsp;&nbsp;"
	Else
		Response.Write("<span disabled>【</span><a href=edit.asp?page="&blockPage-10&">←前10页</a>&nbsp;&nbsp;")
	End If
   i=1
   Do Until i > 10 or blockPage > n
    If blockPage=int(gopage) Then
		Response.Write("<font color=#FF0000>[<b>"&blockPage&"</b>]</font>")
	Else
		Response.Write("<a href=edit.asp?page="&blockPage&">["&blockPage&"]</a>")
    End If
    blockPage=blockPage+1
    i = i + 1
    Loop
	if blockPage > totalpage Then
		Response.Write "&nbsp;&nbsp;<span disabled>后10页→】"
	Else
		Response.Write("&nbsp;&nbsp;<a href=edit.asp?page="&blockPage&">后10页→</a><span disabled>】")
	End If
		Response.Write("&nbsp;&nbsp;共"&n&"页 每页"&msg_per_page&"条记录 共"&totalrec&"条记录")
end if
end sub
%>
</tr>
</table>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>