<!--#include file="../prohead.asp"-->
  <!--#include file="../checkrole.asp"-->
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
 <%
     call checkuser("sz")
 
 id=Replace_Text(request("id"))
 sql="select * from Yixiang_bizre where id="&id&""
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof then 
response.Redirect("index.asp")
response.end
else

set rs1=conn.execute("select * from Yixiang_bizre_class where id="&rs("typeid")&"")
%>
<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="151"><IMG height=32 src="../images/bizer_manage.gif" 
            border=0></TD>
              <TD width="627" background="../images/info_bg.gif">&nbsp;</TD>
        </TR>
	    </TBODY></TABLE>
	  <table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#E4F0FC" class="content_border">
  <tr>
    <td width="20%" height="35" align="center" class=m><span style="color: #ff0000">修改公司证书:</span></td>
    <td width="455" height="35"><div align="center"></div></td>
  </tr>
</table>
	  <SCRIPT language=JavaScript>
function setSubjectText(){
    if(trim(document.form.name.value) == "") {
		    alert("请先填写证书名称！");
			document.form.name.focus();
		    return false;
	}
		
	if(trim(document.form.bh.value) == "") {
		    alert("证书编号不能为空！");
			document.form.bh.focus();
		    return false;
	}
	
	if(trim(document.form.counter.value) == "") {
		    alert("证书说明不能为空！");
			document.form.counter.focus();
		    return false;
	} 
	if(trim(document.form.fzjg.value) == "") {
		    alert("请填写发证机构！");
			document.form.fzjg.focus();
		    return false;
	} 
	if(trim(document.form.fzrq.value) == "") {
		    alert("请填写发证日期！");
			document.form.fzrq.focus();
		    return false;
	} 
	if(trim(document.form.gqrq.value) == "") {
		    alert("请填写证书结束时间！");
			document.form.gqrq.focus();
		    return false;
	} 
  //  return true;
	document.form.submit()
    }
function trim(inputString) {
	   
              if (typeof inputString != "string") { return inputString; }
              var retValue = inputString;
              var ch = retValue.substring(0, 1);
              while (ch == " ") { 
	          //检查字符串开始部分的空格
                  retValue = retValue.substring(1, retValue.length);
                  ch = retValue.substring(0, 1);
              }
              ch = retValue.substring(retValue.length-1, retValue.length);
              while (ch == " ") {
                 //检查字符串结束部分的空格
                 retValue = retValue.substring(0, retValue.length-1);
                 ch = retValue.substring(retValue.length-1, retValue.length);
              }
              while (retValue.indexOf("  ") != -1) { 
	         //将文字中间多个相连的空格变为一个空格
                 retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
              }
              return retValue;
           } 	



</SCRIPT>
<script language="JavaScript" src="../../js/calendar.js"> </script>
<script language="JavaScript">
function pre_pic()
{
var pic_view;
if (document.form.picture.value=="")
{
 		alert("请选择证书图片");
 	 	return false;
	 }
ru="<%=HOPE_InstallDir%>vipcom/";
str=ru+document.form.picture.value;
 pic_view="<img src='"+str+"' onload='javascript:if(this.width>500){this.width=500;}'>";
pic.innerHTML=pic_view;
return true;
}
</script>
 <form method="POST" action="save_edit.asp" name="form"  >
 <table width="100%"  border="0" cellspacing="2" cellpadding="3" class=content_border>
<input type="hidden" name="id" value="<%=id%>"> <tr>
    <td width="20%" bgcolor="#eff7ff" class=c align="right"><FONT 
                  color=#ff0000>*</FONT> <B>证书名称：</B></td>
    <td width="424" bgcolor="#ffffde"><input name="name" type="text" id="name" value="<%=rs("name")%>" size="45" maxlength="50"> 
      <br>
      <SPAN 
                  class=note>[如:消费者最喜爱商品称号]</span></td>
  </tr>
  <tr>
    <td align="right" bgcolor="#eff7ff" class=c><FONT 
                  color=#ff0000>*</FONT> <B>证书编号：</B></td>
    <td width="424" bgcolor="#ffffde"><input name="bh" type="text" id="bh" value="<%=rs("bh")%>" size="25" maxlength="30">
      <br>
      <SPAN 
                  class=note>[如:2002Q11683R0S]</span></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#eff7ff" class=c align="right"><FONT 
                  color=#ff0000>*</FONT> <B>补充说明：</B></td>
    <td bgcolor="#ffffde"><input name="counter" type="text" id="counter" value="<%=rs("counter")%>" size="50" maxlength="50">
      <br><SPAN 
                  class=note>[如:消费者协会荣誉证书]</span></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#eff7ff" class=c align="right"><FONT 
                  color=#ff0000>*</FONT> <B>发证机构：</B></td>
    <td bgcolor="#ffffde"><input name="fzjg" type="text" id="fzjg" value="<%=rs("fzjg")%>" size="50" maxlength="50">
      <br><SPAN 
                  class=note>[如:***省保护消费者权益委员会]</span></td>
  </tr>
    <tr>
    <td width="20%" bgcolor="#eff7ff" class=c align="right"><FONT 
                  color=#ff0000>*</FONT> <B>证书类型：</B></td>
    <td bgcolor="#ffffde">	<select name="typeid" size="1" class=f11>
	 
