<!--#include file="../include/Conn.asp"-->
<!--#include file="../include/Char.asp"-->
<!--#include file="../include/md5.asp"-->
<!--#include file="Admin_Menu.asp" -->
<!--#include file="Admin_IsLogin.asp" -->
<% key=trim(request("key")) 
if request("del")<>"" then 
conn.Execute("delete * from company where uname='"&request("del")&"'")
conn.Execute("delete * from zp where uname='"&request("del")&"'")
conn.Execute("delete * from cmailbox where reid='"&request("del")&"'")
conn.Execute("delete * from cfavorite where uname='"&request("del")&"'")
conn.Execute("delete * from pfavorite where fuid='"&request("del")&"'")
end if %>
<!--#include file="../Include/html.inc"-->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Images/Style.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
<!--//
function check()
{
   if (isNaN(go2to.page.value))
		alert("请正确填写转到页数！");
   else if (go2to.page.value=="") 
	     {
		alert("请输入转到页数！");
		 }
   else
		go2to.submit();
}
//-->
</SCRIPT>
<SCRIPT language=JavaScript src="../Include/window.js"></SCRIPT>
</head>
<body text="#000000" >
	  <%
      admin_flag="07"
      if instr(session("flag1"),admin_flag)=0 or isnull(session("flag1"))=true then
         Response.write "<br><br><br><br><b><font color=red>对不起，您没有管理本页面的权限!</font></B>"
		 Response.end
	  end if
      %>
<table width="95%" border="0" align="center" cellpadding="4" cellspacing="0" bordercolor="#111111" id="AutoNumber72" style="border-collapse: collapse">
  <tr>
   <% set rs=server.createobject("adodb.recordset") 
              if not isempty(request("page")) then   
	          pagecount=cint(request("page"))   
              else   
	          pagecount=1   
              end if
			  sql="select * from company where uname & cname like '%"&key&"%' order by id desc"
			  rs.open sql,conn,1,1   
              if rs.eof and rs.bof then  %> 
              <br>
             <a href=company.asp>对不起，没有记录！点击返回！！！</a>
              <br>   
            <%  response.end
			end if
              rs.pagesize=15
              if pagecount>rs.pagecount or pagecount<=0 then              
              pagecount=1              
              end if              
              rs.AbsolutePage=pagecount %>
    <td align=middle width="100%"><% if rs.pagecount=1 then %><font color="#000000">共有[<font color="#ff0000"><%=rs.recordcount%></font>]位单位用户符合条件                         
		  以下是[<font color="red">1～<%=rs.recordcount%></font>]条</font><%else%><% page_start=(pagecount-1)*rs.pagesize
            if pagecount=1 then page_start=1
		    page_end=rs.pagesize*pagecount
		    if pagecount*rs.pagesize=>rs.recordcount then page_end=rs.recordcount end if%>
         共有[<font color="#ff0000"><%=rs.recordcount%></font>]位单位用户符合条件                           
         以下是[<font color="red"><%=page_start%>～<%=page_end%></font>]条</font></td>
  </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="4" cellspacing="0" bordercolor="#111111" id="AutoNumber73" style="border-collapse: collapse">
  <tr>
    <td align=middle width="100%"><% response.write"<form name=go2to form method=Post action='company.asp?key="+key+"'>"
		     response.write "<font color='#000064'>◆&nbsp;</font>"                                              
		     if pagecount=1 then                                                        
			 response.write "<font color='#000064'>首页 上一页</font>&nbsp;"
			 else                                                        
             response.write "<a href=company.asp?page=1&key="+key+"><font color='0000BE'>首页</font></a>&nbsp;" 
	         response.write "<a href=company.asp?page="+cstr(pagecount-1)+"&key="+key+"><font color='0000BE'>上一页</font></a>&nbsp;"
			 end if                                             
             if rs.PageCount-pagecount<1 then                                                        
             response.write "<font color='#000064'>下一页 尾页</font>"                                                    
			 else                                                        
             response.write "<a href=company.asp?page="+cstr(pagecount+1)+"&key="+key+"><font color='0000BE'>下一页</font></a>&nbsp;"
			 response.write "<a href=company.asp?page="+cstr(rs.PageCount)+"&key="+key+"><font color='0000BE'>尾页</font></a>"           
             end if 
			 response.write "<font color='000064'>&nbsp;页次:<font color=blue>"&pagecount&"</font>/"&rs.pagecount&"页</font>" 
			response.write "<font color='000064'> 转到第　<input type='text' name='page' style='border:1px solid #1168A9; background-color: #EBEBEB; color: #00006A; font-family: 宋体; font-size: 9pt; padding-left:4; padding-right:4; padding-top:1; padding-bottom:1' size=5 maxLength=5 style='font-size: 9pt; color:#00006A; position: relative; height: 18' value="&PageCount&">　页</font>&nbsp;"                               
			response.write "　<input class=button type='button' value='确 定' onclick=check() style='border:1px solid #1168A9; font-family: 宋体; font-size: 9pt; color: #00006A; padding-left:4; padding-right:4; padding-top:1; padding-bottom:1; background-color:#EBEBEB' position: relative; height: 19'>" %></td>
    <%end if%>
	</form>
  </tr>
