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

📄 edit.asp

📁 OA最新破解2008版 全新 破解 希望大家用着舒服
💻 ASP
字号:
<%
if instr(session("flag"),"11")=0 then
response.redirect "../login.asp"
response.end
end if
%>
<!--#include file="../../conn/dbconn2.asp" -->
<!--#include file="../../inc/safe.asp"-->
<!--#include file="../../inc/config.asp"-->
<LINK href="../style.css" rel=stylesheet type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
if Chkrequest(request("info_id")) then
info_id=request("info_id")
else
response.Redirect("../../login/chklogin.asp?login=4")
response.end
end if
sql="select * from info where info_id="&info_id&""
Set rs= conn.execute(sql)
if rs.eof then 
response.Redirect("edit.asp")
response.end
else

set rs3=conn.execute("select class_2.*,class_1.* from class_2,class_1 where class_2.typeid="&rs("typeid")&" and class_1.sortid=class_2.sortid")
%>

<FORM method="post" action="Save_Edit.asp" Name="form" enctype="multipart/form-data">
<input type="hidden" name="filepath" value="<%=newspic%>">
<input type="hidden" name="info_id" value="<%=info_id%>">
  <TABLE class=content_border cellSpacing=0 cellPadding=0 width=100% 
border=0>
    <TBODY>
        <TR>
          <TD align=middle>
		  
<SCRIPT language=JavaScript>
function setSubject(){
    if(form.p_z_Z_Type[0].checked){
        form.p_z_Z_Subject.value = "求购"
    }
    else if(form.p_z_Z_Type[1].checked){              
        form.p_z_Z_Subject.value = "供应"
        }
    else{
        form.p_z_Z_Subject.value = ""
    }
}

