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

📄 ks.supplyadd.asp

📁 本系统是根据科汛系统编写的程序
💻 ASP
📖 第 1 页 / 共 3 页
字号:
                             <td height="25">
                               <iframe id='UpPhotoFrame' name='UpPhotoFrame' src='KS.UpFileForm.asp?ChannelID=8' frameborder="0" scrolling="No" align="center" width='100%' height='25'></iframe></td></tr>
			        <%
					  end if
					 dim I,TypeIDArr,ValidDateArr,ks_rs_t:set ks_rs_t=server.CreateObject("adodb.recordset")
					 ks_rs_t.open "select TypeID,TypeName,TypeColor From KS_GQType",conn,1,1
					 if not ks_rs_t.eof  then
					   TypeIDArr=KS_RS_T.GetRows(-1)
					 end if
					 ks_rs_t.close:set ks_rs_t=nothing
					%>
              <tr class="tdbg">
                <td width="14%" height=25 align="center"><p>交易类别:</p></td>
                <td width="86%" height=25>
<%=KS.ReturnGQType(TypeID,0)%>
                    <font color=#ff6600> *</font>  有 效 期:
                    <select class="textbox" size=1 name="ValidDate">
					 <option value="3" <% if ValidDate=3 Then Response.Write " selected"%>>三天</option>
					 <option value="7"<% if ValidDate=7 Then Response.Write " selected"%>>一周</option>
					 <option value="15"<% if ValidDate=15 Then Response.Write " selected"%>>半个月</option>
					 <option value="30"<% if ValidDate=30 Then Response.Write " selected"%>>一个月</option>
					 <option value="90"<% if ValidDate=90 Then Response.Write " selected"%>>三个月</option>
					 <option value="180"<% if ValidDate=180 Then Response.Write " selected"%>>半年</option>
					 <option value="365"<% if ValidDate=365 Then Response.Write " selected"%>>一年</option>
					 <option value="0"<% if ValidDate=0 Then Response.Write " selected"%>>长期</option>
                    </select>
                    <font color=#ff6600> *</font></td>
              </tr>
              <%
				 Response.Write KSUser.KS_D_F(8,UserDefineFieldValueStr)
			  %>
              <tr class="tdbg">
                <td height=89 align="center">信息内容:<br>
                  <font color=#800000></font></td>
                <td height=89> 
				<%If KS.C_S(ChannelID,34)=0 Then%>	
<textarea class="textbox" name="GQContent" rows=7 style="display:none" cols=65><%=Server.HtmlEncode(GQContent)%></textarea>
	<iframe id='GQContent' name='GQContent' src=../user/Editor.asp?ID=GQContent&style=0&ChannelID=9999' frameborder=0 scrolling=no width='94%' height='200'></iframe>
										<%Else
											 Dim oFCKeditor 
											 Set oFCKeditor = New FCKeditor 
											 oFCKeditor.BasePath = "../KS_Editor/FCKeditor/"
											 oFCKeditor.ToolbarSet = "NewsTool" 
											 oFCKeditor.Width = "98%" 
											 oFCKeditor.Height = "250" 
											 oFCKeditor.Value = GQContent
											 oFCKeditor.Create "GQContent" 
										End If 
											 %>			
	
                </td>
                </tr>
				 <tr class="tdbg">
                <td width="14%" height=25 align="center"><p>关 键 字:</p></td>
                <td width="86%" height=25>