</table>
<table class=tableBorder width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="123" align="center" valign="top">
	
	<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center">
       <tr> 
          <th height="22" colspan="6" align="center" sytle="line-height:150%">企业用户管理</th>
        </tr> 
	    <tr style="cursor:hand" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#EBEEF6'" align="center"> 
          <td width="5%" height="18" class=forumHeaderBackgroundAlternate><b>ID</b></td>
          <td class=forumHeaderBackgroundAlternate width="15%"><b>用户名</b></td>
          <td width="37%" class=forumHeaderBackgroundAlternate><strong>公司名称</strong><strong></strong></td>
          <td class=forumHeaderBackgroundAlternate width="22%"><b>发布时间</b></td>
          <td width="11%" class=forumHeaderBackgroundAlternate><strong>用户级别</strong></td>
          <td width="10%" class=forumHeaderBackgroundAlternate><strong><a href="Admin_cuser.asp?action=add">添加用户</a></strong></td>
        </tr>
      </table>
    <% do while not rs.eof %>
    <table width="100%"  border="0" align="center" cellpadding="2" cellspacing="1">
      <tr align="center" bgcolor="#D6DFF7">
        <td width="5%"><%=rs("id")%></td>
        <td width="15%"><a href="../main/login.asp?usertype=admin_c&uname=<%=rs("uname")%>&pwd=<%=rs("pwd")%>" target="_blank"><%=rs("uname")%></a></td>
        <td width="37%"><% if rs("cname")<>"" then%>
          <a href="../main/company.asp?uid=<%=rs("uname")%>" target=_blank>
          <%=rs("cname")%>
          </a>
          <%else response.write"[未登录]" end if%>
          　          </td>
        <td width="22%"><% if rs("idate")<>"" then%>
            <%=rs("idate")%>
          <%else response.write"未登录" end if%></td>
        <td width="11%"><span class="forumRow">
          <% if rs("cok")<>"1" then%>
          <a href="upc.asp?uid=<%=rs("uname")%>" target=_blank>普通会员</a>
          <%else%>
          <a href="upc.asp?uid=<%=rs("uname")%>" target=_blank>收费会员</a>
          <%end if%>
        </span></td>
        <td width="10%"><a href="../main/login.asp?usertype=admin_c&uname=<%=rs("uname")%>&pwd=<%=rs("pwd")%>" target="_blank">修改</a>/<a href="Admin_Cuser.asp?del=<%=rs("uname")%>&key=<%=key%>"><font color="#000046"> 删除</font></a></td>
      </tr>
    </table>
    <% i=i+1
          rs.movenext 
          if i>=rs.PageSize then exit do 
		  loop 
          %>
    <table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#D6DFF7">
      <tr>
        <td><form action="Admin_CUser.asp" method=post>
            <div align="center"><font color="#000000">单位用户搜索：　</font>
                <INPUT                    
                  maxLength=20 size=28 name="key" style="border:1px solid #1168A9; background-color: #EBEBEB; color: #00006A; font-family: 宋体; font-size: 9pt; padding-left:4; padding-right:4; padding-top:1; padding-bottom:1" value="请输入关键字-S" onclick="Javascript:this.value='';">
              &nbsp; 　
                <input type="submit" value="搜　索" style="border:1px solid #1168A9; font-family: 宋体; font-size: 9pt; color: #00006A; padding-left:4; padding-right:4; padding-top:1; padding-bottom:1; background-color:#EBEBEB">
            </div>
        </form></td>
      </tr>
    </table></td>
  </tr>