function setSubjectText(){
    if(trim(document.form.p_z_Z_Type.value) == "") {
		    alert("请先选择买卖方向");
			document.form.p_z_Z_Type.focus();
		    return false;
	}
	
    if((form.p_z_Z_Subject.value == "求购")&&(form.p_z_Z_Type[0].checked)){
      alert("请先填写信息主题");
      form.p_z_Z_Subject.focus();
      return false;
    }
    if((form.p_z_Z_Subject.value == "供应")&&(form.p_z_Z_Type[1].checked)){
      alert("请先填写信息主题");
      form.p_z_Z_Subject.focus();
      return false;
    }
	
	if(trim(document.form.p_z_Z_Subject.value) == "") {
		    alert("请先填写信息主题");
			document.form.p_z_Z_Subject.focus();
		    return false;
	} 
	
	if(trim(document.form.sortid.value) == "") {
		    alert("请先选择行业大类");
			document.form.sortid.focus();
		    return false;
	} 
	if(trim(document.form.typeid.value) == "") {
		    alert("请先选择行业子类");
			document.form.typeid.focus();
		    return false;
	} 
	if(trim(document.form.keywords.value) == "") {
		    alert("注意:请按左至右的顺序填写\n\n关键字最少要填一个");
			document.form.keywords.focus();
		    return false;
	} 
	if(trim(document.form.content.value) == "") {
		    alert("请先填写详细说明");
			document.form.content.focus();
		    return false;
	} 
	
		  
   var keywords = form.keywords.value;
   for(i=0;i<keywords.length;i++){keywords=keywords.replace(',',',');}
    if(form.keywords2.value){
        for(i=0;i<form.keywords2.value.length;i++){form.keywords2.value=form.keywords2.value.replace(',',',');}
        keywords+=','+form.keywords2.value;
    }
    if(form.keywords3.value){
        for(i=0;i<form.keywords3.value.length;i++){form.keywords3.value=form.keywords3.value.replace(',',',');}
        keywords+=','+form.keywords3.value;
    }    
    form.p_z_Z_Keywords.value = keywords

  //  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"> 
sall=new Array();
<%
Dim i
i=0
set rs2=conn.execute("select * from class_2")
do while not rs2.eof
%>
sall[<%=i%>]=new Array("<%=rs2("typename")%>","<%=rs2("sortid")%>","<%=rs2("typeid")%>");
<%
i=i+1
rs2.movenext
loop
rs2.close
set rs2=nothing
%>
function changeselect(selvalue)  
   { 
      document.form.typeid.length=0;  
      var selvalue=selvalue;
      var i;
      for(i=0;i<sall.length;i++) 
	{
	    if(sall[i][1]==selvalue) 
      		{
  	var newOption1=new Option(sall[i][0],sall[i][2]);
	document.all.typeid.add(newOption1);
		}
	}
}
</script> 
          <BR>
          <TABLE cellSpacing=2 cellPadding=3 width="100%" border=0>
              <COLGROUP>
              <COL class=formtop></COLGROUP>
              <TBODY>
              <TR>
                <TD class=C width="20%" bgColor=#eff7ff><FONT 
                  color=#ff0000>*</FONT> <B>买卖方向:</B></TD>
                <TD class=lh15 width="80%" bgColor=#ffffde><INPUT 
                  onclick=javascript:setSubject() type=radio <%if rs("type")="买" then response.write"CHECKED"%> value=买 
                  name=p_z_Z_Type> 买 <INPUT onclick=javascript:setSubject() 
                  type=radio <%if rs("type")="卖" then response.write"CHECKED"%> value=卖 name=p_z_Z_Type>
                  卖 &nbsp;&nbsp;&nbsp; <BR></TD></TR>
              <TR>
                <TD class=C bgColor=#eff7ff><FONT color=#ff0000>*</FONT> 
                  <B>主题:</B></TD>
                <TD class=lh15 bgColor=#ffffde><INPUT maxLength=50 size=30 
                  value="<%=rs("showname")%>" name=p_z_Z_Subject> <BR>
                          <SPAN 
                  class=note>例:“供应FF-180型直流微电机”或“求购二手发电机”,注意要带动词</SPAN> </TD>
                      </TR>
              <TR>
                <TD class=C bgColor=#eff7ff><FONT color=#ff0000>*</FONT> 
                  <B>行业:</B></TD>
                <TD class=lh15 bgColor=#ffffde>
				<select name="sortid" onChange="changeselect(document.form.sortid.options[document.form.sortid.selectedIndex].value)" size="1"> 
<option selected value="<%=rs3("sortid")%>"><%=rs3("sort")%></option> 
                            <%
set rs1=conn.execute("select * from class_1 where sortid<>"&rs3("sortid")&"")
do while not rs1.eof
response.write "<option value='"&rs1("sortid")&"'>"&rs1("sort")&"</option>"&chr(13)+chr(10)
rs1.movenext
loop
rs1.close
%>
                            
</select> 
<select name="typeid"> 
<option selected value="<%=rs3("typeid")%>"><%=rs3("typename")%></option> 
                            <%
set rs4=conn.execute("select * from class_2 where sortid="&rs3("sortid")&" and typeid<>"&rs3("typeid")&"")
do while not rs4.eof
response.write "<option value='"&rs4("typeid")&"'>"&rs4("typename")&"</option>"&chr(13)+chr(10)
rs4.movenext
loop
rs4.close
set rs4=nothing
rs3.close
set rs3=nothing
%>
                             
</select>
		
	   <BR><SPAN 
                  class=note>指您供应/求购的产品(服务)所属的行业</SPAN> </TD></TR>
              <TR>
                <TD class=C vAlign=top bgColor=#eff7ff><FONT 
                  color=#ff0000>*</FONT> <B>关键字:</B></TD>
                <TD class=lh15 bgColor=#ffffde>
				          <%
				keywords=rs("keywords")
				if keywords<>"" then
				  if instr(keywords,",")>0 then
				     kwarry=split(keywords,",")
					 if ubound(kwarry)=1 then
				           response.write"<INPUT maxLength=8 size=10 value='"&kwarry(0)&"' name=keywords>, <INPUT maxLength=8 size=10 value='"&kwarry(1)&"' name=keywords2>, <INPUT maxLength=8 size=10 name=keywords3>"
				           elseif ubound(kwarry)=2 then
				           response.write"<INPUT maxLength=8 size=10 value='"&kwarry(0)&"' name=keywords>, <INPUT maxLength=8 size=10 value='"&kwarry(1)&"' name=keywords2>, <INPUT maxLength=8 size=10 value='"&kwarry(2)&"' name=keywords3>"
                           elseif ubound(kwarry)>2 then
				           response.write"<INPUT maxLength=8 size=10 value='"&kwarry(0)&"' name=keywords>, <INPUT maxLength=8 size=10 value='"&kwarry(1)&"' name=keywords2>, <INPUT maxLength=8 size=10 value='"&kwarry(2)&"' name=keywords3>"
                     end if
				  else
				  response.write"<INPUT maxLength=8 size=10 value='"&keywords&"' name=keywords>, <INPUT maxLength=8 size=10 name=keywords2>, <INPUT maxLength=8 size=10 name=keywords3>"
                  end if
				else
				response.write"<INPUT maxLength=8 size=10 name=keywords>, <INPUT maxLength=8 size=10 name=keywords2>, <INPUT maxLength=8 size=10 name=keywords3>"
				end if
				%>
                           <INPUT type=hidden 
                  name=p_z_Z_Keywords> <SPAN 
                  class=note><BR>用产品名、行业类目做关键字,可填1-3个(每个最多8个字),尽量填全;<BR>
                          例:供应发电机,可填“发电机”“发电机及电动机”“机械”为关键字<BR>
                    </SPAN></TD>
                </TR>
              <TR>
                <TD class=C bgColor=#eff7ff><FONT color=#ff0000>*</FONT> 
                  <B>详细说明:</B></TD>
                <TD class=lh15 bgColor=#ffffde><TEXTAREA name="content" rows=10 cols=50><%=rs("content")%></TEXTAREA> 
                  <SPAN class=note><BR>说明尽可能详细,以提高信息的可信度,促使您做成生意;<BR><FONT 
                  color=red>注意:请不要在详细说明中留下公司名称和任何联系方式。</FONT></SPAN> </TD></TR>
              <TR>
                <TD class=c bgColor=#eff7ff><FONT color=#ff0000>*</FONT> 
                  <B>有效期:</B></TD>
                <TD class=lh15 bgColor=#ffffde><INPUT type=radio <%if rs("period")=10 then response.write"CHECKED"%> value=10 
                  name="period"> 10天 <INPUT type=radio <%if rs("period")=20 then response.write"CHECKED"%> value=20 
                  name="period"> 20天 <INPUT type=radio <%if rs("period")=30 then response.write"CHECKED"%> value=30 
                  name="period"> 一个月 <INPUT type=radio <%if rs("period")=90 then response.write"CHECKED"%> value=90 
                  name="period"> 三个月 <BR><SPAN 
                  class=note>选择尽可能长的有效期</SPAN></TD></TR></TBODY></TABLE><BR>
          <span class="C">补充更多信息(非必须)</span><BR>
          <BR>
            
            <TABLE cellSpacing=2 cellPadding=3 width="100%" border=0>
              <COLGROUP>
              <COL class=formtop></COLGROUP>
              <TBODY>
              <TR>
                <TD class=C vAlign=top width="20%" 
                bgColor=#eff7ff><B>产品图片:</B></TD>
                <TD class=lh15 bgColor=#ffffde>
                  <INPUT type="file" name="file" style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 title=上传产品图片资料不能大于200K。>
				  <input type="hidden" name="img" value="<%=rs("Picture")%>">
                          <br>
                          使用原有图片 
                          <input type="radio" name="cimg" value="1" checked>
                          | 删除原有图片重新上传 
                          <input type="radio" name="cimg" value="2"></TD>
              <TR>
                <TD class=C bgColor=#eff7ff><B>产品规格:</B></TD>
                <TD class=lh15 bgColor=#ffffde><INPUT 
                  style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 
                  value="<%=rs("Specifications")%>" name="Specifications"> </TD></TR>
              <TR>
                <TD class=C bgColor=#eff7ff><B>产品数量</B>:</TD>
                <TD class=lh15 bgColor=#ffffde><INPUT 
                  style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 
                  value="<%=rs("Quantity")%>" name="Quantity"></TD></TR>
              <TR>
                <TD class=C bgColor=#eff7ff><B>包装说明:</B></TD>
                <TD class=lh15 bgColor=#ffffde><INPUT 
                  style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 
                  value="<%=rs("Packaging")%>" name="Packaging"></TD></TR>
              <TR>
                <TD class=C bgColor=#eff7ff><B>价格说明:</B></TD>
                <TD class=lh15 bgColor=#ffffde><INPUT 
                  style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 
                  value="<%=rs("PriceTerms")%>" name="PriceTerms"></TD></TR></TBODY></TABLE><BR>
            <TABLE cellSpacing=6 cellPadding=3 width="95%" bgColor=#f9f9f9 
            border=0>
              <TBODY>
              <TR>
                <TD><INPUT type=checkbox <%if rs("TrustpassFlag")=true then response.write"CHECKED"%> value="<%=rs("TrustpassFlag")%>" name="TrustpassFlag">
                            希望获得"互联服务" </TD>
                        </TR>
              <TR>
                <TD><INPUT type=checkbox <%if rs("FeedbackFlag")=true then response.write"CHECKED"%> value="<%=rs("FeedbackFlag")%>" 
                  name="FeedbackFlag">
                            我将优先考虑“互联会员”的反馈 </TD>
                        </TR></TBODY></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><Br>
				
            
        </TD>
      </TR></TBODY></TABLE>
</form>
<%
end if
rs.close
set rs=nothing
rs5.close
set rs5=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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