<input name="KeyWords"  class="textbox" type="text" id="KeyWords" value="<%=KeyWords%>" style="width:250px; " />
                                        多个关键字请用&quot;<span style="color: #FF0000">|</span>&quot;隔开	                   </td>
              </tr>

            </table>
          </center>
      </div></td>
    </tr>
    <tr height=25>
      <td width="100%" valign="top"><table width="98%" height=121 border=0 align="center" cellspacing="1" cellpadding=2 bordercolor=#111111 bordercolorlight=#ffffff bordercolordark=#ffffff  id=AutoNumber1 style="BORDER-COLLAPSE: collapse">
          <tr class="tdbg">
            <td valign=top width="14%" height=25><p align=center>联 系 人:</p></td>
            <td valign=top width="35%" height=25><input class="textbox" size=21 name="ContactMan" value="<%=ContactMan%>">
                <font color=#ff6600> *</font></td>
            <td valign=top width="16%" height=25><p align=center>联系电话:</p></td>
            <td valign=top width="35%" height=25><input class="textbox" size=21 name="Tel" value="<%=Tel%>">
                <font color=#ff6600> *</font></td>
          </tr>
          <tr class="tdbg">
            <td valign=top width="14%" height=25><p align=center>公司名称:</p></td>
            <td valign=top width="35%" height=25><input class="textbox" size=21 name="CompanyName" value="<%=CompanyName%>"></td>
            <td valign=top width="16%" height=25><p align=center>联系地址:</p></td>
            <td valign=top width="35%" height=25><input class="textbox" size=21 name="Address" value="<%=Address%>">
                <font color=#ff6600>&nbsp; </font></td>
          </tr>
          <tr class="tdbg">
            <td valign=top width="14%" height=25><p align=center>所在省份:</p></td>
            <td height=25 colspan="3" valign=top><select name="prov" onChange="selectcityarea('prov','city','myform');" style="width:140">
                <%if Province<>"" then%>
                <option  value="<%=Province%>" selected="selected"><%=Province%></option>
                <%else%>
                <option  value="" selected="selected">==请选择省份==</option>
                <%end if%>
              </select>
              &nbsp;&nbsp;&nbsp;城市
              <select name="city" style="width:140">
                <%if city<>"" then%>
                <option  value="<%=city%>" selected="selected"><%=city%></option>
                <%else%>
                <option  value="" selected="selected">==请选择城市==</option>
                <%end if%>
              </select>
              <!--省份城市的调用开始---->
              <script language="JavaScript" src="<%=KS.GetDomain%>KS_Inc/Province.js" type="text/javascript"></script>
              <!----省份城市调用结束---->            </td>
          </tr>
          <tr class="tdbg">
            <td valign=top width="14%" height=19><p align=center>电子邮件:</p></td>
            <td valign=top width="35%" height=19><input class="textbox" size=21 name="email" value="<%=email%>">
                <font color=#ff6600>&nbsp; </font></td>
            <td valign=top width="16%" height=19><p align=center>邮政编码:</p></td>
            <td valign=top width="35%" height=19><input class="textbox" size=21 name="zip" value="<%=zip%>">
                <font color=#ff6600>&nbsp; </font></td>
          </tr>
          <tr class="tdbg">
            <td valign=top width="14%" height=19><p align=center>公司传真:</p></td>
            <td valign=top width="35%" height=19><input class="textbox" size=21 name="fax" value="<%=fax%>"></td>
            <td valign=top width="16%" height=19><p align=center>公司网址:</p></td>
            <td valign=top width="35%" height=19><input class="textbox" size=21 name="HomePage" value="<%=HomePage%>"></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td align=center width="100%" height=45><br>
          <input name="button" type=button onClick="check()" class="button" value=" 发 布 ">
        &nbsp;&nbsp;&nbsp;&nbsp;
          <input name="button" type=button class="button" value="重 填">
        <br>
               </td>
    </tr>
  </table>
</FORM></td>
    </tr>
  </table>
</CENTER>
</div>
</body>
</html>
<% End Sub