</table>
<div align="center">
  <center>
    <table width="95%"  border="0" cellpadding="2" cellspacing="1" class="tableBorder">
      <tr>
        <td bgcolor="#638AE7"><a href="Admin_sendsysmail.asp?stype=person"></a><a href="Admin_sendsysmail.asp?stype=company"><font color="#FFFFFF">向所有单位用户发送站内信件</font></a></td>
      </tr>
    </table>
   <%if request("action")="add" then %>
    <FORM name=addnew onsubmit="return checkform();" action=admin_addcue.asp method=post>
  <table class=tableBorder width="95%" border="0" align="center" cellpadding="2" cellspacing="1">
    <tr> 
      <th height=22 colspan="8" align="center" sytle="line-height:150%">功能：新增记录</th>
    </tr>
    <tr>
      <td class=forumRowHighlight width="12%" height="19">用 户 名：</td>
      <td class=forumRow width="88%"><input type="text" name="uname" size="15" maxLength=15 style="border-style: solid; border-width: 1; padding-top: 0; background-color: #FFFFFF">
        <font color="#ff0033">　（必填）</font></td> 
      </tr>
    <tr>
      <td class=forumRowHighlight width="12%" height="19">密　　码：</td>
      <td class=forumRow width="88%"><input type="password" name="pwd" size="15" maxLength=15 style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; background-color: #FFFFFF">
        <font color="#ff0033">　（必填）</font></td> 
      </tr>
    <tr>
      <td class=forumRowHighlight height="19">重复密码：</td>
      <td class=forumRow><input type="password" name="pwd2" size="15" maxLength=15 style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; background-color: #FFFFFF">
        <font color="#ff0033">　（必填）</font></td>
      </tr>
    <tr>
      <td class=forumRowHighlight width="12%" height="2">电子邮件：</td>
      <td class=forumRow width="88%"><input type="text" name="email" size="20" maxLength=40 >
          <font color="#ff0033">　（必填）</font></td> 
      </tr>
    <tr>
      <td class=forumRowHighlight width="12%" height="8">企业用户：</td>
      <td class=forumRow width="88%"><input name="usertype" type="radio" value="company" checked>
          <font color="#ff0033">　（必填）</font> </td> 
      </tr>
    <tr> 
      <td class=forumRow height="37" colspan="2"><input type="submit" name="Submit32" value="提交" class="button"> 
        <input type="reSet" name="Submit222" value="重置" class="button"></td>
    </tr>
  </table>

            
  <br>