<%
set rs1=conn.execute("select * from Yixiang_bizre_class")
do while not rs1.eof
response.write "<option value='"&rs1("id")&"'>"&rs1("type")&"</option>"&chr(13)+chr(10)
rs1.movenext
loop
rs1.close
%> 
</select>
<br><SPAN 
                  class=note>[如:按照您欲上传的证书类型选择]</span></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#eff7ff" class=c align="right"><FONT 
                  color=#ff0000>*</FONT> <B>发证时间：</B></td>
    <td bgcolor="#ffffde">
      <input name="fzrq" type="text" onFocus="calendar()" value="<%=rs("fzrq")%>" size="25" maxlength="20"> 
      <br>      <SPAN 
                  class=note>[格式如：2000-08-12]</span></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#eff7ff" class=c align="right"><FONT 
                  color=#ff0000>*</FONT> <B>到期时间：</B></td>
    <td bgcolor="#ffffde"><input name="gqrq" type="text" onFocus="calendar()" value="<%=rs("gqrq")%>" size="25" maxlength="20"> 
    <br>      <SPAN 
                  class=note>[格式如：2005-04-12]</span></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#eff7ff" class=c align="right"><FONT 
                  color=#ff0000>*</FONT> <B>选取证书：</B></td>
    <td bgcolor="#ffffde">                  
  		                                                  <!----------------------------------------------------文件上传----------------------------------------------->
<%

if issession=0 then
username=Replace_Text(request.Cookies("Yxmember"))
else
username=session("user")
end if

%>
														  
  <iframe id="d_file" frameborder="0" src="../../inc/upload.asp?tMode=6&istwo=0&utype=guser&guser=<%=username%>" width="300" height="40" scrolling="no"></iframe>
  <!---------------------------------------------------------------------------> 
    <input type="button" name="Submit2" value="预览证书效果" onClick="pre_pic()">
				  <input type="hidden" name="picture" value="<%=rs("Picture")%>">
				 <a href="<%=bizrepic%>/<%=rs("Picture")%>"  target="_blank"><img src="<%=bizrepic%>/<%=rs("Picture")%>" width="100" height="100" border="0"></a>
                          <br>
                          使用原有图片 
                          <input type="radio" name="cimg" value="1" checked>
                          | 删除原有图片重新上传 
                          <input type="radio" name="cimg" value="2"></td>
  </tr>
  <tr bgcolor="#EFF7FF">
    <td colspan="2" align="center"><span id="pic"></span></td>
    </tr>
</table>
<BR>
<TABLE cellSpacing=0 cellPadding=4 border=0>
              <TBODY>
              <TR>
                
                <TD vAlign=top noWrap><INPUT class=subbutton style="WIDTH: 160px" onclick=javascript:setSubjectText() type=button value=修改完成，确定提交！ name=Post> 
                </TD></TR></TBODY></TABLE>
				</FORM>       
  <BR><TABLE class=bdr1 cellSpacing=0 cellPadding=0 width="90%" 
              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>
                                <BR>
                                2、证书荣誉（将企业线下经营所积累的信用延伸到网上（1）“税务登记证”5分/张，5分封顶（2）经营许可类证书、产品类证书、其他证书：2分/张，10分封顶： <BR>
                                <BR>
                        3、请勿重复提交相同内容的信息，否则将不被审核通过：<BR>
                        <BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR>
    
<BR><BR></TD></TR></TBODY></TABLE>
</TABLE>
</tr>
</table>

<IMG 
height=10 src="../images/bottom.gif" width=778><BR>
<!--#include file="../end.asp"-->
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>