'保存
Sub GQInfoSave()
			 BigClassID   = KS.S("BigClassID")
			 SmallClassID = KS.S("SmallClassID")
			 Title        = KS.LoseHtml(KS.S("Title"))
			 PhotoUrl     = KS.LoseHtml(KS.S("PhotoUrl"))
			 Price        = KS.LoseHtml(KS.S("Price"))
			 TypeID       = KS.S("TypeID")
			 ValidDate    = KS.S("ValidDate")
			 GQContent    = Request.Form("GQContent")
			 ContactMan   = KS.LoseHtml(KS.S("ContactMan"))
			 Tel          = KS.LoseHtml(KS.S("Tel"))
			 CompanyName  = KS.LoseHtml(KS.S("CompanyName"))
			 Address      = KS.LoseHtml(KS.S("Address"))
			 Province     = KS.LoseHtml(KS.S("Prov"))
			 City         = KS.LoseHtml(KS.S("City"))
			 Email        = KS.LoseHtml(KS.S("Email"))
			 Zip          = KS.LoseHtml(KS.S("Zip"))
			 Fax          = KS.LoseHtml(KS.S("Fax"))
			 HomePage     = KS.LoseHtml(KS.S("HomePage"))
			 KeyWords     = KS.LoseHtml(KS.S("KeyWords"))
				'自定义字段
				UserDefineFieldArr=KSUser.KS_D_F_Arr(8)
				If IsArray(UserDefineFieldArr) Then
				For I=0 To Ubound(UserDefineFieldArr,2)
				 If UserDefineFieldArr(6,I)=1 And KS.S(UserDefineFieldArr(0,I))="" Then Response.Write "<script>alert('" & UserDefineFieldArr(1,I) & "必须填写!');history.back();</script>":Exit Sub
				 If UserDefineFieldArr(3,I)=4 And Not Isnumeric(KS.S(UserDefineFieldArr(0,I))) Then Response.Write "<script>alert('" & UserDefineFieldArr(1,I) & "必须填写数字!');history.back();</script>":Exit Sub
				 If UserDefineFieldArr(3,I)=5 And Not IsDate(KS.S(UserDefineFieldArr(0,I))) Then Response.Write "<script>alert('" & UserDefineFieldArr(1,I) & "必须填写正确的日期!');history.back();</script>":Exit Sub
				If UserDefineFieldArr(3,I)=8 And Not KS.IsValidEmail(KS.S(UserDefineFieldArr(0,I))) and UserDefineFieldArr(6,I)=1 Then Response.Write "<script>alert('" & UserDefineFieldArr(1,I) & "必须填写正确的Email!');history.back();</script>":Exit Sub
				Next
				End If
				
				Call AddKeyTags(8,KeyWords)
				
	    Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")		
	 IF KS.S("Action")="AddSave" Then

		  RS.Open "Select * From [KS_Class] Where ID='" & SmallClassID & "'", conn, 1, 1
		  If RS.Eof And Rs.Bof Then
		   Response.Write "<script>alert('非法参数!');history.back();</script>"
		   response.end
		  end if
		  Dim TemplateID,GQFsoType,GQFnameType
		  TemplateID=RS("Templateid")
		  GQFsoType=RS("FsoType")
		  GQFnameType = Trim(RS("FnameType"))
		  RS.Close
		  Dim Fname:Fname=KS.GetFileName(GQFsoType, Now, GQFnameType)
		  RS.Open "select top 1 * from KS_GQ where GQID is null", conn, 1, 3
		  RS.AddNew
		   RS("GQID")=KS.GetInfoID(8)
		   RS("Tid")=SmallClassID
		   RS("Title")=Title
		   RS("Price")=Price
		   RS("PhotoUrl")=PhotoUrl
		   RS("TypeID")=TypeID
		   RS("ValidDate")=ValidDate
		   RS("GQContent")=GQContent
		   RS("Hits")=0
		   RS("AddDate")=Now
		   RS("BigClassID")=BigClassID
		   RS("TemplateID")=TemplateID
		   RS("Fname")=Fname
		   RS("Recommend")=0
		   RS("KeyWords")=KeyWords
		   RS("Fax")=Fax
		   RS("Verific")=1
		   RS("UserName")=KS.C("UserName")
		   RS("ContactMan")=ContactMan
		   RS("Tel")=Tel
		   RS("CompanyName")=CompanyName
		   RS("Address")=Address
		   RS("Province")=Province
		   RS("City")=City
		   RS("Email")=Email
		   RS("Zip")=Zip
		   RS("Fax")=Fax
		   RS("Homepage")=Homepage
		   RS("OrderID")=1
		   If IsArray(UserDefineFieldArr) Then
				For I=0 To Ubound(UserDefineFieldArr,2)
					RS("" & UserDefineFieldArr(0,I) & "")=KS.S(UserDefineFieldArr(0,I))
				Next
			End If
		   RS.Update
				If FName="ID" Then
					   RS("Fname") = RS("ID") & GQFnameType
					   RS.Update
				End If
		  RS.Close:Set RS=Nothing
		  IF Cbool(KSUser.UserLoginChecked)=false Then
		   Response.Write "<script>if (confirm('信息发布成功,继续添加吗?')){location.href='KS.addSupply.asp?Action=Add';}else{top.location.href='KS.Supply.asp';}</script>"
		  Else
		    Response.Write "<script>if (confirm('信息发布成功,继续添加吗?')){location.href='KS.addsupply.asp?Action=Add';}else{location.href='KS.Supply.asp';}</script>"
		  End If
	Else
	     IF Cbool(KSUser.UserLoginChecked)=false Then
		  response.write "<script>alert('对不起,请先登录!');location.href='login.asp';</script>"
		  response.End()
		 end if
		  RS.Open "select * from KS_GQ where username='" & KSUser.UserName & "' and ID=" & KS.ChkClng(KS.S("ID")), conn, 1, 3
		   RS("Tid")=SmallClassID
		   RS("Title")=Title
		   RS("PhotoUrl")=PhotoUrl
		   RS("Price")=Price
		   RS("TypeID")=TypeID
		   RS("ValidDate")=ValidDate
		   RS("GQContent")=GQContent
		   RS("BigClassID")=BigClassID
		   RS("ContactMan")=ContactMan
		   RS("Tel")=Tel
		   RS("CompanyName")=CompanyName
		   RS("Address")=Address
		   RS("Province")=Province
		   RS("City")=City
		   RS("Email")=Email
		   RS("Zip")=Zip
		   RS("Fax")=Fax
		   RS("KeyWords")=KeyWords
		   RS("Homepage")=Homepage
		   If IsArray(UserDefineFieldArr) Then
				For I=0 To Ubound(UserDefineFieldArr,2)
					RS("" & UserDefineFieldArr(0,I) & "")=KS.S(UserDefineFieldArr(0,I))
				Next
			End If
		   RS.Update
		  RS.Close:Set RS=Nothing
		  if KS.S("comeurl")<>"" then
		  	   Response.Write "<script> alert('信息修改成功!');location.href='" & KS.S("ComeUrl")& "';</script>"
		  else
		       Response.Write "<script> alert('信息修改成功!');location.href='User_MySupply.asp';</script>"
		  end if
	End If
End Sub

		Sub AddKeyTags(ChannelID,KeyWords)
		     dim i
			 dim trs:set trs=server.createobject("adodb.recordset")
			 dim karr:karr=split(KeyWords,"|")
			 for i=0 to ubound(karr)
			 trs.open "select * from ks_keywords where keytext='" & left(karr(i),100) & "' and channelid=" & channelid,conn,1,3
			 if trs.eof then
			   trs.addnew
			   trs("keytext")=left(karr(i),100)
			   trs("channelid")=channelid
			   trs("adddate")=now
			  trs.update
		   end if
			  trs.close
		  next
		   set trs=nothing
		End Sub

End Class
%> 
<%
'==================================================
'邮箱: zxzyw@126.com		
'网站: www.zxzyw.cn
'==================================================
%>

⌨️ 快捷键说明

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