</form>
<%end if%> <%if request("action")="edit" then %>
        <%
              set rs=server.createobject("adodb.recordset")
              sql="select * from  company where id="&request("id")
              rs.open sql,conn,1,1 
                           %>
    <form name="form1" method="post" action="update_cuser.asp?id=<%=rs("id")%>" >
  <table class=tableBorder width="95%" border="0" align="center" cellpadding="2" cellspacing="1">
    <tr> 
      <th height=22 colspan="8" align="center" sytle="line-height:150%">功能：修改记录</th>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="19">用 户 名：</td>
      <td class=forumRow width="88%"><%=rs("uname")%></td>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="19">密　　码：</td>
      <td class=forumRow width="88%"> <input name="pwd" type="password"  class='INPUT' id="pwd" size="21" maxlength="20"> 
      </td>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="19">所属行业：</td>
      <td width="88%" class=forumRow><SELECT size=1 name=trade >
          <OPTION>请在以下列表中选择</OPTION>
          <OPTION 
              value=计算机业 <%if rs("trade") ="计算机业" then Response.Write "selected"%>>计算机业</OPTION>
          <OPTION value=电子电器、通讯设备 <%if rs("trade") ="电子电器、通讯设备" then Response.Write "selected"%>>电子电器、通讯设备</OPTION>
          <OPTION value=科研设计、科技开发  <%if rs("trade") ="科研设计、科技开发 " then Response.Write "selected"%>>科研设计、科技开发</OPTION>
          <OPTION 
              value=机电设备、电力 <%if rs("trade") ="机电设备、电力 " then Response.Write "selected"%>>机电设备、电力</OPTION>
          <OPTION value=仪器仪表、度量衡器 <%if rs("trade") ="仪器仪表、度量衡器" then Response.Write "selected"%>>仪器仪表、度量衡器</OPTION>
          <OPTION value=机械制造及设备 <%if rs("trade") ="机械制造及设备" then Response.Write "selected"%>>机械制造及设备</OPTION>
          <OPTION 
              value=各种车辆制造与销售 <%if rs("trade") ="各种车辆制造与销售" then Response.Write "selected"%>>各种车辆制造与销售</OPTION>
          <OPTION value=动力、电力 <%if rs("trade") ="动力、电力" then Response.Write "selected"%>>动力、电力</OPTION>
          <OPTION value=化学化工、生物制药 <%if rs("trade") ="化学化工、生物制药" then Response.Write "selected"%>>化学化工、生物制药</OPTION>
          <OPTION 
              value=五金矿产、金属制品 <%if rs("trade") ="五金矿产、金属制品" then Response.Write "selected"%>>五金矿产、金属制品</OPTION>
          <OPTION value=纺织、服装 <%if rs("trade") ="纺织、服装" then Response.Write "selected"%>>纺织、服装</OPTION>
          <OPTION value=农林牧副渔 <%if rs("trade") ="农林牧副渔" then Response.Write "selected"%>>农林牧副渔</OPTION>
          <OPTION value=轻工 <%if rs("trade") ="轻工" then Response.Write "selected"%>>轻工</OPTION>
          <OPTION value=房地产、建筑、装潢 <%if rs("trade") ="房地产、建筑、装潢" then Response.Write "selected"%>>房地产、建筑、装潢</OPTION>
          <OPTION 
              value=造纸、印刷、包装 <%if rs("trade") ="造纸、印刷、包装" then Response.Write "selected"%>>造纸、印刷、包装</OPTION>
          <OPTION value=木材、家具 <%if rs("trade") ="木材、家具" then Response.Write "selected"%>>木材、家具</OPTION>
          <OPTION value=广告、策划、设计 <%if rs("trade") ="广告、策划、设计" then Response.Write "selected"%>>广告、策划、设计</OPTION>
          <OPTION 
              value=新闻出版、广播电视 <%if rs("trade") ="新闻出版、广播电视" then Response.Write "selected"%>>新闻出版、广播电视</OPTION>
          <OPTION 
              value=信息咨询、人才交流 <%if rs("trade") ="信息咨询、人才交流" then Response.Write "selected"%>>信息咨询、人才交流</OPTION>
          <OPTION 
              value=金融、保险 <%if rs("trade") ="金融、保险" then Response.Write "selected"%>>金融、保险</OPTION>
          <OPTION value=交通运输 <%if rs("trade") ="交通运输" then Response.Write "selected"%>>交通运输</OPTION>
          <OPTION 
              value=邮政、电信 <%if rs("trade") ="邮政、电信" then Response.Write "selected"%>>邮政、电信</OPTION>
          <OPTION value=综合性工商企业 <%if rs("trade") ="综合性工商企业" then Response.Write "selected"%>>综合性工商企业</OPTION>
          <OPTION value=市政、公用事业 <%if rs("trade") ="市政、公用事业" then Response.Write "selected"%>>市政、公用事业</OPTION>
          <OPTION 
              value=教育事业 <%if rs("trade") ="教育事业" then Response.Write "selected"%>>教育事业</OPTION>
          <OPTION value=医疗、卫生事业 <%if rs("trade") ="医疗、卫生事业" then Response.Write "selected"%>>医疗、卫生事业</OPTION>
          <OPTION value=文化、艺术 <%if rs("trade") ="文化、艺术" then Response.Write "selected"%>>文化、艺术</OPTION>
          <OPTION value=文娱体育、办公用品 <%if rs("trade") ="文娱体育、办公用品" then Response.Write "selected"%>>文娱体育、办公用品</OPTION>
          <OPTION value=日用生活服务 <%if rs("trade") ="日用生活服务" then Response.Write "selected"%>>日用生活服务</OPTION>
          <OPTION value=商业服务 <%if rs("trade") ="商业服务" then Response.Write "selected"%>>商业服务</OPTION>
          <OPTION value=物资供销 <%if rs("trade") ="物资供销" then Response.Write "selected"%>>物资供销</OPTION>
          <OPTION value=饮食、旅游业 <%if rs("trade") ="饮食、旅游业" then Response.Write "selected"%>>饮食、旅游业</OPTION>
          <OPTION 
              value=粮油、副食 <%if rs("trade") ="粮油、副食" then Response.Write "selected"%>>粮油、副食</OPTION>
          <option value=其它 <%if rs("trade") ="其它" then Response.Write "selected"%>>其它</option>
      </SELECT></td>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="19">企业性质：</td>
      <td width="88%" class=forumRow><SELECT size=1 name=cxz >
          <OPTION 
              value="" selected>请在以下列表中选择</OPTION>
          <OPTION 
              value=行政机关 <%if rs("cxz") ="行政机关" then Response.Write "selected"%>>行政机关</OPTION>
          <OPTION value=社会团体 <%if rs("cxz") ="社会团体" then Response.Write "selected"%>>社会团体</OPTION>
          <OPTION 
              value=事业单位 <%if rs("cxz") ="事业单位" then Response.Write "selected"%>>事业单位</OPTION>
          <OPTION value=国有企业 <%if rs("cxz") ="国有企业" then Response.Write "selected"%>>国有企业</OPTION>
          <OPTION 
              value=三资企业 <%if rs("cxz") ="三资企业" then Response.Write "selected"%>>三资企业</OPTION>
          <OPTION value=集体企业 <%if rs("cxz") ="集体企业" then Response.Write "selected"%>>集体企业</OPTION>
          <OPTION value=乡镇企业 <%if rs("cxz") ="乡镇企业" then Response.Write "selected"%>>乡镇企业</OPTION>
          <OPTION 
              value=私营企业 <%if rs("cxz") ="私营企业" then Response.Write "selected"%>>私营企业</OPTION>
      </SELECT></td>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="2">电子邮件：</td>
      <td class=forumRow width="88%"><input type="text" name="email" size="20" maxLength=40 value="<%=rs("email")%>" >
        <font color="#ff0033">　（必填）</font></td>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="8">地　　址：</td>
      <td class=forumRow width="88%"><input type="text" name="address" size="30" maxLength=40 value="<%=rs("address")%>" >
        <font color="#ff0033">　（必填）</font> 
      </td>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="8">公司名称：</td>
      <td class=forumRow width="88%"><input type="text" name="cname" size="40" maxLength=40 value="<%=rs("cname")%>" > 
      </td>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="8">电　　话：</td>
      <td class=forumRow width="88%"><input type="text" name="phone" size="20" maxLength=40 value="<%=rs("phone")%>" >
        <font color="#ff0033">　（必填）</font>  
      </td>
    </tr>
    <tr> 
      <td class=forumRowHighlight width="12%" height="8">邮政编码：</td>
      <td class=forumRow width="88%"><input type="text" name="zip" size="6" maxLength=6 value="<%=rs("zip")%>" >
        <font color="#ff0033">　（必填）</font> 
      </td>
    </tr>
    <tr> 
      <td class=forumRowHighlight>备　　注： </td>
      <td class=forumRow><textarea rows="10" name="jianj" cols="72"><%=rs("jianj")%></textarea></td>
    </tr>
    <tr> 
      <td class=forumRowHighlight height="37" colspan="2"><input type="submit" name="Submit3" value="提交" class="button"> 
        <input type="reSet" name="Submit22" value="重置" class="button"></td>
    </tr>
  </table>
            
  <br>
</form>
          </tr>
        </table>
		<%end if%>
		<%
		rs.close 
          set rs=nothing 
          conn.close
          set conn=nothing %>
  </center>
</div>
</body>
</html>
