📄 ks.supply.asp
字号:
<font color=#ff6600> </font></td>
</tr>
<tr class="tdbg">
<td valign=top width="15%" height=19><p align=right>公司传真:</p></td>
<td valign=top width="34%" height=19><input class="textbox" size=21 name="fax" value="<%=fax%>"></td>
<td valign=top width="16%" height=19><p align=right>公司网址:</p></td>
<td valign=top width="35%" height=19><input class="textbox" size=21 name="HomePage" value="<%=HomePage%>"></td>
</tr>
<tr class="tdbg">
<td width="15%" height=30><p align=right>信息属性:</p></td>
<td colspan=3><input type="checkbox" size=21 name="IsTop" value="1"<%If IsTop="1" Then Response.Write " Checked"%>>固顶信息 <input type="checkbox" size=21 name="Recommend" value="1"<%If Recommend="1" Then Response.Write " Checked"%>>推荐信息 <input type="checkbox" size=21 name="Verific" value="1"<%If Verific="1" Then Response.Write " Checked"%>>已审核 <input type="checkbox" size=21 name="MakeHtml" value="1" Checked>立即发布 </td>
</tr>
</table>
</center>
</div></td>
</tr>
<tr class='tdbg'>
<td align=middle width="100%" height=45><br>
<input name="button" class='button' type=button onClick="check()" value=" 发 布 ">
<input name="button" class='button' type=button value=" 重 填 ">
<br>
</td>
</tr>
</table>
</FORM></td>
</tr>
</table>
</CENTER>
</div>
</body>
</html>
<%End Sub
'保存
Sub GQInfoSave()
BigClassID = KS.G("BigClassID")
SmallClassID = KS.G("SmallClassID")
Title = KS.G("Title")
PhotoUrl = KS.G("PhotoUrl")
Price = KS.G("Price")
TypeID = KS.G("TypeID")
ValidDate = KS.G("ValidDate")
GQContent = Request.Form("GQContent")
ContactMan = KS.G("ContactMan")
Tel = KS.G("Tel")
CompanyName = KS.G("CompanyName")
Address = KS.G("Address")
Province = KS.G("Prov")
City = KS.G("City")
Email = KS.G("Email")
Zip = KS.G("Zip")
Fax = KS.G("Fax")
HomePage = KS.G("HomePage")
IsTop = KS.ChkClng(KS.G("IsTop"))
Recommend = KS.ChkClng(KS.G("Recommend"))
Verific = KS.ChkClng(KS.G("Verific"))
Makehtml = KS.ChkClng(KS.G("Makehtml"))
Tid = SmallClassID
GQID = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Now(), "-", ""), " ", ""), ":", ""), "PM", ""), "AM", ""), "上午", ""), "下午", "") & KS.MakeRandom(3)
'自定义字段
UserDefineFieldArr=KSCls.Get_KS_D_F_Arr(ChannelID)
If IsArray(UserDefineFieldArr) Then
For I=0 To Ubound(UserDefineFieldArr,2)
If UserDefineFieldArr(6,I)=1 And KS.G(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.G(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.G(UserDefineFieldArr(0,I))) Then Response.Write "<script>alert('" & UserDefineFieldArr(1,I) & "必须填写正确的日期!');history.back();</script>":Exit Sub
Next
End If
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,Fname
TemplateID=RS("Templateid")
GQFsoType=RS("FsoType")
GQFnameType = Trim(RS("FnameType"))
Fname=KS.GetFileName(GQFsoType, Now, GQFnameType)
RS.Close
RS.Open "select * from KS_GQ where GQID=null", conn, 1, 3
RS.AddNew
RS("GQID")=GQID
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("FsoType")=FsoType
RS("Fname")=Fname
RS("Recommend")=Recommend
RS("Verific")=Verific
RS("IsTop")=IsTop
RS("UserName")=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.G(UserDefineFieldArr(0,I))
Next
End If
RS.Update
If FName="ID" Then
RS("Fname") = RS("ID") & GQFnameType
RS.Update
End If
Call RefreshHtml(1)
RS.Close:Set RS=Nothing
Response.Write "<script>if (confirm('信息发布成功,继续添加吗?')){location.href='KS.Supply.asp?Action=AddInfo';}else{location.href='KS.Supply.asp';}<//script>"
Else
RS.Open "select * from KS_GQ where ID=" & KS.ChkClng(KS.G("ID")), conn, 1, 3
RS("GQID")=GQID
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("Homepage")=Homepage
If IsArray(UserDefineFieldArr) Then
For I=0 To Ubound(UserDefineFieldArr,2)
RS("" & UserDefineFieldArr(0,I) & "")=KS.G(UserDefineFieldArr(0,I))
Next
End If
RS.Update
Call RefreshHtml(2)
RS.Close:Set RS=Nothing
if KS.G("comeurl")<>"" then
Response.Write "<script> alert('信息修改成功!');location.href='" & KS.G("ComeUrl")& "';</script>"
else
Response.Write "<script> alert('信息修改成功!');location.href='User_Mysupply.asp';</script>"
end if
End If
End Sub
Sub RefreshHtml(Flag)
Dim TempStr,EditStr,AddStr
If Flag=1 Then
TempStr="添加":EditStr="修改信息":AddStr="继续添加信息"
Else
TempStr="修改":EditStr="继续修改信息":AddStr="添加信息"
End If
With Response
.Write "<link href='Include/Admin_Style.CSS' rel='stylesheet' type='text/css'>"
.Write " <table style=""margin-top:15px"" align='center' width=""80%"" class='border' cellpadding=""2"" cellspacing=""1"">"
.Write " <tr align=center class=""title""> "
.Write " <td height=""28"" colspan=2 align=""center""><b>" & TempStr &"信息成功</b></td>" & vbcrlf
.Write " </tr>"
.Write " <tr class='tdbg' onMouseOver=""this.className='tdbgmouseover'"" onMouseOut=""this.className='tdbg'"" height=""25""> " & vbcrlf
.Write " <td width=""100"" align=""right""><strong>所属栏目:</strong></td>"
.Write " <td width=500>" & KS.C_C(Tid,"FolderName") & "</td>"
.Write " </tr>"
.Write " <tr class='tdbg' onMouseOver=""this.className='tdbgmouseover'"" onMouseOut=""this.className='tdbg'"" height=""25""> "
.Write " <td width=""100"" align=""right""><strong>信息主题:</strong></td>"
.Write " <td>" & Title & "</td>"
.Write " </tr>"
.Write " <tr class='tdbg' onMouseOver=""this.className='tdbgmouseover'"" onMouseOut=""this.className='tdbg'"" height=""25""> "
.Write " <td width=""100"" align=""right""><strong>交易类别:</strong></td>"
.Write " <td>" & KS.GetGQTypeName(TypeID) & "</td>"
.Write " </tr>"
.Write " <tr class='tdbg' onMouseOver=""this.className='tdbgmouseover'"" onMouseOut=""this.className='tdbg'"" height=""25""> "
.Write " <td width=""100"" align=""right""><strong>联 系 人:</strong></td>"
.Write " <td>" & ContactMan & "</td>"
.Write " </tr>"
.Write " <tr class='tdbg' onMouseOver=""this.className='tdbgmouseover'"" onMouseOut=""this.className='tdbg'"" height=""25""> "
.Write " <td width=""100"" align=""right""><strong>联系电话:</strong></td>"
.Write " <td>" & Tel & "</td>"
.Write " </tr>"
.Write " <tr class='tdbg' onMouseOver=""this.className='tdbgmouseover'"" onMouseOut=""this.className='tdbg'"" height=""25""> "
.Write " <td colspan=2 height=""28"" align=""center"">【<a href=""KS.Supply.asp?Page=" & Page & "&Action=Edit&KeyWord=" & KeyWord &"&SearchType=" & SearchType &"&StartDate=" & StartDate & "&EndDate=" & EndDate &"&ID=" &RS("ID") & """><strong>" & EditStr &"</strong></a>】 【<a href=""KS.Supply.asp?Action=AddInfo&FolderID=" & Tid & """><strong>" & AddStr & "</strong></a>】 【<a href=""KS.Supply.asp""><strong>供求管理</strong></a>】 【<a href=""" & KS.GetDomain &"Supply/ShowInfo.asp?ID=" & RS("ID") & """ target=""_blank""><strong>预览信息内容</strong></a>】</td>"
.Write " </tr>"
.Write " </table>"
'判断是否立即发布
If Makehtml = 1 Then
.Write "<div style=""margin-top:15px;border: #E7E7E7;height:296; overflow: auto; width:100%"">"
If KS.GetChannelConfig(8,"FsoHtmlTF")=0 Then
.Write "<div style=""margin-left:140;height:25px""><li>由于信息中心没有启用生成HTML的功能,所以ID号为 <font color=red>" & GQID & "</font> 的信息没有生成!</li></div> "
.Write "<div style=""margin-left:140;height:25px""><li>由于信息中心没有启用生成HTML的功能,所以ID号为 <font color=red>" & TID & "</font> 的栏目没有生成!</li></div> "
Else
.Write "<div align=center><iframe src=""Include/RefreshHtmlSave.Asp?ChannelID=8&Types=Content&RefreshFlag=ID&ID=" & RS("ID") &""" width=""98%"" height=""80"" frameborder=""0""></iframe></div>"
If KS.GetChannelConfig(8,"RefreshFlag")<>1 Then
Dim ObjRS:Set ObjRS=Server.CreateObject("Adodb.Recordset")
ObjRS.Open "Select TS From KS_Class Where ID='" & Tid &"'",Conn,1,1
If Not ObjRS.Eof Then
Dim FolderIDArr:FolderIDArr=Split(left(ObjRS(0),Len(ObjRS(0))-1),",")
For I=0 To Ubound(FolderIDArr)
.Write "<div align=center><iframe src=""Include/RefreshHtmlSave.Asp?ChannelID=8&Types=Folder&RefreshFlag=ID&FolderID=" & FolderIDArr(i) &""" width=""98%"" height=""90"" frameborder=""0""></iframe></div>"
Next
End If
ObjRS.Close:Set ObjRS=Nothing
End iF
End If
If Split(KS.GetConfig("FsoIndex"),".")(1)="asp" or KS.GetChannelConfig(8,"RefreshFlag")<>3 Then
.Write "<div style=""margin-left:140;color:blue;height:25px""><li>由于 <a href=""" & KS.GetDomain & """ target=""_blank""><font color=red>网站首页</font></a> 没有启用生成HTML的功能,所以没有生成!</li></div>"
Else
.Write "<div align=center><iframe src=""Include/RefreshIndex.asp?RefreshFlag=Info"" width=""98%"" height=""80"" frameborder=""0""></iframe></div>"
End If
.Write "</div>"
End If
End With
End Sub
Function GetFolderName(FolderID)
Dim FolderRS, I, TSArr, TempFolderName
Set FolderRS = Conn.Execute("Select TS,FolderName From KS_Class Where ID='" & FolderID & "'")
If Not FolderRS.EOF Then
TSArr = Split(FolderRS(0), ",")
For I = LBound(TSArr) To UBound(TSArr) - 1
If I = 0 Then
TempFolderName = GetSubFolderName(TSArr(I))
Else
TempFolderName = TempFolderName & " >> " & GetSubFolderName(TSArr(I))
End If
Next
GetFolderName = TempFolderName
Else
GetFolderName = ""
End If
FolderRS.Close
Set FolderRS = Nothing
End Function
Function GetSubFolderName(FolderID)
Dim FolderRS
Set FolderRS = Conn.Execute("Select ID,FolderName From KS_Class Where ID='" & FolderID & "'")
If Not FolderRS.EOF Then
GetSubFolderName = "<a href=""?ID=" & FolderRS(0) & """>" & FolderRS(1) & "</a>"
Else
GetSubFolderName = ""
End If
FolderRS.Close
Set FolderRS = Nothing
End Function
End Class
%>
<%
'==================================================
'邮箱: zxzyw@126.com
'网站: www.zxzyw.cn
'==================================================
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -